Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Documentation
Basic Card.xml format
Moderator: CCGHQ Admins
my last post for Awhile
by omnix32 » 30 Jun 2010, 13:06
Morning here. Last post, thanx everyone!!! will try to get interent somehow.
My ICY does allow a choice of untapped creatures now.
I tried variations of the choose "Playtime"
ChooseTarget( "ChooseTargetUntappedCreatureLandArtifacts" )
Choosetarget ( "LandArtifactCreatureUntapped" )
This is where I was getting hung up.
ChooseTarget( "ChooseTargetUntappedCreature" )
Was just a copy and paste from Code already there. It works perfect for tapped creatures.
Also, it could have been the card pool where I added cards from the deck. Not sure if that would effect anything. I have been putting new cards in the Card folder (Outside of the core files) and making my decks from that. I did not stay consistant with updating the card everytime I changed it, until my last attempt which worked. So not sure if it was related to updating the card and working as intended. I am still pretty sure that those cards are just placer cards and the program should read the card from the actual core. Still clueless about this code stuff.
Have fun everyone!!! No clue when I will be back, but I will.
My ICY does allow a choice of untapped creatures now.
I tried variations of the choose "Playtime"
ChooseTarget( "ChooseTargetUntappedCreatureLandArtifacts" )
Choosetarget ( "LandArtifactCreatureUntapped" )
This is where I was getting hung up.
ChooseTarget( "ChooseTargetUntappedCreature" )
Was just a copy and paste from Code already there. It works perfect for tapped creatures.
Also, it could have been the card pool where I added cards from the deck. Not sure if that would effect anything. I have been putting new cards in the Card folder (Outside of the core files) and making my decks from that. I did not stay consistant with updating the card everytime I changed it, until my last attempt which worked. So not sure if it was related to updating the card and working as intended. I am still pretty sure that those cards are just placer cards and the program should read the card from the actual core. Still clueless about this code stuff.
Have fun everyone!!! No clue when I will be back, but I will.
- omnix32
- Posts: 46
- Joined: 16 Mar 2009, 00:24
- Has thanked: 0 time
- Been thanked: 0 time
Re: Basic Card.xml format
by Uresti » 30 Jun 2010, 16:52
No the program read the card from the palce you have it.
ChooseTarget( "ChooseTargetUntappedCreature" )
This calls a function and this function calls in the TEXT_PËRMANENT XML the message to display for
"ChooseTargetUntappedCreature" as an example the card SOUL NET:
<PLAYTIME>
ChooseGainLife() <---Calling a Function to Ask a choice
</PLAYTIME>
<COST qualifier="Conditional" type="Mana" cost="{1}" />
<EFFECT>
YouGainLife( 1 )
</EFFECT>
and in my new created TARGETS.LUA
function ChooseGainLife()
ChooseTarget( "Pay1ManaToGainLife" )
end
Here is the funcion called Note that is not a function per se, it only Display from the TEXT_PERMANENT the text for "Pay1ManaToGainLife" that is "Want to pay 1 mana to gain 1 life?"
Hope i can finish soon the alpha update so you can analyze all this
ChooseTarget( "ChooseTargetUntappedCreature" )
This calls a function and this function calls in the TEXT_PËRMANENT XML the message to display for
"ChooseTargetUntappedCreature" as an example the card SOUL NET:
<PLAYTIME>
ChooseGainLife() <---Calling a Function to Ask a choice
</PLAYTIME>
<COST qualifier="Conditional" type="Mana" cost="{1}" />
<EFFECT>
YouGainLife( 1 )
</EFFECT>
and in my new created TARGETS.LUA
function ChooseGainLife()
ChooseTarget( "Pay1ManaToGainLife" )
end
Here is the funcion called Note that is not a function per se, it only Display from the TEXT_PERMANENT the text for "Pay1ManaToGainLife" that is "Want to pay 1 mana to gain 1 life?"
Hope i can finish soon the alpha update so you can analyze all this
- Uresti
- Posts: 151
- Joined: 25 Jun 2010, 15:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: Basic Card.xml format
by Snacko » 30 Jun 2010, 17:09
You need to add a new message for it to show ChooseCreatureArtifactLandInPlay.
The code should look like:
The code should look like:
- Code: Select all
<MULTICARDS>
<CARD>
<TITLE text="ICY_MANIPULATOR_TITLE" />
<FILENAME text="ICY_MANIPULATOR" />
<COLLECTIONMAX value="400" />
<COLLECTORNUMBER value="421" />
<ARTID value="301023" />
<FRAMECOLOUR name="A" />
<COLOR value="A" />
<ARTIST name="Mat Cavotta" />
<CASTING_COST cost="{4}" />
<CARDNUMBER value="6" />
<FLAVOURTEXT text="ICY_MANIPULATOR_FLAVOUR" />
<TYPE metaname="Artifact" />
<EXPANSION metaname="10E" />
<RARITY metaname="uncommon" />
<ACTIVATED_ABILITY tag="ICY_MANIPULATOR_RULE_1" layer="0">
<COST type="Mana" cost="{1}" />
<COST type="TapSelf" />
<PRE_EFFECT>
Object():GetFilter():Clear()
Object():GetFilter():AddCardType( CARD_TYPE_CREATURE )
Object():GetFilter():AddCardType( CARD_TYPE_ARTIFACT )
Object():GetFilter():AddCardType( CARD_TYPE_LAND )
Object():GetFilter():SetZone( ZONE_IN_PLAY )
Object():GetPlayer():SetTargetCount( 1 )
Object():GetPlayer():SetTargetPrompt( 0, "ChooseCreatureArtifactLandInPlay")
Object():GetPlayer():ChooseTargets()
</PRE_EFFECT>
<EFFECT>
TapTargetCard()
</EFFECT>
<AI_AVAILABILITY behaviour="InResponseOrBeforeMyUntap"/>
</ACTIVATED_ABILITY>
<SFX text="WhiteSwarm6_activated_ability" />
</CARD>
</MULTICARDS>
Re: Basic Card.xml format
by omnix32 » 30 Jun 2010, 17:14
I thought as much, then my code for my Icy was just wrong, until my last attempt with just the creature tap. That is why I went with the creature tap as the code is already written for a untapped check and for creatures.
Would love to anylyze what you have.... but hard to do as the computer is heading for a box and I'll be @#$%#@#$%# if I am paying for dial up speed the same price I am paying for 10 MbPS 1.00 MBPS.
--------------------------------------
Dag nab it!!! I had all that code except the last part.
Object():GetFilter():SetZone( ZONE_IN_PLAY )
Object():GetPlayer():SetTargetCount( 1 )
Object():GetPlayer():SetTargetPrompt( 0, "ChooseCreatureArtifactLandInPlay")--had this except InPlay
Object():GetPlayer():ChooseTargets()
Where do you get the InPLAY
No check for tapped/Untapped though, but you can't idiot proof everything.
Ah......carry on... computer going in box......thanx though.....
Have fun.
Would love to anylyze what you have.... but hard to do as the computer is heading for a box and I'll be @#$%#@#$%# if I am paying for dial up speed the same price I am paying for 10 MbPS 1.00 MBPS.
--------------------------------------
Dag nab it!!! I had all that code except the last part.
Object():GetFilter():SetZone( ZONE_IN_PLAY )
Object():GetPlayer():SetTargetCount( 1 )
Object():GetPlayer():SetTargetPrompt( 0, "ChooseCreatureArtifactLandInPlay")--had this except InPlay
Object():GetPlayer():ChooseTargets()
Where do you get the InPLAY
No check for tapped/Untapped though, but you can't idiot proof everything.
Ah......carry on... computer going in box......thanx though.....
Have fun.
- omnix32
- Posts: 46
- Joined: 16 Mar 2009, 00:24
- Has thanked: 0 time
- Been thanked: 0 time
Re: Basic Card.xml format
by Snacko » 30 Jun 2010, 21:15
ChooseCreatureArtifactLandInPlay is an arbitrary made name that will link to the message that shows when you need to target.
As for checking for tapped, untapped; MtG rules say that you can target any creature, artifact or land, however if it's already tapped then the activated ability does nothing as you can't tap a tapped permanent.
As for checking for tapped, untapped; MtG rules say that you can target any creature, artifact or land, however if it's already tapped then the activated ability does nothing as you can't tap a tapped permanent.
Re: Basic Card.xml format
by Uresti » 30 Jun 2010, 22:20
Thanks Shacko! thats the thing i tried to explain in my post before but sadly, i cant explain myself so simple and comprehensive as you do.
- Uresti
- Posts: 151
- Joined: 25 Jun 2010, 15:26
- Has thanked: 0 time
- Been thanked: 0 time
-
Huggybaby - Administrator
- Posts: 3209
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 704 times
- Been thanked: 595 times
Re: Basic Card.xml format
by Necropotence » 11 May 2013, 13:50
the link! it´s dont working. you can uploaded again? from now, thanks
- Necropotence
- Posts: 24
- Joined: 05 May 2013, 05:30
- Has thanked: 10 times
- Been thanked: 0 time
Re: Basic Card.xml format
by RiiakShiNal » 11 May 2013, 14:01
Aren't you working with DotP 2013? If that is the case then why would you want this as it only works for DotP 2010?Necropotence wrote:the link! it´s dont working. you can uploaded again? from now, thanks
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: Basic Card.xml format
by Necropotence » 11 May 2013, 22:35
sorry, I thought it also works in DOTP 2013. my apologiesRiiakShiNal wrote:Aren't you working with DotP 2013? If that is the case then why would you want this as it only works for DotP 2010?Necropotence wrote:the link! it´s dont working. you can uploaded again? from now, thanks
- Necropotence
- Posts: 24
- Joined: 05 May 2013, 05:30
- Has thanked: 10 times
- Been thanked: 0 time
25 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 3 guests