Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk



Talk about new cards here
Moderator: CCGHQ Admins
Re: Talk about new cards here
by Clark » 30 Aug 2010, 15:51
After my researching, the theory for card template is like Jasper which could be used to define PDF template.kevlahnota wrote:yup, I created the student warfare template with the fixed count numbers.![]()
anyway, the original template I'm using does not look good on DOTP that's why I modified it.The fonts I used are Caslon Bold, MatrixB.
Clark wrote:It seems the count number for levels & corresponding status are fixed in template...ennnn im trying to find a common way.Clark wrote:It seems someone create the template for those levelup creature cards.
Its a great work!!!
I cannot wait to code one blue white levelup deck now
The data could be only filled in the specific place in the template, which means a dynamic level-up template need the customization for both program and the template@@
Hope Wizard would develop some game tools like map-editor for HerosV to help user create more custom mods.
In this case, it seems i have to use static text description to express status for each level@@.
Becasue i don't get familiar with PS like you

- Clark
- Posts: 64
- Joined: 21 Aug 2010, 16:07
- Has thanked: 0 time
- Been thanked: 0 time
Re: Talk about new cards here
by Clark » 30 Aug 2010, 17:08
Hi kevlahnota,kevlahnota wrote:yup, I created the student warfare template with the fixed count numbers.![]()
anyway, the original template I'm using does not look good on DOTP that's why I modified it.The fonts I used are Caslon Bold, MatrixB.
Please check in the new creature i just created which was named as 'ENCLAVE_CRYPTOLOGIST'.
I copy your codes to be 2 new common function for this type creature in COMMUNITY_FUNCTIONS.lua:
- Code: Select all
function IsIn2ndLevelRange( minLev, maxLev )
if ( Object():CountCounters( MTG():ChargeCounters() ) > minLev and Object():CountCounters( MTG():ChargeCounters() ) < maxLev ) then
return true
else
return false
end
end
function IsIn3rdLevelRange( minLev )
if ( Object():CountCounters( MTG():ChargeCounters() ) > minLev ) then
return true
else
return false
end
end
- Code: Select all
<STATIC_ABILITY layer="0">
<PRE_EFFECT>
Object():Register_Set( 0, 7 )
</PRE_EFFECT>
</STATIC_ABILITY>
- Code: Select all
Creature - Human Wizard 2/2
When Venerated Teacher enters the battlefield, put two level counters on each creature you control with level up.
- Code: Select all
Object():Register_Get( 0 ) ~= 7
But its too late for me now, i have no time to test

Does it make sense to you?

Your comments are appreciate!
BTW: Thank you for your efforts to update HQ images for my cards

- Clark
- Posts: 64
- Joined: 21 Aug 2010, 16:07
- Has thanked: 0 time
- Been thanked: 0 time
Re: Talk about new cards here
by kevlahnota » 30 Aug 2010, 17:28
yup, there must be some kind of filter to know if it's a leveller or not. if we can code it or anyone, we can make another new possibility to pass some abilities ( like slivers. )
-
kevlahnota - Programmer
- Posts: 825
- Joined: 19 Jul 2010, 17:45
- Location: Philippines
- Has thanked: 14 times
- Been thanked: 264 times
Re: Talk about new cards here
by logoliv » 30 Aug 2010, 21:05
I just coded Turntimber Basilisk, it generates no error but the target card doesn't block
here's the code :

- Code: Select all
<STATIC_ABILITY layer="0" tag="_COMMONTAG_DEATHTOUCH">
<EFFECT>
Deathtouch()
</EFFECT>
</STATIC_ABILITY>
<TRIGGERED_ABILITY tag="TURNTIMBER_BASILISK_RULE_1" layer="0">
<TRIGGER value="COMES_INTO_PLAY">
return NonTokenLandFall()
</TRIGGER>
<TARGET_DETERMINATION>
return TargetCreatureBad()
</TARGET_DETERMINATION>
<PLAYTIME>
Object():GetFilter():May()
ChooseTarget( "CHOOSE_CREATURE_TO_BLOCK_IF_ABLE" )
</PLAYTIME>
<EFFECT>
Object():GetTargetCard():GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_MUST_BLOCK, 1 )
</EFFECT>
<DURATION>
return UntilEndOfTurn()
</DURATION>
</TRIGGERED_ABILITY>
Re: Talk about new cards here
by Yanna » 30 Aug 2010, 21:27
Not an idea, but i can tell you of my tests with CHARACTERISTIC_MUST_ATTACK (trying to code this soldier that 'pops up' an attacking creature).
It simply doesn't seem to work at all...
It simply doesn't seem to work at all...


