Page 2 of 2

Re: First Person... Environmental Light Exposure Immersion?

Posted: Wed Mar 15, 2023 1:20 pm
by DunnyOfPenwick
I'm guessing the Future Shock Weapons mod is only changing the weapon bitmaps and not using any custom rendering code, in which case it should work fine as is.

Re: First Person... Environmental Light Exposure Immersion?

Posted: Wed Mar 15, 2023 8:42 pm
by l3lessed
Interesting. I'll have to mess with it. I completely rebuilt the weaponManager and the fpsweapon scripts. I pretty much disable the fpsweapon script and completely redraw and replace the gui component. I had to in order to get in animation smoothing. Worse case scenario, I look the engine code and replicate it in my script for the mod.

Re: First Person... Environmental Light Exposure Immersion?

Posted: Thu Mar 16, 2023 5:42 pm
by DunnyOfPenwick
I've already made changes to the grappling hook code in The-Penwick-Papers mod (not uploaded yet) to perform shading using a callback to the First-Person-Lighting mod.. Here are some code snippets...

...in mod init:

Code: Select all

firstPersonLightingMod = ModManager.Instance.GetMod("First-Person-Lighting");
...added a public method to do the callback:

Code: Select all

/// <summary>
/// Attempts to get the player tint from the 'First-Person-Lighting' mod.
/// </summary>
public Color GetPlayerTint()
{
	Color playerTint = Color.white;

	if (firstPersonLightingMod == null || !firstPersonLightingMod.IsReady)
		return playerTint;

	firstPersonLightingMod.MessageReceiver("playerTint", null, (string message, object data) =>
	{
		playerTint = (Color)data;
	});

	return playerTint;
}

...and called it in the grappling hook OnGUI() method:

Code: Select all

    Color playerTint = ThePenwickPapersMod.Instance.GetPlayerTint();
    DaggerfallUI.DrawTextureWithTexCoords(position, texture, animRect, true, playerTint);