It is currently 21 Jul 2018, 20:58
   
Text Size

General XML/LUA Editing Findings

Moderators: Xander9009, CCGHQ Admins

Re: General XML/LUA Editing Findings

Postby Uresti » 12 Jul 2010, 21:56

well i posted about the 10th card limit few days ago...nobody read my posts!! :cry:

Also there is an hidden method called GetconvertedManaCost. So you could possibly use this :
local TargetCardConvertedManaCost = Object():GetTargetCard:GetconvertedManaCost
you can do that doing:
Object():GetFilter():SetConvertedCostMin()

Can you share the method you used to extract the Variables and functions from the exe? i tried with and Hex when game came out without susses

and the function to count it just stop at a given point as example the card Shauku Endbringer

<EFFECT>
Object():GetFilter():Clear()
Object():GetFilter():SetZone( ZONE_IN_PLAY )
Object():GetFilter():AddCardType( CARD_TYPE_CREATURE )
Object():GetFilter():NotTargetted()
if Object():GetFilter():CountStopAt( 2 ) ~= 1 then
CantAttack()
end
</EFFECT>
Just check "If there´s another creature in game" then cant attack
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby Uresti » 12 Jul 2010, 22:07

Huggybaby wrote:
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.
Im not who can say how you do that but i think is better if you start with "General Editing" like manalink should have more order.
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby Huggybaby » 12 Jul 2010, 22:14

I think the most logical thing to do is start by adding DotP to the "Software" category.
User avatar
Huggybaby
Administrator
 
Posts: 3069
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 567 times
Been thanked: 570 times

Re: General XML/LUA Editing Findings

Postby Epiphany » 12 Jul 2010, 22:20

Oh ok, about to get some sleep but tomorrow I'll have a look at getting things more organised. :)

Where are you guys based by the way? Just wondering if our time zones ever match! :)
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, 22:24

I live near Atlanta, Goblin Hero lives near Russia, Bog Wraith lives in Canada.
User avatar
Huggybaby
Administrator
 
Posts: 3069
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 567 times
Been thanked: 570 times

Re: General XML/LUA Editing Findings

Postby Epiphany » 12 Jul 2010, 22:25

Huggybaby wrote:I live near Atlanta, Goblin Hero lives near Russia, Bog Wraith lives in Canada.
Near Russia? Me too! Well East of Russia to be exact. I live in Estonia. :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 Uresti » 12 Jul 2010, 22:48

Im from the land of Nopal and Tortillas!! :)

greetings from Mexico!
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby Huggybaby » 12 Jul 2010, 23:10

Greetings. :) Oh, and extreme lives in Ukraine IIRC. So, we have a lot of people here from that side of the world.
User avatar
Huggybaby
Administrator
 
Posts: 3069
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 567 times
Been thanked: 570 times

Re: General XML/LUA Editing Findings

Postby Uresti » 13 Jul 2010, 01:19

Uresti proudly presents..... Teferis Puzzle Box!
well no at least not now.. seriously, we need to find a way to override the 10 targets limit, teferis puzzle works great until you have more than 10 cards in hand :/ anyway here is the code if someone wants to find a trick to use instead of GetNith

<TRIGGER value="END_OF_STEP">
return ( MTG():GetStep() == STEP_DRAW and TriggerPlayer():MyTurn() ~= 0 )
</TRIGGER>
<PRE_EFFECT>
ChooseNFromHand5( TriggerPlayer(), TriggerPlayer() , "ChooseCard", CountCardsInHand( TriggerPlayer() ) )
</PRE_EFFECT>
<EFFECT>
local XInHand = CountCardsInHand( TriggerPlayer() )
for i=0,CountCardsInHand( TriggerPlayer() ) do
if (Object():GetNthTargetCard( i ) ~= nil) then
Object():GetNthTargetCard( i ):PutInLibrary( -1 )
end
end
PlayerDrawCards( TriggerPlayer(), XInHand )
</EFFECT>
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby otherright » 13 Jul 2010, 01:43

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.
Yeah, I tried that as well. I've tried admin mode, running as XP (which really doesn't work anyway, but thought it was worth a try). This thing just isn't unpacking for me. Now I haven't tried unpacking from the command prompt. I did think about it, but it slowly slipped from my mind. Stressful week.

