Dispatch → Meta → Reference
The “Changeable Variable” Guide/Tutorial.The “Dumpsterz’s Changeable Variable Technique” or simply the “Changeable Variable” is a way to be able to include a remotely control variable that would allow for you to change something throughout all instances of the code being used with only updated one thing. Allow me to explain.
Let’s say we create a thing called the “Fruit Of The Day”. We create it to put it in a dispatch so we can update it every day. Then say we want to add it to another dispatch. Now we are updating two dispatches per day with a new fruit. This can get pretty tiring. There is actually an easy way to get past this.
Let’s say we create a nation by the name of Fruit Of The Day. We make an apple as the flag. Using this code:
Once we add “Fruit Of The Day” into that, we get this:
We are left with just a picture of an apple. All we have to do to change the Fruit Of The Day is change the image of Fruit Of The Day’s flag. It could look something like this:
Then it won’t matter if we posted this code into 1, 10, or 100 dispatches. As long as we updated Fruit Of The Day’s flag, we could change the fruit of the day without having to change it throughout all those dispatches.
In theory, this could be used in Dispatches or WFEs (World Factbook Entry).
This has some pretty useful applications. Say for example you are a RPer who frequently changes your states policies, instead of editing all the instances of, for example, “Is Marijuana Legal?:” Just make a nation and use the technique above to change the flag from “Yes” to “No” whenever you need.
If you a run a region and have a WA Program telling rather people should vote for the current legislation or not, use this technique so that it can easily be changed.
Going one step further, you could actually give orders/notices with this. Say you’re running an event for your region and you have to inform the participants on time specific instructions, you could use this technique and then updated the flag to be red, yellow, blue, etc. And depending on the color could mean that they need to do something. This could also be used for R/D in some shape or form.
This has a lot of possibilities, and I can’t wait to see what comes out of this research.
If you liked this guide, feel free to give it an UpVote!