It is currently 28 Apr 2024, 01:35
   
Text Size

Could I ask a question, please?

New decks and cards for Stainless Games' release

Moderator: CCGHQ Admins

Re: Could I ask a question, please?

Postby Takhen » 20 Feb 2013, 21:11

thefiremind wrote:Did you see that you wrote
CODE: SELECT ALL
<TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
twice?
No...What a stupid mistake made me mad...
A lot of time lost, thinking what an hard code I could have missed...
And it was a pasting error...

Thank you, in my code's order, I didn't see that, now it workS :)

thefiremind wrote:But there's something I'm really curious about: what deck are you planning to make that has Bushido, Convoke, Storm, Conspire and Bloodrush? I usually don't even think about how to code an ability as long as I don't need it, that's why I haven't coded Bushido (and other abilities) yet.
Anyway all this talking about Bushido made me curious about finding a good implementation for Sensei Golden-Tail and Takeno, Samurai General so that they can work together... I'll work on them soon.
It's simply a only green tokens' deck, so Wasteland Viper, Epic Struggle, Chord of Calling...
I need storm for a second deck I'm thinking, and the exact card I made with it is Brain Freeze that I want to use to close :D :D :D
About Bushido it was only an example, but I could use it with Toshiro Umezawa for a third deck (There are already something like 9 deck in my mind!)

thefiremind wrote:Storm is here, you can paste it on any card you need.
Bloodrush can be done by combining cycling with Moment of Heroism. Let me explain: the cost part is taken from cycling, while Moment of Heroism can give you a full example on how to change power/toughness and add an ability.
Storm and Bloodrush are done now.
RiiakShiNal wrote:The only piece about Bloodrush that is the same is that the card is discarded from hand (which is only part of the cost), so no it is not even half copy-pastable, cost is only a small part of an ability.
My greatest problem with Bloodrush was the same "Bloodrush" word: I thought it was a keyword as Flying, but it was only flavour text with "|" to make it in italic :)
thefiremind wrote:Convoke is really a pain to make: you can try with this attempt but I think it wouldn't be easy to adapt for other cards.
Conspire should be relatively easy to make, even if I'm not sure about its timing ("As you cast this spell...").
RiiakShiNal wrote:Convoke is a difficult ability to code and as such any card you find it on may or may not have been coded generically (in other words the coding may or may not be specific to that card).
With Convoke I had some problems because as I see, in that topic it's explained how to use convoke on a creature and not with a mana cost of X, I read that the same card I am doing could be different, but there isn't how it is, so my problem is about how to change the part in the code that are explained and are not code them selves (The rest of the card I copied from Green Sun Zenith, and it works, but it says "a GREEN creature", Chord of Calling says only creature, but in the filter I don't see any Green-Specific code I should delete).
About Conspire you said it is easy, but not if there is somewhere from I could copy or base some modify...

RiiakShiNal wrote:No, there is no such archive. Some abilities are even coded differently from different coders.
thefiremind wrote:Convoke is really a pain to make: you can try with this attempt but I think it wouldn't be easy to adapt for other cards.
Storm is here, you can paste it on any card you need.
This is the "archieve" I was talking about: the abilities are not gathered in the same place, but there are equally ready-made-abilities-I-don't-have-still-now on the forum, and these and all there are already I am looking for :)

Often a topic borns with a title, but then it changes it's argument (this topic is a very example!) so those who participate in these conversations knows better that me if an ability is already made in some topic or not, as storm that allowed me to do Brain Freeze very easy :)
RiiakShiNal wrote:You have explained what you want and yes it is possible, but it is not always going to be easy and will REQUIRE some programming knowledge because you will have to modify anything you copy from a LOL file to a card's XML. Some of the simple modifications that have to be done are things like changing "<" to "&lt;" and ">" to "&gt;". Other changes would include removing the function housing and substituting parameters (essentially manually in-lining every non-built-in function).
I said from LOLs because I found someones, but if there are those codes also out of LOLs files (maybe the same that LOLs' modders used to do their LOLs), it is simplier and better for me that use xml directly: maybe I want to move a LOLs code to XML while it is useful because before of my LOLs' modder were those who converted pre-existing XML files (so I could use directly) in their LOLs :)

RiiakShiNal wrote:No, rarity is still taken into account, so if the card does not have the right rarity (unless you forced it to promo) it will still not be foiled. Promo should also work for the player to force foil a card. "@2" and "@3" are primarily for biased shuffling (each specifies the level required to not bias shuffle that card), but the engine seems to also use this for partially determining what to foil in the AI's deck (for us it can also be used to see roughly when during a game the AI plays a card that we made biased if any).
So, if I understand, only rarity chose the cards that are foiled, talking about AI only.
However, even about AI, I could make foil a card that isn't rare making it promo:
If I understand, "@2" and "@3" make the card promo for the AI as "#" does for the player, it's true? (I didn't understand the difference, but maybe is for the "bias" word bad translated by google or because I have to ask first confirm about the general role of those @x)

RiiakShiNal wrote:DLC = Downloadable Content.

DLC Number is the number on the WAD:
DATA_DLC_0001.WAD has a DLC Number 1.
DATA_DLC_8192.WAD has a DLC Number 8192.
DECK_0017_ST.WAD has a DLC Number 17.
DECK_199901_ST.WAD has a DLC Number 199901.

No extensive testing has really been done to see whether DATA_DLC_s have precedence over DECK_s or the other way around so I'm not sure which takes precedence.
So DLC number is the deck's ID if I remember true when I tried to change IDs and names

RiiakShiNal wrote:That's right, the game engine determines what card frame to use, we have no control over that.

Card Frames still have to exist, but we don't get to pick which ones are used (though we could change the existing ones, but that would change every card that uses those frames).

If you make Zendikar's land as a "colourless permanent" without the "Land" type then you could use the graphic for the whole card, but the card would no longer be a land and would not be correct because then it could not be targeted by cards like Strip Mine and Armageddon, but would be targeted by cards like Cranial Extraction and Child of Alara. As soon as you give it the correct type you would be constrained to the card frame again so, no, there is no way to properly make the lands to use put the picture on the whole card. Also if a card has no types then it is "invisible" (which is a trick we use to make certain effect tokens that we don't want the player to see) and isn't accessible to the player.

