Basic Abilities and function calls
Posted: 27 Jun 2010, 02:57
Now that we know a little about the card layout, lets see static and triggered abilities for our cards. First download the fake dlc http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2788 then download the unpacker http://www.mediafire.com/file/d2umorjzlzh/Data_DLC_9999.rar extract files to a folder of your choice. now in your magic installation folder take Data_Core.wad and drag and drop over Gibbed.Duels.unpack. now you should have a folder named Data_Core.wad, leave it there we will need some files from there later.
Opne you magic folder and go to DLC_9999\DATA_ALL_PLATFORMS\DATA_REQUIRED\CARDS\ and make a new text document. lets make a new creature.
<MULTICARDS> <-- this is the header of the file needed to be recognized
<CARD>
<TITLE text="BLACK_KNIGHT_TITLE" />
<FILENAME text="BLACK_KNIGHT" />
<COLLECTIONMAX value="249" />
<COLLECTORNUMBER value="177" />
<ARTID value="105618 " /> <---We will use that for the moment!
<FRAMECOLOUR name="B" />
<COLOR value="B" />
<ARTIST name="Jeff A. Menges" />
<CASTING_COST cost="{B}{B}" />
<CARDNUMBER value="11" />
<FLAVOURTEXT text="BLACK_KNIGHT_FLAVOUR" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Human" />
<SUB_TYPE metaname="Knight" />
<POWER value="2" />
<TOUGHNESS value="2" />
<EXPANSION metaname="A" />
<RARITY metaname="uncommon" />
Until now we already know all this, now lets give him some nasty abilities:
<STATIC_ABILITY tag="BLACK_KNIGHT_RULE_1" layer="0">
Remember that in magic we have STATIC and TRIGGERED abilities, in this case we will use a static cause we will give him first strike. Tag="BLACK_KNIGHT_RULE_1" Is telling us that he will be displaying the text of our main XML database for his first ability, alsolayer="0">is telling us the the ability has a priority
<EFFECT>
First_Strike() <--This is a stored FUNCTION we are calling
</EFFECT>
Almost Self explanatory...he have ...FIRST Strike!!!
</STATIC_ABILITY>
</CARD>
</MULTICARDS>
Whit those last lines we close the satitc ability,card and header, our creature is ready to play! but what if we want him to fly? well lets give him a new ability. dont forget to delete the last 2 lines (</CARD> and </MULTICARDS>
<STATIC_ABILITY tag="BLACK_KNIGHT_RULE_2" layer ="0">
See RULE_2? we will need another line in our main XML
<EFFECT>
flying()
</EFFECT>
</STATIC_ABILITY>
Now in the folder that you stored your uncompressed Data_core you will find more of the abilities in \DATA_CORE\DATA_ALL_PLATFORMS\DATA_REQUIRED\FUNCTIONS open KEYWORDS.LUA with your notepad, you can find there many functions we can use, the simplest: Trample() Shroud() Fear() etc.
But Black Knight have preotection from White...lets give him that.
<STATIC_ABILITY tag="BLACK_KNIGHT_RULE_3" layer="0">
<EFFECT>
ClearFilter() Calling a FUNCTION to clear existing filters in the card
Object():GetFilter():AddColour( COLOUR_WHITE )
Object(): is the Black Knight in this case, GetFilter(): we can add after this what we specifically need in this case COLOUR_WHITE ). if you want to see more filters open FILTERS.LUA
ProtectionF() Again a FUNCTION form EFFECTS.LUA
</EFFECT>
</STATIC_ABILITY>
Now save choose from the save menu in notepad save as. choose all files ad name it BLACK_KNIGHT.XML
beware not to save it as .txt
Last in the DLC_9999\DATA_ALL_PLATFORMS\DATA_REQUIRED\TEXT_DUELTIME open A_CARD_TEXT (i use Office) and after the last line (swords to ploshares i think) add those:
Close the A_CARD_TEXT clicking in the X office will ask if we wanna save say YES!
I edited ny CORE_CONSTRUCTED_DECK_FULL, (find it on the Data_DLC_9999\DATA_ALL_PLATFORMS\DATA_REQUIRED\DECKS) and added the BLACK_KNIGHT and looks fine in game
Opne you magic folder and go to DLC_9999\DATA_ALL_PLATFORMS\DATA_REQUIRED\CARDS\ and make a new text document. lets make a new creature.
<MULTICARDS> <-- this is the header of the file needed to be recognized
<CARD>
<TITLE text="BLACK_KNIGHT_TITLE" />
<FILENAME text="BLACK_KNIGHT" />
<COLLECTIONMAX value="249" />
<COLLECTORNUMBER value="177" />
<ARTID value="105618 " /> <---We will use that for the moment!
<FRAMECOLOUR name="B" />
<COLOR value="B" />
<ARTIST name="Jeff A. Menges" />
<CASTING_COST cost="{B}{B}" />
<CARDNUMBER value="11" />
<FLAVOURTEXT text="BLACK_KNIGHT_FLAVOUR" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Human" />
<SUB_TYPE metaname="Knight" />
<POWER value="2" />
<TOUGHNESS value="2" />
<EXPANSION metaname="A" />
<RARITY metaname="uncommon" />
Until now we already know all this, now lets give him some nasty abilities:
<STATIC_ABILITY tag="BLACK_KNIGHT_RULE_1" layer="0">
Remember that in magic we have STATIC and TRIGGERED abilities, in this case we will use a static cause we will give him first strike. Tag="BLACK_KNIGHT_RULE_1" Is telling us that he will be displaying the text of our main XML database for his first ability, alsolayer="0">is telling us the the ability has a priority
<EFFECT>
First_Strike() <--This is a stored FUNCTION we are calling
</EFFECT>
Almost Self explanatory...he have ...FIRST Strike!!!
</STATIC_ABILITY>
</CARD>
</MULTICARDS>
Whit those last lines we close the satitc ability,card and header, our creature is ready to play! but what if we want him to fly? well lets give him a new ability. dont forget to delete the last 2 lines (</CARD> and </MULTICARDS>
<STATIC_ABILITY tag="BLACK_KNIGHT_RULE_2" layer ="0">
See RULE_2? we will need another line in our main XML
<EFFECT>
flying()
</EFFECT>
</STATIC_ABILITY>
Now in the folder that you stored your uncompressed Data_core you will find more of the abilities in \DATA_CORE\DATA_ALL_PLATFORMS\DATA_REQUIRED\FUNCTIONS open KEYWORDS.LUA with your notepad, you can find there many functions we can use, the simplest: Trample() Shroud() Fear() etc.
But Black Knight have preotection from White...lets give him that.
<STATIC_ABILITY tag="BLACK_KNIGHT_RULE_3" layer="0">
<EFFECT>
ClearFilter() Calling a FUNCTION to clear existing filters in the card
Object():GetFilter():AddColour( COLOUR_WHITE )
Object(): is the Black Knight in this case, GetFilter(): we can add after this what we specifically need in this case COLOUR_WHITE ). if you want to see more filters open FILTERS.LUA
ProtectionF() Again a FUNCTION form EFFECTS.LUA
</EFFECT>
</STATIC_ABILITY>
Now save choose from the save menu in notepad save as. choose all files ad name it BLACK_KNIGHT.XML
beware not to save it as .txt
Last in the DLC_9999\DATA_ALL_PLATFORMS\DATA_REQUIRED\TEXT_DUELTIME open A_CARD_TEXT (i use Office) and after the last line (swords to ploshares i think) add those:
Close the A_CARD_TEXT clicking in the X office will ask if we wanna save say YES!
I edited ny CORE_CONSTRUCTED_DECK_FULL, (find it on the Data_DLC_9999\DATA_ALL_PLATFORMS\DATA_REQUIRED\DECKS) and added the BLACK_KNIGHT and looks fine in game