Page 4 of 8

Re: General XML/LUA Editing Findings

PostPosted: 11 Jul 2010, 00:45
by otherright
Of course I'd be willing to try them. Thank you guys for your efforts.

Re: General XML/LUA Editing Findings

PostPosted: 11 Jul 2010, 01:06
by otherright
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.

Re: General XML/LUA Editing Findings

PostPosted: 11 Jul 2010, 04:43
by Uresti
sorry i dont have an answer for that maybe your OS?? mine is 32 bits and works perfect.

Re: General XML/LUA Editing Findings

PostPosted: 11 Jul 2010, 11:50
by Epiphany
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.
Does the folder have all the .dll files in there too? There should be 7 in all in there.

Re: General XML/LUA Editing Findings

PostPosted: 11 Jul 2010, 16:54
by Uresti
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???

Re: General XML/LUA Editing Findings

PostPosted: 11 Jul 2010, 17:36
by Epiphany
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:

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>
That seems to work fine for me, although you'll need to add an instruction at the end of the effect to shuffle the library. That should get you on the right lines though, I hope! :)

Re: General XML/LUA Editing Findings

PostPosted: 11 Jul 2010, 19:54
by Uresti
really that simple???

dang! 2 weeks killing myself :) ill give it a try, posting later the results.

Re: General XML/LUA Editing Findings

PostPosted: 11 Jul 2010, 20:01
by Epiphany
Uresti wrote:really that simple???

dang! 2 weeks killing myself :) ill give it a try, posting later the results.
Hah, well... I approached it from a "There must be an easier way!"

I tried loads of different combinations of words before it finally started working.

Hope you get it working too, mate! :)

Re: General XML/LUA Editing Findings

PostPosted: 11 Jul 2010, 20:35
by Yanna
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

PostPosted: 11 Jul 2010, 20:38
by otherright
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.

Re: General XML/LUA Editing Findings

PostPosted: 11 Jul 2010, 21:17
by Uresti
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.

Re: General XML/LUA Editing Findings

PostPosted: 11 Jul 2010, 22:14
by Yanna
Uresti wrote:now timetwister, feldons cane and other jewels can be done.
Thats's good news :) Timetwister is my favorite card indeed ! Looking forward to your Alpha set mate.

Re: General XML/LUA Editing Findings

PostPosted: 11 Jul 2010, 22:15
by Epiphany
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.
Hmm, I'm not sure then. I have the folders on my desktop in "Desktop\Magic Tools\bin-temp2\"

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.

Uresti wrote:In other world heres my code to shuffle thanks Ephiphany! now i can left alpha and code other sets cards.
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.

Re: General XML/LUA Editing Findings

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

I think it opens up quite a lot more options for other cards.

Re: General XML/LUA Editing Findings

PostPosted: 11 Jul 2010, 22:42
by Yanna
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.
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: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.
Exactly :) Maybe 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...