Page 1 of 1
Changes to card script format

Posted:
22 Feb 2013, 08:57
by Max mtg
SVar:Rarity - ignored during parse (removal from all scripts is highly recommended)
Text: - optional (no need for 'no text' lines)
All Licids use 'Licid' alternative state (name globally changed)
Out of game tokens may be represented by CardToken class (used in quest initial conditions)
Re: Changes to card script format

Posted:
22 Feb 2013, 12:55
by timmermac
Isn't the rarity SVar used for things like deck editor and spell shop sorting and booster generation? Or is that covered by the setinfo lines?
Re: Changes to card script format

Posted:
22 Feb 2013, 13:32
by Max mtg
timmermac wrote:Isn't the rarity SVar used for things like deck editor and spell shop sorting and booster generation? Or is that covered by the setinfo lines?
Deckeditor has not been using svar-rarity for over 9000 revisions - that is ~550 days.
Yes, rarity is taken from setinfo. If setinfo is not supplied some default set and rarity are assigned.
Re: Changes to card script format

Posted:
22 Feb 2013, 19:22
by friarsol
Looks like the picture field was still being used by Quest Pets, as mine no longer display their images.
Re: Changes to card script format

Posted:
22 Feb 2013, 19:30
by Max mtg
friarsol wrote:Looks like the picture field was still being used by Quest Pets, as mine no longer display their images.
1. Tokens are not displayed correctly, I suspect. Should download token pictures and investigate.
2. SVar:Picture was not deprecated.
3. Sol, do not use singletons.getmodel.getgame in classes which already have a game field (such classes as player*, gameaction*)
Re: Changes to card script format

Posted:
22 Feb 2013, 19:41
by friarsol
Max mtg wrote:3. Sol, do not use singletons.getmodel.getgame in classes which already have a game field (such classes as player*, gameaction*)
Ah didn't realize Player had it already. I added the code to Card first and then just copied over the useful bits. Didn't expect the two GameEntities to be in different states as far as that goes.
Edit: r19826
Re: Changes to card script format

Posted:
22 Feb 2013, 19:59
by Max mtg
Card should also have a reference to game, but I didn't yet drive the code to that state.
Re: Changes to card script format

Posted:
22 Feb 2013, 20:06
by friarsol
Max mtg wrote:Card should also have a reference to game, but I didn't yet drive the code to that state.
Makes sense there's only so much mind-numbing conversions one can handle in a short amount of time.
Re: Changes to card script format

Posted:
22 Feb 2013, 21:21
by Max mtg
Speaking of quest tokens, do you know where to obtain them?
No beta release topic had any link to tokens, neither ones coming from sets, nor custom ones drawn for quest.
Re: Changes to card script format

Posted:
22 Feb 2013, 21:35
by friarsol
Max mtg wrote:Speaking of quest tokens, do you know where to obtain them?
No beta release topic had any link to tokens, neither ones coming from sets, nor custom ones drawn for quest.
Content Downloaders -> Download Quest Images
Re: Changes to card script format

Posted:
22 Feb 2013, 21:45
by myk
I know you haven't had a chance to test it yet, but just fyi, r19829 did not get the images back
Re: Changes to card script format

Posted:
22 Feb 2013, 22:52
by Max mtg
Thanks, I already got the images and could see results by myself.
19834 fixes token images
Re: Changes to card script format

Posted:
22 Feb 2013, 23:04
by myk
No offense intended. Fix confirmed as of r19836.
Re: Changes to card script format

Posted:
25 Feb 2013, 18:28
by Max mtg
Here is windows powershell script I applied it to all cardname.txt files
- Code: Select all
Get-ChildItem . | ForEach-Object -process { Get-ChildItem $_ | ForEach-Object -process { ( Get-Content $_.FullName ) | Where-Object -FilterScript { $_ -ne "Text:no text" } | Where-Object -FilterScript { $_ -ne "End" } | Set-Content $_.FullName } }
Commited as r19874