It is currently 17 Dec 2018, 05:16
   
Text Size

Basic Abilities and function calls

Moderators: Xander9009, CCGHQ Admins

Basic Abilities and function calls

Postby Uresti » 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!!! =D>
</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:
Image
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
Image
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

ArtID

Postby omnix32 » 27 Jun 2010, 04:01

Pretty awesome stuff. Now the artId number is that based on what the dev's gave it, or is there some numbering system to the original art WOTC used.

I noticed the .TDX files had large number gaps, and not sure if we added our own Picture there would be a numbering system to follow. Once peeps get to making cards for this, it would be kinda cool if everyone could combine efforts without overwrites.

Thank you for all the help. Look forward to more.
omnix32
 
Posts: 46
Joined: 16 Mar 2009, 00:24
Has thanked: 0 time
Been thanked: 0 time

Re: Basic Abilities and function calls

Postby Uresti » 27 Jun 2010, 04:32

thats why i used the same name for picture and cards. maybe DEVs used they own numbers series to identify every card. until now i didnt see any errors related to naming images instead of numbers
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: Basic Abilities and function calls

Postby omnix32 » 27 Jun 2010, 12:44

Ok, that would help sort out who does what.

ARTID value="Black_Knight"

Black_knight.TDX

Not tried this, but would be more easy to keep track of.

This is more fun than playing, is that a good thing?

Have fun.
omnix32
 
Posts: 46
Joined: 16 Mar 2009, 00:24
Has thanked: 0 time
Been thanked: 0 time

Re: Basic Abilities and function calls

Postby Uresti » 27 Jun 2010, 15:00

This is more fun than playing, is that a good thing?
i didnt played a single campaing game yet :lol:

Remember that i said Nevinyrrals Disk was crashing the game? well after all the night trying to figure why was crashing, this morning i came with a solution:
<ARTID value="Nevinyrrals_Disk"> WRONG!!
problem was resolved doing:

<ARTID value="301001">

Just changed the name of the TDX and now it works fine. Then maybe calling TDX have a limit of 8 characters? maybe not, it should be another thing cause with <ARTID Nevinyrrals_disk and JUST ONE ability works fine, but when you try to make another ability crashes.
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: Basic Abilities and function calls

Postby omnix32 » 27 Jun 2010, 20:40

That makes sense. Thinking if duel lands (At least some of them) would be possible. Need a function to select what mana you want to add to mana pool. So many things to try out.

Also net code. I see you have the non steam version from our friends at SkidRow. This game is designed to connect though steam. Wonder if some type of direct connect could be established? It would be possible to emulate a steam server and fool the game. Way beyond my capabilities though. Well, we are just early into this, and thank you for sharing all your information. Keep it coming!!!

have fun.
omnix32
 
Posts: 46
Joined: 16 Mar 2009, 00:24
Has thanked: 0 time
Been thanked: 0 time

Re: Basic Abilities and function calls

Postby Uresti » 27 Jun 2010, 23:36

omnix32 wrote:That makes sense. Thinking if duel lands (At least some of them) would be possible. Need a function to select what mana you want to add to mana pool. So many things to try out.
other lands can be implemented. again :? look at the DLC there is a STRIP MINE. the bad side of this that they produce colored mana instead of colorless and behind the board they still are BASIC lands.

Also net code. I see you have the non steam version from our friends at SkidRow.
Oh you really killed me :cry:
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: Basic Abilities and function calls

Postby omnix32 » 28 Jun 2010, 02:44

Oh.... Skid who???
omnix32
 
Posts: 46
Joined: 16 Mar 2009, 00:24
Has thanked: 0 time
Been thanked: 0 time

Dual Lands

Postby Uresti » 28 Jun 2010, 06:02

Check this "Dual Land"
<MULTICARDS>

<CARD>
<TITLE text="ISLAND_TITLE"/>
<FILENAME text="Tundra"/>
<COLLECTIONMAX value="383"/>
<COLLECTORNUMBER value="368"/>
<ARTID value="05"/>
<FRAMECOLOUR name="C Land"/>
<COLOR value="L"/>
<ARTIST name="Donato Giancola"/>
<SUB_TYPE metaname="Island"/>
<SUB_TYPE metaname="Plains"/>
<CARDNUMBER value="5"/>
<SUPERTYPE metaname="Basic"/>
<TYPE metaname="Land"/>
<EXPANSION metaname="10E"/>
<HELP title="INFO_TYPE_LAND_TITLE" body="INFO_TYPE_LAND_BODY" zone="any" />
</CARD>
</MULTICARDS>

LOL that was silly and quick but seems to work =D>
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: Basic Abilities and function calls

