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 Uresti » 12 Jul 2010, 00:26
- 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 » 12 Jul 2010, 07:36
Hmmm I can't get it to work. I can see the files that you mean, and I've changed all the things to link to my folder number but it's still not working. What exactly does it need to say, and where?Yanna wrote: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).

I was thinking we should perhaps start a wiki somewhere, so that we can start documenting everything we're doing.Yanna wrote:ExactlyMaybe we should start a new thread about DOTP editing because it seems to be a great moddable game once you get the proper code syntax...
-------
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 » 12 Jul 2010, 07:44
I'm thinking about setting up a wiki with these guys:
http://www.wikispaces.com/
Does anyone object? It's free for 2GB of information, so we can keep hosting our files via other means and also keep these forums as our main talking point.
Is that ok? What should I call it?
http://www.wikispaces.com/
Does anyone object? It's free for 2GB of information, so we can keep hosting our files via other means and also keep these forums as our main talking point.
Is that ok? What should I call it?

-------
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 » 12 Jul 2010, 08:23
Never mind Yanna, I found the problem with the art not showing up! I had copied Uresti's early build of his Alpha set and he had spelt Illustrations wrong! It couldn't find the folder because it wasn't linking to it!
Lol!
Lol!

-------
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 » 12 Jul 2010, 19:12
We have a wiki here, please feel free to use it: http://www.slightlymagic.net/wiki/
-
Huggybaby - Administrator
- Posts: 3225
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 734 times
- Been thanked: 601 times
Re: General XML/LUA Editing Findings
by Epiphany » 12 Jul 2010, 19:28
Lol, that'll teach me to not look at the big buttons at the top of the site!Huggybaby wrote:We have a wiki here, please feel free to use it: http://www.slightlymagic.net/wiki/

Thank you!
Oh, apparently I'm not allowed to edit it. It says:
"You do not have permission to edit this page, for the following reason:
The action you have requested is limited to users in the group: Users."
-------
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 » 12 Jul 2010, 19:34
Slightly Offtopic, i found a major drawback...
While making a mill deck (and a good one at that, landfall is easy to implement), i tried to play haunting echoes on the opponent's graveyard. It should have removed every nonbasicland card in graveyard and corresponding cards in library but it didn't...
After looking at what was causing this bug, it is now clear that there's a maximum of targets a spell can have. No matter how i try it, Object():GetPlayer():ChooseTargets() is limited to 10 targets
This breaks haunting echoes as of now, since i'm not able to 'select' each card in graveyard one by one (and thus get its Ref)...
Anybody found a way to get, say, card number X in a graveyard. What i'm trying to achieve is :
- Count number of nonland cards in graveyard
- one by one, 'bind" to the card to get its Ref (name)
- scan through the library and find matching cards, removing them
Hopefully a solution can be found for this !
While making a mill deck (and a good one at that, landfall is easy to implement), i tried to play haunting echoes on the opponent's graveyard. It should have removed every nonbasicland card in graveyard and corresponding cards in library but it didn't...
After looking at what was causing this bug, it is now clear that there's a maximum of targets a spell can have. No matter how i try it, Object():GetPlayer():ChooseTargets() is limited to 10 targets

This breaks haunting echoes as of now, since i'm not able to 'select' each card in graveyard one by one (and thus get its Ref)...
Anybody found a way to get, say, card number X in a graveyard. What i'm trying to achieve is :
- Count number of nonland cards in graveyard
- one by one, 'bind" to the card to get its Ref (name)
- scan through the library and find matching cards, removing them
Hopefully a solution can be found for this !

Re: General XML/LUA Editing Findings
by Huggybaby » 12 Jul 2010, 19:35
The wiki requires another login. You login to the wiki using the same login and password you use to access the forum.Epiphany wrote:Thank you!Huggybaby wrote:We have a wiki here, please feel free to use it: http://www.slightlymagic.net/wiki/
Oh, apparently I'm not allowed to edit it. It says:
"You do not have permission to edit this page, for the following reason:
The action you have requested is limited to users in the group: Users."
NP. lol I have a hard time finding the wiki myself, because I always go directly to the forum and it doesn't have those buttons.Lol, that'll teach me to not look at the big buttons at the top of the site!
Anyway, the difference between our wiki and one of the others is that you know ours won't be edited or threatened by some interested third party.
I hope you can figure out how to use it though. For some reason, wiki editing is its own creature, completely different than forum editing.
-
Huggybaby - Administrator
- Posts: 3225
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 734 times
- Been thanked: 601 times
Re: General XML/LUA Editing Findings
by Epiphany » 12 Jul 2010, 19:52
I don't know!Yanna wrote:Slightly Offtopic, i found a major drawback...
While making a mill deck (and a good one at that, landfall is easy to implement), i tried to play haunting echoes on the opponent's graveyard. It should have removed every nonbasicland card in graveyard and corresponding cards in library but it didn't...
After looking at what was causing this bug, it is now clear that there's a maximum of targets a spell can have. No matter how i try it, Object():GetPlayer():ChooseTargets() is limited to 10 targets![]()
This breaks haunting echoes as of now, since i'm not able to 'select' each card in graveyard one by one (and thus get its Ref)...
Anybody found a way to get, say, card number X in a graveyard. What i'm trying to achieve is :
- Count number of nonland cards in graveyard
- one by one, 'bind" to the card to get its Ref (name)
- scan through the library and find matching cards, removing them
Hopefully a solution can be found for this !
Though I have seen a function I've not heard before, it's on the card Vengeful Firebrand and looks like this:
- Code: Select all
<EFFECT>
Object():GetFilter():Clear()
Object():GetFilter():SetZone( ZONE_GRAVEYARD )
Object():GetFilter():SetPlayer( Object():GetPlayer() )
Object():GetFilter():AddSubType( CREATURE_TYPE_WARRIOR )
Object():GetFilter():NotTargetted()
if Object():GetFilter():CountStopAt( 1 ) ~= 0 then
Haste()
end
</EFFECT>
Possibly!

