Energy regen?

Post Reply
User avatar
Fixious
Posts: 475
Joined: Sat Nov 09, 2013 12:42 am

Energy regen?

Post by Fixious »

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?
User avatar
Fixious
Posts: 475
Joined: Sat Nov 09, 2013 12:42 am

Re: Energy regen?

Post by Fixious »

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

Would you happen to know how to modify when a player can fire their weapon after switching to it?
User avatar
Fixious
Posts: 475
Joined: Sat Nov 09, 2013 12:42 am

Re: Energy regen?

Post by Fixious »

Yeah, I was tinkering with those values but I don't think they're what I need to edit.

Code: Select all

	reloadTime = 0.25;
	fireTime = 1.25;
	spinUpTime = 0.25;
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.
User avatar
DaJ4ck3L
Crow{OZ}
Posts: 3375
Joined: Thu Jul 22, 2010 11:51 pm
Contact:

Re: Energy regen?

Post by DaJ4ck3L »

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.
Image
perrinoia
Site Admin
Posts: 3732
Joined: Sun Jul 01, 2012 7:18 pm

Re: Energy regen?

Post by perrinoia »

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