Postby omnix32 » 28 Jun 2010, 06:19

Sat down to make a ICY....

function TargetPermanentGood()
Object():GetFilter():Clear()
Object():GetFilter():AddCardType(

Effects.........

function TapThisCard()
Object():Tap()

====================================
<COST type="Mana" cost="{4}" />
<COST type="TapSelf" />
<TARGET_DETERMINATION>
return TargetTappedpermentBad()--- need this function??
</TARGET_DETERMINATION>
<PLAYTIME>
ChooseTarget( "TargetPermanentGood()" )
</PLAYTIME>
<EFFECT>
TapTargetCard()




Late and way over my head, going to have to look at the cards and see what functions they call.

should have paid attention to my basic program class. We saved or work on punch cards back in the day.

have fun.
omnix32
 
Posts: 46
Joined: 16 Mar 2009, 00:24
Has thanked: 0 time
Been thanked: 0 time

Tundra??

Postby omnix32 » 28 Jun 2010, 06:22

Tundra may be silly, but working is working.
Awesome!!!

have fun.
omnix32
 
Posts: 46
Joined: 16 Mar 2009, 00:24
Has thanked: 0 time
Been thanked: 0 time

Re: Basic Abilities and function calls

Postby Uresti » 28 Jun 2010, 07:00

Icy...mmhh i think this easy ill give you a litle help.

function TargetPermanentGood() <--use Neutral because AI would think that is for taping his own
<ACTIVATED_ABILITY>
<COST type="Mana" cost="{1}" />
<COST type="TapSelf" />
<FILTER>
Object():GetFilter():Clear()
Object():GetFilter():AddCardType( <--go on with rest of filter!

Effects.........

function TapThisCard() <---you will end taping your own icy
Object():Tap()
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: Basic Abilities and function calls

Postby petitrudy » 28 Jun 2010, 14:42

HI all

I can see the picture of the new cards.

Can you help me ?

I have change ARTID in the the XML file and rename the picture, packed the DATA_DLC_9999 but no change...

What is exactely the process ?
Thx
petitrudy
 
Posts: 29
Joined: 27 Oct 2009, 12:36
Has thanked: 0 time
Been thanked: 0 time

Re: Basic Abilities and function calls

Postby Uresti » 28 Jun 2010, 15:21

hi welcome to the forums!

Dont pack your Data_DLC_9999 will not work , at least mine is not recognized when is packed.

can you be more explicit about your problem?, for images you will nedd a png with 256x188 pixels. put your converted images in Data_DLC_9999\DATA_PC\DATA_LOD2\ART_ASSETS\ILLUSTRATIONS.
and dont use names on your pics!! can cause problems too use a format like "601004"
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: Basic Abilities and function calls

Postby omnix32 » 28 Jun 2010, 15:42

Welcome petitrudy!!!!

You don't need to re-pack anything. The .Wad is just a compression method to save space. The Data_Core.wad is over 500 megs uncompressed about 200 megs compressed.

So the program will read the folder just fine as long as you don't change the naming convention.

The Art ID is of cropped pics that are compressed .TDX files. They are stored in the Illustrations folder.

Data_DLC_999\DATA_PC\DATA_SHARED\ART_ASSETS\Illustrations

Uresti Used a name as a value, but found it should not be over 8 characters. I think it best to just stick with numbers. Any number system would be fine for now just keep it under 8.

The cropped pics are .png files and should be named the same as your compressed .TDX file. The TDX compress uncompress should take care of this without renaming anything.

4434564.png
4434564.TDX

Gibbed tools with everything you need can be found here with more full deck editor, though for some reason, I get Unnamed cards that are (Homemade) using this deck editor.

The smaller version of the deck editor gives at least the name of our cards that we make.
http://forums.somethingawful.com/showth ... t378562751

Because things are just being found out, I suspect that someone will make a complete guide, and some team to be formed on making and adding cards. I think we should wait for a comprehensive guide that covers everything.

This would avoid tons of questions that have already been answered, but things take time.

Just follow the example of the black knight to get an idea on how things work, then try a few easy creatures that just have power and toughness.

If you want card pics (All of them) you can crop these

just download the torrent.

http://www.slightlymagic.net/tracker?time=1277739485

You can also use these cards in Magic Album, and that torrent already has the pics in the correct folder for magic album. (I had to do it all by hand when it came out.... Hours of work)

viewforum.php?f=32

I hope this helped get you going.
omnix32
 
Posts: 46
Joined: 16 Mar 2009, 00:24
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Documentation

Who is online

Users browsing this forum: No registered users and 0 guests


Who is online

In total there are 0 users online :: 0 registered, 0 hidden and 0 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 0 guests

Login Form