[Modding][Suggestion] New XML features.

Show modders some love, they'll reward you greatly in return!

By on September 3, 2010 5:12:08 PM from Elemental Forums Elemental Forums

Werewindlefr

Join Date 03/2007
+27

I've been working on the Elemental XMLs a bit and tried to introduce a few features to the game (abilities and spells, for instance). However, quite a few basic features could not be implemented with the XML tags that currently exist. I think this could be fixed with a mild-to-moderate amount of work, although since I haven't seen what the engine actually looks like in the C++ code, I cannot tell for sure.

Here's a list of what could be useful for us XML sculptors:

-Condition pre-requisites: these would check that a certain UnitStat (including a custom one) has a certain value (or doesn't, or is below/above a certain value). This could be useful when checking that the target is mounted (spearmen) or is a dragon (dragonslayers), for instance. This is also a good way to prevent "buff stacking" for those who'd like abilities that "buff" another target to not be stackable.

-Triggers: Tags that allow a certain effect to happen when *something* happens in the battle (or on the map), the "something" depending on the map. Very useful for passive abilities. We need this! (but it's the most time consuming part of my list, I'd say)

  • Secondary effects that are triggered whenever the target is hit. Like the "procs" in MMOs. for instance, you could have a sword that has a chance to deal additional damage. Or that starts a poison effect on the target. Or lowers one of its attributes. 
  • Effects that are triggered when an enemy enters or leaves a square surrounding the unit/item/prop. Think "attack of opportunity" for those of you that played D&D3 (for the others: attacks you can make when someone tries to move past you without paying attention to you).
  • Effects that are triggered when being attacked. Or missed. Or when you miss. Or when you dodge. Or when you skip turn. Or when a unit dies on the battlefield. Or when you kill a unit on the battlefield.

-A tag that gives us access to the last damage dealt or the last damage dealt/damage received. We can use it for life-leech/retribution/ablative armors-style  abilities and spells.

-Give us a way to remove a piece of equipment or a spell/effect/ability for a small time. Used in disarm/dismount/disenchant.

-Introduce a way for us to roll 1DN/xDN in the calculate tags. We can use it for effects that trigger randomly.

 

I don't know if those requests are realistic, but they'd improve the moddability of the game by leaps and bounds, at least until the python API comes along. But the latter isn't going to be here anytime soon as I understand it, so throwing us a bone could be nice. 

 

Any other suggestions, Elemental players?

Locked Post 8 Replies +2
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
September 3, 2010 5:37:22 PM from Elemental Forums Elemental Forums

A document outlining what all the current xml elements represent and how they're used in the game would be helpful.  Surely there must have been some design doc that was shared internally.  Would love to get my hands on something like that.

An option to override existing values from the core files.


Example (borrowing from Frogboy's New Faction example):

<RaceConfigs>
    <RaceConfig InternalName="Froglers">
        <LeaderName override="true">Gravedancer</LeaderName>
  </RaceConfig>
</RaceConfigs>


 

Reason for Karma (Optional)
Successfully updated karma reason!
September 3, 2010 8:41:52 PM from Elemental Forums Elemental Forums

I would also like to see the ability to list multiple prerequisites for a unit item with an AND condition along with the current OR logic.  In other words, It would be nice if my Mega Bow of Thunder requires Advanced Archery AND Arcane Weapons.  Right now, if I list both techs as prerequisites, attaining either tech gives me the bow.

 

Oh, and I agree with Gravedancer.

Reason for Karma (Optional)
Successfully updated karma reason!
September 3, 2010 9:14:16 PM from Elemental Forums Elemental Forums

Something like the following could be a solution for allowing us to specify AND or OR conditions.

<Prereqs>
    <Criteria>
        <Type>AND</Type>
            <Prereq>
                <Type>Tech</Type>
                <Attribute>Advanced_Archery</Attribute>
                <Value>0</Value>
            </Prereq>
            <Prereq>
                <Type>Tech</Type>
                <Attribute>Arcane_Weapons</Attribute>
                <Value>0</Value>
            </Prereq>
    <Criteria>
</Prereqs>


Another variation making use of attributes, here's an example using "OR".


<Prereqs Criteria="OR">
    <Prereq>
        <Type>Tech</Type>
        <Attribute>Advanced_Archery</Attribute>
        <Value>0</Value>
    </Prereq>
    <Prereq>
        <Type>Tech</Type>
        <Attribute>Arcane_Weapons</Attribute>
        <Value>0</Value>
    </Prereq>
</Prereqs>

Reason for Karma (Optional)
Successfully updated karma reason!
September 4, 2010 1:00:55 AM from Elemental Forums Elemental Forums

This AND/OR (we need a NOT, too!) is indeed an important issue. I really hope devs will understand its importance.

Reason for Karma (Optional)
Successfully updated karma reason!
September 4, 2010 8:46:37 AM from Elemental Forums Elemental Forums

Good suggestions guys!  Right now, modding is pretty limited.  It's hard to fix things without just making them overpowered.

Reason for Karma (Optional)
Successfully updated karma reason!
September 4, 2010 11:18:23 AM from Elemental Forums Elemental Forums

For spell modding, some variables are not accessible.

For instance, you cannot do a proper AOE spell because the spell cannot multiply the damage by the current (or max) number of members in a unit. Only total HP are available.

An AOE spell that hits a squad of 4 would do 4 times as much damage.  It's the whole point of having AOE spells.

 

Hitting a single soldier for 20 damage might be very effective but when there are 15 in the unit you barely scratch it.

That's okay for a single target spell, and those should have other benefits, like being harder to resist/defend against. A sniper spell for single, powerful units, so to speak.

I've used the firebolt vs fireball analogy in another thread before. Usually, the bolt is implemented as a single target spell while the ball is AOE in some shape or form. Of course it's a fantasy cliché but those help in creating immersion because the mind automatically connects this to all kinds of out-of-game experiences, making the otherwise unimaginative spell more... colourful.

 

Damage calculations (1Dn) are said to getting an overhaul anyway so I'd just ignore that issue until I know what it end up being.

 

Another item would be accuracy. A mighty fiery meteor hurtling from the skies might not allow for the fine control to squarely hit a little spider.
Give "physical" combat spells a chance to scatter, with a reduced AOE in the vicinity.

These should be separate, like:

  • chance of a direct hit:  60 %
  • scatter distance if not a direct hit: 1 square
  • AOE damage reduced by 50 % per square off the center

This would make the use of seriously heavy artillery... dangerous... when your own troops are in melee range. =P
You would use something smaller scaled and more controllable in those instances - unless you decide it's warranted...

Reason for Karma (Optional)
Successfully updated karma reason!
September 4, 2010 12:38:43 PM from Elemental Forums Elemental Forums

That second part would be doable with the modifications I requested:

-Create a custom UnitStat called "size".

-Roll a random "chance for the spell effect to take place" based on that UnitStat.

Reason for Karma (Optional)
Successfully updated karma reason!
September 4, 2010 3:07:47 PM from Elemental Forums Elemental Forums

Quoting Robert Hentschke,
For spell modding, some variables are not accessible.

For instance, you cannot do a proper AOE spell because the spell cannot multiply the damage by the current (or max) number of members in a unit. Only total HP are available.


That's not quite true, CDATA expressions can reference TroopCount, though admittedly i haven't tested it, but it is there atleast. Check RangedAttackSpells.xml

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108433  walnut3   Server Load Time: 00:00:00.0000297   Page Render Time: