Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Documentation
General XML/LUA Editing Findings
Moderator: CCGHQ Admins
Re: General XML/LUA Editing Findings
by Epiphany » 04 Jul 2010, 08:30
I just tested the Sliver deck. Lovely stuff!
However, I think something does indeed need to be tuned with the card value and whatnot.
I just attacked with all my slivers, and he had a Giant Spider out, had he blocked one of my creatures with it, two things would happen:
So he was either being rubbish, not understanding the importance of the cards, or just giving up. Any of the three are an option.
However, I think something does indeed need to be tuned with the card value and whatnot.
I just attacked with all my slivers, and he had a Giant Spider out, had he blocked one of my creatures with it, two things would happen:
- The computer would still be alive.
- The Giant Spider would have survived too.
So he was either being rubbish, not understanding the importance of the cards, or just giving up. Any of the three are an option.
-------
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
- Epiphany
- Posts: 95
- Joined: 30 Jun 2010, 13:27
- Has thanked: 0 time
- Been thanked: 0 time
Re: General XML/LUA Editing Findings
by Uresti » 04 Jul 2010, 15:43
AI will always make dumb decisions.
still AI dont want to play slivers i changed the cardvalue for more slivers and throw them at a deck and Ai only plays 1 slivers then nothing.
still AI dont want to play slivers i changed the cardvalue for more slivers and throw them at a deck and Ai only plays 1 slivers then nothing.
- Uresti
- Posts: 151
- Joined: 25 Jun 2010, 15:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: General XML/LUA Editing Findings
by Yanna » 05 Jul 2010, 19:41
Allright, after litterally hours of testing i finally nailed it !
At first i was putting all cards in the DATA_CORE folder, so i wanted to be able to see which pics i added in there (hence the NOVAXXXX).
Well the thing is, once those picture filenames are corrected, the AI plays every card in the deck. And honestly he plays some very good
CARDMAXNUMBER, COLLECTORNUMBER don't affect anything in the card. Though RARITY and CARDVALUE are directly linked to the AI's choice of which card to play.
So now i'm still making a huge DLC, here's an example of the cards i'm including (100 % tested working) :
Mutilate
Mogg Fanatic
Goblin Warrens
Empyrial Archangel
Thanks for the help on testing the cards out !
See ya soon
YannA a.k.a NOVA
EDIT : added a new card (and yes, threshold can be made with a 'function') :
Putrid Imp
At first i was putting all cards in the DATA_CORE folder, so i wanted to be able to see which pics i added in there (hence the NOVAXXXX).
Well the thing is, once those picture filenames are corrected, the AI plays every card in the deck. And honestly he plays some very good
CARDMAXNUMBER, COLLECTORNUMBER don't affect anything in the card. Though RARITY and CARDVALUE are directly linked to the AI's choice of which card to play.
So now i'm still making a huge DLC, here's an example of the cards i'm including (100 % tested working) :
Mutilate
Mogg Fanatic
Goblin Warrens
Empyrial Archangel
Thanks for the help on testing the cards out !
See ya soon
YannA a.k.a NOVA
EDIT : added a new card (and yes, threshold can be made with a 'function') :
Putrid Imp
Last edited by Yanna on 05 Jul 2010, 21:02, edited 1 time in total.
Re: General XML/LUA Editing Findings
by Epiphany » 05 Jul 2010, 20:42
I really love the effort that you're putting in with this Yanna.
I've been constantly hitting brick walls, I keep trying to make a card, spend ages trying to get it to work and then end up giving up. It's very soul destroying! There are so many cards I can't get to work, just while trying to make them in alphabetical order.
Maybe I should just get on with documenting what we already know.
I've been constantly hitting brick walls, I keep trying to make a card, spend ages trying to get it to work and then end up giving up. It's very soul destroying! There are so many cards I can't get to work, just while trying to make them in alphabetical order.
Maybe I should just get on with documenting what we already know.
-------
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
- Epiphany
- Posts: 95
- Joined: 30 Jun 2010, 13:27
- Has thanked: 0 time
- Been thanked: 0 time
Re: General XML/LUA Editing Findings
by Huggybaby » 05 Jul 2010, 22:24
Good stuff fellas. And here's hoping omnix gets his internet back soon!
-
Huggybaby - Administrator
- Posts: 3201
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 696 times
- Been thanked: 594 times
Re: General XML/LUA Editing Findings
by Yanna » 06 Jul 2010, 00:04
Thanks for the support guys ! It takes really lot of time to do the cards you want, and basically it's a step by step process. My advice is to hang on, start with an easy card then try to add some more abilities to it.Epiphany wrote:I really love the effort that you're putting in with this Yanna.
I've been constantly hitting brick walls, I keep trying to make a card, spend ages trying to get it to work and then end up giving up. It's very soul destroying! There are so many cards I can't get to work, just while trying to make them in alphabetical order.
Maybe I should just get on with documenting what we already know.
Soon enough you should be more confident with the way the code works. Althought it's true without any reference it's even longer because you have to scavenge through all the files to get the proper syntax...
Looking forward for omnix and other people to join, the more the merrierHuggybaby wrote:Good stuff fellas. And here's hoping omnix gets his internet back soon!
YannA a.k.a NOVA
Re: General XML/LUA Editing Findings
by Uresti » 06 Jul 2010, 07:20
Then, forced numbers in TXD names to solve crashing and AI issues playing cards, still cards values intrigues me....
anyone noticed in CONSTANTS.LUA the mana colors?? any idea how to call them?
anyone noticed in CONSTANTS.LUA the mana colors?? any idea how to call them?
- Uresti
- Posts: 151
- Joined: 25 Jun 2010, 15:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: General XML/LUA Editing Findings
by Epiphany » 06 Jul 2010, 07:36
Thanks for the advice! You're right, I should stick to it. I made the Altar of Dementia and it felt very rewarding to use it!Yanna wrote:Thanks for the support guys ! It takes really lot of time to do the cards you want, and basically it's a step by step process. My advice is to hang on, start with an easy card then try to add some more abilities to it.
Soon enough you should be more confident with the way the code works. Althought it's true without any reference it's even longer because you have to scavenge through all the files to get the proper syntax...
YannA a.k.a NOVA
I haven't managed to. Do you mean to call them as a mana resource? I must admit it really sucks that we can't make a Llanowar Elves or Birds of Paradise based on the current system.Uresti wrote:anyone noticed in CONSTANTS.LUA the mana colors?? any idea how to call them?
-------
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
- Epiphany
- Posts: 95
- Joined: 30 Jun 2010, 13:27
- Has thanked: 0 time
- Been thanked: 0 time
Re: General XML/LUA Editing Findings
by Epiphany » 06 Jul 2010, 10:52
I must be doing something really stupid, but I'm trying to make Apocalypse and I have the following code:
The function is listed in Effects.LUA as "DiscardHand ( pPlayer )"
This should be really basic stuff, but I often struggle when targeting the card player.
- Code: Select all
<SPELL_ABILITY tag="APOCALYPSE_RULE_1" layer="0">
<FILTER>
return (Permanents() and InPlay())
</FILTER>
<EFFECT>
Subject():RemoveFromGame()
DiscardHand( Object():GetPlayer() )
</EFFECT>
</SPELL_ABILITY>
The function is listed in Effects.LUA as "DiscardHand ( pPlayer )"
This should be really basic stuff, but I often struggle when targeting the card player.
-------
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
- Epiphany
- Posts: 95
- Joined: 30 Jun 2010, 13:27
- Has thanked: 0 time
- Been thanked: 0 time
Re: General XML/LUA Editing Findings
by Epiphany » 06 Jul 2010, 11:05
Actually.
The above does work, except only when it destroys permanents. If there were no permanents in play already then it doesn't do the discard effect. Anyone know how to make it do the second ability regardless of whether anything has been removed from the game?
The above does work, except only when it destroys permanents. If there were no permanents in play already then it doesn't do the discard effect. Anyone know how to make it do the second ability regardless of whether anything has been removed from the game?
-------
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
- Epiphany
- Posts: 95
- Joined: 30 Jun 2010, 13:27
- Has thanked: 0 time
- Been thanked: 0 time
- Uresti
- Posts: 151
- Joined: 25 Jun 2010, 15:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: General XML/LUA Editing Findings
by Epiphany » 06 Jul 2010, 15:42
Ah, of course!Uresti wrote:do another <spell ability>
Cheers!
-------
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
- Epiphany
- Posts: 95
- Joined: 30 Jun 2010, 13:27
- Has thanked: 0 time
- Been thanked: 0 time
Re: General XML/LUA Editing Findings
by Epiphany » 06 Jul 2010, 15:50
Has anyone had a go at implementing buyback yet?
I tried, and it went something like this:
If you say "yes" then it will return to your hand without increasing the cost. So I'm not sure what to do.
I tried, and it went something like this:
- Code: Select all
<SPELL_ABILITY tag="SEARING_TOUCH_RULE_1" layer="0">
<TARGET_DETERMINATION>
return TargetCreatureOrPlayerBad()
</TARGET_DETERMINATION>
<PLAYTIME>
Object():GetPlayer():BeginNewMultipleChoice()
Object():GetPlayer():AddMultipleChoiceAnswer( "YES" )
Object():GetPlayer():AddMultipleChoiceAnswer( "NO" )
Object():GetPlayer():AskMultipleChoiceQuestion( "DoYouWantToPayBuyback" )
if Object():GetMultipleChoiceResult() == 0 then
IncreaseCost( 6 )
end
ChooseTarget( "ChooseCreatureOrPlayerTwoDamage" )
</PLAYTIME>
<EFFECT>
if Object():GetMultipleChoiceResult() == 0 then
DealDamageToTarget( 2 )
ReturnThisCardToOwnersHand()
else
SacrificeThisCard()
DealDamageToTarget( 2 )
end
</EFFECT>
</SPELL_ABILITY>
If you say "yes" then it will return to your hand without increasing the cost. So I'm not sure what to do.
-------
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
- Epiphany
- Posts: 95
- Joined: 30 Jun 2010, 13:27
- Has thanked: 0 time
- Been thanked: 0 time
Re: General XML/LUA Editing Findings
by Uresti » 07 Jul 2010, 00:22
Ouch im stuck in the same problem.
im trying something like (still dont work)
If not then
deladage()
end
<ELSE_EFfECT>
IncreaseCost()
DealDamage()
ReturnThisCardToHand()
<ELSE_EFFECT>
im trying something like (still dont work)
If not then
deladage()
end
<ELSE_EFfECT>
IncreaseCost()
DealDamage()
ReturnThisCardToHand()
<ELSE_EFFECT>
- Uresti
- Posts: 151
- Joined: 25 Jun 2010, 15:26
- Has thanked: 0 time
- Been thanked: 0 time
Re: General XML/LUA Editing Findings
by Epiphany » 07 Jul 2010, 06:11
Seems like a good way of approaching it! I'll have another try later today.Uresti wrote:Ouch im stuck in the same problem.
im trying something like (still dont work)
If not then
deladage()
end
<ELSE_EFfECT>
IncreaseCost()
DealDamage()
ReturnThisCardToHand()
<ELSE_EFFECT>
On other news:
I've made a file that combines all of the cards in the data_core folder into one text file.
http://padbury.uk.to/magic/combined_data_core_cards.rar
Basically if you open it in notepad it makes searching for certain keywords much easier because it searches every card at once!
-------
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
http://www.slightlymagic.net/forum/viewtopic.php?f=62&t=2876
^ My release thread
http://www.slightlymagic.net/wiki/Duels_of_the_Planeswalkers
^ Check out the DotP wiki for help and guides
- Epiphany
- Posts: 95
- Joined: 30 Jun 2010, 13:27
- Has thanked: 0 time
- Been thanked: 0 time
Who is online
Users browsing this forum: No registered users and 3 guests