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 otherright » 11 Jul 2010, 00:45
Of course I'd be willing to try them. Thank you guys for your efforts.
- otherright
- Posts: 63
- Joined: 29 Sep 2009, 17:46
- Has thanked: 4 times
- Been thanked: 6 times
Re: General XML/LUA Editing Findings
by otherright » 11 Jul 2010, 01:06
Quick Question:
Gibbed's unpacker. When I drop the wad on it, it executes and immediately crashes. Any ideas why? I've tried it both in the directory and outside the directory. Took it completely out of program files as well. Nothing. It crashes. I'd love to unpack the files and have a look around.
Gibbed's unpacker. When I drop the wad on it, it executes and immediately crashes. Any ideas why? I've tried it both in the directory and outside the directory. Took it completely out of program files as well. Nothing. It crashes. I'd love to unpack the files and have a look around.
- otherright
- Posts: 63
- Joined: 29 Sep 2009, 17:46
- Has thanked: 4 times
- Been thanked: 6 times
Re: General XML/LUA Editing Findings
by Uresti » 11 Jul 2010, 04:43
sorry i dont have an answer for that maybe your OS?? mine is 32 bits and works perfect.
- 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 » 11 Jul 2010, 11:50
Does the folder have all the .dll files in there too? There should be 7 in all in there.otherright wrote:Quick Question:
Gibbed's unpacker. When I drop the wad on it, it executes and immediately crashes. Any ideas why? I've tried it both in the directory and outside the directory. Took it completely out of program files as well. Nothing. It crashes. I'd love to unpack the files and have a look around.
-------
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 » 11 Jul 2010, 16:54
im not sure but can be a "bug" script error or really (probably) im too idiot for scripting.
Im still trying to reshuffle graveyard in to library so i made a filter to count all the cards in my graveyard, then i call the function to select the cards in the graveyard i can only select 10 cards no matter how much cards are in GY
<MULTICARDS>
.......
<PRE_EFFECT>
local cards = CountCardsInGraveyard( Object():GetTargetPlayer())
ChooseNFromGraveyard2( Object():GetTargetPlayer(), "ChooseACard", cards )
</PRE_EFFECT>
supposedly i can choose the total number of cards in the gY but no!! when i choose the 10th card function ends. I know my count in GY works fine "CountCardsInGraveyard" cause if i make an effect to gain life for the number of cards in GY i get life for the total of the cards not just 10
<EFFECT>
YouGainLIfe( CountCardsInGraveyard( Object():GetTargetPlayer() )
</EFFECT>
This is the Function that DEVS used for ChooseNFromGraveyard2
function ChooseNFromGraveyard2( pPlayer, pTag, pCount )
Object():GetFilter():Clear()
Object():GetFilter():SetPlayer( pPlayer )
Object():GetFilter():SetZone( ZONE_GRAVEYARD )
Object():GetPlayer():SetTargetCount( pCount )
local index = 1
while index < pCount + 1 do
Object():GetPlayer():SetTargetPrompt( index - 1, pTag )
index = index + 1
end
Object():GetPlayer():ChooseTargets()
end
Any Ideas???
Im still trying to reshuffle graveyard in to library so i made a filter to count all the cards in my graveyard, then i call the function to select the cards in the graveyard i can only select 10 cards no matter how much cards are in GY
<MULTICARDS>
.......
<PRE_EFFECT>
local cards = CountCardsInGraveyard( Object():GetTargetPlayer())
ChooseNFromGraveyard2( Object():GetTargetPlayer(), "ChooseACard", cards )
</PRE_EFFECT>
supposedly i can choose the total number of cards in the gY but no!! when i choose the 10th card function ends. I know my count in GY works fine "CountCardsInGraveyard" cause if i make an effect to gain life for the number of cards in GY i get life for the total of the cards not just 10
<EFFECT>
YouGainLIfe( CountCardsInGraveyard( Object():GetTargetPlayer() )
</EFFECT>
This is the Function that DEVS used for ChooseNFromGraveyard2
function ChooseNFromGraveyard2( pPlayer, pTag, pCount )
Object():GetFilter():Clear()
Object():GetFilter():SetPlayer( pPlayer )
Object():GetFilter():SetZone( ZONE_GRAVEYARD )
Object():GetPlayer():SetTargetCount( pCount )
local index = 1
while index < pCount + 1 do
Object():GetPlayer():SetTargetPrompt( index - 1, pTag )
index = index + 1
end
Object():GetPlayer():ChooseTargets()
end
Any Ideas???
- 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 » 11 Jul 2010, 17:36
I've had a go, and am doing it differently to you.
If I understand correctly you want to return everything in your graveyard into the library?
The way I achieved it is like this:

If I understand correctly you want to return everything in your graveyard into the library?
The way I achieved it is like this:
- Code: Select all
<SPELL_ABILITY tag="GRAVEYARD_TO_LIBRARY_RULE_1" zone="Graveyard" layer="0">
<FILTER>
return InGraveyard()
</FILTER>
<EFFECT>
Subject():PutInLibrary( -1 )
</EFFECT>
</SPELL_ABILITY>

-------
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 » 11 Jul 2010, 19:54
really that simple???
dang! 2 weeks killing myself
ill give it a try, posting later the results.
dang! 2 weeks killing myself

- 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 » 11 Jul 2010, 20:01
Hah, well... I approached it from a "There must be an easier way!"Uresti wrote:really that simple???
dang! 2 weeks killing myselfill give it a try, posting later the results.
I tried loads of different combinations of words before it finally started working.
Hope you get it working too, mate!

-------
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 Yanna » 11 Jul 2010, 20:35
Nice finding indeed ! So you can select everything in graveyard in a filter and then apply a function to it ? Very nice ^^

Re: General XML/LUA Editing Findings
by otherright » 11 Jul 2010, 20:38
Yes, all .dlls are in there. And of course, since I can't unpack it, I can't edit a deck. I'm using Vista.
- otherright
- Posts: 63
- Joined: 29 Sep 2009, 17:46
- Has thanked: 4 times
- Been thanked: 6 times
Re: General XML/LUA Editing Findings
by Uresti » 11 Jul 2010, 21:17
otherright you can use any DLC from the forum, they are unpacked and have almost everything you need to start making your desired cards. maybe your anti virus? OS 64 bits? try running in compatibility mode or download and install the last FRAMEWORK available, 2.0 i think.
In other world heres my code to shuffle thanks Ephiphany! now i can left alpha and code other sets cards.
<FILTER>
return InGraveyard() and OwnedByYou()
</FILTER>
<EFFECT>
Subject():PutInLibrary( -1 )
ShuffleOwnersLibrary()
</EFFECT>
</SPELL_ABILITY>
now timetwister, feldons cane and other jewels can be done.
In other world heres my code to shuffle thanks Ephiphany! now i can left alpha and code other sets cards.
<FILTER>
return InGraveyard() and OwnedByYou()
</FILTER>
<EFFECT>
Subject():PutInLibrary( -1 )
ShuffleOwnersLibrary()
</EFFECT>
</SPELL_ABILITY>
now timetwister, feldons cane and other jewels can be done.
- 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 » 11 Jul 2010, 22:14
Thats's good newsUresti wrote:now timetwister, feldons cane and other jewels can be done.


Re: General XML/LUA Editing Findings
by Epiphany » 11 Jul 2010, 22:15
Hmm, I'm not sure then. I have the folders on my desktop in "Desktop\Magic Tools\bin-temp2\"otherright wrote:Yes, all .dlls are in there. And of course, since I can't unpack it, I can't edit a deck. I'm using Vista.
Have you tried copying the data wad into the same folder and then running the unpack program from the command prompt? Unfortunately you will need to unpack the data_core folder if you want to be able to add new images to the game.
So glad it works for you! That's what I love about these forums, we can all learn off of each other and bounce ideas around the place.Uresti wrote:In other world heres my code to shuffle thanks Ephiphany! now i can left alpha and code other sets cards.
-------
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 » 11 Jul 2010, 22:20
Yeah I got my inspiration when I thought "hold on a minute, if you can give all white creatures +1/+1... can you give all creatures the ReturnToLibrary effect?" and it turns out you can.Yanna wrote:Nice finding indeed ! So you can select everything in graveyard in a filter and then apply a function to it ? Very nice ^^
I think it opens up quite a lot more options for other cards.
-------
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 Yanna » 11 Jul 2010, 22:42
Technically you can separate your images in a separate DLC, you need to update the Appinfo files that are located in the DLC/DATA_PC folder. The only thing required about the DATA_CORE folder is if you want to add the secret menu function (and thus unlock decks).Epiphany wrote:Unfortunately you will need to unpack the data_core folder if you want to be able to add new images to the game.
ExactlyEpiphany wrote:So glad it works for you! That's what I love about these forums, we can all learn off of each other and bounce ideas around the place.


Who is online
Users browsing this forum: No registered users and 1 guest