XML and suggestions regarding unimplemented but planned content

Discussion in 'Suggestions' started by Null, Nov 29, 2011.

  1. Null

    Null Will Mod for Digglebucks

    So I was looking at the xml definitions of the expansions and seeing the plans for content. One of the possible worries was that there would be things like [CODE}<effect type="thisisaneffectttypewithnoattributesthatwillonlybeusedforthisonespell"/>[/CODE] simply because it is much easier to mod with more possibilities at one's disposal and not following strict hardcoded effects.

    So, these are my suggestions regarding the xml and how it should be organized.
    First are these two:
    Maverick - fire multiple bolts in one round
    Dual Pitcher - two shots in one turn

    I want to propose that this be implemented as such in a buff (or skillDB definition)
    Code:
    <!-- buff -->
    <haste amount="3" useItem="1" itemType="bolt"/>
    
    This is quite obviously haste, in that each action would not take up a turn, up to the number in amount. If amount is zero it would run until the buff ends or an invalid action is used, if it is infinite the buff ends when the haste does as well, just like invisibility ends the buff when it ends. A turn would immediately end and all uses for that round would be lost upon any action not specified. The actions could be as follows such that the existence of all of them (or for ease of use an all="1" attribute).
    • useItem - allows item use; itemType signifies the type of item, or name of item that can be used and is considered to be all if not given
    • useAbility - allows ability use; spell would hold the name of an allowed spell (or ability type maybe? such as attack or spell, whereas the first is any with attack="1" and the second something that would be muted). It would default to all
    • attack allows basic attacks and only basic attacks
    • pickupItem - allows the pick up of items, itemType again gives the type of item (of course they could use something different but it's likely they'd be only the same item)
    • putdownItem - allows the placing of items, yet again using itemType. This could be used for something like traps where one could move and place down traps multiple times in a turn.
    • interact - allows interaction with the enviroment, maybe a type attribute of some sort could be used to specify that maybe only doors, or vending machines can be interacted with etc, but it wouldn't be that necessary.
    • move - allow movement
    If all of those are true I believe that should be every last action that uses a turn.


    So before the next few, there should be an attribute in the spell tag, nextItem="1". This would be along with nextItemType and consumeNextItem. What this means is that instead of the spell being activated when you cast it from your bar, it would be activated when you select an item of nextItemType and use that, which would use the spells targeting type (I feel like this would be quite frustrating to implement though, but I can't think of any easy way to use this). So given this, the item would be selected, and a couple things could be done with it.

    First of all there'd be some effects (or maybe one).
    Code:
    <effect type="putdown"/> <!-- simply places the item at target location, this could be used to say put down traps at a distance -->
    <effect type="activateitem"/> <!-- activates the effect of the item if it has one, based on the targeted tile, but does absolutely nothing if the item does not have something it does when used (maybe it can activate traps though). This does not apply the damage on the item, only on-hit effects. I'd like to see this be able to activate self spells on targets if possible, so that something like splashing poisons on an area is possible. As an example, this could be used for something like a lob where an item is thrown overtop of enemies. You could throw a flask of something and have it splash it's poison all over where you'd throw it -->
     
    <effect type="damage" itemMult="1.5"/> <!-- this would simply hit with the stats of the item multiplied by this, whether it be bolt, thrown item, weapon or armor (because armor always has damage). If it was an allowed item, it would simply take it's base damage, multiply it by this decimal (rounded however) and add that to the damage of the spell. no other attribute would be used. If no item is selected nothing happens.
    <effect type="drain" itemMult="1"/> <!-- same thing as damage, this makes the selected item steal health -->
    
    So, as an example I had mentioned the idea of a lob. Now in order to get this to animate as a spell two things need to exist. There needs to be a way to use the object's sprite, and a way to fire a missile that doesn't stop at enemies.

    One targeting type would need to exist for this (and another for the similar spell you wanted, Impossible Shot).
    The first would be something like phasemissile (I'm not too good at naming). This would fire to the target space, ignoring all entities in the way, while still respecting walls.
    The second would be beammissile, which does the same thing, but instead hits all entities along it's path.

    The final part of this would be the animation. I would suggest something like this as a simple way
    Code:
    <anim item="1" sfx="magic"/>  <!-- just simply uses the item sprite and throws that -->
    <anim item="1" sprite="sprites/sfx/flame_buff_loop/flame_buff_loop" frames="6" framerate="50" sfx="flame" /> <!-- uses the item sprite, but additionally overlays a swirly flame effect that would almost definitely look bad but it's for example -->
    <!-- there probably would need to be some way to have the effect draw below the item but I cannot think of an elegant way to have the xml -->
    
    So if it were implemented like that, Impossible Shot would look something like this
    Code:
    <spell name="Impossible Shot" type="beammissile" nextItem="1" nextItemType="mundanebolt" consumeNextItem="1" icon="skills/skill_crossbow_small.png"> <!-- mundanebolt could probably be an itemtype to count any bolt without an on-hit effect -->
    <effect type="damage" itemMult="1"/>
    <anim item="1"/> <!-- maybe some cool glowy effect as wel -->
    </spell>
    
    That's really nice, easy to read and easy to figure out. I feel that non-mundane bolts could be used if they only were activated at the very end, in which case it'd probably be something like this which is a bit more ugly. In this case the item's data would be passed to the new spell.
    Code:
    <spell name="Impossible Shot" type="targetground" nextItem="1" nextItemType="bolt" consumeNextItem="1" icon="skills/skill_crossbow_small.png">
    <effect type="trigger" spell="Impossible Shot Bolt"/> <!-- this would ideally pass the item stats to the new skill -->
    <effect type="activateitem"/>
    </spell>
    <spell name="Impossible Shot Bolt" type="beammissile" usesNextItem="1"/>
    <effect type="damage" itemMult="1"/>
    </spell>
    
    So posting that I realize the need for a usesNextItem attribute for the info to get passed to that spell (otherwise if it's just blindly passing it it's kind of a waste).


    So onto a rather different topic of Hermeticism. Most of these deserve their own effect as there's not many variations possible. The main thing though is the mana. I'm going to suggest this.
    Code:
    <effect type="permanentbuff" secondary="1" id="1" amount="-5"/> <!-- mana -5 permanently -->
     
    <effect type="permanentbuff" secondary="1" id="0" amount="-50" percent="1"/> <!-- halve health and mana permanently -->
    <effect type="permanentbuff" secondary="1" id="1" amount="-50" percent="1"/>
    
    That's rather self-explanatory but most importantly it's reusable.

    The rune of triangulation I'll get back to.


    If you look at magical law, there's a couple spells that all use the concept of the last spell hit. Confiscate Evidence could easily be created using xml defined earlier as such (and maybe with a targetitem targeting type). Of course I don't really like this spell because it's limited usefulness but it would be defined as such.
    Code:
    <spell name="Confiscate Evidence" type="targetitem" icon="skills/placeholder32.png">
    <effect type="pickup/>
    </spell>
    
    Of course that's not really anything it's just nice to give examples of how the same xml can be used (though nothing else actually used pickup).

    The thing is most of these could use their own effects logically.Rune of Objection could easily just be an effect type of undo or something. Field of Damages is kind of odd. Of course that's probably passive but i have no idea what to think of that. Writ of Counterspelling would be nice as something like
    Code:
    <effect type="recast" bad="1"/> <!-- if bad is one it would recast the last spell from an enemy at that caster, if it was zero it would recast the last spell the player casted on the same target it was casted on, not sure why this would be useful but it'd be nice to be able to use, in fact maybe that gives an idea -->
    
    And the Rune of Triangulon could simply use this with some playerHitMissileBuff (a playerHitSpellBuff would be useful as well though), with a percent to cast a spell that returns it.



    I really hope that this doesn't seem arrogant that I would suggest something like this I just want to make sure everything is moddable and make the xml be easily mutable.
     
    Essence and dbaumgart like this.