It is currently 10 May 2025, 03:42
   
Text Size

Documentation of functions and paramteres

Moderator: CCGHQ Admins

Documentation of functions and paramteres

Postby Xana » 06 Aug 2012, 12:46

Hey

Just begun coding my own cards, and i'm making good progress through examining other cards.

But i've begun to wonder, are there anyone documenting what the different functions do, what the parameters do and so on.

for example, what does SetHint do, i think it sets what kind of hint the game gives you when using the cards, but I'm not sure. And still not sure what the different constants do.

The same with ie. auto_skip="1" and so on, are there anywhere this is documented or is it just trial and error? If there isn't anyone documenting it, perhaps we should start a wiki or something so it would be easier to look up how different functions work?
Xana
 
Posts: 13
Joined: 15 Jan 2010, 18:59
Has thanked: 2 times
Been thanked: 2 times

Re: Documentation of functions and paramteres

Postby thefiremind » 06 Aug 2012, 13:04

I started writing on the wiki (this forum has a wiki of its own) for DotP2012, but it was an enormous work and eventually lost the will to go on.
If someone offers me a hand (but with total confidence about not quitting!), I could start again for DotP2013, I just don't have time and will to make it all on my own.

Until that time, don't worry, we all learn by trial and error when we don't have any clarifying example. When you have doubts, just ask here.

SetHint gives the AI a hint about what it should choose as target: HINT_NEUTRAL would mean "anything you like", HINT_ENEMY/HINT_ALLIED would mean "preferably an opponent/allied card", HINT_ENEMY_ONLY/HINT_ALLIED_ONLY would mean "an opponent/allied card at all costs when possible". It's also used when you have the "simplified targets" option checked: it will allow you to select only the targets the follow that hint.

About auto_skip="1", it means that when you have the "automatic resolve" option checked, that ability won't wait for something in answer. You should use it in abilities that generally don't need an answer: for example, if you draw a card, the opponent almost never has a reason to answer, same if you pump a creature's power but not its toughness (you don't need more damage to kill it even if you deal damage later).
There is also forced_skip="1" that won't wait for something in answer no matter what's your choice: you usually don't need this tag, but it can be used when you code something that can't be answered to (a color choice as in Voice of All, for example).
Finally, there is internal="1" that does the same as forced_skip but doesn't even show the glow on the card, and it's used for abilities that need to be transparent to the players.
< 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: Documentation of functions and paramteres

Postby Xana » 06 Aug 2012, 17:57

Hey

Thanks for the answer :)

I guess i'll try and see if i can't do some documentation while i get more experience coding cards, and hopefully someone will find it usefull, i don't think i can guarantee that i won't get bored doing documentation, but atleast if that happens what i did get down will be out there.

This topic is a start, and what you already provided was great info :)
Xana
 
Posts: 13
Joined: 15 Jan 2010, 18:59
Has thanked: 2 times
Been thanked: 2 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 23 guests


Who is online

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

Login Form