NavBoard 1 Year Old on May 22nd!
Happy Anniversary!
|
|
|
|
| | Dont have new topic access .  | Dont have reply access |
|
iBludgeon
Registered Posts: 1
| Development Issues... (Cartovore 2.14)
NOTE: Most of this post is a long, rambling story. If you want to skip straight to my question, simply scroll to the bottom of the post. You'll probably be able to answer it without reading my tale of drudgery.
I am trying to make a card, and frankly, I'm stumped.
It's not that I don't know what I'm doing. I understand the basics of your trait system. However, what I'm trying to something fairly exotic, and Cartomancer keeps stopping me. You see, I'm trying to make a card that can digest a player card.
More specifically, I'm trying to make a card that can digest its user's player card. Why would I want a card to do such a counterproductive thing? Well, to offset its other action (it eats everything the turn it comes into play - everything besides players, that is [yes, it's OP'd. I don't care]).
I got the "eat everyone" action to work. I got the "eat your allies if your voracity is high enough" action to work. But it's been about a week, and the "eat your leader" action still refuses to cooperate.
In my first attempt, I scripted an action that would cause the card to swallow its leader if and when its strength reached a certain number (50, I think). The result? It worked fine - for about three turns. After that, the card coughed up the leader. I had set the action so that it would re-swallow the leader if she escaped, and that part worked too. Unfortunately, for a reason I never figured out, the leader took no digestion damage once she was re-swallowed.
I solved this problem ( and the problem of the card coughing up its allies after swallowing them with the "eat everyone" action) by inserting ADDTRAIT:MORSEL into the action. This worked well. My custom card no longer coughed up her allies, or her leader. Unfortunately, the leader escaped pretty dang easily on her own. This is when I discovered that the PLAYER trait gives a card a 50% chance to escape a belly every turn. Normally, that's a good thing - it keeps "Power Overwhelming" from becoming "Win the Game." In this situation, though, it was bad. I wanted the penalty for letting my custom card get too strong to be, basically, "it betrays you and eats you. You'd better hope it kills your enemy before it finishes digesting you." However, the leader routinely escaped within four turns, and once she was swallowed again she took no digestion damage. Again, I never figured out why this happened, so I decided I needed to keep the leader from escaping.
I couldn't think of any way to do that other than to make the action remove the PLAYER trait. While this was obviously not the best idea, it almost worked. Almost. Everything about the action worked fine - the leader got eaten, she couldn't escape, and she consistently took digestion damage - except for one extremely important detail. Since the leader lacked the PLAYER trait, I didn't lose when she died.
I thought I had an answer for this difficulty, too: make another action that would make me lose the game if the leader posessed the PARTIALLY DIGESTED trait. So I did. However, this action was countered every time it activated. I'm not sure why, but I think the action was unable to target a character in a belly, and it had to target the leader in order to function.
So I ask you this: is there a certain command that must be part of an action script to allow said action to target a character in a belly?
|
2-22-2009 12:07AM
|
|
Duamutef
Aspiring God of Vore
Administrator Posts: 72
|
Yes, and that may be what's screwing up your other actions as well.
Generally, if an action isn't working and you're not sure why, the first place to look should be the rules file ("CartovoreRules.gam"). It has a ton of scripts that it tacks on to cards to give them their default behaviors; in fact, the entire game is based on those scripts. None of the behavior of Cartovore cards is hard-coded; everything from attacking to digestion comes from the trait actions in the rules file. The few exceptions are all script-related (such as the NOCOUNTERS trait).
The file is largely based on "Trait Actions." These are actions that are given to any card that has the trait. Attacking, for example, is based on a STRENGTH trait action; if they have the STRENGTH trait, they are given an action that causes them to inflict damage on another character. These actions are defined in the rules file.
The file can look pretty dense if you're unfamiliar with it, but there's a few things in particular you want to look for: "CANCEL" "NOCOUNTERS" and "TARGETED," in that order, or "TRAITACTION, [TRAITNAME]" where [TRAITNAME] is the name of the trait you suspect is causing you trouble (such as PLAYER, DIGESTING, INBELLY, or whatever). For example, doing a text search for "TRAITACTION, PLAYER" will take you to the section of the file that defines all of the behaviors that are specific to player cards, including their 50% escape chance.
The others are script elements that tend to cause people trouble if they don't know about them. "CANCEL" is an action that cancels whatever action triggered it. "NOCOUNTERS" is a trait that prevents other actions from reacting; it is typically placed in an action as an effect trait rather than on a card (if it's on a card, everything the card does is immune to reactions, and this can often cause unwanted behavior). "TARGETED" is an action trigger that causes the action to go off any time a card is targeted with any action.
CANCEL will be inside action scripts; usually reactions that use the TARGETED trigger. In this case, your attempts to target the player card are being thwarted by one of the actions assigned to the INBELLY trait. Specifically, the INBELLY trait gives a card an action that cancels any other action that targets the card or comes from the card unless that action has the DIGESTACTION trait. Thus, characters can't attack someone who is in someone else's belly, nor can someone who has been swallowed continue to attack. They cannot be targeted with spells, and so forth. Actions which are meant to affect characters that have been eaten are given the DIGESTACTION trait. Actions can have traits that their host cards don't have, and that's what you would want to do in this case; to add the DIGESTACTION trait to an action, you would want to place "TRAIT:DIGESTACTION:1:" at the beginning of the action's effect. That causes the game to behave as though the acting card has the trait in question, but only as pertaining to that action.
If you look around, you'll notice all of the scripts that inflict digestion damage and so forth all have either the DIGESTACTION trait or the NOCOUNTERS trait (usually the former).
Most of the answers to your problems lie in the rules file. I think the reason the player card isn't taking digestion damage is that there are additional traits that keep track of who is digesting who so the game doesn't have to search through every single card every single turn. When you directly force a character to swallow another, you have to set the swallowed character's INBELLY trait to the global ID of the swallowing character. I think the syntax you'd want would be "ADDTRAIT:INBELLY:SRCGID." You don't need to set the DIGESTING trait; it will figure that out on it's own, and it isn't critical anyway; digestion damage actually comes from the INBELLY trait. While DIGESTION is used to determine how much damage is inflicted, the actual action that inflicts the damage comes from the INBELLY trait. (This is because you only want a character to take damage when they've been swallowed, and you only want it to apply to that character.) DIGESTING is primarily used for display purposes (to show the player which characters are digesting other characters).
Your best bet for preventing player cards from escaping would be to set up a counter for their escape action. Try putting something like this on the card:
Target: ALL Trigger: TURNSTART "REQTRAIT:PLAYER:REQTRAITEQUALS:INBELLY:SRCGID:REQMYTRAITMORE:HP:0:ADDEFFECT:MYACTION:SELF:TRAIT:BONUSACTION:1:TRAIT:DIGESTACTION:1:CANCEL"
What this will do is so long as the player card started the turn in the character's stomach and the character has 1 or more HP, the player card will be unable to take any action that comes from itself (not even DIGESTACTION actions). Thus, the only way to get them out will be to either kill the character or use an action card that will let the player card escape. (If you want to prevent this as well, add a second action but replace "MYACTION" with "TARGETED." Note that this will prevent the player from using any action of any kind on their player card unless you also change "CANCEL" to "REQNOTRAIT:DIGESTACTION:CANCEL" on the second action.)
Hopefully that makes some sort of sense.
|
4-2-2009 12:20AM
|
|
| | Dont have new topic access .  | Dont have reply access |
| |
2 online in last 5 min > 2 Guests, 0 Members
|
|
|
|
|
|