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);

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

Posted: Fri Mar 24, 2023 6:39 am
by thenameisthegame
The only time something might appear off with the player hands is when casting a spell, perhaps more specifically the spells which don't create light. I think it's limited to the Caster Only type spells (captured in attached screenshot). I mention Caster Only since if you have a By Touch healing spell, which looks identical in animation, it'll generate light.

Maybe those spells could be made to have attached a light on cast (although I don't think the original code gave them any) by using a flash effect for them using parts of the Mage Light (Arcane color) code for the duration of the animation frames which have the 'sparkles of magic' to them.

EDIT: Enchanted weapons could be something to consider too

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

Posted: Fri Mar 24, 2023 2:37 pm
by DunnyOfPenwick
I've already added code to make the caster more visible when casting.
I haven't done anything with magic weapons yet, but the glowing nimbus depicted in the magic weapon images suggests there is light being emitted, which would foul any attempts to hide in darkness. I'll make a note to add a small light source if a magic weapon is being wielded.