May 3, 2012 at 5:03 PM
Join Date: Aug 20, 2006
Location:
Posts: 2857
Age: 34
Pronouns: he/him
So I just had a possible brainwave. Over time, I've come up with preferred ways of creating certain effects, and picked up a few from playing other mods. Now, while there's a multitude of "how I make this work" threads, there has (from memory) never really been a place to discuss how to make the code work for you. Say, for example, that someone comes up with an idea for a scene and then goes about thinking how to implement it in a mod. They might assume some parts are impossible and downsize it until it only works with basic coding functions, or scrap it altogether.
There are some things, of course, that require ASM, or drawing ability (>_>), or just aren't feasible. However, particularly in the case of effects that are purely visual, it's possible to get surprisingly far using only TSC. I've also seen many a new mod struggle with basic map or entity effects, but almost never see questions about them, such as what deleting an entity or making them visible or invisible really means. These types of difficulties are more like logic errors than run-time errors, and so don't really fit in with starter-level coding tutorials or quick answers, as they can often be abstract or complex. In many cases there are even multiple ways of doing the same thing.
Classic example: An event takes place where certain entities or tiles are changed, the player saves and reloads, and the changes are lost. Entities can usually be fixed using flags, but maps are only ever loaded in their default configuration. Therefore, rather than having to make a change every single time a map is reloaded, what I do is create the map the way it will look in its final state and change it to its 'initial' state only the first time that it's visited. Failing that, or if certain other changes need to be made upon each load, a h- or v-trigger can be placed directly over the save point, which will instantly go off before the player can do anything. However, this runs into difficulties if such tiles visible near the save point, because the player isn't meant to see them changing. Sometimes it might even be better to create a whole new map, but only when it won't mean even more work or waste space.
I've long wanted to try and find a place where these types of tips and tricks would fit in, but in tute threads they would get drowned out and in the quick answers thread I can only help one person at a time and people may not even think to ask these things there. Hopefully this thread will allow my self and others to help folks out with their ideas as they arise, and maybe save them the trouble we all went through when we were first starting out. For the time being, feel free to discuss/argue my idea here, and if it works out the topic can be made official-ish.
Hugs
There are some things, of course, that require ASM, or drawing ability (>_>), or just aren't feasible. However, particularly in the case of effects that are purely visual, it's possible to get surprisingly far using only TSC. I've also seen many a new mod struggle with basic map or entity effects, but almost never see questions about them, such as what deleting an entity or making them visible or invisible really means. These types of difficulties are more like logic errors than run-time errors, and so don't really fit in with starter-level coding tutorials or quick answers, as they can often be abstract or complex. In many cases there are even multiple ways of doing the same thing.
Classic example: An event takes place where certain entities or tiles are changed, the player saves and reloads, and the changes are lost. Entities can usually be fixed using flags, but maps are only ever loaded in their default configuration. Therefore, rather than having to make a change every single time a map is reloaded, what I do is create the map the way it will look in its final state and change it to its 'initial' state only the first time that it's visited. Failing that, or if certain other changes need to be made upon each load, a h- or v-trigger can be placed directly over the save point, which will instantly go off before the player can do anything. However, this runs into difficulties if such tiles visible near the save point, because the player isn't meant to see them changing. Sometimes it might even be better to create a whole new map, but only when it won't mean even more work or waste space.
I've long wanted to try and find a place where these types of tips and tricks would fit in, but in tute threads they would get drowned out and in the quick answers thread I can only help one person at a time and people may not even think to ask these things there. Hopefully this thread will allow my self and others to help folks out with their ideas as they arise, and maybe save them the trouble we all went through when we were first starting out. For the time being, feel free to discuss/argue my idea here, and if it works out the topic can be made official-ish.
Hugs