Jump to content

Flashlight Tweak


Paapi

Recommended Posts

Hello guys

 

I just start to having fun with the modding, and need a bit help. I wanted to make the flashlight a bit more realistic, for example battery drainage (use it for 5 min and than 1 min recharge or use a battery item to recharge instantly)

Link to comment
Share on other sites

Didn't even realize that the game had a flashlight, mostly all we can do atm is tweak the numbers, that is if you're not insanely familiar with the code and hooks, wait for the modkit to come out if you want it to have new features.

if you want to tweak whatever options exist, it should be in /scripts/inventory/inventory_special

Link to comment
Share on other sites

Paapi I was looking to modify the flashlight for different reasons and in a different way than you, however since I found this thread on an initial search before going digging myself I thought I'd post back.

 

I achieved my initial objective immediately (changing the light angle, color etc) so I messed around further based on what you actually wanted.

 

It looks like you can get pretty close quite easily, at-least, on the regen. You'd likely have to modify an addition file / objects somewhere to make it actually use batteries though. Maybe have a look some crafting stuff that uses batteries and see if you can surmize how to translate that into something the flashlight would use? If you do that post back so there's info. I haven't looked at craft or blueprint stuff at all.

 

Anyway, for something to get you started look in inventory.scr and find Flashlight_Basic and change the following:

 

 

// DepletionTime(2419200.0);
DepletionTime(5.0);

 

// RegenerationTime(0.0);
RegenerationTime(1.0);

 

// CanWorkWhenFullyDrained(true);
CanWorkWhenFullyDrained(false);

 

// RegenTimeFullyDrained(0.0);
RegenTimeFullyDrained(5.0);

 

With the above in my game the flashlight turns on normally, lasts for 5 seconds and then has a nice dimming as it goes out. It recharges (regen) and then works again for 5 seconds etc.

 

I didn't mess with this further since this gets close to the effect you described. You should be able to mess with these (and some others near them) to get really close to whatever you're trying to do. Only the addition of using actual batteries appears more involved. That might be simple too but I don't have experience (yet) with messing around with the games items and modules. It may very well be possible to simply add a module statement somewhere to make the flashlight use it. No idea just a guess on that.

 

 

I'm using the Data3.pak method to apply everything I'm doing currently. I just leave a Data3.pak file open that I'm working on and when I update any files I drop the data folder into it then copy the updated file over to the games main location for them. Works fine.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...