[eWiP/eQuestion/eRequestfortheCommunityandDevelopers] Custom Special Ability to Simululate Injury.

Ok. A brief disclaimer, I'm a little drunk after our Grammy party, and (of all things, woe is me!) I'm thinking about a custom special ability that reduces Attack/Damage/Dodge proportional to amount of damage that unit has taken. I think that it might work, but have a nagging worry that some part of the process isn't currently implementable... mainly getting the calculation to run each turn. This is what it would be:

All living units are given the hidden stat IsLiving = 1. This is referenced in the calculations.

The units current health is divided by their total health. I'm pretty sure that there are tags for both of these things, but see the disclaimer.

This value is multiplied by the IsLiving stat, then against that units Attack, Damage, & Dodge stat.

My main concern is that there isn't any way to implement a passive special ability that is calculated per turn, but I have 0 experience with modding special abilities. Any help from those that know would be greatly appreciated.

Also, if this works, I'd be more than happy to release this as part of a modular mini-mod. The next step is implementing a special ability (in much the same way as this one) called Blood Curse. I think that it would be fun to have a vampirism-like ability done through a hidden stat that could be gifted by a unit that has it to a unit that doesn't. Something different but familiar.

Also, I'd welcome collaboration. I think it's both fun and useful.

Also, I think that it can hardly be denied that Mumford & Sons is one of the break-out bands of 2011.

7,552 views 14 replies
Reply #1 Top

Hopefully this will at the least be something that can be implemented when they add scripting modability.

Reply #2 Top

2011? More like 2009.

Reply #3 Top

Quoting Tydorius, reply 1
Hopefully this will at the least be something that can be implemented when they add scripting modability.

Something like this could be done with an enchantment and the SetUnitStat tag currently, so it's not out of the realm of possibility. I'm just not certain that it can be applied in non-dispellable way.

Quoting Heavenfall, reply 2
2011? More like 2009.

I suspect that you might be cool enough to know and love them in 2009, but I think that "break-out" implies popular knowing and loving.

:grin:  

Reply #4 Top

Whatever. This thread is too mainstream for me!

If you need me, I'll be out back doing things I'll stop doing if you've heard of them.

PS. Afaik calculations only happen once. I'll run a quick test.

Reply #5 Top

I've heard of everything but helping me out with my custom special ability. It's your only option for maintaining your street cred!

Reply #6 Top

Yeah, calculations only happen once when you cast the spell.

What you can do is apply multipliers instead of calculated stats. For example, a spell boosts health by 20% but takes away 20% of its defense. The effect of those multipliers are constantly recalculated. The value of the multiplier can be calculated, of course (but only once).

Reply #7 Top

Thanks for doing that.

Since I (foolishly) updated to 1.19b, I can't actually play the game to run a test. Having said that, I though that applying multipliers (albeit fractional ones) was what I was doing? I'm not sure that I'm picking up on what you're throwing down here. I guess what I don't get is how you would scale stats without invoking calculations.

Edit: Ah, ok I think I see what you mean, but without any Booles to apply those multipliers, I don't see how something like this could work, unless I'm missing something?

Reply #8 Top

Well you can't. But with multipliers, at least you could simulate permanent effects on the target. For example a werewolf bite. The unit permanentally has a bonus that gives it 20% more attack and 5 combat health regen, but loses 50% of its charisma.

The difference between a multiplier and a normal adjustment is that the multiplier will affect future changes to the stat as well.

Yes, it's not exactly what you wanted to do.

Reply #9 Top

Ah, so a custom ability that passes from unit to unit is possible, but the injury effects are not.

Reply #10 Top

LoA,

Why can't you test/play with 1.19b?

Reply #11 Top

I'm getting the "Failed to download data file" error message. And yes, I am connected to the internet, Impulse, and my firewall has an exception for Elemental.

*shrug* I can wait for 1.2. All I really wanted was to see if my performance had gone up or down.

Reply #12 Top

Did you try adding /localdataonly to your Elemental shortcut? (I believe when you hit Esc when you get that error, it will let you play).

 

Reply #13 Top

I use the following and it does not log me in and I can use my own data.zip build to test in 1.19b.

Shortcut target input: "C:\Program Files\Stardock Games\Elemental\Elemental.exe" /LOCALDATAONLY /FASTLOAD

Reply #14 Top

Ah, thanks guys. I'll give that a try.