It is currently 19 Apr 2024, 18:53
   
Text Size

General XML/LUA Editing Findings

Moderator: CCGHQ Admins

Re: General XML/LUA Editing Findings

Postby 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

Postby 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.
otherright
 
Posts: 63
Joined: 29 Sep 2009, 17:46
Has thanked: 4 times
Been thanked: 6 times

Re: General XML/LUA Editing Findings

Postby 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

Postby Epiphany » 11 Jul 2010, 11:50

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.
Epiphany
 
Posts: 95
Joined: 30 Jun 2010, 13:27
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby 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???
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby 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:

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! :)
Epiphany
 
Posts: 95
Joined: 30 Jun 2010, 13:27
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby Uresti » 11 Jul 2010, 19:54

really that simple???

dang! 2 weeks killing myself :) ill give it a try, posting later the results.
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby Epiphany » 11 Jul 2010, 20:01

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! :)
Epiphany
 
Posts: 95
Joined: 30 Jun 2010, 13:27
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby 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 ^^
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: General XML/LUA Editing Findings

Postby 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

Postby 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.
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby Yanna » 11 Jul 2010, 22:14

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.
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

Re: General XML/LUA Editing Findings

Postby Epiphany » 11 Jul 2010, 22:15

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.
Epiphany
 
Posts: 95
Joined: 30 Jun 2010, 13:27
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby Epiphany » 11 Jul 2010, 22:20

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.
Epiphany
 
Posts: 95
Joined: 30 Jun 2010, 13:27
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby Yanna » 11 Jul 2010, 22:42

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...
Image
User avatar
Yanna
 
Posts: 137
Joined: 03 Mar 2009, 14:52
Has thanked: 0 time
Been thanked: 1 time

PreviousNext

Return to Documentation

Who is online

Users browsing this forum: No registered users and 26 guests


Who is online

In total there are 26 users online :: 0 registered, 0 hidden and 26 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 26 guests

Login Form