| 07-10-2002, 12:16 AM | #1 |
I think it's about time we started talking about ways of debugging maps, ways of figuring out why triggers aren't working, etc. Also, I think it's important to think about ways in which you can make it easier to change elements of your map later for balance or debugging purposes. Here are my debugging tips: *Generally you have alot of stuff happening during map initialization. If you need to use custom text, create a seperate trigger with the map initialization event and put the actions that need custom text in their instead, this will make it easier to change the non-custom text stuff later. *If you're going to convert a trigger to custom text, make a disabled copy of it as a backup in case you want to change something in the GUI later, then you can copy and paste the backup and just convert it to custom text again. *Setup triggers that detect you typing in a chat message like so: -variablename Then have it show in game text the contents of the variable. This way you can check the values of important variables when you need to. Use for loops to go through arrays, and cat strings together to illustrate the values like so: display to all players text: "variablename[" + for loop integer A + "] = " + variablename[for loop integer A] *Whenever you use a trigger to add/subtract gold/wood, rather than specifying the value, put the value you want as the initial value of a variable and use the variable instead. This way, later, rather than going through a ton of triggers and changing each value, you can just change the initial value of the variable. *Do the same for special effect strings, this makes it easier to change your effect to a cooler one later. Also good for whenever you subtract mana or any other property that is somehow a 'cost' which you'll probably want to change a few times for balance reasons. *In general, use the game text action to display the contents of variables whenever you're curious of their value. _Do not_ delete these actions, rather, just disable them. This way if you need them again later you can just re-enable them and resave. *Setup triggers to detect things that shouldn't be able to happen that'll display an error message, and then the value of any related variables. *Put triggers solely related to debugging in their own "debug category" so it's easy to disable them all for release. |