Re: Talk about new cards here
by Clark » 31 Aug 2010, 15:47
Firstly I tried to add custom constant to identify those creatures with level up as follow, but failed.kevlahnota wrote:yup, there must be some kind of filter to know if it's a leveller or not. if we can code it or anyone, we can make another new possibility to pass some abilities ( like slivers. )
There must be a validation to those all constants in program.CONSTANT.LUA
CREATURE_TYPE_LEVELUP = SIZE_OF_TYPE_BAND * CARD_TYPE_CREATURE + 218
Creature Card
<SUB_TYPE metaname = "Levelup" />
After that i try to add signature to the card object, and validate it in the ability function of another card but also got failed.
- Code: Select all
Creature with level up
<STATIC_ABILITY layer="0">
<EFFECT>
Object():Register_Clear( 0 )
Object():Register_Set( 0, 3 )
</EFFECT>
</STATIC_ABILITY>
Another creature
<FILTER>
return CreaturesYouControl( )
</FILTER>
<EFFECT>
if ( Object():Register_Get( 0 ) == 3 ) then
Subject():AddCounters( MTG():ChargeCounters(), 2 )
end
</EFFECT>
Fortunately, it seems there is only one existing card of the creature type WOMBAT according to the database.(no creature of that type in game)

So...my temperate solution is:
- Code: Select all
Creature with level up
<SUB_TYPE metaname = "Wombat" />
Another creature
<FILTER>
return CreaturesInPlayOfType( CREATURE_TYPE_WOMBAT )
</FILTER>
<EFFECT>
Subject():AddCounters( MTG():ChargeCounters(), 2 )
</EFFECT>
Hope we could fix this "hard code" in further.
BTW: i also tried to create a card with PLANESWALK type which was defined in constant.lua, but got failed.

- Clark
- Posts: 64
- Joined: 21 Aug 2010, 16:07
- Has thanked: 0 time
- Been thanked: 0 time
Re: Talk about new cards here
by Uresti » 31 Aug 2010, 16:30
We cant add new types to CONSTANTS:LUA because is linked to the EXE. and about planeswalkers are in the PERMAMENTS list but not in the EXE.Firstly I tried to add custom constant to identify those creatures with level up as follow, but failed.
- Uresti
- Posts: 151
- Joined: 25 Jun 2010, 15:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: Talk about new cards here
by Yanna » 31 Aug 2010, 18:02
Some precisions to add :
See, they're all declared into the exe as int32 (if i'm correct). The CONSTANT.LUA file is here because it's easier for a human to handle words rather than numbers. Kind of 'translator' if you want.
That's why instead of AddCardType( 13325 ) you can write AddCardType( CARD_TYPE_WOMBAT ).
This should work :
I'm already using a better type to mark Arcane Spells : CREATURE_TYPE_PRISM. There is no creature card with type PRISM in the whole game
Hope you sort it out !
YannA
It won't work, you cannot add more constants unless you change the exe.Clark wrote:Firstly I tried to add custom constant to identify those creatures with level up as follow, but failed.
CONSTANT.LUA
CREATURE_TYPE_LEVELUP = SIZE_OF_TYPE_BAND * CARD_TYPE_CREATURE + 218
Creature Card
<SUB_TYPE metaname = "Levelup" />
See, they're all declared into the exe as int32 (if i'm correct). The CONSTANT.LUA file is here because it's easier for a human to handle words rather than numbers. Kind of 'translator' if you want.
That's why instead of AddCardType( 13325 ) you can write AddCardType( CARD_TYPE_WOMBAT ).
This won't work, because you're asking the Object if he has an int registered, not the Subject.Clark wrote:
- Code: Select all
Another creature
<FILTER>
return CreaturesYouControl( )
</FILTER>
<EFFECT>
if ( Object():Register_Get( 0 ) == 3 ) then
Subject():AddCounters( MTG():ChargeCounters(), 2 )
end
</EFFECT>
This should work :
- Code: Select all
Another creature
<FILTER>
return CreaturesYouControl() and Subject():Register_Get(0) == 3 )
</FILTER>
<EFFECT>
Subject():AddCounters( MTG():ChargeCounters(), 2 )
</EFFECT>
Watch out for a Coat Of Arms that would boost those 'Wombats'. Otherwise it's a pretty good solution i would say.Clark wrote:
At last, i have to add a existing sub type into those creatures.
Fortunately, it seems there is only one existing card of the creature type WOMBAT according to the database.(no creature of that type in game)![]()
I'm already using a better type to mark Arcane Spells : CREATURE_TYPE_PRISM. There is no creature card with type PRISM in the whole game