Not that this has anything to do with anything, but its Monday and I have 4 fighters with contests Thursday and I've been playing the other side of the coach coin this week getting things set up and holding their hands and telling them everything is all right, but they are still getting their as*es in there and fighting.

So, with work and coaching, its been a long week already. But I digress, I'll try it.
otherright
 
Posts: 63
Joined: 29 Sep 2009, 17:46
Has thanked: 4 times
Been thanked: 6 times

Re: General XML/LUA Editing Findings

Postby figment » 13 Jul 2010, 04:04

First, new user to the forum. Found the forum after searching around and thought I'd post some of my findings on this game. Looks like other users have already gotten beyond what I've done. My contribution I suppose would be a plugin for Paint.NET for reading/writing TDX files which are just modified DDS files.

Anyway to quote myself from another forum:
Here is a standalone custom deck example. The readme goes into more detail though is by no means newb friendly. Included is the example of a standalone WAD file. It contains examples of Custom AI Avatar (cleverly named Example AI), Custom Deck (named Example Deck) and a Custom Card (Bad Moon from 4e).
http://rapidshare.com/files/406282257/M ... 0.rar.html
http://www.sendspace.com/file/qxk4by

Probably need both the main game and the first DLC as I have both and am not going to test without it. I dont know if steam cares about the files or not so I'd recommend running steam offline and not trying to use any custom edits online.
TDXFileType Plugin for Paint.NET - Custom TDX file converter for Paint.NET
http://rapidshare.com/files/405003581/T ... pe.7z.html
http://www.sendspace.com/file/xljjka
---
As a second topic, I was trying to create a multicolored land (Underground Sea). I was able to do this and add it to a deck and it will work as either Blue or Black but it actually adds both Blue and Black at the same time doubling the mana. Also the AI does not understand how to play the cards (or its detected a hack and is playing extra dumb) and I think assumes they are only black. Anyway I suspect multicolored land would go a long way towards fixing the cannot tap land manually issue.
figment
 
Posts: 1
Joined: 13 Jul 2010, 03:37
Has thanked: 0 time
Been thanked: 0 time

Re: General XML/LUA Editing Findings

Postby Huggybaby » 13 Jul 2010, 04:23

Welcome to the forum, and thanks for sharing your work. There are exciting things to come, what with all the talented people here.

Please share a link to that other forum. Unlike some places, we don't have such restrictions here. We want to know about everyone working on this game because the more we can cooperate the more efficiently we can proceed.
User avatar
Huggybaby
Administrator
 
Posts: 3069
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 567 times
Been thanked: 570 times

Re: General XML/LUA Editing Findings

Postby Uresti » 13 Jul 2010, 04:42

Welcome figment!
thanks for sharing your work, your WAD example intrigues me cause our DLCs only are recognized when are uncompressed.
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 » 13 Jul 2010, 16:57

I'm really struggling with Fevered Convulsions.

Here's my code:

Code: Select all
<ACTIVATED_ABILITY tag="FEVERED_CONVULSIONS_RULE_1" layer="0">
      <COST type="Mana" cost="{2}{B}{B}" />
      <TARGET_DETERMINATION>
        return TargetCreatureBad()
      </TARGET_DETERMINATION>
      <PLAYTIME>
        ChooseTarget( "ChooseCreatureToGiveMinusOneMinusOne" )
      </PLAYTIME>
      <EFFECT>
      AddPowerAndToughnessToTargetCard( -1, -1 )
      </EFFECT>
    </ACTIVATED_ABILITY>
Anyone care to tell me what I'm doing wrong? :)

I'm not sure why it's not working, must be something really simple.
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 » 13 Jul 2010, 17:12

all the code is fine except you need to add -1 -1 counters

function from EFFECTS.LUA

function AddMinusOneMinusOneCounter( pObject )
pObject:AddCounters( MTG():MinusOneMinusOneCounters(), 1 )
end
Uresti
 
Posts: 151
Joined: 25 Jun 2010, 15:26
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Documentation

Who is online

Users browsing this forum: No registered users and 1 guest


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (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 1 guest

Login Form