It is currently 18 Jul 2025, 21:57
   
Text Size

Community Wad

Moderator: CCGHQ Admins

Re: Community Wad

Postby Splinterverse » 16 Sep 2016, 16:50

Awesome. I will try that.

Another question (sorry for so many), I've got Subterranean Tremors coded, but there's no 8/8 red Lizard creature token on any other card. How do we create a new token? Does it have a file like the cards or is it in a different file?
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 76 times

Re: Community Wad

Postby Xander9009 » 16 Sep 2016, 17:39

Splinterverse wrote:Awesome. I will try that.

Another question (sorry for so many), I've got Subterranean Tremors coded, but there's no 8/8 red Lizard creature token on any other card. How do we create a new token? Does it have a file like the cards or is it in a different file?
I'll create any tokens needed, and I've just done this one. Making tokens for the CW is... involved. For the sake of this appearing in future search results, I'll put in a spoiler here and explain the process.

How to make a token in the CW | Open
Making a token is normally a very simple process. A token is a card like any other with the addition of the tag
Code: Select all
<TOKEN />
However, because of their nature, they need to be treated specially in a few different ways.

1: Their name. Because a token doesn't have a MultiverseID, their FILENAME's won't contain one and still make sense. Also, because they need to be called from different cards, and their FILENAME is what's used for that, being able to remember or figure out a token's FILENAME is important for those coding cards. This makes random numbers really unwieldy. The CW uses a method I haven't seen in any other mods. The tokens names are based on all information that might make a token unique. So, the filenames don't clash with one another, and as long as you know how to put that information together, this method makes figuring out their names without looking them up really easy.