Hope you sort it out !
YannA

Re: Talk about new cards here
by logoliv » 31 Aug 2010, 18:06
I tried many differents ways, but I agree with you, it doesn't workYanna wrote:Not an idea, but i can tell you of my tests with CHARACTERISTIC_MUST_ATTACK (trying to code this soldier that 'pops up' an attacking creature).
It simply doesn't seem to work at all...

Re: Talk about new cards here
by petitrudy » 02 Sep 2010, 08:41
Hi all,
Could you, when you make a new card, copy the card text (in english, dont translate) in other language ?
For example, in 6321_CARD_TEXT.XML, 6666_CARD_TEXT.XML only the English are complete.
Thx for your help.
Petitrudy
Could you, when you make a new card, copy the card text (in english, dont translate) in other language ?
For example, in 6321_CARD_TEXT.XML, 6666_CARD_TEXT.XML only the English are complete.
Thx for your help.
Petitrudy
- petitrudy
- Posts: 29
- Joined: 27 Oct 2009, 12:36
- Has thanked: 0 time
- Been thanked: 0 time
Re: Talk about new cards here
by logoliv » 02 Sep 2010, 16:02
@ petitrudy : it's unnecessary... you just need to configure the Magic launcher and set the language to English 

Last edited by logoliv on 03 Sep 2010, 16:15, edited 1 time in total.
Re: Talk about new cards here
by petitrudy » 03 Sep 2010, 13:23
I dont have magic laucher ??? where is it ? i can download it ?
I use the STEAM version
ok i find it :p thx !
I use the STEAM version
ok i find it :p thx !
- petitrudy
- Posts: 29
- Joined: 27 Oct 2009, 12:36
- Has thanked: 0 time
- Been thanked: 0 time
Re: Talk about new cards here
by Clark » 04 Sep 2010, 17:47
Hi,
I got confused about the implement of one key card for LEVELUP_DECK.
Need your kindly suggestion. (Even 'hard code' is welcome
)
Thank you.

I got confused about the implement of one key card for LEVELUP_DECK.
Need your kindly suggestion. (Even 'hard code' is welcome

Thank you.

- Clark
- Posts: 64
- Joined: 21 Aug 2010, 16:07
- Has thanked: 0 time
- Been thanked: 0 time
Re: Talk about new cards here
by Uresti » 05 Sep 2010, 00:13
i know we can add or substract cost of cards but not abilities...maybe if Cost its a general variable in the exe we could use something like:
<TRIGGERED_ABILITY tag="ACTIVATED_ABILITIES_RULE_1" internal="1" pre_trigger="1" layer="0">
<TRIGGER value="SPELL_PLAYED">
return return CreaturesInPlay()
</TRIGGER>
<EFFECT>
Cost = Cost - 1
</EFFECT>
Note: This will not work its just a sample, pre_trigger="1" will cause something before we cast it can be used with DecreaseCost(3) (as castiong cost)
<TRIGGERED_ABILITY tag="ACTIVATED_ABILITIES_RULE_1" internal="1" pre_trigger="1" layer="0">
<TRIGGER value="SPELL_PLAYED">
return return CreaturesInPlay()
</TRIGGER>
<EFFECT>
Cost = Cost - 1
</EFFECT>
Note: This will not work its just a sample, pre_trigger="1" will cause something before we cast it can be used with DecreaseCost(3) (as castiong cost)
- Uresti
- Posts: 151
- Joined: 25 Jun 2010, 15:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: Talk about new cards here
by Clark » 05 Sep 2010, 04:17
Exactly, that's the bottleneck i met with.Uresti wrote:i know we can add or substract cost of cards but not abilities...maybe if Cost its a general variable in the exe we could use something like:
<TRIGGERED_ABILITY tag="ACTIVATED_ABILITIES_RULE_1" internal="1" pre_trigger="1" layer="0">
<TRIGGER value="SPELL_PLAYED">
return return CreaturesInPlay()
</TRIGGER>
<EFFECT>
Cost = Cost - 1
</EFFECT>
Note: This will not work its just a sample, pre_trigger="1" will cause something before we cast it can be used with DecreaseCost(3) (as castiong cost)
I try to add another 'hard code' <ACTIVATED_ABILITY/> in the card with decreased mana cost.
But it seems the card won't work if there are more than 3 <ACTIVATED_ABILITY/> tags in it.

- Clark
- Posts: 64
- Joined: 21 Aug 2010, 16:07
- Has thanked: 0 time
- Been thanked: 0 time
Who is online
Users browsing this forum: No registered users and 4 guests