Disable dynamic EMP time - Page 2

Disable dynamic EMP time

Requests for features in the spring code.

Moderator: Moderators

Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Disable dynamic EMP time

Post by Tobi »

Changed it.

Now unit gets stunned if it paralyzeDamage > maxHealth, and paralyzeDamage shouldn't get canceled by low-paralyzeTime weapons anymore.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Disable dynamic EMP time

Post by Argh »

Ok, so now weapon damage table --> armorType --> damage --> paralyzeDamage + damage? Just flat out?

I wrote an instant paralyzer variant in Lua:

Code: Select all

	if paralyzer then
		 local h,mH,pD,cP,bP = Spring.GetUnitHealth(unitID)
		Spring.Echo("h = "..h,"mH = "..mH,"pD = "..pD,"cP = "..cP,"bP = "..bP)
		if pD < mH then
			return damage + mH
		else
			return damage + pD
		end
	end
First hit == paralysis. Second hit == paralysis + current paralyzeDamage.

Only problem is that the treatment of the paralyze time is funky. On the first hit, a weapon doing 1000 damage seems to do roughly 1 second of paralyze.

On the second hit, it's nearly 7 seconds, due to
Each slow update (every 16 frames) paralyzeDamage is decreased with maxHealth * (16/30/40) = maxHealth*0.025*16/30.

This isn't going to produce very logical behavior- things with lots of hitpoints, even if set up to be extra-vulnerable to paralysis, become free of paralysis faster, arbitrarily.

It should just ramp down 1000 units / second, so that building timing and balance is straightforward. 1000 paralyze damage == 1 second game-time. If people want to make Units recover faster / slower than that, they can use Lua to easily manipulate the logic then.

Then you can get rid of all the extra cruft, like having a timing variable in the WeaponDef (or just treat that as an override- if defined, ignore damage, multiply that number by 1000).

Or... even better yet... fix it however you want to, but let us turn that whole system off with a mod option. Now that I know how it works, I'd rather do it in Lua.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Disable dynamic EMP time

Post by TheFatController »

So just to get my head around all that, if a BLADEWING_LYZER has "paralyzetime=7;", will there still be circumstances where a unit can be paralyzed for longer than 7 seconds?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Disable dynamic EMP time

Post by Argh »

Yes. Because the proposed change means that it's the step-down relationship between maxHealth and time that now governs how fast that paralyzer damage drops back down below maxHealth.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Disable dynamic EMP time

Post by Tobi »

TheFatController wrote:So just to get my head around all that, if a BLADEWING_LYZER has "paralyzetime=7;", will there still be circumstances where a unit can be paralyzed for longer than 7 seconds?
With only my change the only case in which this can happen is if it is being / has just been paralyzed by another weapon, which has paralyzeTime > 7 seconds.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Disable dynamic EMP time

Post by Tobi »

Argh wrote:Only problem is that the treatment of the paralyze time is funky. On the first hit, a weapon doing 1000 damage seems to do roughly 1 second of paralyze.

On the second hit, it's nearly 7 seconds, due to
Each slow update (every 16 frames) paralyzeDamage is decreased with maxHealth * (16/30/40) = maxHealth*0.025*16/30.

This isn't going to produce very logical behavior- things with lots of hitpoints, even if set up to be extra-vulnerable to paralysis, become free of paralysis faster, arbitrarily.

It should just ramp down 1000 units / second, so that building timing and balance is straightforward. 1000 paralyze damage == 1 second game-time. If people want to make Units recover faster / slower than that, they can use Lua to easily manipulate the logic then.

Then you can get rid of all the extra cruft, like having a timing variable in the WeaponDef (or just treat that as an override- if defined, ignore damage, multiply that number by 1000).

Or... even better yet... fix it however you want to, but let us turn that whole system off with a mod option. Now that I know how it works, I'd rather do it in Lua.
The way you suggest it units with more health would stay paralysed much longer. Currently, independent of hitpoints, effective remaining paralysis time is reduced with 1 second every second.

The unit does 1 second paralyze damage on first shot because it first has to waste damage on getting the unit paralyzed in the first place. This is the first maxHealth damage. In your example the remaining damage happens to be good for 1 second of paralyzation. The second shot can be fully used to add time, so this happens to add 7 seconds. This goes up to the time specified by paralyzeTime in the weapon.