This is the format for a token's name:
Token_{Name/Subtypes}_[Types_][Power_Toughness_][Colors_][Abilities_][MM_]CW_{#}

To read the above, everything not in a set of brackets [] will appear every time.
Items inside brackets will only appear if they exist on the card.
Items in braces {} will always appear but change from card to card.
Items in neither brackets nor braces appear letter for letter (namely, "TOKEN_", "CW_", and the spare "_").

The {Name/Subtypes} field always uses the token's name. If a token is not given a specific name, then its subtypes are used for its name, with underscores serving as spaces.
{#} can always be 1. Each token with an identical name except for the {#} will be identical except for art. Always create these in sequential order. Never skip numbers, or CW_Tokens() will break.

[Types_] is the first letter of each of the token's card types. Artifact creatures have "AC_"
[Power_Toughness_] can be a number, X, or S. X is used for a token which is created with a specific power and toughness. S is used for a token which is created without a specific power and toughness but which has an ability to maintain a relative power and toughness (e.g. "equal to the number of cards in your hand").
[Colors_] is the first letter of each color a token is, including C for colorless. If a token is not specifically given a color or colorless, this field is omitted.
[Abilities_] is the first letter of each typical ability a token has. Two-word abilities are considered as one word. S is used for any ability not specifically included (list is below).
[MM_] is included if the token requires RiiakShiNal's Manual Mana Functions.

All lists of letters are in alphabetical order.

Types:
A - Artifact
C - Creature
E - Enchantment
L - Land
P - Planeswalker

Power/Toughness:
# - Static power and toughness
S - Dynamic power and toughness
X - Static but initially variable power and toughness

Colors:
B - Black
C - Colorless
G - Green
R - Red
U - Blue
W - White

Abilities: -Some abilities have the same initial. Include both (so a defender with deathtouch will have two D's). If a token has an ability, but that ability is not listed, use S for special. As new sets release new keyword abilities, they may be added to the list.
A - Annihilator
C - Changeling
D - Deathtouch
D - Defender
D - Devour
D - Double Strike
F - First Strike
F - Flanking
F - Forestwalk
F - Flying
H - Haste
I - Indestructible
I - Infect
I - Islandwalk
L - Lifelink
M - Mountainwalk
P - Protection
R - Reach
S - Shroud
S - Special
T - Trample
V - Vigilance

With the FILENAME ready, create the token as if it was any other card. Add <TOKEN /> at the end of the token's main tags (before any abilities, but after <TOUGHNESS>).

Normal cards use their CARDNAME value for their ARTID. Tokens, because they have many versions with the same CARDNAME, use their FILENAME value instead.

Because all tokens need registered, there is an error checking program in the CW's tools section. I use this program to ensure many errors are avoided, one of those errors in missing token registrations on cards. If a card creates a token, then that token needs registered on the card. However, if a token creates a token, it's the parent that needs to register. The error checking tool isn't quite that smart, though, so it will flag any tokens that make tokens as bugged if they're missing the proper registration. The result is very simply that a token that creates tokens needs a commented out line on which the child token is registered. For instance, eldrazi spawn and scion tokens make colorless mana tokens. So, while any card that creates a spawn or scion needs to register both the spawn/scion and the colorless mana token, the spawn/scion tokens also have this line near the end:
Code: Select all
--<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_C" />
Now, here's where it gets tricky. Open the function file CW_TOKENS.LOL. In this file, there is a long list of all of the tokens available in the CW. At the end of this list, you'll find a comment containing the last used MID (MutliverseID) for a token. Increment this number and use this new number for your token's MultiverID value.

Then, remove "TOKEN_" and "_CW_#" from the beginning and end of your token's name, and use that to find it on the list. Increment the number for that token.

If the token doesn't exist on the list, add it to the list in alphabetical order and start it off with 1. Thanks to the CW_Tokens_RegisterToken() function, you won't need to worry about array indices or anything like that; it's all taken care of.

--- ART ---
Art for a token is also handled specially. Tokens' art files are full-card images. So, rather than the normal 512x376 like normal cards' art files, they're 356x512 like colorless non-artifact creatures (namely, eldrazi). The image needs to be aligned within a certain area to show up properly in-game. This area is affected by whether or not the token has abilities. If it has abilities, then the ability box at the bottom makes the picture area smaller. The picture area for token with abilities is 330x293, while for a token without abilities it's 324x379.

This viewing area is also slightly differently placed within the full image for ability vs non-ability tokens.
With an ability, the viewing area is offset by 12x43 from the top left corner (there are blank 12 pixels left of the viewing area and 43 above it, meaning the viewing area starts at 13x44).
Without an ability, the offset is 15x45.

In order to manage this a bit more easily, use one of the images in this folder. Crop and resize the part of the image that should show in-game to the pixel dimensions in the name of the file used, and then copy your resized image to the blank token. Align it over the black box, then copy-paste it back to your token image and save. DO NOT overwrite the blank token image in the folder (ctrl-z and resave the blank one if you do by accident).

Convert the token image like normal and upload it like normal, remembering that it's name should be the token's FILENAME value.

If done correctly, there should be a new working token in the CW.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby Splinterverse » 16 Sep 2016, 18:03

Very cool. I'll wait for the new .wad to test. Do you have the token name (or token line) for the 8/8 lizard so I can drop it in the code?

Much appreciated!
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 76 times

Re: Community Wad

Postby Xander9009 » 16 Sep 2016, 18:17

All token names are standardized. You just need the types, color, PT, and abilities. Since it doesn't have any abilities, you just need the types and PT. Type is LIZARD and CREATURE and PT is 8/8.

TOKEN_LIZARD_C_8_8_R_CW_1

"TOKEN" always appears.
"LIZARD": Subtype (token name in-game)
C: First letter of Creature
8_8: P/T
R: Color
CW_1: Basically always appears.

If it had abilities the first letter of those abilities would come between R and CW. Trample and haste, for example: TOKEN_LIZARD_C_8_8_R_HT_CW_1
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby TheWrath » 16 Sep 2016, 18:34

MIZZIUM_MORTARS_CW_253632 Can't be cast overload cost
It's only play as normal cast
TheWrath
 
Posts: 3
Joined: 21 Aug 2016, 07:48
Has thanked: 0 time
Been thanked: 0 time

Re: Community Wad

Postby Splinterverse » 16 Sep 2016, 20:48

Ok. I am finished for today. Will be back tomorrow.

==CARDS==
Coded, tested, uploaded
-- FROM MISSING CARDS LIST --
Rootwater Shaman
Xanthic Statue
Xun Yu, Wei Advisor
Yamabushi's Storm
Yavimaya Ancients
Yavimaya Gnats
Yawgmoth's Edict
Yawning Fissure
Zodiac Dragon
-- FROM CONSPIRACY TAKE THE CROWN --
Domesticated Hydra
Sinuous Vermin
Skittering Crustacean
Splitting Slime
Stunt Double

Coded, uploaded, but NOT tested:
Death Spark (added graveyard position check from Xander)

==ART==
High Quality:
Abandon Hope
Alliance of Arms
Brand of Ill Omen
Domesticated Hydra
Krovikan Horror
Rootwater Shaman
Selvala, Heart of the Wilds
Sinuous Vermin
Subterranean Tremors
Xanthic Statue
Xun Yu, Wei Advisor
Yamabushi's Storm
Yavimaya Ancients
Yavimaya Gnats
Yawgmoth's Edict
Yawning Fissure
Low Quality:
Leovold, Emissary of Trest
Naya Soulbeast
Skittering Crustacean
High Quality but Cropped:
Stunt Double

There are a few problem children that I could use input on:

Alliance of Arms @ http://pastebin.com/Q76U6B2h
It works fine for the player, but the opponent seems to be able to pick whatever number he/she/it wants and then not tap the mana, EVEN when he/she/it doesn't have the mana available. The AI loves picking 16 when it has one untapped mountain. :(

Brand of Ill Omen @ http://pastebin.com/PEzpZ9Uv
This card fizzles on play. Can't for the life of me figure out why.

Naya Soulbeast @ http://pastebin.com/r0sfCXuY
This card also fizzles on play. No idea why.

I will be back at again tomorrow on more missing cards.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 76 times

Re: Community Wad

Postby tmxk2012917 » 17 Sep 2016, 01:20

Lumpine Prototype could not attack even though both the opponent and I had no card in hand
tmxk2012917
 
Posts: 164
Joined: 15 Mar 2015, 09:52
Has thanked: 20 times
Been thanked: 12 times

Re: Community Wad

Postby Splinterverse » 17 Sep 2016, 09:53

I am back it again, working on missing cards.

Xander -- do you guys have a formatter you use on the XML after using "A Card Maker"? I'm using Notepad++ but I feel like I'm spending a lot of time tabbing and indenting since the output of "A Card Maker" has spaces in front of lines instead of tabs.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 76 times

Re: Community Wad

Postby Splinterverse » 17 Sep 2016, 12:36

Any idea why the following doesn't work?

I've tried many variations. It needs to work on each player's upkeep step.

Code: Select all
 <TRIGGER value="BEGINNING_OF_STEP">
      return MTG():GetStep() == STEP_UPKEEP and TriggerPlayer() ~= nil
</TRIGGER>
   <RESOLUTION_TIME_ACTION>
      local Target = TriggerPlayer()
      if Target ~= nil then
         Target:MillCards( 1 )   
      end
   </RESOLUTION_TIME_ACTION>
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 76 times

Re: Community Wad

Postby Xander9009 » 17 Sep 2016, 14:00

thefiremind's generator makes them such that each tab is replaced with two or three spaces. I don't remember which, but it's consistent. You can do a find/replace for " " => " " and it'll do the whole file at once.

Since you're using Notepad++, you can also make a macro out of that. In case you haven't made a macro before, click the Macro menu and choose start recording. The, use only keyboard bindings to get the result you want (and don't use auto-complete, not that that's relevant to this scenario). Then, click macro-> Stop recording. Now, pressing ctrl-shift-p will perform the same keyboard actions (but no windows pop up or anything, very efficient). You can also go back into the macro menu and save the current macro, which is helpful because when you close Notepad++ the macro disappears. Mind you, I haven't saved a macro in a long time, so I can't give instructions off-hand, but I remember it being easy.

And to actually answer your question, yes, I made my own almost 2 years ago. It's in the subfolder within tools. It's named Card Indentor. Note that it works by dropping files onto it. You can either drop files or a folder. It'll indent all XMLs with DotP in mind, meaning MultipleChoiceQuestion functions and similar things are indented specially for readability. It also fixes <br> tags in the cards, but I don't think those have been an issue for a long time (they used to slip through the generator and end up in the XML, but I think that was fixed at some point). While it's running, esc will exit it.

----

Splinterverse wrote: <TRIGGER value="BEGINNING_OF_STEP">
      return MTG():GetStep() == STEP_UPKEEP and TriggerPlayer() ~= nil
</TRIGGER>
   <RESOLUTION_TIME_ACTION>
      local Target = TriggerPlayer()
      if Target ~= nil then
         Target:MillCards( 1 )   
      end
   </RESOLUTION_TIME_ACTION>
That's not working because the "BEGINNING_OF_STEP" trigger doesn't have a TriggerPlayer(). You need "BEGINNING_OF_PLAYERS_STEP".

----

tmxk2012917 wrote:Lumpine Prototype could not attack even though both the opponent and I had no card in hand
Isn't that the opposite of what it was doing before? #-o
I've now fixed it, and I'll even make sure to test it this time haha.

----

Splinterverse wrote:Ok. I am finished for today. Will be back tomorrow.

==CARDS==
Coded, tested, uploaded
-- FROM MISSING CARDS LIST --
Rootwater Shaman
Xanthic Statue
Xun Yu, Wei Advisor
Yamabushi's Storm
Yavimaya Ancients
Yavimaya Gnats
Yawgmoth's Edict
Yawning Fissure
Zodiac Dragon
-- FROM CONSPIRACY TAKE THE CROWN --
Domesticated Hydra
Sinuous Vermin
Skittering Crustacean
Splitting Slime
Stunt Double

Coded, uploaded, but NOT tested:
Death Spark (added graveyard position check from Xander)

==ART==
High Quality:
Abandon Hope
Alliance of Arms
Brand of Ill Omen
Domesticated Hydra
Krovikan Horror
Rootwater Shaman
Selvala, Heart of the Wilds
Sinuous Vermin
Subterranean Tremors
Xanthic Statue
Xun Yu, Wei Advisor
Yamabushi's Storm
Yavimaya Ancients
Yavimaya Gnats
Yawgmoth's Edict
Yawning Fissure
Low Quality:
Leovold, Emissary of Trest
Naya Soulbeast
Skittering Crustacean
High Quality but Cropped:
Stunt Double

There are a few problem children that I could use input on:

Alliance of Arms @ http://pastebin.com/Q76U6B2h
It works fine for the player, but the opponent seems to be able to pick whatever number he/she/it wants and then not tap the mana, EVEN when he/she/it doesn't have the mana available. The AI loves picking 16 when it has one untapped mountain. :(

Brand of Ill Omen @ http://pastebin.com/PEzpZ9Uv
This card fizzles on play. Can't for the life of me figure out why.

Naya Soulbeast @ http://pastebin.com/r0sfCXuY
This card also fizzles on play. No idea why.

I will be back at again tomorrow on more missing cards.
Alliance of Arms - I'm not sure off-hand. I'd have to do some in-depth testing. I'll do that later today when I work on Mizzium Mortars.

Brand of Ill Omen - Enchant Creature is a SPELL_ABILITY, not an ACTIVATED_ABILITY. Don't forget it needs the attach_definition attribute, and don't forget its close tag:
Code: Select all
<SPELL_ABILITY attach_definition="0">
Naya Soulbeast - A card that needs an ability to do something when it's not on the battlefield needs that ability's zctive_zone attribute (in the ability tag) set to whatever zone it will be in when it's supposed to trigger/do stuff. In this case, you'd use ZONE_ANY. Have a look at the code for Emrakul, the Aeons Torn.
Code: Select all
   <TRIGGERED_ABILITY active_zone="ZONE_ANY">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When you cast Emrakul, take an extra turn after this one.]]></LOCALISED_TEXT>
      --...LOCALISED_TEXT...
      <TRIGGER value="SPELL_PLAYED" simple_qualifier="self" />
      <SFX text="GLOBAL_WARP_PLAY" />
      <RESOLUTION_TIME_ACTION>
         local effectController = EffectController()
         if effectController ~= nil then
            local team = effectController:GetTeam()
            team:TakeExtraTurn()
         end
      </RESOLUTION_TIME_ACTION>
      <AUTO_SKIP always="1" />
   </TRIGGERED_ABILITY>
nachonal986 wrote:Hey there, months that I didn't touch this excellent game, and I'm a little confused...

All the arts show as last modified on Feb 2016, and I didn't find the core file as before...

What happened? :(
Did you get your issue figured out?
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby Splinterverse » 17 Sep 2016, 14:31

Thanks, Xander. I will try those fixes with Naya Soulbeast and Brand of Ill Omen. I'll also look into a macro for my Notepad++. Great help as usual!! :)
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 76 times

Re: Community Wad

Postby Xander9009 » 17 Sep 2016, 14:52

tmxk2012917 wrote:Lumpine Prototype could not attack even though both the opponent and I had no card in hand
Fixed and tested.

TheWrath wrote:MIZZIUM_MORTARS_CW_253632 Can't be cast overload cost
It's only play as normal cast
I tested Mizzium Mortars and it worked fine on my end. To be fair, I found one situation where it wouldn't allow it to be cast with overload even though I had the mana, but that situation is really unlikely (I'd stolen a land from my opponent). In all other situations, so long as I could pay {3}{R}{R}{R}, it let me cast it with overload. I had to zoom into the card to activate its overload cost, since if you just click a card with overload in your hand, it tries to play it normally, but that's true for all overload cards (I think). Is it possible that was your issue? If not, I'll need a more thorough explanation of a game where you consistently can't cast it with overload when you should be able to. Sorry, there's just not much I can actually do until I can actually recreate the bug on my end. The code for overload is too complicated to just poke at and hope it works lol.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby Splinterverse » 17 Sep 2016, 17:55

Need some help on this code block. I think the converted mana cost isn't being calculated or something.

Code: Select all
    <TRIGGER value="BEGINNING_OF_PLAYERS_STEP">
      return MTG():GetStep() == STEP_UPKEEP and TriggerPlayer() ~= nil
    </TRIGGER>
   <RESOLUTION_TIME_ACTION>
      TriggerPlayer():MillCards( 1 )   
      local card_cmc = TriggerPlayer():Graveyard_GetNth(0):GetConvertedManaCost()
      if card_cmc ~= 0 then
         MTG():PutPTTokensOntoBattlefield("TOKEN_MINION_C_X_X_B_CW_1", card_cmc, EffectController(), result, result)
      end
   </RESOLUTION_TIME_ACTION>
Here is the error message I am getting:
Code: Select all
[lua] [string "INFERNAL_GENESIS_CW_24624_TITLE (RESOLUTION_TIME_ACTION)~0x000002f5"]:5:
 parameter mismatch or too few parameters [expected bzS32]
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 76 times

Re: Community Wad

Postby Xander9009 » 17 Sep 2016, 17:56

Where is the variable 'result' defined?
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Community Wad

Postby Splinterverse » 17 Sep 2016, 18:10

Xander9009 wrote:Where is the variable 'result' defined?
Ah. In my question to copy it, I inadvertently copied one with variable P/T. I didn't need that at all. Will test with the fix. Thanks!
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 76 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 5 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 5 guests

Login Form