Before you ask, Eldrazi cards work because they are neither Land nor Artifact, but they do have either the Creature or Enchantment types (Instant and Sorcery types may also work) and they are colourless.
what a pity, it would have been really nice :(

RiiakShiNal wrote:
Takhen wrote:There were also DECK_000X_ST, or DECK_000X_CH, or DECK_000X_UT and _PC but I didn't open because they were a lot...
Depending on what mods you have installed (or not) many of those are official decks, while others are modded decks. Typically modded decks have considerably higher numbers than the official (so that we don't conflict). Though while DECK_XXXX_?? is from the official standpoint used to indicate a deck, modders have also included non-deck items in their files as well sometimes. For example "Deck_1999_Cosmetic.wad" is thefiremind's cosmetic mod and changes graphics, but has no deck or card related items in it. Another example is "Deck_9999_Unlocks1.wad" it only really contains an APPID_LINKING.TXT (other than headers) and also has no decks or cards in it.

Basically we know for certain that WADs that start with either "DATA_DLC_" or "DECK_" are read and used by the game, but they can contain basically whatever we want so modders stick to using those filenames, but what they put in them is up to them. We tend to appreciate useful naming as it can tell us roughly what we can expect to find in the files, but not all modders give us friendly names for the WADs and we just have to look and see what is in it.
So there isn't difference between them or a way to identify which are official?
It isn't like "when the word DLC appears in the deck title it is an official expansion" or else?
More than _Cosmetic or _Core, I was talking about _CH, _UT, _ST, _PC
User avatar
Takhen
 
Posts: 235
Joined: 04 Feb 2013, 19:35
Has thanked: 0 time
Been thanked: 0 time

Re: Could I ask a question, please?

Postby RiiakShiNal » 20 Feb 2013, 22:31

Takhen wrote:My greatest problem with Bloodrush was the same "Bloodrush" word: I thought it was a keyword as Flying, but it was only flavour text with "|" to make it in italic :)
There are several "keywords" like that, they are keywords, but they don't really mean anything by themselves it is the text after them that is the real ability.

And yes, putting text between pipes ("|") does make it italic, though I've had issues with making long pieces of text italic (like it chops off one or two characters at the end of the line) so I only use it for keywords in the card text.

Takhen wrote:With Convoke I had some problems because as I see, in that topic it's explained how to use convoke on a creature and not with a mana cost of X, I read that the same card I am doing could be different, but there isn't how it is, so my problem is about how to change the part in the code that are explained and are not code them selves (The rest of the card I copied from Green Sun Zenith, and it works, but it says "a GREEN creature", Chord of Calling says only creature, but in the filter I don't see any Green-Specific code I should delete).
About Conspire you said it is easy, but not if there is somewhere from I could copy or base some modify...
If you are talking about the selection text it says in game that is actually from the ChooseTarget line. The second parameter is a string reference that pulls the referenced string from the TEXT_PERMANENT files to display to the user in the correct localization. It has no effect on the filter, but can be confusing for players if it is not changed to be accurate for what the card actually wants the user to pick.

Takhen wrote:This is the "archieve" I was talking about: the abilities are not gathered in the same place, but there are equally ready-made-abilities-I-don't-have-still-now on the forum, and these and all there are already I am looking for :)
The reason I said there was no such archive is because you asked about one that collected them all in the same place. This forum itself does actually serve as a place where we can collect our ideas and code, but it is not as easily accessible as a proper archive would be.

Takhen wrote:I said from LOLs because I found someones, but if there are those codes also out of LOLs files (maybe the same that LOLs' modders used to do their LOLs), it is simplier and better for me that use xml directly: maybe I want to move a LOLs code to XML while it is useful because before of my LOLs' modder were those who converted pre-existing XML files (so I could use directly) in their LOLs :)
Actually people moved to using LOL files because it is easier than maintaining code in the cards themselves. For example say you have a set of cards that have basically the same ability code like Annihilator (now this code is relatively simple and most people have not put it into a LOL file, but it makes for a good example) and you code them all without using a LOL file. Then someone finds a bug in the code you have used for all of those cards that you need to fix. Do you (A) fix each and every individual card every time someone finds a bug in the code or (B) move the Annihilator code to a LOL file and have each code reference the LOL file so you only have to fix the one place in the LOL file where the code is broken?

Personally I prefer option B, as it lets me fix the problem once and not have to worry about whether I fixed every card that has Annihilator or not. Using LOL files and the functions they contain also has a side effect of making the code in a card easier to read and easier to find where a specific problem is.

As for "preexisting" XML files the only ones that come to mind are those in the "official" game and those made for previous DotP games. Those from previous games would have to be re-coded due to engine changes, and those from the "official" game we only have to worry about bugs with them.

Takhen wrote:So, if I understand, only rarity chose the cards that are foiled, talking about AI only.
However, even about AI, I could make foil a card that isn't rare making it promo:
If I understand, "@2" and "@3" make the card promo for the AI as "#" does for the player, it's true? (I didn't understand the difference, but maybe is for the "bias" word bad translated by google or because I have to ask first confirm about the general role of those @x)
No, rarity determines whether a card can or cannot be foiled, but whether it is foiled or not for the AI is done by random selection giving priority to cards that are given biased status.

No, "@2" and "@3" do not make the cards promo cards (for anyone, AI or Player). "@2" means "this card should be shuffled towards the bottom of the deck unless the player is using AI difficulty level 2 or higher". "@3" means "this card should be shuffled towards the bottom of the deck unless the player is using AI difficulty level 3 (highest difficulty)". Though biased shuffling only affects the AI it is not done for players, so even if you are playing a deck that has cards that are biased shuffled it won't affect you, it will only take effect if the AI is playing that deck.

Takhen wrote:So DLC number is the deck's ID if I remember true when I tried to change IDs and names
No, a single DLC can contain many decks as such this is not a valid comparison. The DLC number is simply the number on the WAD. If you look at my DLC (Data_DLC_8192) my DLC number is 8192, which contains NO decks. I then have another part which contains 17 different WADs none of which have a DLC number, but each one has 1 deck (none of which have a deck uid number of 8192, but they are prefixed with 8192).

Some modders have several DLC numbers each one for a different deck and/or for a different piece of their mod. Thefiremind uses several numbers for his mod, he uses 1999 for the core, then for his individual decks he uses 1999XX where XX is the number of the deck (it also doubles as his deck's UID, but did not have to).

The DLC number only seems to matter in determining which mod has precedence for overriding files.

Takhen wrote:So there isn't difference between them or a way to identify which are official?
It isn't like "when the word DLC appears in the deck title it is an official expansion" or else?
More than _Cosmetic or _Core, I was talking about _CH, _UT, _ST, _PC
Nope, sorry you have to know which are which, though generally those with the lower numbers are the official decks (right now mostly those with numbers that are two-significant-digits or less are official, 0001-0099, though not all numbers are used). Data_Core.wad is official even though it has no number or other really identifying marks.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Could I ask a question, please?

Postby Takhen » 23 Feb 2013, 20:55

RiiakShiNal wrote:If you are talking about the selection text it says in game that is actually from the ChooseTarget line. The second parameter is a string reference that pulls the referenced string from the TEXT_PERMANENT files to display to the user in the correct localization. It has no effect on the filter, but can be confusing for players if it is not changed to be accurate for what the card actually wants the user to pick.
I used Green Suns Zenith to take the code, and I didn't notice that it is better than Chord of Calling :)

RiiakShiNal wrote:The reason I said there was no such archive is because you asked about one that collected them all in the same place. This forum itself does actually serve as a place where we can collect our ideas and code, but it is not as easily accessible as a proper archive would be.
I didn't try by my self because I wouldn't add to my notes some code that is still in testing phase or with some bug or incomplete (I will however take a look in previous posts)
RiiakShiNal wrote:Actually people moved to using LOL files because it is easier than maintaining code in the cards themselves. For example say you have a set of cards that have basically the same ability code like Annihilator (now this code is relatively simple and most people have not put it into a LOL file, but it makes for a good example) and you code them all without using a LOL file. Then someone finds a bug in the code you have used for all of those cards that you need to fix. Do you (A) fix each and every individual card every time someone finds a bug in the code or (B) move the Annihilator code to a LOL file and have each code reference the LOL file so you only have to fix the one place in the LOL file where the code is broken?

Personally I prefer option B, as it lets me fix the problem once and not have to worry about whether I fixed every card that has Annihilator or not. Using LOL files and the functions they contain also has a side effect of making the code in a card easier to read and easier to find where a specific problem is.
Precisely, in codes' research I would know which code are so many simple that are sure (in this case, if there are no other reasons, I want to insert it in the XML), and which could have some bug and so it is better to keep the LOL file
And in this case I have to ask how to use these LOLs, because my pratice knowlegde stops at XML and TDX...

RiiakShiNal wrote:As for "preexisting" XML files the only ones that come to mind are those in the "official" game and those made for previous DotP games. Those from previous games would have to be re-coded due to engine changes, and those from the "official" game we only have to worry about bugs with them.
With preexisting I was talking about DOTP's originals, but also all the card I extracted from the deck in WIKI DOTP 2013 RELEASES.
About those ones, I copied the XML without to consider the LOLs files, and infact I noticed that the mana from the token of Nest Invader doesn't add and maybe it is the reason...
How I could know which cards i can save with only XML and which others needs a LOL and which LOL to works? Those are something like 2000 cards é_è

Maybe is for this reason too that the card I was trying, Druids' Repository, doesn't work in the part of adding mana (or maybe it is an excuse for don't admit I am not able to make that XD)
There the code, first part from Beastmaster Ascension looks to run
Code: Select all
  <TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever a creature you control attacks, put a charge counter on Druids' Repository.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine Kreatur angreift, die du kontrollierst, lege eine Ladungsmarke auf die Lagerstätte der Druiden legen.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una criatura que controles ataque, pon un contador de carga sobre el Depósito del druida.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu'une créature que vous contrôlez attaque, mettez un marqueur « charge » sur le Réservoir druidique.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta una creatura che controlli attacca, metti un segnalino carica sul Rifugio dei Druidi.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールするクリーチャーが1体攻撃するたび、ドルイドの保管庫の上に蓄積カウンターを1個置く。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[당신이 조종하는 생물이 공격할 때마다, 드루이드의 보관소에 충전 카운터 한 개를 올려놓는다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда существо под вашим контролем атакует, положите один жетон заряда на Друидский Склад.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que uma criatura que você controla atacar, coloque um marcador de carga sobre Repositório Druídico.]]></LOCALISED_TEXT>
    <TRIGGER value="ATTACKERS_DECLARED" simple_qualifier="controller">
    if EffectSource() ~= nil and EffectSource():CountCounters(MTG():GetCountersType("QUEST_COUNTER")) &lt; 7 then
       local filter = Object():GetFilter()
       filter:AddCardType( CARD_TYPE_CREATURE )
       filter:SetZone( ZONE_IN_PLAY )
       filter:SetPlayer(EffectController())
       filter:AddExtra( FILTER_EXTRA_CREATURE_ATTACKING )
       filter:NotTargetted()
             
       local attacking_creatures_you_control = filter:Count()
       if attacking_creatures_you_control &gt; 0 then
          EffectDC():Set_Int(0, attacking_creatures_you_control)
          return true
       end
    end
    return false
    </TRIGGER>

    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then   
       local current_counters = EffectSource():CountCounters(MTG():GetCountersType("QUEST_COUNTER"))
       local counters_to_add = EffectDC():Get_Int(0)
        EffectSource():AddCounters( MTG():GetCountersType("QUEST_COUNTER"), counters_to_add )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>

  <ACTIVATED_ABILITY forced_skip="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Remove a charge counter from Druids' Repository: Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Entferne eine Ladungsmarke von der Lagerstätte der Druiden: Erhöhe deinen Manavorrat um ein Mana einer beliebigen Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Remover un contador de carga del Depósito del druida: Agrega un maná de cualquier color a tu reserva de maná.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Retirez un marqueur « charge » du Réservoir druidique : Ajoutez un mana de la couleur de votre choix à votre réserve.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Rimuovi un segnalino carica dal Rifugio dei Druidi: Aggiungi un mana di un qualsiasi colore alla tua riserva di mana.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ドルイドの保管庫から蓄積カウンターを1個取り除く:あなたのマナ・プールに、好きな色1色のマナ1点を加える。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[드루이드의 보관소에서 충전 카운터 한 개를 제거한다: 당신의 마나풀에 원하는 색의 마나 한 개를 담는다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Удалите один жетон заряда с Друидского Склада: добавьте одну ману любого цвета в ваше хранилище маны.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Remova um marcador de carga de Repositório Druídico: Adicione um mana de qualquer cor à sua reserva de mana.]]></LOCALISED_TEXT>
    <AVAILABILITY>
    return EffectController():IsAI() == 0
    </AVAILABILITY>
    <COST type="Mana" cost="{0}" />
    <RESOLUTION_TIME_ACTION>
    EffectController():ChooseColour( "CARD_QUERY_CHOOSE_COLOUR", 1 )
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    ObjectDC():Set_Int( 0, GetChosenColour() )
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    if EffectController():IsAI() ~= 0 then
   ObjectDC():Set_Int(1, 1)
    end
    </RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>
  <STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
    <CONTINUOUS_ACTION layer="6">
    local characteristics = Object():GetCurrentCharacteristics()
    local mana_color = ObjectDC():Get_Int(0)
    characteristics:GrantAbility(mana_color)
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <MANA_ABILITY resource_id="1" filter_zone="ZONE_IN_PLAY">
    <COST type="TapSelf" />
    <PRODUCES amount="{W}" />
  </MANA_ABILITY>
  <MANA_ABILITY resource_id="2" filter_zone="ZONE_IN_PLAY">
    <COST type="TapSelf" />
    <PRODUCES amount="{U}" />
  </MANA_ABILITY>
  <MANA_ABILITY resource_id="3" filter_zone="ZONE_IN_PLAY">
    <COST type="TapSelf" />
    <PRODUCES amount="{B}" />
  </MANA_ABILITY>
  <MANA_ABILITY resource_id="4" filter_zone="ZONE_IN_PLAY">
    <COST type="TapSelf" />
    <PRODUCES amount="{R}" />
  </MANA_ABILITY>
  <MANA_ABILITY resource_id="5" filter_zone="ZONE_IN_PLAY">
    <COST type="TapSelf" />
    <PRODUCES amount="{G}" />
  </MANA_ABILITY>
  <TRIGGERED_ABILITY internal="1">
    <TRIGGER value="BEGINNING_OF_STEP">
    if ( EffectController():IsAI() ~= 0 and MTG():GetStep() == STEP_END_OF_TURN and ObjectDC():Get_Int(1) ~= 0 ) then
   ObjectDC():Set_Int(1, 0)
   return true
    end
    return false
    </TRIGGER>
  </TRIGGERED_ABILITY>
</CARD_V2>
RiiakShiNal wrote:No, rarity determines whether a card can or cannot be foiled, but whether it is foiled or not for the AI is done by random selection giving priority to cards that are given biased status.

No, "@2" and "@3" do not make the cards promo cards (for anyone, AI or Player). "@2" means "this card should be shuffled towards the bottom of the deck unless the player is using AI difficulty level 2 or higher". "@3" means "this card should be shuffled towards the bottom of the deck unless the player is using AI difficulty level 3 (highest difficulty)". Though biased shuffling only affects the AI it is not done for players, so even if you are playing a deck that has cards that are biased shuffled it won't affect you, it will only take effect if the AI is playing that deck.
I don't understand the correlation between foiling and shuffling, but now I know that both @2 and @3 are for shuffling and I won't to use because I want the same total casual effect as in real life

RiiakShiNal wrote:No, a single DLC can contain many decks as such this is not a valid comparison. The DLC number is simply the number on the WAD. If you look at my DLC (Data_DLC_8192) my DLC number is 8192, which contains NO decks. I then have another part which contains 17 different WADs none of which have a DLC number, but each one has 1 deck (none of which have a deck uid number of 8192, but they are prefixed with 8192).

Some modders have several DLC numbers each one for a different deck and/or for a different piece of their mod. Thefiremind uses several numbers for his mod, he uses 1999 for the core, then for his individual decks he uses 1999XX where XX is the number of the deck (it also doubles as his deck's UID, but did not have to).

The DLC number only seems to matter in determining which mod has precedence for overriding files.
Maybe more than what it is, I should know in which directory, file, line I can find and change that DLC number

RiiakShiNal wrote:Nope, sorry you have to know which are which, though generally those with the lower numbers are the official decks (right now mostly those with numbers that are two-significant-digits or less are official, 0001-0099, though not all numbers are used). Data_Core.wad is official even though it has no number or other really identifying marks.
So there is no difference between official ones and others
I found some I thought they was official, but the deck image was a image card and not a planeswalker: inusual for original deck, but maybe it means nothing and it is true that those are official :)
User avatar
Takhen
 
Posts: 235
Joined: 04 Feb 2013, 19:35
Has thanked: 0 time
Been thanked: 0 time

Re: Could I ask a question, please?

Postby RiiakShiNal » 23 Feb 2013, 22:19

Takhen wrote:Precisely, in codes' research I would know which code are so many simple that are sure (in this case, if there are no other reasons, I want to insert it in the XML), and which could have some bug and so it is better to keep the LOL file
And in this case I have to ask how to use these LOLs, because my pratice knowlegde stops at XML and TDX...
If looking at my cards it is fairly easy to see which custom functions I use in the cards as they all start with "RSN_". As for which LOL file they are in you just have to look in the FUNCTIONS directory to see which file a particular function is in as the game will read all of those files and will use a particular function from where ever it can find it.

Takhen wrote:With preexisting I was talking about DOTP's originals, but also all the card I extracted from the deck in WIKI DOTP 2013 RELEASES.
About those ones, I copied the XML without to consider the LOLs files, and infact I noticed that the mana from the token of Nest Invader doesn't add and maybe it is the reason...
How I could know which cards i can save with only XML and which others needs a LOL and which LOL to works? Those are something like 2000 cards é_è
It is quite possible that you have used code from one or more LOL files without realizing it because the game does not differentiate between built-in functions and our custom functions, so the only way to know which is which is to know what all the built-in functions are. Now as you get better at coding you may be able to "feel" what is or isn't a built-in function as you will become comfortable in using them, but there is no hard fast rule as to what is and isn't built-in.

Once you have determined that a function is custom then finding it means looking through each LOL file in the mod that the card came from (or each mod that the mod depends on if it is a dependent mod) to find it.

Takhen wrote:Maybe is for this reason too that the card I was trying, Druids' Repository, doesn't work in the part of adding mana (or maybe it is an excuse for don't admit I am not able to make that XD)
There the code, first part from Beastmaster Ascension looks to run
Code: Select all
  <TRIGGERED_ABILITY auto_skip="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever a creature you control attacks, put a charge counter on Druids' Repository.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine Kreatur angreift, die du kontrollierst, lege eine Ladungsmarke auf die Lagerstätte der Druiden legen.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una criatura que controles ataque, pon un contador de carga sobre el Depósito del druida.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu'une créature que vous contrôlez attaque, mettez un marqueur « charge » sur le Réservoir druidique.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta una creatura che controlli attacca, metti un segnalino carica sul Rifugio dei Druidi.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールするクリーチャーが1体攻撃するたび、ドルイドの保管庫の上に蓄積カウンターを1個置く。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[당신이 조종하는 생물이 공격할 때마다, 드루이드의 보관소에 충전 카운터 한 개를 올려놓는다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда существо под вашим контролем атакует, положите один жетон заряда на Друидский Склад.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que uma criatura que você controla atacar, coloque um marcador de carga sobre Repositório Druídico.]]></LOCALISED_TEXT>
    <TRIGGER value="ATTACKERS_DECLARED" simple_qualifier="controller">
    if EffectSource() ~= nil and EffectSource():CountCounters(MTG():GetCountersType("QUEST_COUNTER")) &lt; 7 then
       local filter = Object():GetFilter()
       filter:AddCardType( CARD_TYPE_CREATURE )
       filter:SetZone( ZONE_IN_PLAY )
       filter:SetPlayer(EffectController())
       filter:AddExtra( FILTER_EXTRA_CREATURE_ATTACKING )
       filter:NotTargetted()
             
       local attacking_creatures_you_control = filter:Count()
       if attacking_creatures_you_control &gt; 0 then
          EffectDC():Set_Int(0, attacking_creatures_you_control)
          return true
       end
    end
    return false
    </TRIGGER>

    <RESOLUTION_TIME_ACTION>
    if EffectSource() ~= nil then   
       local current_counters = EffectSource():CountCounters(MTG():GetCountersType("QUEST_COUNTER"))
       local counters_to_add = EffectDC():Get_Int(0)
        EffectSource():AddCounters( MTG():GetCountersType("QUEST_COUNTER"), counters_to_add )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>

  <ACTIVATED_ABILITY forced_skip="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Remove a charge counter from Druids' Repository: Add one mana of any color to your mana pool.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Entferne eine Ladungsmarke von der Lagerstätte der Druiden: Erhöhe deinen Manavorrat um ein Mana einer beliebigen Farbe.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Remover un contador de carga del Depósito del druida: Agrega un maná de cualquier color a tu reserva de maná.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Retirez un marqueur « charge » du Réservoir druidique : Ajoutez un mana de la couleur de votre choix à votre réserve.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Rimuovi un segnalino carica dal Rifugio dei Druidi: Aggiungi un mana di un qualsiasi colore alla tua riserva di mana.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ドルイドの保管庫から蓄積カウンターを1個取り除く:あなたのマナ・プールに、好きな色1色のマナ1点を加える。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[드루이드의 보관소에서 충전 카운터 한 개를 제거한다: 당신의 마나풀에 원하는 색의 마나 한 개를 담는다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Удалите один жетон заряда с Друидского Склада: добавьте одну ману любого цвета в ваше хранилище маны.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Remova um marcador de carga de Repositório Druídico: Adicione um mana de qualquer cor à sua reserva de mana.]]></LOCALISED_TEXT>
    <AVAILABILITY>
    return EffectController():IsAI() == 0
    </AVAILABILITY>
    <COST type="Mana" cost="{0}" />
    <RESOLUTION_TIME_ACTION>
    EffectController():ChooseColour( "CARD_QUERY_CHOOSE_COLOUR", 1 )
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    ObjectDC():Set_Int( 0, GetChosenColour() )
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    if EffectController():IsAI() ~= 0 then
   ObjectDC():Set_Int(1, 1)
    end
    </RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>
  <STATIC_ABILITY filter_zone="ZONE_IN_PLAY">
    <CONTINUOUS_ACTION layer="6">
    local characteristics = Object():GetCurrentCharacteristics()
    local mana_color = ObjectDC():Get_Int(0)
    characteristics:GrantAbility(mana_color)
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <MANA_ABILITY resource_id="1" filter_zone="ZONE_IN_PLAY">
    <COST type="TapSelf" />
    <PRODUCES amount="{W}" />
  </MANA_ABILITY>
  <MANA_ABILITY resource_id="2" filter_zone="ZONE_IN_PLAY">
    <COST type="TapSelf" />
    <PRODUCES amount="{U}" />
  </MANA_ABILITY>
  <MANA_ABILITY resource_id="3" filter_zone="ZONE_IN_PLAY">
    <COST type="TapSelf" />
    <PRODUCES amount="{B}" />
  </MANA_ABILITY>
  <MANA_ABILITY resource_id="4" filter_zone="ZONE_IN_PLAY">
    <COST type="TapSelf" />
    <PRODUCES amount="{R}" />
  </MANA_ABILITY>
  <MANA_ABILITY resource_id="5" filter_zone="ZONE_IN_PLAY">
    <COST type="TapSelf" />
    <PRODUCES amount="{G}" />
  </MANA_ABILITY>
  <TRIGGERED_ABILITY internal="1">
    <TRIGGER value="BEGINNING_OF_STEP">
    if ( EffectController():IsAI() ~= 0 and MTG():GetStep() == STEP_END_OF_TURN and ObjectDC():Get_Int(1) ~= 0 ) then
   ObjectDC():Set_Int(1, 0)
   return true
    end
    return false
    </TRIGGER>
  </TRIGGERED_ABILITY>
</CARD_V2>
The code you have here does not use mana tokens, even though mana tokens are REQUIRED for this card. The reason mana tokens would be required for this card is because it should not produce mana unless a counter is removed, but having the possibility of granting a mana ability without having one active will cause the game to crash (this has been verified by multiple people).

Takhen wrote:I don't understand the correlation between foiling and shuffling, but now I know that both @2 and @3 are for shuffling and I won't to use because I want the same total casual effect as in real life
The AI will prioritize foiling cards for the AI that are marked to be biased shuffled. That is the correlation between them.

If someone is playing on max difficulty level then the @2 and @3 have no effect on shuffling. They only affect shuffling on lower levels of difficulty, though you can omit them if desired. I don't set up biased shuffling for my decks because I don't think it is necessary.

Takhen wrote:Maybe more than what it is, I should know in which directory, file, line I can find and change that DLC number
It is changed by changing the number in the filename of the WAD. It is that simple.

Takhen wrote:So there is no difference between official ones and others
I found some I thought they was official, but the deck image was a image card and not a planeswalker: inusual for original deck, but maybe it means nothing and it is true that those are official :)
Nope, as far as the game sees them there is no difference between an official WAD and a mod WAD.

The image for the deck also does not mean anything, any deck can use any image. For some of my decks I use planeswalker images, for others I use card images, which I used was more about which images I had in decent quality that went well with the deck.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Could I ask a question, please?

Postby thefiremind » 23 Feb 2013, 22:35

I was writing this answer before RiiakShiNal posted his, but I wrote some additional information that could be useful so I'll post it anyway. :lol:

Takhen wrote:I used Green Suns Zenith to take the code, and I didn't notice that it is better than Chord of Calling :)
You can only fetch green creatures with Green Sun's Zenith. If you only need to fetch green creatures, then yes, it's better.

Takhen wrote:Precisely, in codes' research I would know which code are so many simple that are sure (in this case, if there are no other reasons, I want to insert it in the XML), and which could have some bug and so it is better to keep the LOL file
If I knew which LOL files have some bug, I would fix them... :lol: If someone made a LOL file that lets you write less code for the same result, I don't see any reason not to use it. You also said that you aren't planning to share your results (at least for now), so you don't have to worry for other people who must have the same LOL files for your cards to work.

Takhen wrote:And in this case I have to ask how to use these LOLs, because my pratice knowlegde stops at XML and TDX...
Even when you are not using LOL files made by other users, you are using LOL files anyway because the ones I listed here are official. When you write EffectDC() you are referring to a LOL file which specifies that EffectDC() actually calls MTG():EffectDataChest(). Why are we using EffectDC() then? Because it's shorter to write and easier to remember. You don't have to do anything special to use LOL files: they need to be included in the DATA_ALL_PLATFORMS\FUNCTIONS folder of a WAD file, then you use the functions declared in the LOL file (example: EffectDC()) as you would use the functions in the game executable (example: DestroyWithoutRegenerate())... well, the difference is that functions declared in LOL files are global, meaning you don't call them from an object (no Object():, MTG(): or whatever before them).

Takhen wrote:How I could know which cards i can save with only XML and which others needs a LOL and which LOL to works?
You can't. :lol: You should rely on the modders who should specify the dependencies of their mods. For example I can guarantee that my cards only need the LOL files from my mod, nothing from other mods is required. And you can recognize the functions that need RiiakShiNal's LOL files because he used names that start with "RSN_" (I promise I'll do the same for DotP2014... if and when it will be released :wink:).

Takhen wrote:Maybe is for this reason too that the card I was trying, Druids' Repository, doesn't work in the part of adding mana (or maybe it is an excuse for don't admit I am not able to make that XD)
You chose a difficult card... you need mana tokens for this one. Let me explain: DotP2013 only understands tapping as a possible cost for getting mana. So, if you limit yourself to what the game offers, Eldrazi Spawn tokens and Druids' Repository can't be coded. There's a workaround that we call "mana tokens". The idea is that you forget about automatic mana tapping for those cards, and you give them an activated ability that creates an invisible token. This token can be tapped for mana automatically and will be removed from the game when used or when the current phase ends. With mana tokens you are basically emulating the mana pool. The downsides are 2: you use activated abilities that won't be counted as mana abilities (so they will trigger Burning-Tree Shaman and similar cards), and you'll end up mixing automatic mana tapping with manual mana tapping which feels a bit out of place (that's why I don't like to use mana tokens, but that's just a matter of taste).
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Re: Could I ask a question, please?

Postby Takhen » 24 Feb 2013, 00:08

RiiakShiNal wrote:If looking at my cards it is fairly easy to see which custom functions I use in the cards as they all start with "RSN_". As for which LOL file they are in you just have to look in the FUNCTIONS directory to see which file a particular function is in as the game will read all of those files and will use a particular function from where ever it can find it.
"RSN_" is clear and I found 10 files with it
Perhaps I would need to know with which card I have to use LOLs and which LOL in particular in that case
It would be easy if a LOL was "Cascade" so I know that I need it when I use a deck with some Cascade in it, but the most of those LOL have names I'm not able to relate with their use...
thefiremind wrote:If I knew which LOL files have some bug, I would fix them... If someone made a LOL file that lets you write less code for the same result, I don't see any reason not to use it. You also said that you aren't planning to share your results (at least for now), so you don't have to worry for other people who must have the same LOL files for your cards to work.
That I want to say is that there are some abilities that are so simple that for sure those have no bus (flying for example or a simply copy-pastable ability) and knowing which are those I could insert in the XML and not in the LOL, for those where there is the doubt, also if it is a little doubt, I could use the LOL (when I will be able to do)
The reason is that for now I am not able...if you say it is easy, and you can help me to use (and say when to use, seen that except for Mana Token's needer, cards I have done still now seem to work without it), I will use LOLs too :)
thefiremind wrote:Even when you are not using LOL files made by other users, you are using LOL files anyway because the ones I listed here are official. When you write EffectDC() you are referring to a LOL file which specifies that EffectDC() actually calls MTG():EffectDataChest(). Why are we using EffectDC() then? Because it's shorter to write and easier to remember. You don't have to do anything special to use LOL files: they need to be included in the DATA_ALL_PLATFORMS\FUNCTIONS folder of a WAD file, then you use the functions declared in the LOL file (example: EffectDC()) as you would use the functions in the game executable (example: DestroyWithoutRegenerate())... well, the difference is that functions declared in LOL files are global, meaning you don't call them from an object (no Object():, MTG(): or whatever before them).
Still now I used that link only for Badges number, for the rest I "Frankensteined" parts of other cards, so I found "EffectDC()" somewhere, but I never understand what it was because there wasn't no reason to do and the card work equally...

RiiakShiNal wrote:It is quite possible that you have used code from one or more LOL files without realizing it because the game does not differentiate between built-in functions and our custom functions, so the only way to know which is which is to know what all the built-in functions are. Now as you get better at coding you may be able to "feel" what is or isn't a built-in function as you will become comfortable in using them, but there is no hard fast rule as to what is and isn't built-in.

Once you have determined that a function is custom then finding it means looking through each LOL file in the mod that the card came from (or each mod that the mod depends on if it is a dependent mod) to find it.
About Nest Invader I think there is a LOL related because copying in CARDS directory also the Token and the Mana Token, it equally doesn't work
But which of them to use, I don't know...There is a code's line that links it as "ARTID" does for the TDX, so that I can find the LOL in particular?

And about the other 2000+ cards by other modders, I should test one to one? :shock:
Couldn't I, maybe also deleting and reopening all mods, to know which card relate with which LOL?

Without something of "concrete" as the ARTID example I'm not able to find this link, expecially don't knowing the most of LOLs' functions (the "not-Cascade" LOLs)
thefiremind wrote:You can't. You should rely on the modders who should specify the dependencies of their mods. For example I can guarantee that my cards only need the LOL files from my mod, nothing from other mods is required. And you can recognize the functions that need RiiakShiNal's LOL files because he used names that start with "RSN_" (I promise I'll do the same for DotP2014... if and when it will be released ).
With this I know that if I need a card made by you, I can find its LOL between yours, but if I need only a card from yours, it is useful to copy all your LOLs, it isn't? So I still need to know how to "see" which LOL is related with which XML

thefiremind wrote:The code you have here does not use mana tokens, even though mana tokens are REQUIRED for this card. The reason mana tokens would be required for this card is because it should not produce mana unless a counter is removed, but having the possibility of granting a mana ability without having one active will cause the game to crash (this has been verified by multiple people).
I suspected I had to use something as Mana Token, but because it was similar to Bird of Paradise I thought bad it wasn't necessary.
By a first watching I think a Mana Token is an invisible counter that the game uses to "remember" that I have a mana in my mana pool.
But how to use, or what exactly it is, I couldn't say...
How to relate the Mana Token to my XML? And it needs a LOL as I supposed about Nest Invader?
thefiremind wrote:You chose a difficult card... you need mana tokens for this one. Let me explain: DotP2013 only understands tapping as a possible cost for getting mana. So, if you limit yourself to what the game offers, Eldrazi Spawn tokens and Druids' Repository can't be coded. There's a workaround that we call "mana tokens". The idea is that you forget about automatic mana tapping for those cards, and you give them an activated ability that creates an invisible token. This token can be tapped for mana automatically and will be removed from the game when used or when the current phase ends. With mana tokens you are basically emulating the mana pool. The downsides are 2: you use activated abilities that won't be counted as mana abilities (so they will trigger Burning-Tree Shaman and similar cards), and you'll end up mixing automatic mana tapping with manual mana tapping which feels a bit out of place (that's why I don't like to use mana tokens, but that's just a matter of taste).
So you don't like to use, and I agree with you, but how you make me understand there isn't way to emulate cards like Druids' Repository or Eldrazi Tokens without using...Or there is a way?

RiiakShiNal wrote:It is changed by changing the number in the filename of the WAD. It is that simple.
All there without links within other files? I could do it (maybe :) )
User avatar
Takhen
 
Posts: 235
Joined: 04 Feb 2013, 19:35
Has thanked: 0 time
Been thanked: 0 time

Re: Could I ask a question, please?

Postby thefiremind » 24 Feb 2013, 01:03

Takhen wrote:Still now I used that link only for Badges number, for the rest I "Frankensteined" parts of other cards, so I found "EffectDC()" somewhere, but I never understand what it was because there wasn't no reason to do and the card work equally...
Then you don't need to worry about which functions come from LOL files and which functions come from the executable: the cards will work anyway. :lol:

Takhen wrote:With this I know that if I need a card made by you, I can find its LOL between yours, but if I need only a card from yours, it is useful to copy all your LOLs, it isn't? So I still need to know how to "see" which LOL is related with which XML
If you keep all the mods installed, you don't need to copy any LOL file: your custom WAD will read what it needs from other WAD files as well. I'll tell you more: copying LOL files is something I wouldn't recommend, because if I update/fix my LOL files, your copies won't be up-to-date and you could see a card not working when it's just reading from the obsolete copy.

Takhen wrote:So you don't like to use, and I agree with you, but how you make me understand there isn't way to emulate cards like Druids' Repository or Eldrazi Tokens without using...Or there is a way?
There's no way. You can try for yourself if you can't believe it: make a copy of Cathedral of War, and change the cost of the mana ability from
Code: Select all
<COST type="TapSelf" />
to
Code: Select all
<COST type="SacrificeSelf" />
Now you would expect Cathedral of War to be sacrificed when needed for mana... but it won't! It will be tapped for mana as if you didn't change anything.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Re: Could I ask a question, please?

Postby RiiakShiNal » 24 Feb 2013, 21:07

Takhen wrote:About Nest Invader I think there is a LOL related because copying in CARDS directory also the Token and the Mana Token, it equally doesn't work
But which of them to use, I don't know...There is a code's line that links it as "ARTID" does for the TDX, so that I can find the LOL in particular?
No, there is no such line because all functions defined in LOL files are global, any card can use them without having to do anything special. (As pointed out by thefiremind earlier.)

Takhen wrote:And about the other 2000+ cards by other modders, I should test one to one? :shock:
Couldn't I, maybe also deleting and reopening all mods, to know which card relate with which LOL?
You would be able to figure out which cards use which groups of LOL files, because a card is not limited to using functions from just one file. You also should be aware that some modders made their mods rely on LOLs from other mods.

Takhen wrote:With this I know that if I need a card made by you, I can find its LOL between yours, but if I need only a card from yours, it is useful to copy all your LOLs, it isn't? So I still need to know how to "see" which LOL is related with which XML
It is not a one-to-one relationship a single XML can use multiple LOLs, a single LOL can be used for multiple cards and can even use multiple other LOLs. For example, RSN_ABILITY_TESTS.LOL relies on CONSTANTS.LOL, EXTRACTINFO.LOL, and RSN_COUNTING.LOL, RSN_COUNTING.LOL then relies on CONSTANTS.LOL, EXTRACTINFO.LOL, and RSN_CONSTANTS.LOL then EXTRACTINFO.LOL depends on CONSTANTS.LOL. So as illustrated LOLs can be interdependent on each other so saying a card only relies on just 1 LOL is usually not possible. Even thefiremind's cards rely on multiple LOLs (some of which are not included in his mod, but you don't have to worry about the ones he did not include as they are the ones that come with the game itself).

thefiremind wrote:
Takhen wrote:With this I know that if I need a card made by you, I can find its LOL between yours, but if I need only a card from yours, it is useful to copy all your LOLs, it isn't? So I still need to know how to "see" which LOL is related with which XML
If you keep all the mods installed, you don't need to copy any LOL file: your custom WAD will read what it needs from other WAD files as well. I'll tell you more: copying LOL files is something I wouldn't recommend, because if I update/fix my LOL files, your copies won't be up-to-date and you could see a card not working when it's just reading from the obsolete copy.
Again as I mentioned earlier in this post you have to be careful because LOLs can depend on other LOLs as well. Plus when modders update if you just copied the files your files would then be obsolete and could conflict the other updated mod.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Could I ask a question, please?

Postby Takhen » 27 Feb 2013, 22:33

thefiremind wrote:
Takhen wrote:Still now I used that link only for Badges number, for the rest I "Frankensteined" parts of other cards, so I found "EffectDC()" somewhere, but I never understand what it was because there wasn't no reason to do and the card work equally...
Then you don't need to worry about which functions come from LOL files and which functions come from the executable: the cards will work anyway. :lol:
If you say that the card will works because you expected that the game will find the LOLs in the WADs where I took the card itself, it isn't
I'm tring to keep separated the single WADs to can choose which to instert and which don't, so if I need LOLs, I should learn how to relate to XMLs and how to use...

thefiremind wrote:
Takhen wrote:With this I know that if I need a card made by you, I can find its LOL between yours, but if I need only a card from yours, it is useful to copy all your LOLs, it isn't? So I still need to know how to "see" which LOL is related with which XML
If you keep all the mods installed, you don't need to copy any LOL file: your custom WAD will read what it needs from other WAD files as well. I'll tell you more: copying LOL files is something I wouldn't recommend, because if I update/fix my LOL files, your copies won't be up-to-date and you could see a card not working when it's just reading from the obsolete copy.
Related with the previous, I prefer to keep cards I use, made by me or not, work indipendently
So if there are some abilities (I don't think LOLs are only abilities but I don't know what other they are) that could need to be updated, I could take it in your LOLs (and I would like to uses those LOLs without decks, so in game's installation directory I will keep the running decks and I could choose which to add after the installation and which other no)
Those abilities that doesn't need to be upgrated (Flying, or some others simple as Storm that you let me simply copy so I thoungh it is relatively easy, or abilities with no keywords but easy too, as my Horobi, Death's Wail that seems to work and I will show you soon) I want to keep in the XML, if it isn't a problem (as the game slower or similar)

thefiremind wrote:
Takhen wrote:So you don't like to use, and I agree with you, but how you make me understand there isn't way to emulate cards like Druids' Repository or Eldrazi Tokens without using...Or there is a way?
There's no way. You can try for yourself if you can't believe it: make a copy of Cathedral of War, and change the cost of the mana ability from
Code: Select all
<COST type="TapSelf" />
to
Code: Select all
<COST type="SacrificeSelf" />
Now you would expect Cathedral of War to be sacrificed when needed for mana... but it won't! It will be tapped for mana as if you didn't change anything.
If this requires only the Mana Tokens, that requires the LOL by itself, could you explain to me how to use?
RiiakShiNal wrote:No, there is no such line because all functions defined in LOL files are global, any card can use them without having to do anything special. (As pointed out by thefiremind earlier.)
I'm trying to understand: let me make an example
We need a LOL for the ability FLYING
So we have the FLYING.LOL and the FLYING_CREATURE_123456.XML

As you say it isn't something like
FLYING_CREATURE_123456.XML says "This card needs Flying, read it in FLYING.LOL"
FLYING.LOL says "Hello Game, if a player needs Flying do this: [...]"

But as I am saying it should be at least like
FLYING_CREATURE_123456.XML says "This card has Flying: Game, 'you know what to do' "
FLYING.LOL says "Hello Game, if a player needs Flying do this: [...]"

How to explain...
Also if the Flying's code is in a LOL ad not in a card, the card must says it has Flying, and this "to say it has Flying", if there isn't the Flying's code itself, is a link between the XML and the LOL, no?
Now it isn't important to understand my twisted example but it is that if I have to learn to use also the LOLs, other than XML and TDX, I need a starting point...
RiiakShiNal wrote:You would be able to figure out which cards use which groups of LOL files, because a card is not limited to using functions from just one file. You also should be aware that some modders made their mods rely on LOLs from other mods.
This would be put only more obstacles, maybe I could refer directly to the mods their mods refer themselves, I don't know, but my target is to semplify
So if I would take into the game directory all files I find without understand what they are, maybe also doubles or useful files, they will works, ok, but when I will delete a single part I don't need all will crash
This is the reason i would like to separe the XML+TDX singles, the XML+TDX+LOLs etc: to be able to know if I only need a card, for example Nest Invader, what I have to copy from the deck that uses it also without using the deck itself
It would be so difficult or with a little effort and a "little" bit of your suggestions I could be able to do?

RiiakShiNal wrote:It is not a one-to-one relationship a single XML can use multiple LOLs, a single LOL can be used for multiple cards and can even use multiple other LOLs. For example, RSN_ABILITY_TESTS.LOL relies on CONSTANTS.LOL, EXTRACTINFO.LOL, and RSN_COUNTING.LOL, RSN_COUNTING.LOL then relies on CONSTANTS.LOL, EXTRACTINFO.LOL, and RSN_CONSTANTS.LOL then EXTRACTINFO.LOL depends on CONSTANTS.LOL. So as illustrated LOLs can be interdependent on each other so saying a card only relies on just 1 LOL is usually not possible. Even thefiremind's cards rely on multiple LOLs (some of which are not included in his mod, but you don't have to worry about the ones he did not include as they are the ones that come with the game itself).
Maybe I know this, if semplifying you are saying, for exaple, that if both HASTE and STORM need HASTE.LOL and STORM.LOL, the card CREATURE_WITH_HASTE_AND_STORM.XML needs two LOLs to work
And according with my idea I will take all three files in a directory called CREATURE WITH HASTE AND STORM
and if there is another creature with HASTE I will copy HASTE.LOL in its directory too or I could put a README.TXT files to place in every card's directory that need a LOL that says "this card needs these LOLs from the directory where you take LOLs: HASTE.LOL, BLABLA.LOL etc..."

The second methodic would be also easier to upgrade LOLs, and this same second methodic should answer also to this
RiiakShiNal wrote:Again as I mentioned earlier in this post you have to be careful because LOLs can depend on other LOLs as well. Plus when modders update if you just copied the files your files would then be obsolete and could conflict the other updated mod.
So it wouldn't be a modify of mods, only a reorder with the target to have more clear and easy to do my mods from those (I will also reorder the answers of this topic, with the target to make as easy as possible a work that has the codes that make it hard)



Watching back about the Unlocked cards, today I tried with no success to make a deck's sideboard
I deleted the game then I reinstalled it
Now it was clean, with no mods, so I added only my deck, running, with only a modify: now it has the UNLOCKS directory
So I took the DATA_CORE.WAD, and I modified the APPID_LINKING.XML, I thought it should be the only one because I reinstalled, so it should be the APPID_LINKING the game uses

Code: Select all
[AJANI_DEFAULT]
1
97330
97330

[CHANDRA_DEFAULT]
2
97330
97330

[GARRUK_DEFAULT]
3
97330
97330

[JACE_DEFAULT]
4
97330
97330

[KEZZIK_DEFAULT]
5
97330
97330

[LILIANA_DEFAULT]
6
97330
97330

[MANDRED_DEFAULT]
7
97330
97330

[NEFAROX_DEFAULT]
8
97330
97330

[SARNEK_DEFAULT]
9
97330
97330

[TALKOS_DEFAULT]
10
97330
97330

[AZORIUS_DEFAULT]
12
97330
97330

[GOLGARI_DEFAULT]
13
97330
97330

[IZZET_DEFAULT]
14
97330
97330

[RAKDOS_DEFAULT]
15
97330
97330

[Wielding_Steel]
16
97330
97330

[Cuore_della_Miriade]
9999001
97330
97330
It is a THETA version, so I moved all numbers to 97330
Before they was progressive numbers greater than 97330, I also tried to continue the progression with the same no results
Here "Cuore della Miriade" is my deck's name and 9999001 is the deck ID
So I saved, packed and put the new DATA_CORE.WAD in place of the older.

In my UNLOCKS directory there are two files: CUORE_DELLA_MIRIADE_PROMO.XML and CUORE_DELLA_MIRIADE_UNLOCKS.XML
Here the PROMO
Code: Select all
<UNLOCKS uid="97330" deck_uid="9999001" content_pack="1" game_mode="2">
  <CARD name="GREEN_SUNS_ZENITH_38221559" deckOrderId="41" unlockOrderId="0" quantity="1" />
  <CARD name="SKULLCLAMP_88848197" deckOrderId="42" unlockOrderId="1" quantity="1" />
</UNLOCKS>
Here the UNLOCKS
Code: Select all
<UNLOCKS uid="97330" deck_uid="9999001" content_pack="1" game_mode="0">
  <CARD name="RANCOR_276969" deckOrderId="40" unlockOrderId="8" quantity="2" />
</UNLOCKS>
DECK_UID is always 9999001
UNLOCKS and PROMO UID is always 97330 (or 97390 for PROMO and 97391 for UNLOCKS and vice versa when I continued the progression before I moved all to 97330)

So I packed also the deck and added.
It sometimes showed no sideboard, and sometimes the game crashed when I opened it in the "Decks Management", but never the side.

I don't know what it is
My only consideration about is that the others pre-made (and I think official) decks despite they have in the APPID_LINKIG always numbers equal or greater than 97330, see in the NAMEDECK_UNLOCKS_1.XML

Code: Select all
<UNLOCKS uid="9054" deck_uid="15" content_pack="1" game_mode="0">
  <CARD name="DEMIGOD_OF_REVENGE_281225" deckOrderId="40" unlockOrderId="0" quantity="1" />
  <CARD name="TERMINATE_276986" deckOrderId="41" unlockOrderId="1" quantity="1" />
  <CARD name="ONYX_MAGE_280285" deckOrderId="42" unlockOrderId="2" quantity="1" />
  <CARD name="ASHENMOOR_GOUGER_278458" deckOrderId="43" unlockOrderId="3" quantity="1" />
  <CARD name="SCAVENGER_DRAKE_280238" deckOrderId="44" unlockOrderId="4" quantity="1" />
  <CARD name="VEXING_DEVIL_280304" deckOrderId="45" unlockOrderId="5" quantity="1" />
  <CARD name="MALFEGOR_276946" deckOrderId="46" unlockOrderId="6" quantity="1" />
  <CARD name="REANIMATE_277211" deckOrderId="47" unlockOrderId="7" quantity="1" />
  <CARD name="BLOODCHIEF_ASCENSION_277362" deckOrderId="48" unlockOrderId="8" quantity="1" />
  <CARD name="KAERVEK_THE_MERCILESS_277332" deckOrderId="49" unlockOrderId="9" quantity="1" />
  <CARD name="AVATAR_OF_SLAUGHTER_281235" deckOrderId="50" unlockOrderId="10" quantity="1" />
  <CARD name="HEAT_SHIMMER_281278" deckOrderId="51" unlockOrderId="11" quantity="1" />
  <CARD name="CHAOS_WARP_281236" deckOrderId="52" unlockOrderId="12" quantity="1" />
  <CARD name="CHAOS_WARP_281236" deckOrderId="53" unlockOrderId="13" quantity="1" />
  <CARD name="DIN_OF_THE_FIREHERD_281226" deckOrderId="54" unlockOrderId="14" quantity="1" />
  <CARD name="BITUMINOUS_BLAST_276743" deckOrderId="55" unlockOrderId="15" quantity="1" />
  <CARD name="ASHENMOOR_LIEGE_281224" deckOrderId="56" unlockOrderId="16" quantity="1" />
  <CARD name="ONYX_MAGE_280285" deckOrderId="57" unlockOrderId="17" quantity="1" />
  <CARD name="CAPRICIOUS_EFREET_277959" deckOrderId="58" unlockOrderId="18" quantity="1" />
  <CARD name="VEXING_DEVIL_280304" deckOrderId="59" unlockOrderId="19" quantity="1" />
  <CARD name="ASHENMOOR_LIEGE_281224" deckOrderId="60" unlockOrderId="20" quantity="1" />
  <CARD name="SCAVENGER_DRAKE_280238" deckOrderId="61" unlockOrderId="21" quantity="1" />
  <CARD name="WRECKING_BALL_276801" deckOrderId="62" unlockOrderId="22" quantity="1" />
  <CARD name="REANIMATE_277211" deckOrderId="63" unlockOrderId="23" quantity="1" />
  <CARD name="AVATAR_OF_DISCORD_281239" deckOrderId="64" unlockOrderId="24" quantity="1" />
  <CARD name="AVATAR_OF_DISCORD_281239" deckOrderId="65" unlockOrderId="25" quantity="1" />
  <CARD name="ROCKSLIDE_ELEMENTAL_281251" deckOrderId="66" unlockOrderId="26" quantity="1" />
  <CARD name="ROCKSLIDE_ELEMENTAL_281251" deckOrderId="67" unlockOrderId="27" quantity="1" />
  <CARD name="BLOODCHIEF_ASCENSION_277362" deckOrderId="68" unlockOrderId="28" quantity="1" />
  <CARD name="GRAVE_TITAN_276927" deckOrderId="69" unlockOrderId="29" quantity="1" />
</UNLOCKS>
UID = 9054, a number I didn't discovered from where comes...
Yet it must be said that the Foil effect to the rare cards worked, so that I did shouldn't be all wrong!



And another event:
I was trying a test version of the Green Tokens Deck I'm making and I noticed that at a certain point, with Fungoloth, Saproling Tokens I should have had didn't add
Then I noticed that I had 72 tokens and my opponents had 28 tokens of the same type
It seems there is a limit of 100 token/type, it is a bug or what?
It looks like to be poor considering the maximum power and toughness reached by my Primordial Hydra by +1/+1 counters (that I think should be similar to tokens), no?
(If someone want to know the Hydra went to 9999/9999 :D :D :D )
User avatar
Takhen
 
Posts: 235
Joined: 04 Feb 2013, 19:35
Has thanked: 0 time
Been thanked: 0 time

Re: Could I ask a question, please?

Postby RiiakShiNal » 28 Feb 2013, 14:29

Takhen wrote:I'm trying to understand: let me make an example
We need a LOL for the ability FLYING
So we have the FLYING.LOL and the FLYING_CREATURE_123456.XML

As you say it isn't something like
FLYING_CREATURE_123456.XML says "This card needs Flying, read it in FLYING.LOL"
FLYING.LOL says "Hello Game, if a player needs Flying do this: [...]"

But as I am saying it should be at least like
FLYING_CREATURE_123456.XML says "This card has Flying: Game, 'you know what to do' "
FLYING.LOL says "Hello Game, if a player needs Flying do this: [...]"

How to explain...
Also if the Flying's code is in a LOL ad not in a card, the card must says it has Flying, and this "to say it has Flying", if there isn't the Flying's code itself, is a link between the XML and the LOL, no?
Now it isn't important to understand my twisted example but it is that if I have to learn to use also the LOLs, other than XML and TDX, I need a starting point...
You could say that the function call itself is the link, but the link doesn't tell you which file, it just specifies which function (which could be hiding in any LOL file). Though you also have to consider a single action block of a single ability of a single card can easily call upon multiple LOL files. So the best way to figure out which card uses which files is to know which files contain which functions.

You can also think of functions as groups of building blocks put together to fulfill a purpose. A simple project may only require 1 or 2 of those groups, but a complex project may require groups of building blocks from several different locations each serving a different purpose.

Takhen wrote:This would be put only more obstacles, maybe I could refer directly to the mods their mods refer themselves, I don't know, but my target is to semplify
So if I would take into the game directory all files I find without understand what they are, maybe also doubles or useful files, they will works, ok, but when I will delete a single part I don't need all will crash
This is the reason i would like to separe the XML+TDX singles, the XML+TDX+LOLs etc: to be able to know if I only need a card, for example Nest Invader, what I have to copy from the deck that uses it also without using the deck itself
It would be so difficult or with a little effort and a "little" bit of your suggestions I could be able to do?
Your "simplifying" to me seems to be adding more obstacles. You said earlier in this thread that you were not going to be releasing your work so why do you need to isolate everything? I usually just manage other peoples files by keeping them in their WADs and deal with them as a whole instead of picking them apart and dealing with every minor detail (I don't have that kind of time).

You say you want to use Nest Invader from another mod, then simply make sure you have that mod installed and reference the card itself, no need to pull it out of the mod as mods share resources. There are several modders out there who use cards from other mods without having to know exactly how the card was built or what LOLs it uses, they just reference the card.

Takhen wrote:Maybe I know this, if semplifying you are saying, for exaple, that if both HASTE and STORM need HASTE.LOL and STORM.LOL, the card CREATURE_WITH_HASTE_AND_STORM.XML needs two LOLs to work
And according with my idea I will take all three files in a directory called CREATURE WITH HASTE AND STORM
and if there is another creature with HASTE I will copy HASTE.LOL in its directory too or I could put a README.TXT files to place in every card's directory that need a LOL that says "this card needs these LOLs from the directory where you take LOLs: HASTE.LOL, BLABLA.LOL etc..."

The second methodic would be also easier to upgrade LOLs, and this same second methodic should answer also to this
This is not correct, for example Cloudcrown Oak (from my mod) has one ability Reach, but it requires RSN_CHARACTERISTICS.LOL, EXTRACTINFO.LOL and CONSTANTS.LOL. A more complex ability may require even more LOLs.

Creating a directory for every card also seems like a tremendous waste of time. I have no idea why you would even attempt to do so.

Takhen wrote:Watching back about the Unlocked cards, today I tried with no success to make a deck's sideboard
I deleted the game then I reinstalled it
Now it was clean, with no mods, so I added only my deck, running, with only a modify: now it has the UNLOCKS directory
So I took the DATA_CORE.WAD, and I modified the APPID_LINKING.XML, I thought it should be the only one because I reinstalled, so it should be the APPID_LINKING the game uses

Code: Select all
[AJANI_DEFAULT]
1
97330
97330

[CHANDRA_DEFAULT]
2
97330
97330

[GARRUK_DEFAULT]
3
97330
97330

[JACE_DEFAULT]
4
97330
97330

[KEZZIK_DEFAULT]
5
97330
97330

[LILIANA_DEFAULT]
6
97330
97330

[MANDRED_DEFAULT]
7
97330
97330

[NEFAROX_DEFAULT]
8
97330
97330

[SARNEK_DEFAULT]
9
97330
97330

[TALKOS_DEFAULT]
10
97330
97330

[AZORIUS_DEFAULT]
12
97330
97330

[GOLGARI_DEFAULT]
13
97330
97330

[IZZET_DEFAULT]
14
97330
97330

[RAKDOS_DEFAULT]
15
97330
97330

[Wielding_Steel]
16
97330
97330

[Cuore_della_Miriade]
9999001
97330
97330
It is a THETA version, so I moved all numbers to 97330
Before they was progressive numbers greater than 97330, I also tried to continue the progression with the same no results
The official game with expansions may have more than 1 APPID_LINKING.TXT so you have to make sure you are modifying the correct one.

Takhen wrote:Here "Cuore della Miriade" is my deck's name and 9999001 is the deck ID
So I saved, packed and put the new DATA_CORE.WAD in place of the older.

In my UNLOCKS directory there are two files: CUORE_DELLA_MIRIADE_PROMO.XML and CUORE_DELLA_MIRIADE_UNLOCKS.XML
Here the PROMO
Code: Select all
<UNLOCKS uid="97330" deck_uid="9999001" content_pack="1" game_mode="2">
  <CARD name="GREEN_SUNS_ZENITH_38221559" deckOrderId="41" unlockOrderId="0" quantity="1" />
  <CARD name="SKULLCLAMP_88848197" deckOrderId="42" unlockOrderId="1" quantity="1" />
</UNLOCKS>
Here the UNLOCKS
Code: Select all
<UNLOCKS uid="97330" deck_uid="9999001" content_pack="1" game_mode="0">
  <CARD name="RANCOR_276969" deckOrderId="40" unlockOrderId="8" quantity="2" />
</UNLOCKS>
DECK_UID is always 9999001
UNLOCKS and PROMO UID is always 97330 (or 97390 for PROMO and 97391 for UNLOCKS and vice versa when I continued the progression before I moved all to 97330)

So I packed also the deck and added.
It sometimes showed no sideboard, and sometimes the game crashed when I opened it in the "Decks Management", but never the side.
This will cause problems. Every uid MUST BE UNIQUE. I don't know if using 97330 as an id will cause problems, but using it as a uid for two different files will definitely cause problems. So you should have something like this (numbers don't matter as long as they are unique, but it is usually better to use a set pattern so you don't have to constantly guess which number is or is not unique.):

Code: Select all
<UNLOCKS uid="9999101" deck_uid="9999001" content_pack="1" game_mode="2">
Code: Select all
<UNLOCKS uid="9999201" deck_uid="9999001" content_pack="1" game_mode="0">
Takhen wrote:I don't know what it is
My only consideration about is that the others pre-made (and I think official) decks despite they have in the APPID_LINKIG always numbers equal or greater than 97330, see in the NAMEDECK_UNLOCKS_1.XML

Code: Select all
<UNLOCKS uid="9054" deck_uid="15" content_pack="1" game_mode="0">
  <CARD name="DEMIGOD_OF_REVENGE_281225" deckOrderId="40" unlockOrderId="0" quantity="1" />
  <CARD name="TERMINATE_276986" deckOrderId="41" unlockOrderId="1" quantity="1" />
  <CARD name="ONYX_MAGE_280285" deckOrderId="42" unlockOrderId="2" quantity="1" />
  <CARD name="ASHENMOOR_GOUGER_278458" deckOrderId="43" unlockOrderId="3" quantity="1" />
  <CARD name="SCAVENGER_DRAKE_280238" deckOrderId="44" unlockOrderId="4" quantity="1" />
  <CARD name="VEXING_DEVIL_280304" deckOrderId="45" unlockOrderId="5" quantity="1" />
  <CARD name="MALFEGOR_276946" deckOrderId="46" unlockOrderId="6" quantity="1" />
  <CARD name="REANIMATE_277211" deckOrderId="47" unlockOrderId="7" quantity="1" />
  <CARD name="BLOODCHIEF_ASCENSION_277362" deckOrderId="48" unlockOrderId="8" quantity="1" />
  <CARD name="KAERVEK_THE_MERCILESS_277332" deckOrderId="49" unlockOrderId="9" quantity="1" />
  <CARD name="AVATAR_OF_SLAUGHTER_281235" deckOrderId="50" unlockOrderId="10" quantity="1" />
  <CARD name="HEAT_SHIMMER_281278" deckOrderId="51" unlockOrderId="11" quantity="1" />
  <CARD name="CHAOS_WARP_281236" deckOrderId="52" unlockOrderId="12" quantity="1" />
  <CARD name="CHAOS_WARP_281236" deckOrderId="53" unlockOrderId="13" quantity="1" />
  <CARD name="DIN_OF_THE_FIREHERD_281226" deckOrderId="54" unlockOrderId="14" quantity="1" />
  <CARD name="BITUMINOUS_BLAST_276743" deckOrderId="55" unlockOrderId="15" quantity="1" />
  <CARD name="ASHENMOOR_LIEGE_281224" deckOrderId="56" unlockOrderId="16" quantity="1" />
  <CARD name="ONYX_MAGE_280285" deckOrderId="57" unlockOrderId="17" quantity="1" />
  <CARD name="CAPRICIOUS_EFREET_277959" deckOrderId="58" unlockOrderId="18" quantity="1" />
  <CARD name="VEXING_DEVIL_280304" deckOrderId="59" unlockOrderId="19" quantity="1" />
  <CARD name="ASHENMOOR_LIEGE_281224" deckOrderId="60" unlockOrderId="20" quantity="1" />
  <CARD name="SCAVENGER_DRAKE_280238" deckOrderId="61" unlockOrderId="21" quantity="1" />
  <CARD name="WRECKING_BALL_276801" deckOrderId="62" unlockOrderId="22" quantity="1" />
  <CARD name="REANIMATE_277211" deckOrderId="63" unlockOrderId="23" quantity="1" />
  <CARD name="AVATAR_OF_DISCORD_281239" deckOrderId="64" unlockOrderId="24" quantity="1" />
  <CARD name="AVATAR_OF_DISCORD_281239" deckOrderId="65" unlockOrderId="25" quantity="1" />
  <CARD name="ROCKSLIDE_ELEMENTAL_281251" deckOrderId="66" unlockOrderId="26" quantity="1" />
  <CARD name="ROCKSLIDE_ELEMENTAL_281251" deckOrderId="67" unlockOrderId="27" quantity="1" />
  <CARD name="BLOODCHIEF_ASCENSION_277362" deckOrderId="68" unlockOrderId="28" quantity="1" />
  <CARD name="GRAVE_TITAN_276927" deckOrderId="69" unlockOrderId="29" quantity="1" />
</UNLOCKS>
UID = 9054, a number I didn't discovered from where comes...
Yet it must be said that the Foil effect to the rare cards worked, so that I did shouldn't be all wrong!
The 9054 there is the UID for the unlocks, but the APPID_LINKING.TXT works on Deck UID not unlock UIDs. The only thing you have to do for unlock UIDs is make sure they are unique and not used as a UID anywhere else.

Takhen wrote:And another event:
I was trying a test version of the Green Tokens Deck I'm making and I noticed that at a certain point, with Fungoloth, Saproling Tokens I should have had didn't add
Then I noticed that I had 72 tokens and my opponents had 28 tokens of the same type
It seems there is a limit of 100 token/type, it is a bug or what?
It looks like to be poor considering the maximum power and toughness reached by my Primordial Hydra by +1/+1 counters (that I think should be similar to tokens), no?
(If someone want to know the Hydra went to 9999/9999 :D :D :D )
It is not a bug, it is an internally defined engine limit. You could get more Saprolings by using a different Saproling token, because the limit is on specific tokens. Further there seems to be an absolute limit with how many tokens can be in play of all types. If you go above that limit the game crashes (I'm still trying to figure out the exact number there). I've had up to 200 Elf tokens (100 Green Elf Warrior tokens, 100 Green/White Elf Warrior Tokens) in play before (just before the game crashed due to having too many tokens) so the game applies the 100 token limit to each individual token.

It can be a poor substitute, but if you are running an Elf deck (or any deck that can mass buff tokens), it can seriously work to your advantage, I've had 150+ Elves before with the smallest one being 8000+/8000+ all on the board at once. I've done more than 1.8 Million damage in a single attack.

For example your massive hydra versus my massive elves:
"I attack with my 9999/9999 hydra"
"I block with 2 8000/8000 elf tokens"
Result: hydra dies, 1 elf token dies.
"Before the end of your turn I use Imperious Perfect to create another elf token"
Result: 1 elf token created (due to Joraga Warcaller's 7999 counters, it comes in as 8000/8000).
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Could I ask a question, please?

Postby Takhen » 02 Mar 2013, 22:27

RiiakShiNal wrote:You could say that the function call itself is the link, but the link doesn't tell you which file, it just specifies which function (which could be hiding in any LOL file). Though you also have to consider a single action block of a single ability of a single card can easily call upon multiple LOL files. So the best way to figure out which card uses which files is to know which files contain which functions.

You can also think of functions as groups of building blocks put together to fulfill a purpose. A simple project may only require 1 or 2 of those groups, but a complex project may require groups of building blocks from several different locations each serving a different purpose.
RiiakShiNal wrote:Your "simplifying" to me seems to be adding more obstacles. You said earlier in this thread that you were not going to be releasing your work so why do you need to isolate everything? I usually just manage other peoples files by keeping them in their WADs and deal with them as a whole instead of picking them apart and dealing with every minor detail (I don't have that kind of time).

You say you want to use Nest Invader from another mod, then simply make sure you have that mod installed and reference the card itself, no need to pull it out of the mod as mods share resources. There are several modders out there who use cards from other mods without having to know exactly how the card was built or what LOLs it uses, they just reference the card.
RiiakShiNal wrote:This is not correct, for example Cloudcrown Oak (from my mod) has one ability Reach, but it requires RSN_CHARACTERISTICS.LOL, EXTRACTINFO.LOL and CONSTANTS.LOL. A more complex ability may require even more LOLs.

Creating a directory for every card also seems like a tremendous waste of time. I have no idea why you would even attempt to do so.
So you are saying that a single ability could require more functions in more LOLs and you are also saying that a single LOL could gathers more functions it it...
More I read about, more the situation becames hard :lol:

My need is to save the card because I need more those than the WADs of other modders
Add to this a little bit of perfectionism in reording :lol:

I think it is important, as I wrote also in another post a little ago because when I need to “frankenstain” a new card, more is my “XMLs collection” and more are the possibilities I find a card with the more similar ability I can find
And I would like also that I could make my card work without all decks, because I can need cards from decks I don't like and it is useless to take always all decks

But you are right, to keep near every XML its LOL/LOLs could be a great effort
And if I take a folder with only all XMLs, another with only LOLs and use a scheme that says to me (and all that want when and if I will have :) ) “you need to use this LOL if you are using a card with reach or haste”, “you need to use this other LOL if you are using a card with rebhound...” ecc?
It seems to be faster than the previuos method and clear too
LOLs I think can't be so numerous to make difficult as numerous are indeed the XMLs, and this make possible to simply upgrade the LOLs in a little time without touch the XMLs folder
What do you think about? :)

RiiakShiNal wrote:The official game with expansions may have more than 1 APPID_LINKING.TXT so you have to make sure you are modifying the correct one.
RiiakShiNal wrote:This will cause problems. Every uid MUST BE UNIQUE. I don't know if using 97330 as an id will cause problems, but using it as a uid for two different files will definitely cause problems. So you should have something like this (numbers don't matter as long as they are unique, but it is usually better to use a set pattern so you don't have to constantly guess which number is or is not unique.):

Code: Select all
<UNLOCKS uid="9999101" deck_uid="9999001" content_pack="1" game_mode="2">
Code: Select all
<UNLOCKS uid="9999201" deck_uid="9999001" content_pack="1" game_mode="0">
RiiakShiNal wrote:The 9054 there is the UID for the unlocks, but the APPID_LINKING.TXT works on Deck UID not unlock UIDs. The only thing you have to do for unlock UIDs is make sure they are unique and not used as a UID anywhere else.
I tried also without expansion and mods

Something that now I know and before I missed is that the number in the APPID_LINKING can be different from the UID promo and unlock in the deck's files

However also before to know, I remember a test
There was a Data_Core, maybe the basical but not sure
that was progressive, with no 97330:
Code: Select all
[Basical_Deck]
15
97388
97389
So I added
Code: Select all
[Basical_Deck]
15
97388
97389

[My_Deck]
9999001
97390
97391
I know that the different numbers after the IP deck are not important, as we said before, but thinking that it was I made the same in the deck's file:
Code: Select all
<UNLOCKS uid="97390" deck_uid="9999001" content_pack="1" game_mode="2">
Code: Select all
<UNLOCKS uid="97391" deck_uid="9999001" content_pack="1" game_mode="0">
or
Code: Select all
<UNLOCKS uid="97391" deck_uid="9999001" content_pack="1" game_mode="2">
Code: Select all
<UNLOCKS uid="97390" deck_uid="9999001" content_pack="1" game_mode="0">
I don't remember which of those two combinations
However, according to you, the important is that the two UID in the two deck's files are different
So, also without knowing why, I also did that you said, and it doesn't work too...
So what is the difference between my 97390 and 97391 and your 9999101 and 9999201? Maybe all the UID must have the same number of digits or something?

RiiakShiNal wrote:It is not a bug, it is an internally defined engine limit. You could get more Saprolings by using a different Saproling token, because the limit is on specific tokens. Further there seems to be an absolute limit with how many tokens can be in play of all types. If you go above that limit the game crashes (I'm still trying to figure out the exact number there). I've had up to 200 Elf tokens (100 Green Elf Warrior tokens, 100 Green/White Elf Warrior Tokens) in play before (just before the game crashed due to having too many tokens) so the game applies the 100 token limit to each individual token.

It can be a poor substitute, but if you are running an Elf deck (or any deck that can mass buff tokens), it can seriously work to your advantage, I've had 150+ Elves before with the smallest one being 8000+/8000+ all on the board at once. I've done more than 1.8 Million damage in a single attack.

For example your massive hydra versus my massive elves:
"I attack with my 9999/9999 hydra"
"I block with 2 8000/8000 elf tokens"
Result: hydra dies, 1 elf token dies.
"Before the end of your turn I use Imperious Perfect to create another elf token"
Result: 1 elf token created (due to Joraga Warcaller's 7999 counters, it comes in as 8000/8000).
You super-beat my record!!! :shock:

However the most of my token are made by Mycoloth
So I don't know if a single card can create more type of token...

Or you are suggesting something like
<Mycoloth adds X saproling_token1>
<if there are more than 99 saproling_token1 in play Mycoloth adds X saproling_token2>
And if the max to not crash was exactly 200 something that make the number of token can't be more than 199?
User avatar
Takhen
 
Posts: 235
Joined: 04 Feb 2013, 19:35
Has thanked: 0 time
Been thanked: 0 time

Re: Could I ask a question, please?

Postby Takhen » 02 Mar 2013, 23:06

About the unlocked I would underline that I am able to make the PROMO FOIL DECK, so if the way is the same it is strange that I find those problems...
It looks like there isn't card's in my unlocks lists (there is indeed Rancor x2 to test) and in "Deck Manage" it looks like "Unlocked cards 0/0"
User avatar
Takhen
 
Posts: 235
Joined: 04 Feb 2013, 19:35
Has thanked: 0 time
Been thanked: 0 time

Re: Could I ask a question, please?

Postby Takhen » 03 Mar 2013, 01:12

I don't know if it can make the difference, but I discovered that
ST = Standard Deck
CH = Challenge Deck
PC = Plane Deck
UT = Tutorial Deck

And I never set any choice that make my deck of any specific type (I know I don't need a PC or UT, but can't say about CH or ST)
User avatar
Takhen
 
Posts: 235
Joined: 04 Feb 2013, 19:35
Has thanked: 0 time
Been thanked: 0 time

Re: Could I ask a question, please?

Postby RiiakShiNal » 03 Mar 2013, 04:19

Takhen wrote:So you are saying that a single ability could require more functions in more LOLs and you are also saying that a single LOL could gathers more functions it it...
More I read about, more the situation becames hard :lol:
That's right, many complex abilities use multiple functions from multiple LOL files.

A single LOL file can contain functions for many abilities and may require other LOL files simply to work at all.

Takhen wrote:My need is to save the card because I need more those than the WADs of other modders
Add to this a little bit of perfectionism in reording :lol:
You can fairly easily get rid of decks by deleting (or changing the extensions of) the appropriate deck xml files from the WADs. That way you could still use their cards without having their decks. With my mod you even have the option of only putting in the decks you want (or none if you don't want them), but you will still be able to access all the cards from my mod as long as you have my core wad (Data_DLC_8192.wad) as all the decks are in separate wads (Deck_Eyes_of_Shadow.wad, Deck_Teeth_of_the_Predator.wad, etc...).

Takhen wrote:I think it is important, as I wrote also in another post a little ago because when I need to “frankenstain” a new card, more is my “XMLs collection” and more are the possibilities I find a card with the more similar ability I can find
And I would like also that I could make my card work without all decks, because I can need cards from decks I don't like and it is useless to take always all decks
Again, if you are using functions from other modders then you would need to either make your mod depend on their mods, copy the LOLs from their mods, or you would need to learn some programming so you can figure out how to "inline" all the functions you need.

Takhen wrote:But you are right, to keep near every XML its LOL/LOLs could be a great effort
And if I take a folder with only all XMLs, another with only LOLs and use a scheme that says to me (and all that want when and if I will have :) ) “you need to use this LOL if you are using a card with reach or haste”, “you need to use this other LOL if you are using a card with rebhound...” ecc?
It seems to be faster than the previuos method and clear too
LOLs I think can't be so numerous to make difficult as numerous are indeed the XMLs, and this make possible to simply upgrade the LOLs in a little time without touch the XMLs folder
What do you think about? :)
You are welcome to make the effort, but I'm not going to help with that because trying to tie certain LOLs to certain cards just seems like an exercise in futility. Most of the major modders have their own functions for certain common tasks. So the functions that an ability uses (and thus which LOL files it depends on) will vary depending on which modder coded that card's ability.

Your new method might take less effort than your previous method, but you would still need to analyze each and every card and LOL file to figure out what depends on what. So the amount of work is still tremendous.

Takhen wrote:I tried also without expansion and mods

Something that now I know and before I missed is that the number in the APPID_LINKING can be different from the UID promo and unlock in the deck's files

However also before to know, I remember a test
There was a Data_Core, maybe the basical but not sure
that was progressive, with no 97330:
Code: Select all
[Basical_Deck]
15
97388
97389
So I added
Code: Select all
[Basical_Deck]
15
97388
97389

[My_Deck]
9999001
97390
97391
I know that the different numbers after the IP deck are not important, as we said before, but thinking that it was I made the same in the deck's file:
Code: Select all
<UNLOCKS uid="97390" deck_uid="9999001" content_pack="1" game_mode="2">
Code: Select all
<UNLOCKS uid="97391" deck_uid="9999001" content_pack="1" game_mode="0">
or
Code: Select all
<UNLOCKS uid="97391" deck_uid="9999001" content_pack="1" game_mode="2">
Code: Select all
<UNLOCKS uid="97390" deck_uid="9999001" content_pack="1" game_mode="0">
I don't remember which of those two combinations
However, according to you, the important is that the two UID in the two deck's files are different
So, also without knowing why, I also did that you said, and it doesn't work too...
So what is the difference between my 97390 and 97391 and your 9999101 and 9999201? Maybe all the UID must have the same number of digits or something?
The UIDs for the unlock XMLs are in NO WAY RELATED to the AppIds in the APPID_LINKING.TXT file. The UIDs must be unique, other than that nothing cares what they are.

The numbers in the APPID_LINKING.TXT file after the Deck UID are AppIds not UIDs. An AppId is a number assigned by Steam for different products, once you have purchased a product on Steam that AppId is associated with your account. Since we have no control over Steam if we want an AppId that will unlock cards for people using the Steam version we need to use an AppId that they will have (97330 which is the AppId for Duels of the Planeswalkers 2013). Skidrow does not support AppIds so for the Skidrow version we need to use an AppId of 0. Theta does support AppIds (including custom AppIds), but by default says everyone has 97330 (so if you use 97330 cards will be unlocked automatically) for custom AppIds you can use any other number then when in the Deck Manager if you click "Unlock Full Deck" or "Premium Foil Deck" Theta will save the appropriate AppId out to the player's "swarm" which will be loaded and used the next time the player loads the game.

As for decks show 0 of 0 cards unlocked there are a number of reasons this can happen.
  • You are using the promo unlock method and have not yet entered the promo codes.
  • You have no promo unlocks and have 10 or fewer regular unlocks.
  • You have some promo unlocks and some regular unlocks, but combined they total 10 unlocks or less.
The way the Deck Manager is coded it takes the total number of unlocks, subtracts 10 then uses that number for saying how many cards are unlocked. The only way to get the Deck Manager to show the proper number of unlocks is to have exactly 10 promo unlocks. At that point any and all regular unlocks will be counted correctly by the Deck Manager.

Takhen wrote:You super-beat my record!!! :shock:

However the most of my token are made by Mycoloth
So I don't know if a single card can create more type of token...

Or you are suggesting something like
<Mycoloth adds X saproling_token1>
<if there are more than 99 saproling_token1 in play Mycoloth adds X saproling_token2>
And if the max to not crash was exactly 200 something that make the number of token can't be more than 199?
Ehh, there are probably people on this forum that have beat my record, so it doesn't really mean much.

Yes, a single card can create more than one type of token. It is not common, but it can happen. More often than not though you can have multiple cards in a deck with each one creating a different type of token.

You could make a conditional when creating tokens that if it wants to create a token it could count how many already exist, then create a second type if there are already 100 of the first type.

I've experienced crashes with as few as 135 tokens, so I'm not sure what the max to not crash is yet. Placing an internal limit on how many tokens can be produced in total is something I have thought about, but before it is done someone (myself or someone else) needs to figure out (and have it confirmed) what is the absolute maximum number of tokens that can be in play without leading to a crash.

Takhen wrote:About the unlocked I would underline that I am able to make the PROMO FOIL DECK, so if the way is the same it is strange that I find those problems...
It looks like there isn't card's in my unlocks lists (there is indeed Rancor x2 to test) and in "Deck Manage" it looks like "Unlocked cards 0/0"
This is related to what I said above about how the game counts the number of unlocks. The only way it will give you the correct number of regular unlocks is to have exactly 10 promo unlocks.

Takhen wrote:I don't know if it can make the difference, but I discovered that
ST = Standard Deck
CH = Challenge Deck
PC = Plane Deck
UT = Tutorial Deck

And I never set any choice that make my deck of any specific type (I know I don't need a PC or UT, but can't say about CH or ST)
That is just a naming convention and it doesn't matter. If you look at my decks (which are standard decks by the way) you'll see that I don't use that convention, I prefer to give my WADs the name of the deck so people can quickly identify which WAD relates to which Deck.
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Could I ask a question, please?

Postby Takhen » 03 Mar 2013, 15:09

RiiakShiNal wrote:That's right, many complex abilities use multiple functions from multiple LOL files.

A single LOL file can contain functions for many abilities and may require other LOL files simply to work at all.
RiiakShiNal wrote:You can fairly easily get rid of decks by deleting (or changing the extensions of) the appropriate deck xml files from the WADs. That way you could still use their cards without having their decks. With my mod you even have the option of only putting in the decks you want (or none if you don't want them), but you will still be able to access all the cards from my mod as long as you have my core wad (Data_DLC_8192.wad) as all the decks are in separate wads (Deck_Eyes_of_Shadow.wad, Deck_Teeth_of_the_Predator.wad, etc...).
RiiakShiNal wrote:Again, if you are using functions from other modders then you would need to either make your mod depend on their mods, copy the LOLs from their mods, or you would need to learn some programming so you can figure out how to "inline" all the functions you need.
RiiakShiNal wrote:You are welcome to make the effort, but I'm not going to help with that because trying to tie certain LOLs to certain cards just seems like an exercise in futility. Most of the major modders have their own functions for certain common tasks. So the functions that an ability uses (and thus which LOL files it depends on) will vary depending on which modder coded that card's ability.

Your new method might take less effort than your previous method, but you would still need to analyze each and every card and LOL file to figure out what depends on what. So the amount of work is still tremendous.
Maybe you are talking about to take only the “Core” (or however the core files of each modder) and it could be a better idea if these are separated from decks
Or if there are not ever separated, maybe it is possible to create a single updatable core that contains all LOLs, BADGES, etc (if it don't take a lot of ROM space there is no problem) so that only for the deck there is the choice of to add or not but each XML or WAD will automatically works

Is this your idea? If I understand right it could be better than mine and equally ordered :D :D :D

RiiakShiNal wrote:The UIDs for the unlock XMLs are in NO WAY RELATED to the AppIds in the APPID_LINKING.TXT file. The UIDs must be unique, other than that nothing cares what they are.

The numbers in the APPID_LINKING.TXT file after the Deck UID are AppIds not UIDs. An AppId is a number assigned by Steam for different products, once you have purchased a product on Steam that AppId is associated with your account. Since we have no control over Steam if we want an AppId that will unlock cards for people using the Steam version we need to use an AppId that they will have (97330 which is the AppId for Duels of the Planeswalkers 2013). Skidrow does not support AppIds so for the Skidrow version we need to use an AppId of 0. Theta does support AppIds (including custom AppIds), but by default says everyone has 97330 (so if you use 97330 cards will be unlocked automatically) for custom AppIds you can use any other number then when in the Deck Manager if you click "Unlock Full Deck" or "Premium Foil Deck" Theta will save the appropriate AppId out to the player's "swarm" which will be loaded and used the next time the player loads the game.

As for decks show 0 of 0 cards unlocked there are a number of reasons this can happen.
  • You are using the promo unlock method and have not yet entered the promo codes.
  • You have no promo unlocks and have 10 or fewer regular unlocks.
  • You have some promo unlocks and some regular unlocks, but combined they total 10 unlocks or less.
The way the Deck Manager is coded it takes the total number of unlocks, subtracts 10 then uses that number for saying how many cards are unlocked. The only way to get the Deck Manager to show the proper number of unlocks is to have exactly 10 promo unlocks. At that point any and all regular unlocks will be counted correctly by the Deck Manager.
RiiakShiNal wrote:This is related to what I said above about how the game counts the number of unlocks. The only way it will give you the correct number of regular unlocks is to have exactly 10 promo unlocks.
You are right: I have also Promo Unlock cards withouth the 10 codes that unlocks the 10 official cards from 30/40 to 40/40
I didn't only because I was thinking to my mods and I didn't need those extra cards
Now I was trying to insert those codes and the game crashed...
So I unistalled all the game and I installed to try: same result, when I confirm the first code it crashes

This is strange because now the game is clean, with no mods, and when I tried those 10 codes some time ago they worked...

RiiakShiNal wrote:Ehh, there are probably people on this forum that have beat my record, so it doesn't really mean much.

Yes, a single card can create more than one type of token. It is not common, but it can happen. More often than not though you can have multiple cards in a deck with each one creating a different type of token.

You could make a conditional when creating tokens that if it wants to create a token it could count how many already exist, then create a second type if there are already 100 of the first type.

I've experienced crashes with as few as 135 tokens, so I'm not sure what the max to not crash is yet. Placing an internal limit on how many tokens can be produced in total is something I have thought about, but before it is done someone (myself or someone else) needs to figure out (and have it confirmed) what is the absolute maximum number of tokens that can be in play without leading to a crash.
Maybe to provide which cards will reach the 100th token would be hard
Also a card that adds a single token could go beyond the 100 with particular condition (Parallel Lives + 99Tokhen already in play)
And however would be an effort to modify in this way all the cards that makes tokens

So I thought that “we” (I would do gladly but it is a little out of my skills :lol:) could modify instread the same token with a string of code like <If a player need to add some other of this token but the game reach the 100th, add instread the Xtype_Token_2>: the same idea from before but from the token itself and not from the card
Could be useful my suggest? :)

Obviusly it could be useful between a difference of 100-200, but no so much if the difference is 100-135...

RiiakShiNal wrote:That is just a naming convention and it doesn't matter. If you look at my decks (which are standard decks by the way) you'll see that I don't use that convention, I prefer to give my WADs the name of the deck so people can quickly identify which WAD relates to which Deck.
Takhen wrote:Add to this a little bit of perfectionism in reording :lol:
I loved your choice :)
User avatar
Takhen
 
Posts: 235
Joined: 04 Feb 2013, 19:35
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Magic: The Gathering - Duels of the Planeswalkers

Who is online

Users browsing this forum: No registered users and 32 guests


Who is online

In total there are 32 users online :: 0 registered, 0 hidden and 32 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 32 guests

Login Form