Something to look into at least.
-------
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 » 12 Jul 2010, 19:53
Ok thanks again. Will have a go and see if I can create a few useful pages without cluttering it up too much.Huggybaby wrote:The wiki requires another login. You login to the wiki using the same login and password you use to access the forum.
NP. lol I have a hard time finding the wiki myself, because I always go directly to the forum and it doesn't have those buttons.
Anyway, the difference between our wiki and one of the others is that you know ours won't be edited or threatened by some interested third party.
I hope you can figure out how to use it though. For some reason, wiki editing is its own creature, completely different than forum editing.
-------
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 » 12 Jul 2010, 20:33
Yeah i tried to use it already but i can't target the Nth card in graveyard still...Epiphany wrote:Perhaps there is some way that you could use the CountStopAt function in a for loop that works from 1 up to the count of the number of cards in the graveyard?
Possibly!
Something to look into at least.
BUT
And there's a big big BUT ! I've cracked open the EXE file using an hexadecimal editor, trying to find GetNth of some sort and guess what... There are some hidden functions that aren't present in the LUA files

Trying to toy with some thing found into the exe i manage to do this :
Object():GetPlayer():Library_GetNth(3):RemoveFromGame()
Yes, that binds to the 3rd card in your deck and removes it from the library ^^ and this Library_GetNth cannot be found anywere in LUA files...
Also there is an hidden method called GetconvertedManaCost. So you could possibly use this :
local TargetCardConvertedManaCost = Object():GetTargetCard:GetconvertedManaCost ^^ As i'm a big fan of reanimator decks i can sense 'reanimate' hitting the playfield

Anyway i'll try to get some more infos of that exe, coding cards will be better if every function is clearly known...

Re: General XML/LUA Editing Findings
by Epiphany » 12 Jul 2010, 20:37
Wow, I'd say that's a major breakthrough! Well done!Yanna wrote:Yeah i tried to use it already but i can't target the Nth card in graveyard still...
BUT
And there's a big big BUT ! I've cracked open the EXE file using an hexadecimal editor, trying to find GetNth of some sort and guess what... There are some hidden functions that aren't present in the LUA files
Trying to toy with some thing found into the exe i manage to do this :
Object():GetPlayer():Library_GetNth(3):RemoveFromGame()
Yes, that binds to the 3rd card in your deck and removes it from the library ^^ and this Library_GetNth cannot be found anywere in LUA files...
Also there is an hidden method called GetconvertedManaCost. So you could possibly use this :
local TargetCardConvertedManaCost = Object():GetTargetCard:GetconvertedManaCost ^^ As i'm a big fan of reanimator decks i can sense 'reanimate' hitting the playfield![]()
Anyway i'll try to get some more infos of that exe, coding cards will be better if every function is clearly known...

And oh man! GetconvertedManaCost means I might be one step closer to making my favourite card: Aluren!
-------
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 » 12 Jul 2010, 21:06
I've had a go at making a page, is this ok? http://www.slightlymagic.net/wiki/List_ ... n_triggersHuggybaby wrote:We have a wiki here, please feel free to use it: http://www.slightlymagic.net/wiki/
If so I'll start adding new sections for other things I know about so far.
-------
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 » 12 Jul 2010, 21:17
Thanks ^^ And new findings also.Epiphany wrote:Wow, I'd say that's a major breakthrough! Well done!
And oh man! GetconvertedManaCost means I might be one step closer to making my favourite card: Aluren!
Each Object (card) has some storage where you can store values.
The one i'm playing with actually is :
Object():Register_Object_Set( %INDEX%, %OBJECT% ).
In this you can store other cards. Say for example you want to keep track of a card, you can store it in the storage of another card to retrieve it later.
The bad news is that through testing, %INDEX% cannot be greater than 8 (another limitation


Re: General XML/LUA Editing Findings
by Huggybaby » 12 Jul 2010, 21:46
That looks great. Don't forget to add a link to the top page.Epiphany wrote:I've had a go at making a page, is this ok? http://www.slightlymagic.net/wiki/List_ ... n_triggersHuggybaby wrote:We have a wiki here, please feel free to use it: http://www.slightlymagic.net/wiki/
If so I'll start adding new sections for other things I know about so far.
-
Huggybaby - Administrator
- Posts: 3225
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 734 times
- Been thanked: 601 times
Who is online
Users browsing this forum: No registered users and 1 guest