So if you want weapons that pretty much instantly do the full paralyzeTime of paralyzation, just make damage for paralyzation weapons a few orders of magnitude higher then damage for normal weapons.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Disable dynamic EMP time

Post by TheFatController »

Tobi wrote:
TheFatController wrote:So just to get my head around all that, if a BLADEWING_LYZER has "paralyzetime=7;", will there still be circumstances where a unit can be paralyzed for longer than 7 seconds?
With only my change the only case in which this can happen is if it is being / has just been paralyzed by another weapon, which has paralyzeTime > 7 seconds.
Image
Excellent.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Disable dynamic EMP time

Post by Pxtl »

Personally, I liked the "damaged units are more easy to stun" behavior, but I agree that "thus, dealing damage effectively also deals stun-damage" side-effect was undesirable.

Either way, since my modding projects are in torpor, I'm hardly a stake-holder.

Anybody know the OTA behavior?
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Disable dynamic EMP time

Post by Gota »

Was there emp in OTA?
In any case IMO hurt units should not become paralyzed faster.
I think it makes more sense for the paralyze to use the units full hp as a base.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: Disable dynamic EMP time

Post by Pxtl »

Gota wrote:Was there emp in OTA?
In any case IMO hurt units should not become paralyzed faster.
I think it makes more sense for the paralyze to use the units full hp as a base.
I don't know whether to laugh or cry at reading this.

Yeah, there were paralyze units in OTA. The Arm spider and tactical missile launcher building were stun units.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Disable dynamic EMP time

Post by Google_Frog »

Please make this optional. CA emp is balanced around damaged units being easier to paralyze and the ability to keep units paralyzed by damaging them.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Disable dynamic EMP time

Post by Gota »

Pxtl wrote:
Gota wrote:Was there emp in OTA?
In any case IMO hurt units should not become paralyzed faster.
I think it makes more sense for the paralyze to use the units full hp as a base.
I don't know whether to laugh or cry at reading this.

Yeah, there were paralyze units in OTA. The Arm spider and tactical missile launcher building were stun units.
I support laughing if you must pick one :)
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Disable dynamic EMP time

Post by TheFatController »

Google_Frog wrote:Please make this optional. CA emp is balanced around damaged units being easier to paralyze and the ability to keep units paralyzed by damaging them.
I'm sure you'll have no problem recreating the old functionality with lua as BA had to do with the reclaim change.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Disable dynamic EMP time

Post by Google_Frog »

TheFatController wrote:
Google_Frog wrote:Please make this optional. CA emp is balanced around damaged units being easier to paralyze and the ability to keep units paralyzed by damaging them.
I'm sure you'll have no problem recreating the old functionality with lua as BA had to do with the reclaim change.
Which change? There's lots of options about reclaim in modrules so you should be able to find it there.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: Disable dynamic EMP time

Post by TheFatController »

Where they replaced the crazy reclaim formula with the sensible one, but as BA was balanced on the crazy formula it had to be reinstated with a Gadget, no modrule was provided to access the old formula.
User avatar
Otherside
Posts: 2296
Joined: 21 Feb 2006, 14:09

Re: Disable dynamic EMP time

Post by Otherside »

Google_Frog wrote:Please make this optional. CA emp is balanced around damaged units being easier to paralyze and the ability to keep units paralyzed by damaging them.
Do not want :/

EMP is overpowered because of the stupid perma stun
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Disable dynamic EMP time

Post by Neddie »

If it is overpowered, it is because it wasn't balanced correctly given the design. This mechanic can be balanced as well.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Disable dynamic EMP time

Post by Google_Frog »

TheFatController wrote:Where they replaced the crazy reclaim formula with the sensible one, but as BA was balanced on the crazy formula it had to be reinstated with a Gadget, no modrule was provided to access the old formula.
There's a difference. The old crazy reclaim formula was just a holdover from TA.

The different EMP behaviors on the other hand are based on simple formulas and each have their merits for different game designs.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Disable dynamic EMP time

Post by imbaczek »

you can increase/decrease the amount of paralyze damage in UnitPreDamaged.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Disable dynamic EMP time

Post by Gota »

Maybe CA should think about rebalancing emp so they are balanced with this new mechanic since the one that is currently implemented is far less intuitive.
Post Reply

Return to “Feature Requests”