[eRequest for the Developers] My Spell Modding Wishlist

A more specific version of the general requests for modding changes to developers.

1)Allow substitution of models. This would allow a variety of transformation spells.

2)Allow Calculate to reference resource values. This would allow for adding custom shard type power increases. If I understand the code currently, the influence of shard posession on damage is hard coded. A big limitation for those of us who want to expand the magic system.

3)Allow a spell effect that takes player posession of units.

4)Allow for a per-round calculation of damage. Allows for oh-shit! spells that would pressure you to win the battle in a timely manner. And lots of other things.

5)Allow the calculate function for resource-increasing spells.

6)Allow for more than two values to be integrated into the calculate function. This kind of limits the complexity of spells.

Anyone else have any specific spell-related requests? I apologize if I'm stepping on any toes by making a seperate thread for this.

5,501 views 10 replies
Reply #1 Top

The ability to use the calculate function outside of spells!

Reply #2 Top

I belive that 2 and 4 are already possible. Some spells already reference the shards for power increases, have a look through the spell book files. There is a bleed ability that does damage per round you can have a look at. From memory you add <Duration>3</Duration> and <Perround>1</Perround> to the game modifier and it will then apply the effects from that game modifier each round for 3 (or whatever) rounds.

6 would be nice but you can get round it by creating intermediate variables see the tutorial by  here https://forums.elementalgame.com/394151.

 

edit: just re-read point 4, not sure if per round will re-calculate the damage, if it doesn't then I agree it would be nice to have as well.

Reply #3 Top

Quoting Nimbyjester, reply 2
I belive that 2 and 4 are already possible. Some spells already reference the shards for power increases, have a look through the spell book files. 
End of Nimbyjester's quote

Right. But, the code inside the Calculate tag looks like this:

[UnitStat_NumAirShards]

...which appears to be hard-coded. So, you couldn't say... increase prestige in a city equal to the amount of food you have available for X turns. Or code in custom shard damage effects.

Reply #4 Top

Quoting Nimbyjester, reply 2
I belive that 2 and 4 are already possible. Some spells already reference the shards for power increases, have a look through the spell book files. There is a bleed ability that does damage per round you can have a look at. From memory you add <Duration>3</Duration> and <Perround>1</Perround> to the game modifier and it will then apply the effects from that game modifier each round for 3 (or whatever) rounds.

6 would be nice but you can get round it by creating intermediate variables see the tutorial by Gnilbert here https://forums.elementalgame.com/394151.
End of Nimbyjester's quote

 

When in tactical combat, a duration of 3 maybe isn't what you would assume it to be. You have to include the enemy's turns. So if you wanted an effect to last a FULL 3 rounds (between your turns and the enemy's), you'd put a duration of 6. I'm not sure where you got the perroud thing, I haven't seen that anywhere.

I could be mistaken here, but what I believe he means is to RE-calculate every round. Right now, I believe it runs the calculation once, then repeats that result for the number of durations.

 

Reply #5 Top

I'm going to have to have a look into this now, you've peaked my curiosity! I've not tried using the shard values outside of combat. Most of the stuff I've done is all inside tactical combat. I'd be surprised if there wasn't a way to get at the actual resource values though.

Reply #6 Top

Wasn't PerRound was PerTurn

 

Edit: Did a quick test using per turn. The damage calculation was re calculated each turn during the enemies round. I attacked doing 3 damage, enemies round he takes 3 damage again, next round I skip my go, enemies round he takes 2 damage etc. So initially you essentially do two lots of damage from two calculations.

Game modifier I used:

Code: xml
  1.     &lt;GameModifier InternalName="InfernalModifier"&gt;
  2.       &lt;ModType&gt;Unit&lt;/ModType&gt;
  3.       &lt;Attribute&gt;DefendableDamage&lt;/Attribute&gt;
  4.       &lt;Calculate InternalName="DamageFromStr" ValueOwner="CastingUnit"&gt;
  5.         &lt;Expression&gt;&lt;![CDATA[[UnitStat_Strength] * .1]]&gt;&lt;/Expression&gt;
  6.       &lt;/Calculate&gt;
  7.       &lt;Calculate InternalName="ModifiedAttack" ValueOwner="CastingUnit"&gt;
  8.         &lt;Expression&gt;&lt;![CDATA[[UnitStat_Attack] / [DamageFromStr]]]&gt;&lt;/Expression&gt;
  9.       &lt;/Calculate&gt;
  10.       &lt;Calculate InternalName="BaseDamage" ValueOwner="CastingUnit"&gt;
  11.         &lt;Expression&gt;&lt;![CDATA[[UnitStat_NumFireShards] + [ModifiedAttack]]]&gt;&lt;/Expression&gt;
  12.       &lt;/Calculate&gt;
  13.       &lt;Calculate InternalName="DamageFromInt" ValueOwner="CastingUnit"&gt;
  14.         &lt;Expression&gt;&lt;![CDATA[[UnitStat_Intelligence] * -.1]]&gt;&lt;/Expression&gt;
  15.       &lt;/Calculate&gt;
  16.       &lt;Calculate InternalName = "Value" ValueOwner="CastingUnit"&gt;
  17.         &lt;Expression&gt;&lt;![CDATA[[DamageFromInt] * [BaseDamage]]]&gt;&lt;/Expression&gt;
  18.       &lt;/Calculate&gt; 
  19.  &lt;Duration&gt;5&lt;/Duration&gt;
  20.  &lt;PerTurn&gt;1&lt;/PerTurn&gt;
  21.     &lt;/GameModifier&gt;

Reply #7 Top

You're using DefendableDamage. You can't draw any conclusions from that. use TrueDamage CurHealth.

Reply #8 Top

I could be mistaken here, but what I believe he means is to RE-calculate every round. Right now, I believe it runs the calculation once, then repeats that result for the number of durations.
End of quote

Yeah, this is what I mean. Even though you're getting different values each turn, it's essentially running the same calculations each turn.

Reply #9 Top

Just tested changing the damage to CurHealth from DefendableDamage has the same effect, it is re-calculated each round.

Can't get calculate to use any attributes at all though when dealing with Resources. The game doesn't even want to load when I try it :/ ..

Reply #10 Top

Quoting LightofAbraxas, reply 8

I could be mistaken here, but what I believe he means is to RE-calculate every round. Right now, I believe it runs the calculation once, then repeats that result for the number of durations.


Yeah, this is what I mean. Even though you're getting different values each turn, it's essentially running the same calculations each turn.
End of LightofAbraxas's quote

So what you want is for in my example, if your attack was increased half way through the duration then the next damage calculation should take that into account?

 

Edit: Just tested that and although the damage does change each round it is calculated off the original stats each time. Increased attack by 5000 and it did nothing to the damage during the duration but did for new attacks.

Looks like we need a "Sustained" modifier, so you can have a spell thats overall power is unchanged once cast and sustained powers that will update the attribute values used each duration. So basically everything on your list! :-"