Jump to content

Mod to make NPCs use lanterns more when roaming


falselight
 Share

Recommended Posts

In my experience sometimes NPCs don't use their lanterns even when it's already dark out. I use the darker nights mod and this was especially glaring during the mission with Charles where you scout out a new campsite, just before Chapter 3. I don't care how good of a tracker he is, he for damn sure can't do it in the pitch black. Is there a mod that exists that encourages NPCs to use lanterns more? If not, what file(s) do I need to edit to make it happen?

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

You can create a simple script to give lantern to nearby peds only at night, using ScriptHook, works good
Like this:

get nerby peds
if(peds is walking) <-Give only to walking peds
     if(hour > 20 && hour < 5)
          give lantern

Edited by Breso
Link to comment
Share on other sites

  • 4 months later...

So, anyone?

 

I'm using Darker Nights too, and I think this lantern mod is really important, especially during combat when enemies can easily spot you in the dark.

 

I've been searching through the wiki, but it's really tough when you don't know the exact names of the functions you need, and it seems that there hasn't been much update in the decoding of hashes since last year. I even sketched out some logic I think is a good starting point, but i wasn't able to find the right functions in the database:

 

if (time > 20 && time < 5)
    GET_PED();
        if (PED_IS_INSIDE_BUILDING) return;
        if (PED_IS_NEAR_ARTIFICIAL_SOURCE_OF_LIGHT) return;
        if (PED_IS_HIDING) return;
        if (PED_IS_IN_VEHICLE)
        	GET_VEHICLE_FROM_PED()
        		return VEHICLE_SET_LANTERNS_ON();
        else if (PED_IS_USING_ITEM_OR_WEAPON)
            return PED_STASH_LANTERN()
        else
            return PED_USE_LANTERN()

 

It's also important to reduce NPCs' ability to see the player when the player is in the dark.

Link to comment
Share on other sites

  • 5 months later...
On 7/1/2023 at 11:51 AM, falselight said:

No, but I plan on seeing about that sometime soon. Gotta learn ScriptHook though. Unless someone else ITT has already got around to it?

I started doing it but withour proper scripthook docu it's really really hard. If some one intrested in doing this mod, let's do it together.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...