I'm tinkering around with the files to create a basic mod for someone and am trying to alter the rate of energy regen (not drain). I've looked through all of larmor's properties and can't seem to find the right variable. Any suggestions?
Also, is there a global gravity value, or is that a per-map thing?
Energy regen?
Re: Energy regen?
Thanks! Found the regen value just as you said. This isn't a serious mod so no need to mess with other armor types. I simply modified the Raindance gravity since that's what we're mainly testing on.Ghost wrote:Not on my PC right now and I'm super high but I'll try to help you out.
I believe player.cs has a function called Player::OnAdd that sets the energy regen. It should be 8 by default which means all armors are regenerating energy at the same rate.
At this point you need to code individual checks for each armor.
I don't think there is a global gravity variable but I bet you could change the gravity through the mod if you want. I'm able to change sky colors and weather through tab so I'm sure it's possible.
If you need me to explain anything in more detail let me know.
Would you happen to know how to modify when a player can fire their weapon after switching to it?
Re: Energy regen?
Yeah, I was tinkering with those values but I don't think they're what I need to edit.
While I can modify the rate of fire, I only want to change how long it takes for the player to fire their weapon after switching to it. I want to keep its regular ROF after that. Every weapon has that slight delay after switching to it before you can fire.
Code: Select all
reloadTime = 0.25;
fireTime = 1.25;
spinUpTime = 0.25;
Re: Energy regen?
Maybe the fire/spin/reload time proc's when you switch to the gun. You should try to edit the values down/up and see if it works that way.
Re: Energy regen?
I don't think you can delay it without an onFire function.
For instance, you could modify each weapon's onMount event, to record the simTime, then modify each weapons onFire event to check how much time has past since onMount, and return if less than the desired time.
However, weapons with onFire events instead or predetermined projectiles are already delayed a few milliseconds, and I find this to be aggravating.
For instance, you could modify each weapon's onMount event, to record the simTime, then modify each weapons onFire event to check how much time has past since onMount, and return if less than the desired time.
However, weapons with onFire events instead or predetermined projectiles are already delayed a few milliseconds, and I find this to be aggravating.