First Person... Environmental Light Exposure Immersion?

Talk about the mods you'd like to see in Daggerfall Unity. Give mod creators some ideas!
User avatar
DunnyOfPenwick
Posts: 275
Joined: Wed Apr 14, 2021 1:58 am
Location: Southeast US

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

Post 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.

l3lessed
Posts: 1399
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

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

Post 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.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

User avatar
DunnyOfPenwick
Posts: 275
Joined: Wed Apr 14, 2021 1:58 am
Location: Southeast US

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

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

User avatar
thenameisthegame
Posts: 36
Joined: Sun Feb 19, 2023 10:02 pm

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

Post 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
Attachments
hands_magic.png
hands_magic.png (186.19 KiB) Viewed 3095 times

User avatar
DunnyOfPenwick
Posts: 275
Joined: Wed Apr 14, 2021 1:58 am
Location: Southeast US

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

Post 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.

Post Reply