You must be logged in to post messages.
Please login or register

AoW2/SM Mod Making
Moderated by Swolte, Ziggurat Mason

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Customized Enchantment Abilities
posted 11-22-06 04:05 AM EDT (US)   
Some experiments with fields of .Enchantment Data property of EnchantmentAbility class shows new Mod/Map-design possibilities.

This object's fields are:
0x14 ? DWord; usually =-1 (some 0) in res/lib, >0 in-game enchantments, probably EnchantmentID
0x15 Upkeep Mana
0x16 Upkeeper; Player #
0x17 Cast Mana
0x18 Origin; {[Innate], Spell, Ench.Hall, ?Domain Ench., Innate}

AoWSMEd sets 0x14 and 0x18, and all those properties are set when EnchantmentAbility is created by spell, but there's no reason why we can't set any correct values manually.
Dispel Magic ability works even with EnchantmentAbility instances defined in UnitResource, if target ability has .Origin = Spell = 1. .Cast Mana seems to affect Dispel Magic success probability (never missed 1 yet). When Steal Enchantment is used against it, transferred Enchantment Ability has new .Enchantment ID value appointed and .Upkeeper assigned (thus enchantment appears in player's Magic/Active list) and retains original .Cast Mana and .Upkeep Mana (BTW, Magic/Active list shows 0 upkeep cost correctly).


And even I make no pretence Of having more than common sence - R.W.Wood
The secret half a country keeps, the whisper in the lane... - R.Kipling
[UPatch 1.4 Team] * STLpack
Replies:
posted 11-22-06 05:00 AM EDT (US)     1 / 4  
Let's continue:
If non-enchantment ability's ClassID is tweaked to EnchantmentAbility and .Origin = Spell is assigned, it can be dispelled correctly, but using Steal Enchantment on it crashes AoWSM (maybe method creates a normal instance of given ability with its normal class and then tries to assign .Enchantment Data property not existing in the destination object).
There's a trouble: Enchantment will be restored from UnitResource when game is saved and loaded. Fortunately,
this does not occur if a dispelled unit does not survive to be saved.

Conclusion:
Abilities which normally belong to EnchantmentAbility class (or its descendant ResurganceAbility) can be made dispellable while built-in, with dispel resistance customizable as .Cast Mana value to make unit's "built-in" enchantment more resistant.
And .UpkeepMana can be pre-set to desired value of stolen instances of such abilities (because built-in must have "none"/"independent" as the owner anyway).
The best use of this trick is an unit with single Enchantment based movement ability. Note that if Fire Halo, Free Movement, Water Walking or Wind Walking is the unit's sole movement mode, after its removal by Dispel Magic or Steal Enchantment this unit cannot be placed anywhere, hence it will be immobilized until the end of combat and then disappears instead of being re-placed on global map.
However, when modifying classes (other than ResurganceAbility) to EnchantmentAbility ClassID, instances should not be dispellable (have .Origin = Spell) in rulesets where Steal Enchantment is accessible.

Values of .UpkeepPlayer other than 0 (=Independent =default) can be set, but seems to be useless for abilities in Units' and other AbilityOwners in res/lib (we don't know who will be 1st, 2nd, etc players in yet unknown maps).
It's possible in specific instances (Heroes or items on maps), but .UpkeepMana probably will not be used if enchantment isn't registered in some list (.EnchantmentID hints that such list exists). Therefore it will be useless per se anyway until we'll learn how to edit such lists... and it may be easier to add current casting points and mana, cast spells manually, then edit and rename the saved game into "turn 0" map.

And even I make no pretence Of having more than common sence - R.W.Wood
The secret half a country keeps, the whisper in the lane... - R.Kipling
[UPatch 1.4 Team] * STLpack

[This message has been edited by Turbo Beholder (edited 01-02-2011 @ 04:38 PM).]

posted 11-22-06 05:40 AM EDT (US)     2 / 4  
I don't understand anything about just what u said but is this possible: Make a passive ability like 'Cause fear' an active one.

-= Love heals all =-
The One and only NymphMaster!
Aow-SM Maps: The Titan Gate (4.9/5)
Aow-TWT Maps:Glass (4.6/5)
Got any questions/suggestions regarding my maps? Post them HERE
posted 11-23-06 03:26 PM EDT (US)     3 / 4  

Quoted from "sausud":

don't understand anything about just what u said

Mainly it means that unit like "Flying Eye" can be created and then successful use of Dispel Magic or Steal Enchantment makes it disabled and doomed.

Quoted from "sausud":

is this possible: Make a passive ability like 'Cause fear' an active one

No, and moreover, passive ability is non-specific per se, it "works" only when check for its presence is called somewhere. Please further questions about non-enchantment tweaks ask
in that thread.

And even I make no pretence Of having more than common sence - R.W.Wood
The secret half a country keeps, the whisper in the lane... - R.Kipling
[UPatch 1.4 Team] * STLpack
posted 11-23-06 04:19 PM EDT (US)     4 / 4  
Turbo Beholder,

Is it possible for an ability to be temporary? The ones other than Haste, Shadow Walking and curses, poison? More specifically, I was thinking about Fury lasting 3 turns.

Other question. Can the Morph ability be edited to change which unit can be morphed into? Was thinking about an item with Morph (Dragon) or something. Also wondering if dragon specifically would be possible since Changeling ability only works with humanoids.


Artist, Sorcerer, Monk and AoW Series fan
Proud citizen of BRASIL \o/ |o/ \o| \o/ |o| /o/ \o/
Blog with some art
www.the-battlefield.com ex-member with fond memories:Battlefield Player of the year 2003;Battlefield Winner of 4 Tourneys;Battlefield Winner of AoW league 2004
Proud owner of an AoW SM poster signed by Devs!
Please try the fantastic BNW Mod made by my friend Kirky Picardo! The best AoW:SM Mod!

[This message has been edited by Merkraad (edited 11-23-2006 @ 04:24 PM).]

Age of Wonders 2 Heaven » Forums » AoW2/SM Mod Making » Customized Enchantment Abilities
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Wonders 2 Heaven | HeavenGames