Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
[ TUTORIAL ADVANCE ] Coding Your Cards...
User-made mods in DLC (Downloadable Content) form.
Get MTG cards here for your DotP that aren't available anywhere else!
Get MTG cards here for your DotP that aren't available anywhere else!
Moderator: CCGHQ Admins
[ TUTORIAL ADVANCE ] Coding Your Cards...
by jacque » 13 Oct 2013, 11:23
INTRO
I have gotten much better at this, thanks to RiiakShiNal, thefiremind and of course MCBrodie... I would love to share this knowledge I have with you guys out there. This tutorial is suitable to both beginners, and also those who have already been coding.
-------------------------------------------------------------------------------------------------------
DISCLAIMER
The author, Jacque, shall not be held responsible due to any untoward mishaps occurred using this "Tutorial". You will understand that using this tutorial is at your own risk.
-------------------------------------------------------------------------------------------------------
TABLE OF CONTENTS
1. What do you need?
2. Useful Guidelines
3. The Twin Pillars
4. The Programmer: Working with Codes
5. The Artiste: Dealing with Artwork
6. Sharing your Work
7. Useful Links
-------------------------------------------------------------------------------------------------------
FINAL NOTES
Enjoy... You'd soon get addicted like me...
Love,
Jacque
I have gotten much better at this, thanks to RiiakShiNal, thefiremind and of course MCBrodie... I would love to share this knowledge I have with you guys out there. This tutorial is suitable to both beginners, and also those who have already been coding.
-------------------------------------------------------------------------------------------------------
DISCLAIMER
The author, Jacque, shall not be held responsible due to any untoward mishaps occurred using this "Tutorial". You will understand that using this tutorial is at your own risk.
-------------------------------------------------------------------------------------------------------
TABLE OF CONTENTS
1. What do you need?
2. Useful Guidelines
3. The Twin Pillars
4. The Programmer: Working with Codes
5. The Artiste: Dealing with Artwork
6. Sharing your Work
7. Useful Links
-------------------------------------------------------------------------------------------------------
FINAL NOTES
Enjoy... You'd soon get addicted like me...
Love,
Jacque
Last edited by jacque on 14 Oct 2013, 04:10, edited 4 times in total.
Learn making your own cards today!!!
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Re: [ Tutorial Advance ] Coding Your Cards...
by jacque » 13 Oct 2013, 11:24
WHAT DO YOU NEED?
1. RIIAK'S DOTP 2014 DECK BUILDER
1.1 DOWNLOAD
1.2 INSTALLATION
1.3 CONFIGURATION
-------------------------------------------------------------------------------------------------------
2. GIBBED TOOLS
2.1 DOWNLOAD
2.2 INSTALLATION
-------------------------------------------------------------------------------------------------------
3. CODING SOFTWARE
3.1 NOTEPAD++ (FREEWARE)
-------------------------------------------------------------------------------------------------------
4. GRAPHIC EDITING SOFTWARE
4.1 ADOBE PHOTOSHOP (LICENSED SOFTWARE)
4.2 EASY PAINT TOOL SAI (FREEWARE)
-------------------------------------------------------------------------------------------------------
5. DLC FROM OTHER MODDERS
5.1 MODDER LIST
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
- Before you begin, there are a few software and/or tools that you'll need:
1. RIIAK'S DOTP 2014 DECK BUILDER
- - Basically a software that allows you to build your own DOTP2014 Decks based on the downloaded contents that you have, which generates a "card pool" for the deck builder.
- It also allows you to view the card's code directly without first having to unpack the *.WAD files using Gibbed Tools, and repacking them once you're done.
1.1 DOWNLOAD
1.2 INSTALLATION
1.3 CONFIGURATION
- 1.3.1 DOTP2014 GAME DIRECTORY | Open
- - You'll need to configure the Deck Builder properly before you begin using it.
- Locate and define the DotP 2014 game directory. - 1.3.2 YOUR OWN BLOCK ID | Open
- - Every modder has his/her own Block ID. Please refer to this page to find out more. This is to avoid the cards that you have created clashes with the ones that others have created.
- Block ID is a number that differentiates your cards from other modders' cards. It is possible that there are more than one modder having worked/working on the same card. - 1.3.3 CUSTOM DATA FOLDER | Open
- - In Dotp 2014 Deck Builder, click "Tools", then select "Setup Custom Data Folder". You will be placing all the cards you create under this folder.
- This newly created folder will be found under your DotP 2014 Game Directory named "DATA_DLC_DECK_BUILDER_CUSTOM".
- Under the DATA_DLC_DECK_BUILDER_CUSTOM folder, you will see these:
- CARDS - This is where you place all the coded cards in *.XML format
- ART_ASSETS > ILLUSTRATIONS - This is where you place all the artwork for the coded cards in *.TDX format.
- You can leave the other files alone for now.
-------------------------------------------------------------------------------------------------------
2. GIBBED TOOLS
- - Basically a tool that allows you to pack/unpack *.WAD files, and also to convert image files into *.TDX and vice-versa.
2.1 DOWNLOAD
2.2 INSTALLATION
-------------------------------------------------------------------------------------------------------
3. CODING SOFTWARE
- - You don't really need any special software to code the cards. I am only using Notepad. But if you insist on getting something "special" to help you code "easier" (colored tags, etc.), you can try Notepad++
3.1 NOTEPAD++ (FREEWARE)
-------------------------------------------------------------------------------------------------------
4. GRAPHIC EDITING SOFTWARE
- - Basically a software that allows you to crop artwork from card scans, or from other related websites.
4.1 ADOBE PHOTOSHOP (LICENSED SOFTWARE)
4.2 EASY PAINT TOOL SAI (FREEWARE)
-------------------------------------------------------------------------------------------------------
5. DLC FROM OTHER MODDERS
- - You'll definitely need reference sources when you code your cards. The idea: The more references you can refer to, the better it is.
- Most of the official cards only offer "basic" solutions, that's why you need other DLCs for inspiration.
5.1 MODDER LIST
- 5.1.1 INFO | Open
- - Below a list of modders who knows what they are doing:
- RiiakShiNal
- thefiremind
- kevlahnota
- gorem2k
- summomole
- BloodReyvyn
- TFM&G2K
- jacque
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
Last edited by jacque on 13 Oct 2013, 13:07, edited 34 times in total.
Learn making your own cards today!!!
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Re: [ Tutorial Advance ] Coding Your Cards...
by jacque » 13 Oct 2013, 11:24
USEFUL GUIDELINES
1. BEST PRACTICES
-------------------------------------------------------------------------------------------------------
2. CARD PREFIX ID
-------------------------------------------------------------------------------------------------------
3. CARD NAME FORMAT
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
- It is good to gather "intel" of your "enemy" before you go into the "war zone"... *nah it's not that bad actually xD*
1. BEST PRACTICES
- - The dos and don'ts.
- INFO | Open
- LINK TO BEST PRACTICES
-------------------------------------------------------------------------------------------------------
2. CARD PREFIX ID
- - Organizing your cards so that they do not clash with other modders' cards.
- INFO | Open
- LINK TO CARD PREFIX ID
-------------------------------------------------------------------------------------------------------
3. CARD NAME FORMAT
- - How you can name your cards.
- INFO | Open
- - I name my cards according to this structure: "NAME_OF_THE_CARD"_"PREFIX+MULTIVERSEID"
- Example: SHADOWMAGE_INFILTRATOR_256126333.XML
- thefiremind (TFM) has created an online card generator tool to save you the hassle of renaming your card manually (and a lot more). His tool is located HERE.
- Please REMEMBER that TFM's online tool DOES NOT provide the full code for the card.
- What it does is that it just provide the basic structure (there are scenarios you may need to change the structure to suit the card's ability(ies)), all the necessary XML blocks (sections) eg. Card's Name, Casting Cost, Expansion, Flavour Text, Rule Text, etc.
- Please REMEMBER these as well:- 1. The name of your XML file must match the <FILENAME> tag in that XML file. If your XML is SHADOWMAGE_INFILTRATOR_256126333, the string in the <FILENAME> tag must be <FILENAME text="SHADOWMAGE_INFILTRATOR_256126333" />
- 2. You MAY NOT use the same 256126333 for the <ARTID> tag of Shadowmage Infiltrator. BUT, the string you name for the <ARTID> tag MUST BE THE SAME as the name of the corresponding TDX file (the artwork for Shadowmage Infiltrator). Therefore, if in the <ARTID> tag is <ARTID value="A256777888" />, your TDX file MUST BE named A256777888.TDX. HOWEVER, I do advise strongly that u use the SAME card prefix + multiverse across all levels (easier to trace and catalogue).
- XML: SHADOWMAGE_INFILTRATOR_256126333
<FILENAME> tag: <FILENAME text="SHADOWMAGE_INFILTRATOR_256126333" />
<ARTID> tag: <ARTID value="A256126333" />
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
Last edited by jacque on 13 Oct 2013, 13:49, edited 5 times in total.
Learn making your own cards today!!!
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Re: [ Tutorial Advance ] Coding Your Cards...
by jacque » 13 Oct 2013, 11:24
THE TWIN PILLARS
1. THE PROGRAMMER: WORKING WITH CODES
-------------------------------------------------------------------------------------------------------
2. THE ARTISTE: DEALING WITH ARTWORK
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
- The concept behind card coding is based on two pillars, of which goes hand in hand. Whenever a card is coded, you will need a corresponding artwork for it, vice-versa. Therefore remember, whenever you work on a card, don't forget the artwork to go with it.
1. THE PROGRAMMER: WORKING WITH CODES
- You do not necessarily have to be an experienced programmer to code your cards. What you need are sources of inspiration, basic understanding of logic and the structures that governs them, and determination as well as persistence - don't give up easily, you do not know if you're only a step away to a fully functional card.
-------------------------------------------------------------------------------------------------------
2. THE ARTISTE: DEALING WITH ARTWORK
- Don't worry you do not need to come out with your own artwork for the cards. All you need is to know where to find them, and how to modify them to suit your needs. I believe in the implementation of Alternate Arts, and artworks should be of high quality.
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
Last edited by jacque on 13 Oct 2013, 14:03, edited 2 times in total.
Learn making your own cards today!!!
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Re: [ Tutorial Advance ] Coding Your Cards...
by jacque » 13 Oct 2013, 11:25
THE PROGRAMMER: WORKING WITH CODES
1. MASTERLIST
1.1 HOW IT WORKS?
1.2 DOWNLOAD
-------------------------------------------------------------------------------------------------------
2. STEP-BY-STEP: WHAT'S FIRST?
2.1 IDENTIFYING A CARD
2.2 GETTING CARD STRUCTURE
2.3 RECOGNIZING CARD STRUCTURE
2.4 CARD TYPES & ABILITIES
2.5 WHEN TO USE THEM ABILITIES
2.6 CAPTAIN OF THE WATCH: STATIC ABILITY #1
2.8 CAPTAIN OF THE WATCH: TRIGGERED ABILITY
2.9 CAPTAIN OF THE WATCH: FINISHING THE CARD
-------------------------------------------------------------------------------------------------------
3. NEW CARDS WITH RIIAKSHINAL'S DECK BUILDER
3.1 IDENTIFYING A CARD
3.2 GETTING CARD STRUCTURE
3.3 RECOGNIZING CARD STRUCTURE
3.4 ENDLESS WURM: STATIC ABILITY
3.6 ENDLESS WURM: FINISHING THE CARD
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
- I will be giving two examples, which I believe, should be enough. Don't expect to be spoon-fed; it has been proven that one learns best through self-learning hehehe...
1. MASTERLIST
- I have a masterlist in Excel format, to help me keep track of the cards that I have coded, cards that I have released as Core, cards that are without artworks, cards still need work, etc.
1.1 HOW IT WORKS?
- INFO | Open
NO. - Number of the card in the masterlist.
REL - Date of when the card was released.
CARD NAME - Name of the card.
COLOUR - Colour of the card.
SET - Which set is the card from.
DATE - Date when the card was coded.
STATUS - Status of the card. OK - Tested & Working, WIP - Work in Progress, Blank - Not Tested.
VER - Card used in which version of DotP. 2014 - DotP2014.
ART - Which artwork was used for the card. New - New dimension of 512 x 376 DPI.
REMARK - Only for cards that are marked WIP.
1.2 DOWNLOAD
- INFO | Open
- You may or may not use this, it's entirely up to you. DOWNLOAD LINK
-------------------------------------------------------------------------------------------------------
2. STEP-BY-STEP: WHAT'S FIRST?
- This is what I usually do. Again, it may or may not apply to you.
2.1 IDENTIFYING A CARD
- INFO | Open
- - Let's pick a random card to work with... Captain of the Watch.
2.2 GETTING CARD STRUCTURE
- INFO | Open
- - Next we obtain Captain of the Watch's card structure from TFM's Online Card Generator: TFM'S ONLINE CARD GENERATOR LINK.
- Fill in the necessary fields. For this example, we'll be using 256 as our Block ID; so at the card generator, do this:
- You'd be prompted to save CAPTAIN_OF_THE_WATCH_256259716.XML. Don't worry the file is safe. Save it in the CARDS folder under the DATA_DLC_DECK_BUILDER_CUSTOM folder in your DOTP2014 game directory.
2.3 RECOGNIZING CARD STRUCTURE
- INFO | Open
- - "Right-click" on the XML file, "Open With", "Notepad"... and you'll see this:
- As you can see, the basic needful has been done for you with TFM's Online Card Generator.
- Captain of the Watch has 3 abilities:- 1. <STATIC_ABILITY>
- 2. <STATIC_ABILITY>
- 3. <TRIGGERED_ABILITY>
- So there are 3 blocks total we'll be working on.
2.4 CARD TYPES & ABILITIES
- INSTANT & SORCERY | Open
- - <SPELL_ABILITY></SPELL_ABILITY>
- CREATURE | Open
- - <STATIC_ABILITY></STATIC_ABILITY>
- <TRIGGERED_ABILITY></TRIGGERED_ABILITY>
- <ACTIVATED_ABILITY></ACTIVATED_ABILITY>
- ENCHANTMENT | Open
- - <STATIC_ABILITY></STATIC_ABILITY>
- <TRIGGERED_ABILITY></TRIGGERED_ABILITY>
- <ACTIVATED_ABILITY></ACTIVATED_ABILITY>
- ARTIFACT | Open
- - <STATIC_ABILITY></STATIC_ABILITY>
- <TRIGGERED_ABILITY></TRIGGERED_ABILITY>
- <ACTIVATED_ABILITY></ACTIVATED_ABILITY>
- LAND | Open
- - <MANA_ABILITY></MANA_ABILITY>
- <ACTIVATED_ABILITY></ACTIVATED_ABILITY>
- <TRIGGERED_ABILITY></TRIGGERED_ABILITY>
2.5 WHEN TO USE THEM ABILITIES
- <STATIC_ABILITY> | Open
- - On cards with power toughness boost to creatures, etc. eg.:
- Glorious Anthem: Creatures you control gets +1/+1.
- Luna Wolves: First Strike
- Black Knight: Protection from White, First Strike
- <ACTIVATED_ABILITY> | Open
- - On cards that requires an "activation" before an ability is granted eg.:
- <TRIGGERED_ABILITY> | Open
- - On cards that grants an ability when a condition is met, eg.:
- When Captain of the Watch enters the battlefield, put three 1/1 white Soldier creature tokens onto the battlefield.
- Bloodied Ghost enters the battlefield with a -1/-1 counter on it.
- At the beginning of your upkeep, remove a -1/-1 counter from each creature you control.
- Whenever a creature enters the battlefield, untap all creatures.
2.6 CAPTAIN OF THE WATCH: STATIC ABILITY #1
- 1ST <STATIC_ABILITY> | Open
- - Normally abilities like this; Vigilance, Indestructible, Deathtouch, Trample, First Strike, etc. are all generated by TFM's Online Card Generator.
- So for this one, you're all set... =)- Code: Select all
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Vigilance]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_VIGILANCE" />
</STATIC_ABILITY>
- 2ND <STATIC_ABILITY> | Open
- - Abilities that grants power toughness boost are normally entailed by a <FILTER></FILTER> block, then followed by a <CONTINUOUS_ACTION></CONTINUOUS_ACTION> block.
- The <FILTER> block basically defines the cards that are affected by this ability. In this case, there are a few conditions: Other soldiers & you control.
- As for CotW's 2nd <STATIC_ABILITY>, you'd be doing this:- Code: Select all
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Other Soldier creatures you control get +1/+1 and have vigilance.]]></LOCALISED_TEXT>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource() )
filter:Add( FE_SUBTYPE, OP_IS, CREATURE_TYPE_SOLDIER )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
</FILTER>
<CONTINUOUS_ACTION layer="7C" filter_id="0">
if FilteredCard() ~= nil then
local characteristics = FilteredCard():GetCurrentCharacteristics()
characteristics:Power_Add( 1 )
characteristics:Toughness_Add( 1 )
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="8" filter_id="0">
if FilteredCard() ~= nil then
local characteristics = FilteredCard():GetCurrentCharacteristics()
characteristics:Bool_Set( CHARACTERISTIC_VIGILANCE, 1 )
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
- FE_CARD_INSTANCE cards that are affected, OP_NOT not, EffectSource() the card that is giving this ability - CotW.
- FE_SUBTYPE card subtype, OP_IS is, CREATURE_TYPE_SOLDIER a Soldier.
- FE_TYPE card type, OP_IS is, CARD_TYPE_CREATURE a creature.
- FE_CONTROLLER these cards belongs to, OP_IS is, EffectController() the controller of CotW.
- <CONTINUOUS_ACTION layer="7C" filter_id="0"> notice the filter_id="0", matching with <FILTER filter_id="0">? Whatever this <CONTINUOUS_ACTION> block gives only affects what has been defined in the <FILTER> block with the ID 0.
- I do not really understand the designation of the "layers" but, normally power toughness boost goes under layer="7C".
- if FilteredCard() ~= nil then, if FilteredCard() if what has been filtered in the <FILTER> block, ~= is not equals, nil none, then
- local characteristics = FilteredCard():GetCurrentCharacteristics() local characteristics local variable/container named characteristics, FilteredCard():GetCurrentCharacteristics() getting the characteristics of other soldiers.
- characteristics:Power_Add( 1 ),other Soldiers +1 power.
- characteristics:Toughness_Add( 1 ), other Soldiers +1 toughness.
- characteristics:Bool_Set( CHARACTERISTIC_VIGILANCE, 1 ) granting Vigilance to other Soldiers.
2.8 CAPTAIN OF THE WATCH: TRIGGERED ABILITY
- <TRIGGERED_ABILITY> | Open
- - Captain of the Watch's trigger:
- When Captain of the Watch enters the battlefield, put three 1/1 white Soldier creature tokens onto the battlefield.
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Captain of the Watch enters the battlefield, put three 1/1 white Soldier creature tokens onto the battlefield.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<RESOLUTION_TIME_ACTION>
MTG():PutTokensOntoBattlefield( "TOKEN_SOLDIER_1_1_W_333000014", 3, EffectController() )
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
- <RESOLUTION_TIME_ACTION></RESOLUTION_TIME_ACTION> block means "What happens then?"
- MTG():PutTokensOntoBattlefield( "TOKEN_SOLDIER_1_1_W_333000014", 3, EffectController() ), PutTokensOntoBattlefield putting tokens into the battlefield, TOKEN_SOLDIER_1_1_W_256000001 the token's card name, 3 quantity, EffectController() under whose control (in this case CotW's controller).
2.9 CAPTAIN OF THE WATCH: FINISHING THE CARD
- INFO | Open
- - Remember that cards that generates tokens, will need their tokens registered. If you forgot this, using this card would crash the game.
- Add these two lines at the end of Captain of the Watch's XML, just before the </CARDV2> tag.- Code: Select all
<HELP title="MORE_INFO_BADGE_TITLE_13" body="MORE_INFO_BADGE_BODY_13" zone="ZONE_ANY" />
<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
<TOKEN_REGISTRATION reservation="1" type="TOKEN_SOLDIER_1_1_W_256000001" />
<AI_BASE_SCORE score="900" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
- Mythic Cards: 1200
- Rare Cards: 900
- Uncommon Cards: 600
- Common Cards: 300
-------------------------------------------------------------------------------------------------------
3. NEW CARDS WITH RIIAKSHINAL'S DECK BUILDER
- RiiakShiNal's DotP 2014 Deck Builder is a very convenient tool when it comes to looking for card references.
3.1 IDENTIFYING A CARD
- INFO | Open
- - Let's pick another random card to work with... Endless Wurm.
3.2 GETTING CARD STRUCTURE
- INFO | Open
- - Next we obtain Endless Wurm's card structure from TFM's Online Card Generator: TFM'S ONLINE CARD GENERATOR LINK.
- Fill in the necessary fields. For this example, we'll still be using 256 as our Block ID; so at the card generator, do this:
- You'd be prompted to save ENDLESS_WURM_256008820.XML. Save it in the CARDS folder under the DATA_DLC_DECK_BUILDER_CUSTOM folder in your DOTP2014 game directory.
3.3 RECOGNIZING CARD STRUCTURE
- INFO | Open
- - "Right-click" on the XML file, "Open With", "Notepad"...
- Endless Wurm has 2 abilities:- 1. <STATIC_ABILITY>
- 2. <TRIGGERED_ABILITY>
3.4 ENDLESS WURM: STATIC ABILITY
- 1ST <STATIC_ABILITY> | Open
- - Just like Captain of the Watch's Vigilance, for this one, you're all set as well... =)
- Code: Select all
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Trample]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_TRAMPLE" />
</STATIC_ABILITY>
- INFO | Open
- - Remember the thing about triggers, there are two sides to them: a condition and an action. Let's look at Endless Wurm's trigger again:
- At the beginning of your upkeep, sacrifice Endless Wurm unless you sacrifice an enchantment.
- CONDITION: At the beginning of your upkeep
- ACTION: sacrifice Endless Wurm unless you sacrifice an enchantment
- Run RiiakShiNal's DotP 2014 Deck Builder...
- Click on "Set Filter"...
- Focus on the "Check Abilities" section...
- Chances of finding what you want is slimmer if you go for the full phrase. Let's be a little more patient and take it a step at a time. Type in "at the beginning of" like this:
- Then click "Apply", and the it will filter ALL CARDS that meets the trigger "at the beginning of". Remember that the more mods you have downloaded, the better the results will be.
- To make this tutorial user-friendly, bearing in mind that the mods I have may not be similar to what you have, let's focus on results with "Official Cards" instead.
- Click on "Wad" once, and it'll group the results according to their WADs, in ascending or descending order.
- Scroll down the list until you see "DATA_DECKS_D14", these are official cards.
- Let's look at "Jinxed Idol", right click on the entry, and then click on "View Card". You will then see its XML in the pop-up window.
- Highlight and copy the Jinxed Idol's trigger (use your mouse to make the selection, then press Ctrl+C)
- Paste the trigger onto Endless Wurm's trigger:
- Moving on, repeat from where you clicked "Set Filter"... Focusing still on the Abilities section, type in "your upkeep, sacrifice"...
- You'd notice this time, the result with DATA_DECKS_D14 returned is limited: Xathrid Demon, which is not what you're looking for best suited for Endless Wurm.
- I want you now to get references from cards by other modders. If you've downloaded my Core which is LOCATED HERE, from the search results, look for "DATA_DLC_JAC", then look for "Masticore".
- Right click on Masticore's entry, View Card, and then copy the "RESOLUTION_TIME_ACTION" part like this:
- And then paste it onto Endless Wurm like this:
- Update the necessary areas like this... Those highlighted in blue, to those in yellow:
- So what you just did was:- 1. At the beginning of the controller of Endless Wurm upkeep, it checks if he/she has any enchantment on the battlefield.
- 2. If the number of enchantments on the battlefield (derived from filter:Count()) is more than 0 (meaning there's at least 1 to pay for Endless Wurm's upkeep), then Endless Wurm will create a Multiple Choice Menu for its controller: to pay Endless Wurm's Upkeep, or to sacrifice Endless Wurm.
- 3. If there are no enchantments controlled by Endless Wurm's controller at the beginning of his/her upkeep, Endless Wurm automatically gets sacrificed.
- What you just did back there:- 1. You obtained the controller's response to the menu from effectController:GetMultipleChoiceResult()
- 2. Then you check what response was it, was it the 1st option to pay upkeep, or was it the 2nd to sacrifice it from if result == 0 then
- 3. If it was the 1st option (starts with result == 0), then you allowed the controller to choose which enchantment he/she controls to sacrifice (in the event he/she controls more than 1 enchantment, safer)
- 4. And you saved the controller's choice of which enchantment to sacrifice using EffectDC():Make_Targets(1). The number assigned to Make_Targets must be the same as the number used for Get_Targets() later, in this case Get_Targets(1).
- 5. If the 2nd option was chosen, Endless Wurm is sacrificed.
- Lastly, what you just did:- 1. You retrieved the target enchantment to be sacrificed using EffectDC():Get_Targets(1):Get_CardPtr(0).
- 2. Then the enchantment is sacrificed through this: EffectController():Sacrifice(enchantment)
3.6 ENDLESS WURM: FINISHING THE CARD
- INFO | Open
- - As we're about to be done with the card, add in this line right at the bottom, before the </CARD_V2> tag
- <AI_BASE_SCORE score="900" zone="ZONE_BATTLEFIELD" />
- That's about it... You've got a functioning Endless Wurm (I know cause I've tested it hehehe...)
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
Last edited by jacque on 06 Feb 2014, 08:41, edited 23 times in total.
Learn making your own cards today!!!
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Re: [ Tutorial Advance ] Coding Your Cards...
by jacque » 13 Oct 2013, 11:25
THE ARTISTE: DEALING WITH ARTWORK
1. ARTWORK POOL
1.1 SOURCES
2. CROPPING STENCIL
2.1 DIFFERENT SETS, DIFFERENT DIMENSIONS
3. CONVERSION
4. CONVERSION & COMPRESSION USING RSN'S CONVERTER
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
- Having done coding Captain of the Watch & Endless Wurm, now let's work on the Artwork.
1. ARTWORK POOL
- You'll need to have a source where you can get High Quality images of the cards you are working on. I get very upset whenever I come across card artworks that are unclear or blurry.
1.1 SOURCES
- MAGICVILLE | Open
- - If you have been following this tutorial, after generating Captain of the Watch's card structure with TFM's Online Card Generator, you should be able to see this:
- Click on MagicVille (somehow the link is broken, CLICK HERE instead. Usually it works though.)
- Save the best picture.
- MEDIAFIRE | Open
- - This is where I get my Artworks from. It's someone's private folder on Mediafire.
- Click on HERE.
- Download "M13 Magic 2013 Fulls.zip" under "Advanced Level Core Sets".
- Look for Captain of the Watch.
2. CROPPING STENCIL
- Card artworks are best displayed in game based on 512 x 376 Px (pixels) PNGs converted into TDXs. It also irritates me to see card artworks that are distorted, not resized proportionly.
2.1 DIFFERENT SETS, DIFFERENT DIMENSIONS
- INFO | Open
- - You should realize by now that the dimensions for card artwork has evolved over the years. As you would be getting your artwork from various sources, you will need to resize them (most of the time you do) so that they appear "nicely" on the cards that you have just made.
- STENCIL DOWNLOAD | Open
- - For the benefit of others who are not as vain as I am, you can download the crop stencil I made from THIS LINK.
- You may have already noticed that the stencil's dimension is a tad smaller 422 x 310 Px instead of 512 x 376 DPI. Don't sweat. The reason for this is because I am using card artwork from card scans from the second source that I have provided under 1.1 SOURCES.
- As I was saying, card artwork scans from Limited Edition Alpha right until Scourge has a slightly taller and narrower dimension, compared to the later sets. Therefore, you will probably need resizing card artworks from these sets. Those thereafter normally you can just drag and drop the stencil over.
- USING THE STENCIL | Open
- - I'll be using Adobe Photoshop as the referencing Graphic Editing Software in this tutorial. *the crop stencil is a *.PSD file, so yea...*
- Open the crop stencil and any card artwork side by side (referring to the MEDIAFIRE card scans) and I'm assuming that you'd have some prior knowledge using Adobe Photoshop *sorry*.
- Drag and drop the stencil onto the card scan. Adjust the stencil over the card until you get as much the card artwork as possible.
- Have the stencil layer selected, then click on the Magic Wand Tool (shortcut key: W), and then click on the artwork area. A selection of the artwork would be made like this:
- Under the "Layers" panel, click on Background layer (the card scan), then copy the selection (press Ctrl + C).
- Go to the menu, click on "File", then "New" (shortcut key: Ctrl + N). You'll see this pop-up window. Don't ask why, but I love working on 600DPI. You'd notice the size of the selection is smaller (422 x 310 Px).
- Paste the selection in (shortcut key: Ctrl + V).
- Now we have to resize it... Click on "Image" on the menu bar, then "Image Size" (shortcut key: Ctrl + Alt + I).
- Key in "512" under for width, and you'd realize 422 x 310 will be resized to 512 x 376 (that's what we want).
- Save it, click on "File" on the menu bar, click "Save As".
- Select "PNG" under the pull-down list under "Format". Since we worked on Endless Wurm, recollect its prefix+multiverse ID, and use it as the file name: 256008820.PNG
- You will be prompted: PNG OPTIONS and you'd get a selection of None or Interlaced... Choose None. Interlaced is for images that you want to preserve the transparency of it.
3. CONVERSION
- Now you'll need to convert the PNG file(s) into TDX file(s) respectively so that both the deck builder and DotP2014 could recognize the artwork for the corresponding card(s).
- INFO | Open
- - You'd notice that Gibbed Tools has also included a TDXConverter named: Gibbed.Duels.TdxConvert, which we ARE NOT going to use that, it doesn't compress your PNGs.
4. CONVERSION & COMPRESSION USING RSN'S CONVERTER
- We would want the card artwork size to be as small as possible, at the same time maintaining its clarity as well.
- CONVERTER DOWNLOAD | Open
- - For the benefit of others, you can get RSN's TDX Converter from these links below:
- RSN TDX Converter DXT1.
- RSN TDX Converter DXT5 (supports transparency).
- CONVERTER USAGE | Open
- - To get the compressed card artwork, drag and drop 256008820.PNG onto RSNTDXConverter.bat and your TDX will be generated: 256008820.TDX.
- Copy the TDX file and paste it into the ILLUSTRATIONS folder under ART_ASSETS.
- DATA_DLC_DECK_BUILDER_CUSTOM > DATA_ALL_PLATFORMS > ART_ASSETS > ILLUSTRATIONS
- OTHER CONVERTERS | Open
- - There are different level of conversion. You can read about them and they are LOCATED HERE.
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
Last edited by jacque on 17 Oct 2013, 05:03, edited 14 times in total.
Learn making your own cards today!!!
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Re: [ Tutorial Advance ] Coding Your Cards...
by jacque » 13 Oct 2013, 11:25
SHARING YOUR WORK
1. CREATING YOUR OWN CORE
1.1 REFRESH DECK BUILDER CARD POOL
1.2 CREATING THE CORE
1.3 SHARING THE CORE
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
- Give yourself a pat on your back for making it this far. You're only a few steps away then you're "officially" done...
1. CREATING YOUR OWN CORE
- Sharing is caring. We learn faster, when there are others who are willing to take time and share their knowledge. I guess that's what communities are for.
1.1 REFRESH DECK BUILDER CARD POOL
1.2 CREATING THE CORE
1.3 SHARING THE CORE
- | Open
- - There are many ways you can share your Core. You can be using Google Drive like me, you can also upload it to a free online hoster eg. MediaFire, FileFront, etc.
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
Last edited by jacque on 15 Oct 2013, 02:42, edited 4 times in total.
Learn making your own cards today!!!
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Re: [ Tutorial Advance ] Coding Your Cards...
by jacque » 13 Oct 2013, 11:25
USEFUL LINKS
1. XML TAGS
-------------------------------------------------------------------------------------------------------
2. LOL CONTENTS - CRITERIAS, ETC.
-------------------------------------------------------------------------------------------------------
3. FUNCTIONS
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
- Some good references that may come in handy...
1. XML TAGS
- INFO | Open
- - READ IT HERE.
-------------------------------------------------------------------------------------------------------
2. LOL CONTENTS - CRITERIAS, ETC.
- INFO | Open
- - READ IT HERE.
-------------------------------------------------------------------------------------------------------
3. FUNCTIONS
- INFO | Open
- - READ IT HERE.
-------------------------------------------------------------------------------------------------------
[ - BACK TO TOP ]
Last edited by jacque on 14 Oct 2013, 04:13, edited 2 times in total.
Learn making your own cards today!!!
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Re: [ TUTORIAL ADVANCE ] Coding Your Cards...
by RiiakShiNal » 13 Oct 2013, 13:37
Wouldn't this be easier to write on the Wiki as it will keep track of the table of contents automatically and you shouldn't need to worry about post size limits.
I don't know if you can do spoilers on the wiki, but horizontal lines, headers, bolding, images, code blocks, etc... can all be done (though the way you do the formatting is somewhat different, the wiki doesn't use BBCode).
I don't know if you can do spoilers on the wiki, but horizontal lines, headers, bolding, images, code blocks, etc... can all be done (though the way you do the formatting is somewhat different, the wiki doesn't use BBCode).
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: [ TUTORIAL ADVANCE ] Coding Your Cards...
by jacque » 14 Oct 2013, 04:17
Prob is Riiak, I am used to this, and not familiar at all with Wiki... =(
The tutorial is now complete... Hope I've covered enough areas...
The tutorial is now complete... Hope I've covered enough areas...
Learn making your own cards today!!!
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Re: [ TUTORIAL ADVANCE ] Coding Your Cards...
by RiiakShiNal » 14 Oct 2013, 12:32
With compressing artwork, the 2 main compression modes that should be used are DXT1 and DXT5.
DXT1 offers the best compression, but does not support transparency. This is what we use for card images as card images do not need or use transparency. At 512x376 compressed with DXT1 you should get 126 KB every time.
DXT5 offers good compression with full transparency support. This is used for AI Personality images (other than the full image) and Deck Box images as they all have variable alpha in the images. A deck box image at the standard 512x512 compressed with DXT5 should come up to about 257 KB.
DXT1 offers the best compression, but does not support transparency. This is what we use for card images as card images do not need or use transparency. At 512x376 compressed with DXT1 you should get 126 KB every time.
DXT5 offers good compression with full transparency support. This is used for AI Personality images (other than the full image) and Deck Box images as they all have variable alpha in the images. A deck box image at the standard 512x512 compressed with DXT5 should come up to about 257 KB.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: [ TUTORIAL ADVANCE ] Coding Your Cards...
by jacque » 14 Oct 2013, 16:14
Aaa... now I understanddd... =) Thanks again... updated the tutorial as well... Thanks Riiak!!! =)RiiakShiNal wrote:With compressing artwork, the 2 main compression modes that should be used are DXT1 and DXT5.
DXT1 offers the best compression, but does not support transparency. This is what we use for card images as card images do not need or use transparency. At 512x376 compressed with DXT1 you should get 126 KB every time.
DXT5 offers good compression with full transparency support. This is used for AI Personality images (other than the full image) and Deck Box images as they all have variable alpha in the images. A deck box image at the standard 512x512 compressed with DXT5 should come up to about 257 KB.
Learn making your own cards today!!!
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Re: [ TUTORIAL ADVANCE ] Coding Your Cards...
by jacque » 16 Oct 2013, 23:25
I might add a section: "Troubleshooting" when I have the time later...
Please gimme your feedback on this... If it has been helpful, not, improvements, etc...
Please gimme your feedback on this... If it has been helpful, not, improvements, etc...
Learn making your own cards today!!!
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Click on if a post/reply helped you.
I stitch old cards together to make new ones...
~ Jacque, the confused
Re: [ TUTORIAL ADVANCE ] Coding Your Cards...
by BloodReyvyn » 11 Feb 2014, 10:24
Wow, awesome tutorial. Obviously, I can code cards, but this would have made awesome reading when I first started. Thanks a million.
"There's an experience worse than blindness - it's the certainty that your vision is perfect and the horror that there's no world around you to see."
-
BloodReyvyn - Posts: 421
- Joined: 19 May 2013, 13:29
- Has thanked: 53 times
- Been thanked: 40 times
Re: [ TUTORIAL ADVANCE ] Coding Your Cards...
by braquio » 18 Feb 2014, 18:17
Hi!
I'm starting coding cards, and this tutorial is great!!
i coded my first card: Goblin Bombardment
Works perfectly but i only have 1 problem, when i use dxt1 or dxt5 converters didnt work, i dont know why, im used the gibbed converter and its ok with the only problem of the size of the image. .tdx size is 753kb
I'm starting coding cards, and this tutorial is great!!
i coded my first card: Goblin Bombardment
Works perfectly but i only have 1 problem, when i use dxt1 or dxt5 converters didnt work, i dont know why, im used the gibbed converter and its ok with the only problem of the size of the image. .tdx size is 753kb
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
18 posts
• Page 1 of 2 • 1, 2
Return to New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
Who is online
Users browsing this forum: No registered users and 4 guests