It is currently 02 Aug 2025, 17:32
   
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 » 10 Feb 2013, 00:11

Yes, I did, but how to do to use crop with colorless cards?
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 » 10 Feb 2013, 00:17

You can't. DotP2012 allowed us to choose the frame, while DotP2013 decides automatically according to the mana cost. Actually, you can give other colors to the card with the <COLOUR value="..."> block, but the colorless non-land non-artifact frame is only one, and it's transparent like the Eldrazi cards.
< 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: 722 times

Re: Could I ask a question, please?

Postby Takhen » 10 Feb 2013, 00:21

Eldrazi not? Strange: there are somewhere in my decks (I don't know if they are ufficial or not, but contains Eldrazi!)
There are no way? Neither with a .full or else?

Otherwise the important is how to do artifact and lands
I can remove Eldrazi from my dreams, but I love artifacts!
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 » 10 Feb 2013, 00:29

I can't understand the problem. You can make Eldrazi cards: the only available colorless non-land non-artifact frame is exactly the Eldrazi frame.
The limitation on the frames gets in our way only when making nonbasic lands that produce colored mana (for example you can't make Oboro, Palace in the Clouds with a blue land frame, unless you make the land really blue but then it would be wrong because the land itself is colorless).
< 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: 722 times

Re: Could I ask a question, please?

Postby Takhen » 10 Feb 2013, 00:34

Oh, good!
but if not by the mana cost, how to use the Land or Artifact frame?
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 » 10 Feb 2013, 00:41

When one of the types on the card is land or artifact, the frame is chosen automatically according to that information, too. In short, you'll almost never have to worry about the frame.
< 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: 722 times

Re: Could I ask a question, please?

Postby Takhen » 10 Feb 2013, 00:46

HOW MANY THINKS TOO KNOW! It seems I am walking on an hard way!

Thanks, now I "should" (I hope it is) to know enough for simple Creatures

Before my next doubts I have to study a little bit of codes' tutorial you gave me :)

But I will early return! :twisted: :lol:
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 » 11 Feb 2013, 00:51

Code: Select all
Well this is something that can't be teached in a tutorial: Lua is a programming language so you should at least have some basic programming knowledge. In the Documentation section you can find 2 topics for this: DotP2013 LOL files decoded and Info from DotP 2013 executable, but those just list the available constants and functions provided by the game, without telling you how to use them. If you want to understand how to use them, you have to look at the existing cards and see how the various abilities are "translated" into code.
Today I was reading your links
But I saw they are lists of piece of codes
I can't understand how to use those pieces: about the HELP TEXT line, you said that Flying has a number, Haste has a number...
So I found at the bottom of a list of those the "BADGE" number of each ability, and now I know that I have to "complete HELP TEXT with a BADGE number" related with the ability I need.
Perhaps how to use all those lists of pieces of codes? I can read titles up on those lists, but the can't answer me (EFFECTS: but every abilities have an effect; LOL: What's?)
I could understand with logic something like "DestroyWithoutRegenerate()" that is what has to happen to the target
Because I can translate

But something like these:
Code: Select all
SetSFXTargetCard
Code: Select all
Bool_Get
I can't translate them as I did with DestroyWithoutRegenerate to understand their uses

So ho I can know the greatest part of those lists of parts of code or how to combine them?
Watching other cards I think I need some rules about how to join and to know the uses of those codes that can't be understood simply reading them
Because opening that lists I don't know from where I should start, and opening a running card I don't know If changes I do can destroy the code's grammar...

Using Dragonlair Spider I simply changed tokens from 1 to 10, but when I have to manipulate the code's grammar I can't find a Start Point
That if I start from a complete card, that if I start from the lists of pieces of code...

How to do/try/learn?
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 » 11 Feb 2013, 09:56

Takhen wrote:EFFECTS: but every abilities have an effect; LOL: What's?
The names of those lists have been kept from DotP2010 where a lot more effects were "prototyped" (= instead of repeating the whole code for an effect in each card, they used a function to make it short), so don't mind the filenames. *.LOL is the extension for Lua files. As far as I know, *.LUA is for unencrypted files, and *.LOL for encrypted files, but I use *.LOL for my functions as well because I don't know if *.LUA files would be ignored.

Takhen wrote:I could understand with logic something like "DestroyWithoutRegenerate()" that is what has to happen to the target
Because I can translate

But something like these:
Code: Select all
SetSFXTargetCard
Code: Select all
Bool_Get
I can't translate them as I did with DestroyWithoutRegenerate to understand their uses
SetSFXTargetCard isn't used in any official card so I don't know how to use it. Judging from the name, it seems that it can select the target for the card animation (which is the card target by default). I tried that function once, but I haven't been able to guess the parameters.
Bool_Get is quite self-explanatory if you know a bit of programming: boolean is the data type that can be set to true or false (1 or 0). Registers used by the game can store multiple data types, and you must know what you stored, so if you stored a boolean with Bool_Set, you'll retrieve it with Bool_Get.

Takhen wrote:So ho I can know the greatest part of those lists of parts of code or how to combine them?
Watching other cards I think I need some rules about how to join and to know the uses of those codes that can't be understood simply reading them
I understood how to code cards just by looking at existing cards and starting from easy pieces of code. The first deck I made for DotP2012 was a Slivers deck: that was easy because Slivers all have just a static ability that is granted to all Slivers in play. The fact is that I have a very good base knowledge about programming (I'm studying IT engineering and I always enjoyed programming) so it was easy for me to approach a programming language even if I had never seen Lua before. I have no idea about how hard it could be for someone who never programmed before.
< 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: 722 times

Re: Could I ask a question, please?

Postby RiiakShiNal » 11 Feb 2013, 14:41

thefiremind wrote:The names of those lists have been kept from DotP2010 where a lot more effects were "prototyped" (= instead of repeating the whole code for an effect in each card, they used a function to make it short), so don't mind the filenames. *.LOL is the extension for Lua files. As far as I know, *.LUA is for unencrypted files, and *.LOL for encrypted files, but I use *.LOL for my functions as well because I don't know if *.LUA files would be ignored.
*.LOL is actually for "compiled" LUA files, but we have to use *.LOL for "uncompiled" files as well since the game does indeed ignore *.LUA. I tried to make my function files *.LUA initially as that was what I did for DotP 2010, but the game ignored them until I changed them to *.LOL.

thefiremind wrote:SetSFXTargetCard isn't used in any official card so I don't know how to use it. Judging from the name, it seems that it can select the target for the card animation (which is the card target by default). I tried that function once, but I haven't been able to guess the parameters.
SetSFXTargetCard was used in DotP 2010 to set which target to do a particular effect on as some of the spell effects had to be told which target, the effects in DotP 2013 seem to be coded better so it's not really necessary, but if you really wanted to use it I would imagine the parameters are the same as they were in DotP 2010.

Code: Select all
Object():SetSFXTargetCard( <Card Object to Target> )
thefiremind wrote:I understood how to code cards just by looking at existing cards and starting from easy pieces of code. The first deck I made for DotP2012 was a Slivers deck: that was easy because Slivers all have just a static ability that is granted to all Slivers in play. The fact is that I have a very good base knowledge about programming (I'm studying IT engineering and I always enjoyed programming) so it was easy for me to approach a programming language even if I had never seen Lua before. I have no idea about how hard it could be for someone who never programmed before.
I also have an extensive background in programming, but I've also had to try to teach people how to program before so I do have some idea how difficult it is for someone who does not understand programming.

Programming requires a certain mindset, while it is true that virtually anyone can learn to program, if a person does not have the necessary mindset and is unable to switch to that mindset then most concepts will be lost on the person and they will only be able to do very simple programming at most. Programmers tend to break tasks down into simple logical steps so that computers can understand those steps. Most people though don't really know or understand how to break some tasks into steps which prevents them from becoming good programmers, but those same people usually excel in other areas. For example my father can't do anything but very simple programs (he even has issues writing relatively simple batch files), but he is exceptionally good at electronic CAD layout and design.

For DotP cards, most people should be able to grasp enough to be able to make simple cards, but for the complex cards it will likely always be up to those who can visualize and break down the abilities into steps that we can actually code. I'm not saying that only programmers will be able to handle the more complex cards, but it will likely always be the realm of those with the certain mindset required.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Could I ask a question, please?

Postby Takhen » 11 Feb 2013, 15:18

thefiremind wrote:The names of those lists have been kept from DotP2010 where a lot more effects were "prototyped" (= instead of repeating the whole code for an effect in each card, they used a function to make it short), so don't mind the filenames. *.LOL is the extension for Lua files. As far as I know, *.LUA is for unencrypted files, and *.LOL for encrypted files, but I use *.LOL for my functions as well because I don't know if *.LUA files would be ignored.
I don't understand: XML=Card, TDX=Image, WAD=Deck; XMLs+TDXs=WAD complete and running deck
So from where are coming from those *.LOL and *.LUA files?

thefiremind wrote:SetSFXTargetCard isn't used in any official card so I don't know how to use it. Judging from the name, it seems that it can select the target for the card animation (which is the card target by default). I tried that function once, but I haven't been able to guess the parameters.
Bool_Get is quite self-explanatory if you know a bit of programming: boolean is the data type that can be set to true or false (1 or 0). Registers used by the game can store multiple data types, and you must know what you stored, so if you stored a boolean with Bool_Set, you'll retrieve it with Bool_Get.
Mines were examples
I have no programming knowledge, so when I read "Bool_Get" or more and more and more others, I can't know how to use

There isn't a list/tutorial in order that "Those are codes for Instant: ... " "Those others are codes about tokens: ... "

I know I have to look at a similar card, but only if it is present
And for particular cards, as Mycoloth, I could find a similar as "Devour", or "Take a token" or "Add counters +1/+1"

But it is more different from "Tokens = 2*(+1/+1 counters)"
You surely can do it, but this is another example; That I'm trying to say is that maybe it could be less difficult with a tutorial for not programming users: we don't have to understand why a piece of code goes here, we have only to know what pieces to use in which situation and ho to join those

Take static abilities:
Code: Select all
Object():GetCurrentCharacteristics():Characteristic_Set( CHARACTERISTIC_FIRST_STRIKE, 1 )
I HAVE NO IDEA, what is this, why those "()", why "1"
But I know where I have to past this line, so I am now able to take first strike to a card.
If in this same way, If there was a "pieces of code TITLE for noobs" I could know which piece of code means "Token", which means "their number must be the same of[...]" and which means "+1/+1 counters" and how to combine those without I must to understand why.
I could do a Mycoloth or others with no great problems in this way
But like now, I see only those loooooooooooooooong lists of pieces of code
Someone I could translate with logic and the most part I can't

This answers also to this
[quote=]I have no idea about how hard it could be for someone who never programmed before.[/quote]
If I might to know how to create by myself the codes, it would be very difficult, but If I have only to know what copy and where paste, like a good monkey trained, I should be able to do :lol:

Am I able to explain what I would say? :)
It is the same way I can write a little bit of english knowing only where I have to past "But, Which, If", HAHAHAHAHAHAHAHAHA
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 » 11 Feb 2013, 15:23

For DotP cards, most people should be able to grasp enough to be able to make simple cards, but for the complex cards it will likely always be up to those who can visualize and break down the abilities into steps that we can actually code. I'm not saying that only programmers will be able to handle the more complex cards, but it will likely always be the realm of those with the certain mindset required.
Yes, as I wrote in my previous answer: steps and a little knowledge "just enough" to know what copy, where paste, with no errors
Luckly I haven't to create codes by my self, there are lists
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 » 11 Feb 2013, 16:18

Takhen wrote:I don't understand: XML=Card, TDX=Image, WAD=Deck; XMLs+TDXs=WAD complete and running deck
So from where are coming from those *.LOL and *.LUA files?
How can I explain function prototyping to someone who never programmed? Let's see... when I explained what I mean with "mod", I wrote it once, now you know what I mean with "mod" and I just have to write "mod" to you without explaining the meaning everytime. That's what you do with *.LOL files: you write long functions into them, give each function a name, then in the cards you call the function by its name instead of repeating the long pieces of code. Another thing you can do in *.LOL files is to declare constants that have names you can understand. For example: you are more likely to remember CHARACTERISTIC_FIRST_STRIKE rather than the value it represents, because then you would need to remember all the values for all the characteristics. I know that this purpose is defeated by the need of knowing the values for the HELP blocks, but DotP developers often did unreasonable things. :lol:

Takhen wrote:There isn't a list/tutorial in order that "Those are codes for Instant: ... " "Those others are codes about tokens: ... "

I know I have to look at a similar card, but only if it is present
And for particular cards, as Mycoloth, I could find a similar as "Devour", or "Take a token" or "Add counters +1/+1"

But it is more different from "Tokens = 2*(+1/+1 counters)"
You surely can do it, but this is another example; That I'm trying to say is that maybe it could be less difficult with a tutorial for not programming users: we don't have to understand why a piece of code goes here, we have only to know what pieces to use in which situation and ho to join those
The existing cards already tell you how to do the basic things: if you ask me how to produce a token, I search for a fitting example on the existing cards and tell you to look at that. Then maybe you could pick 2 cards that create tokens but with some differences, compare the card abilities and compare how they are coded, and the differences between the abilities should be all reflected onto the differences between the ways they have been coded.
Asking to write a tutorial that explains how to make every possible ability in DotP would be the same as asking someone else to code all existing cards in Magic... but then I think it would be better to just request the cards you can't code by yourself.
One thing is sure: I won't be the one who writes such a tutorial. I'm no teacher and I absolutely lack the patience needed to teach something with absolutely no base knowledge to start from. (Teachers also get paid for their time, which is a good help for patience. :lol: :lol: :lol:)

Takhen wrote:If I might to know how to create by myself the codes, it would be very difficult, but If I have only to know what copy and where paste, like a good monkey trained, I should be able to do :lol:
There's nothing to teach about copying and pasting: you have lots of cards already coded, take them and start to "fuse" their code into other cards. Obviously the amount of cards that you can code with blind copying and pasting is limited, but in order to jump to the next step (modifying existing code), either you have a bit of programming knowledge, or you learn that bit of programming knowledge you need. I don't think there are other solutions: some things need prerequisites to be understood.
< 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: 722 times

Re: Could I ask a question, please?

Postby RiiakShiNal » 11 Feb 2013, 16:34

Takhen wrote:I don't understand: XML=Card, TDX=Image, WAD=Deck; XMLs+TDXs=WAD complete and running deck
So from where are coming from those *.LOL and *.LUA files?
XML is a file type not specifically a card. XML files are used for Cards, Decks, AI Personalities, Permanent Text, Campaigns, Layout, etc.... TDX is a specific format for DotP images (much like PNG, JPG, and GIF are different formats of images). WAD is like an archive of many files (sort of like a ZIP, RAR, or 7Z file) which if it has the correct structure may contain one or more decks, cards, images, etc.... LOL (and LUA which DotP 2013 ignores) are simply text files that contain programming code for various functions and/or classes to use to make coding of cards (and the game interface) easier. We use LOL files to make our custom functions available to many cards and for other modders to use when making their cards. Typically the functions included in LOL files do not need to be copied and can simply be used from other cards without problems.

Takhen wrote:Mines were examples
I have no programming knowledge, so when I read "Bool_Get" or more and more and more others, I can't know how to use

There isn't a list/tutorial in order that "Those are codes for Instant: ... " "Those others are codes about tokens: ... "
No, there is no such list because many functions are used for all types of cards when and where they are needed. Making such a list would be virtually impossible.

Takhen wrote:I know I have to look at a similar card, but only if it is present
And for particular cards, as Mycoloth, I could find a similar as "Devour", or "Take a token" or "Add counters +1/+1"

But it is more different from "Tokens = 2*(+1/+1 counters)"
You surely can do it, but this is another example; That I'm trying to say is that maybe it could be less difficult with a tutorial for not programming users: we don't have to understand why a piece of code goes here, we have only to know what pieces to use in which situation and ho to join those
That's just it each piece of code will vary depending on what card is being made as to where it goes and how it is used. If it were simple to say this piece of code is always used like this because of this reason then we could make a program that could build any card without needing people to understand programming.

Takhen wrote:Take static abilities:
Code: Select all
Object():GetCurrentCharacteristics():Characteristic_Set( CHARACTERISTIC_FIRST_STRIKE, 1 )
I HAVE NO IDEA, what is this, why those "()", why "1"
But I know where I have to past this line, so I am now able to take first strike to a card.
If in this same way, If there was a "pieces of code TITLE for noobs" I could know which piece of code means "Token", which means "their number must be the same of[...]" and which means "+1/+1 counters" and how to combine those without I must to understand why.
I could do a Mycoloth or others with no great problems in this way
But like now, I see only those loooooooooooooooong lists of pieces of code
Someone I could translate with logic and the most part I can't
The parenthesis enclose parameters passed into a function. "Object" is a function that returns the card instance on which it is used and takes no parameters hence you have the empty parenthesis "()". "GetCurrentCharacteristics" is a function that relies on an object instance hence the colon (":") preceding the function and takes no parameters so again empty parenthesis "()". GetCurrentCharacteristics returns a characteristics instance for the object it is used on (either Card or Player) "Characteristic_Set" is a function that relies on a characteristics instance again why it has the preceding colon (":"), but it takes 2 parameters in this case both are integers (numbers). The first parameter is to say which ability flag to change in this case CHARACTERISTIC_FIRST_STRIKE (which is the number 3) and the second parameter determines what value to assign to that flag (for Characteristic_Set the valid assignable values are 0 [unset] and 1 [set]) in this case we are assigning 1 (which sets the flag) and both parameters are enclosed in a set of parenthesis.

There are no set rules which state any particular piece of code means "Token" or "Number must equal" though +1/+1 counters we do know is this (gives us the object for +1/+1 counters):
Code: Select all
MTG():PlusOnePlusOneCounters()
However to GET the number of +1/+1 counters on the card it is (though we would still need to store that number somewhere):
Code: Select all
Object():CountCounters( MTG():PlusOnePlusOneCounters() )
So to get and store the number of counters on the card we would need:
Code: Select all
local nNumCounters = Object():CountCounters( MTG():PlusOnePlusOneCounters() )
Where "local" defines a place for us to put the number (or object if necessary) and "nNumCounters" is a name I made up for the place that "local" creates so I can access that place later.

Takhen wrote:If I might to know how to create by myself the codes, it would be very difficult, but If I have only to know what copy and where paste, like a good monkey trained, I should be able to do :lol:
That's the problem if a trained monkey could do it then we could write a program to do it and eliminate the monkey entirely, but we can't because it requires human knowledge and thought that a trained monkey is incapable of. People have taught monkeys to talk, but they have also been able to make computers talk, we can't make computers write complex cards for us and we also can't teach monkeys to make complex cards for us. If you look at the very simple cards though (usually those that just have some basic static abilities) we have already written programs that can fully generate those cards (without the need for the trained monkey) because those have certain rules that can be easily determined. There are a few Card Generators on this forum, but they only work for the simple cards because complex cards still require someone with the knowledge to break it down. Though on the upside simple cards also work well for getting people into coding cards because they can be explained as to why this piece of code was used.

With your example of Mycoloth the "Devour 2" ability could be coded automatically by a program, but the second ability requires that someone read, understand and break the ability into parts. For example "At the beginning of your upkeep" would tell someone they are going to need to make a TRIGGERED_ABILITY with a TRIGGER block keying off of BEGINNING_OF_STEP with STEP_UPKEEP, TriggeredForMe() (the object's controller), though part of this can be simplified by using the MyUpkeep() function from EXTRACTINFO.LOL. Creating a token is really creating another card and a 1/1 Green Saproling happens to be TOKEN_SAPROLING_1_1_277461 (which can be found in DATA_CORE\DATA_ALL_PLATFORMS\CARDS\TOKEN_SAPROLING_1_1_277461.XML) and because we need to create more than one card and put it into play we would likely use the function PutTokensIntoPlay() from EFFECTS.LOL with the parameters: "TOKEN_SAPROLING_1_1_277461", nNumCounters

Though all of that required a human to read and interpret the text on the card. English and any other human language is imprecise and requires interpretation to understand what it means which is why computers have issues trying to understand what people mean. Think about it like asking a question to a search engine, rather than give you exactly what you want it has to do some guessing and can even give you things you would never have expected given the question you asked, but if you ask a human the same question you are much more likely to get a response that actually means something in relation to what you asked.

Unfortunately, teaching someone to program is well beyond the scope of what we can reasonably hope to accomplish in any forum thread. Functions, Classes, Objects (and instances), and Parameters are all very basic programming concepts that are used all the time with coding cards.
RiiakShiNal
Programmer
 
Posts: 2188
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Could I ask a question, please?

Postby Takhen » 12 Feb 2013, 20:47

RiiakShiNal wrote:XML is a file type not specifically a card. XML files are used for Cards, Decks, AI Personalities, Permanent Text, Campaigns, Layout, etc.... TDX is a specific format for DotP images (much like PNG, JPG, and GIF are different formats of images). WAD is like an archive of many files (sort of like a ZIP, RAR, or 7Z file) which if it has the correct structure may contain one or more decks, cards, images, etc.... LOL (and LUA which DotP 2013 ignores) are simply text files that contain programming code for various functions and/or classes to use to make coding of cards (and the game interface) easier. We use LOL files to make our custom functions available to many cards and for other modders to use when making their cards. Typically the functions included in LOL files do not need to be copied and can simply be used from other cards without problems.
So, if I understand, LOL (LUA in DOTP 2012) is the language I use in the XML files

RiiakShiNal wrote:No, there is no such list because many functions are used for all types of cards when and where they are needed. Making such a list would be virtually impossible.
About this I link you this:
viewtopic.php?f=65&t=7337
In this topic there is a list called "EFFECTS", so I know I have to use that to have an effect (If I want to draw, or discard, or regenerate), or also a list called "FILTERS" so I know I have to use that if I need "that player discard a card FROM HIS DECK", "destroy a creature AN OPPONENT CONTROL"

But about lists called "MISC" or "EXTRACTINFO" I can't imagine their usage, so when I search in that list that I need, I don't know neither what I am reading
If Extract info was something like "those pieces of code say to the game -use this card as an instant- -use this card as a enchantment-", so I will read the list knowing a little more I have to find in that

In third type of list, I read "COSTANTS" and I see a lot of number I know the game will read as it was an ability, a zone or other, but I don't know where to use
Now look at this:
Code: Select all
HELP title="MORE_INFO_BADGE_TITLE_3" body="MORE_INFO_BADGE_BODY_3" zone="ZONE_ANY" />
This is the line that say to the game "give information about Deaththouch", right?

If it was like
Code: Select all
HELP title="MORE_INFO_BADGE_TITLE_*inserthereBADGENUMBERfromCONSTANTlist*" body="MORE_INFO_BADGE_BODY_3" zone="ZONE_ANY" />
It will be easy to understand a part of the "CONSTANT" list

Conversely, if I start from the list to understand how to use the constant, it is hard

RiiakShiNal wrote:The parenthesis enclose parameters passed into a function. "Object" is a function that returns the card instance on which it is used and takes no parameters hence you have the empty parenthesis "()". "GetCurrentCharacteristics" is a function that relies on an object instance hence the colon (":") preceding the function and takes no parameters so again empty parenthesis "()". GetCurrentCharacteristics returns a characteristics instance for the object it is used on (either Card or Player) "Characteristic_Set" is a function that relies on a characteristics instance again why it has the preceding colon (":"), but it takes 2 parameters in this case both are integers (numbers). The first parameter is to say which ability flag to change in this case CHARACTERISTIC_FIRST_STRIKE (which is the number 3) and the second parameter determines what value to assign to that flag (for Characteristic_Set the valid assignable values are 0 [unset] and 1 [set]) in this case we are assigning 1 (which sets the flag) and both parameters are enclosed in a set of parenthesis.

There are no set rules which state any particular piece of code means "Token" or "Number must equal" though +1/+1 counters we do know is this (gives us the object for +1/+1 counters):
CODE: SELECT ALL
MTG():PlusOnePlusOneCounters()

However to GET the number of +1/+1 counters on the card it is (though we would still need to store that number somewhere):
CODE: SELECT ALL
Object():CountCounters( MTG():PlusOnePlusOneCounters() )

So to get and store the number of counters on the card we would need:
CODE: SELECT ALL
local nNumCounters = Object():CountCounters( MTG():PlusOnePlusOneCounters() )

Where "local" defines a place for us to put the number (or object if necessary) and "nNumCounters" is a name I made up for the place that "local" creates so I can access that place later.
This is good, knowing the use of "()" or "object", I could more simply understand why those parentesis are sometimes empty or full
So I am now able to translate
Code: Select all
Object():GetCurrentCharacteristics():Characteristic_Set( CHARACTERISTIC_FIRST_STRIKE, 1 )
In
Code: Select all
On this card: Active the next characteristic: Characteristic from a set of them (The specifc characteristic is "First Strike", Active that -where "Active" is the numer one after the comma- )
Knowing a little more of rules than before, this line looks like it was more clear

So I can speculate that
Code: Select all
local nNumCounters = Object():CountCounters( MTG():PlusOnePlusOneCounters() )
means
Code: Select all
Remember the number of counters -to use in the effect of token- = On this card: Add Counters: Type of counters is +1/+1
And now we should say when those must be added, something like (invented, obviusly, otherwise if I was able to do to real I would just done it!)
Code: Select all
When Object goes in PLAY ZONE
Send from the zone PLAY ZONE to GRAVEYARD ZONE
Number: Any number
Filter: Creature
________Filter: You control

local nNumCounters = Object():CountCounters( MTG():PlusOnePlusOneCounters() )

Where local nNumCounters = number Creature moved from PLAY ZONE to GRAVEYARD in this way

In UNKEEP_STEP
Effect: add to PLAY ZONE under your control
Number: 2*nNumCounters
EffectObject: 1/1 token, see ID "blablabla" which links this token with a pre-existent one in the game's database
Now, that I wrote, is obviusly not a code, but this is more or less what the game want to know from my card
I don't need to know what I have to say in the card, but I have to know how to do this

A great hand would be to know how to link the pieces of code: "()" ":" "~nil"
And those are not a lot
Then I need to chose the correct code

If I see this:
Code: Select all
CountCardsInYourGraveyardOfType = function(l_5_0)
  Object():GetFilter():Clear()
  Object():GetFilter():SetZone(ZONE_GRAVEYARD)
  Object():GetFilter():AddSubType(l_5_0)
  Object():GetFilter():SetPlayer(Object():GetPlayer())
  Object():GetFilter():NotTargetted()
  return Object():GetFilter():Count()
I can image that this count the number of card in the graveyard of a tipe
So there is a zone's filter that say "only in the graveyard", then the type of the card, that is "1, 5, 0"
Looking here
Code: Select all
CARD_TYPE_ARTIFACT = 0
CARD_TYPE_CREATURE = 1
CARD_TYPE_ENCHANTMENT = 2
CARD_TYPE_INSTANT = 3
CARD_TYPE_LAND = 4
CARD_TYPE_PLANESWALKER = 5
CARD_TYPE_SORCERY = 6
CARD_TYPE_TRIBAL = 7
CARD_TYPE_SCHEME = 8
CARD_TYPE_PLANE = 9
CARD_TYPE_PHENOMENON = 10
I think in the example the type of card to filter in the graveyard is a Planeswalker, or a Creature, or an Artifact

This is only a counter (not return in play or remove, or other), I would use this if I have to make a card like "this creature has power like the number of creatures in your (not targeted) graveyard"

This MUST be wrong, but it let me suppose something on experiment

But when I see so many numbers and less words like here:
Code: Select all
AtLeastOneTargetFromDefinition = function(l_1_0)
  local l_1_1 = Object():LoadTargetDefinition(l_1_0)
  local l_1_2, l_1_3 = l_1_1:CountStopAt, l_1_1
  local l_1_4 = 1
  return l_1_2(l_1_3, l_1_4)
end
How I could suppose if I know only this is a filter for something (that is also different from the filter I used about the graveyard fact)?

So I don't say I want to learn it fast
But if in a topic like this
viewtopic.php?f=65&t=7330
it was

*Clear() => This have to be used (for examples), like opening of a filter
*SetMarkedObjectsOnly() => This filters only objects with counters on them
*SetMinEnchantmentCount(Number) => This serves when...
*SetParentPlayer => This serves when...

Otherwise those are like a shopping list with the costs but not the commodity to be bought: I know what to give, but I don't know what the game will do "in return" of these codes-prices




Of course you have every reason in the world to say that if one had the foundations of computer science would know automatically the things I say confuse me, but for people like me who does not, is not possible with a little effort and the right aid know the steps that need to be made ​​to learn?
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 5 guests

Main Menu

User Menu

Our Partners


Who is online

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

Users browsing this forum: No registered users and 5 guests

Login Form