draw a card triggers an action - Not supposed to !

Hi there, I’m looking into a problem …
In my latest version of Terraforming Mars, I modified 4 cards, among the 300+ pieces already present.
Now when they are taken from a deck, through classic Draw from Deck GKC, one of their actions is triggered.
ErrorLog does not show anything, as if the behaviour is expected.
There is NO action that should be triggered that way. I’m using different keystrokes/actions for these
2 cards use a new prototype, 1 another, and the last just has its new settings as personal traits
I copied the existing cards, and I improved their definition on the copy … after the tests, I deleted the original and placed the copies in the deck.
This is something I’ve been doing for 2 years, but that’s the first time I see this. Usualy I struggle with bad syntax and typos.

With that limited amount of information, can you help me troubleshooting ?
How a deck draw can trigger an action when nothing says to ?
Can there be a conflict in some piece guid ?

I saw nothing in the buildfile, but I didn’t dig too much yet.

I may need to go back to previous version, and non-optimized cards :frowning:

Now I’m thinking: I didn’t create a new proto. I recycled an old one and renamed it.
This may cause problems in the code, as when I try to add a proto in an expansion, I receive error messages about duplicate definition, even if it’s only present one.
I’ll destroy the new traits and proto, and start over for these 4 cards.
Though, I’d like to have a real log I can place in verbose mode to troubleshoot the engine and the module … Is it possible?

Here are a couple of troubleshooting ideas that could help–

  • Make sure you exit all the way out of the editor and re-launch an edit session of your module before you try it – lots of prototype-level changes won’t “take” unless you do this.
  • Two ways I get around the need for “logging”:
    1. I put in a bunch of “Report” traits when troubleshooting - watch who’s receiving what keystroke when. I find a LOT that way.
    2. I add “Text Labels” to pieces (and you can totally add one to a “card” it’s just another piece) and put all kinds of information in it e.g. values of Dynamic Properties and Global Properties and stuff like that. Save your sanity by making the font a lot bigger. Doesn’t have to be pretty during troubleshooting…
  • The most obvious (to me at least) way a deck draw could trigger an action, is if the “Map” it is being moved to is sending a keystroke when a piece is moved to a map (I think it’s the very bottom field in the configuration/properties dialog for a Map).
  • OR, if the GKC itself that draws some card is activating some keystroke in a trait.

Hope that’s of some value - none of them is the direct solution to the problem but you asked for troubleshooting help.

Brian

Thank you @cattlesquat ! I already use the Text labels a lot to debug. It’s a good thing to track variables.
I didn’t have any Map keystroke, or any GKC for these cards.
I removed the last traits I created for the first card (out of 4), and it seems to work fine now.
Probably some weird behaviour coming from the multiple indented prototypes applied to the card.
I’ll confirm here if I could make all 4 working fine, but your help was very welcome.

Ok, I confirm : starting a new game from the editor did mess up with my protos.
I deleted and created the whole stuff and only tested from real game.
All is fine now.

Excellent. After multiple super-frustrating “bug” incidents, I now have a hard and fast rule that when editing my module, when I’m ready to test what I just did, I always exit all the way out and restart before trying the module. As far as I can tell it works just fine to be running the module “in the editor”, as long as you’ve exited all the way out of the editor and re-opened the module for a fresh edit session. Your mileage may vary, of course! :smiley: