It is currently 18 Dec 2018, 11:17
   
Text Size

General XML/LUA Editing Findings

Moderators: Xander9009, CCGHQ Admins

Re: General XML/LUA Editing Findings

Postby Uresti » 12 Jul 2010, 00:26

Sorry for the offtopic but....
Uresti wrote:In other world......"
LOL sorry was "WORDS"
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 » 12 Jul 2010, 07:36

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).
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: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...
I was thinking we should perhaps start a wiki somewhere, so that we can start documenting everything we're doing.
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 » 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? :)
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 » 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! :D
Epiphany
 
Posts: 95
Joined: 30 Jun 2010, 13:27
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby Huggybaby » 12 Jul 2010, 19:12

We have a wiki here, please feel free to use it: http://www.slightlymagic.net/wiki/
User avatar
Huggybaby
Administrator
 
Posts: 3077
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 574 times
Been thanked: 572 times

Re: General XML/LUA Editing Findings

Postby Epiphany » 12 Jul 2010, 19:28

Huggybaby wrote:We have a wiki here, please feel free to use it: http://www.slightlymagic.net/wiki/
Lol, that'll teach me to not look at the big buttons at the top of the site! :D

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."
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 » 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 8-[

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 !
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 Huggybaby » 12 Jul 2010, 19:35

Epiphany wrote:
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."
The wiki requires another login. You login to the wiki using the same login and password you use to access the forum.

Lol, that'll teach me to not look at the big buttons at the top of the site! :D
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.
User avatar
Huggybaby
Administrator
 
Posts: 3077
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 574 times
Been thanked: 572 times

Re: General XML/LUA Editing Findings

Postby Epiphany » 12 Jul 2010, 19:52

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 8-[

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 !
I don't know!

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>
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! :D

Something to look into at least.
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 » 12 Jul 2010, 19:53

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.
Ok thanks again. Will have a go and see if I can create a few useful pages without cluttering it up too much.
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 » 12 Jul 2010, 20:33

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! :D

Something to look into at least.
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 :lol:

Anyway i'll try to get some more infos of that exe, coding cards will be better if every function is clearly known...
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 » 12 Jul 2010, 20:37

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

Anyway i'll try to get some more infos of that exe, coding cards will be better if every function is clearly known...
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!
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 » 12 Jul 2010, 21:06

Huggybaby wrote:We have a wiki here, please feel free to use it: http://www.slightlymagic.net/wiki/
I've had a go at making a page, is this ok? http://www.slightlymagic.net/wiki/List_ ... n_triggers

If so I'll start adding new sections for other things I know about so far.
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 » 12 Jul 2010, 21:17

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!
Thanks ^^ And new findings also.

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 :shock: ).
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 Huggybaby » 12 Jul 2010, 21:46

Epiphany wrote:
Huggybaby wrote:We have a wiki here, please feel free to use it: http://www.slightlymagic.net/wiki/
I've had a go at making a page, is this ok? http://www.slightlymagic.net/wiki/List_ ... n_triggers

If so I'll start adding new sections for other things I know about so far.
That looks great. Don't forget to add a link to the top page.
User avatar
Huggybaby
Administrator
 
Posts: 3077
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 574 times
Been thanked: 572 times

PreviousNext

Return to Documentation

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 2 guests

Login Form