Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I'll edit the comment to reflect it, but my switch is just $game_switches[62], and I want it to actually process that switch to check if it returns true or false.
Another possibility you could use is the .ini file. Since that is stored outside the save games.
If you need the code to be run after the game though then just put it into a Script Call command in a parallel process common event.
I'm using the CSCA Difficulty script, alongside the LGlobalSave script, so that once my game is completed, it will save a switch saying the game is completed to load at the start of the game, which will change the difficulty listings. I wanted it so that every difficulty changes its name (it's some funky fourth-wall breaking thing I'm doing to trigger a spooky boss fight), which is why I'm trying to get the script to decide between one of two versions of itself to run based on the switch's value.
The issue I run into now is that by doing so, I insert modules or class definitions into a method, which comes up as an error.
Is there a workaround for this, or better yet, some way to place a script beforehand that will decide which version of the same script to run and which one to not run based on a switch's value?
Again, thank you so much for your help so far!
And here's the original script if you need some sort of comparison to the script I'm using: http://pastebin.com/LyAdCAam
My version of the script so far, I copied the original module "DIFFICULTY" and made a second module of it right underneath as "DIFFICULTYALT" where it creates the new difficulty descriptions. I then used your above script underneath it to check for the value of $game_switches[62] and run the script using DIFFICULTY module if false, DIFFICULTYALT module if true.
All I really need is an instance of the original script being able to run one way or the other based on the value of the switch, so I included the original script if you want to just use that to make a framework instead. Whatever you're willing to help with c:
Also you took the normal difficulty out of the CSCA module therby removing it from it's functions.
Also you can't define a class inside method as you have tried to do on line 261.
It would be really helpfull if I knew what tou were trying to change because it may be as simple as adding and if statement to it. Also modules as I said are loaded first so having them bound to an if statement that uses an at the time undeclared array would just put us back at square one.
All I'm trying to change is the difficulty descriptions and text to display completely differently in game. I made another version of the script where the text says the different things I want it to (each difficulty has a different name and description than it normally does) and it works, but I need to make it so the difficulties display their normal names and descriptions, but when a switch is activated (which IS loaded before the difficulty showing up due to the global save script), it will load the different names and descriptions for the difficulties.
Edit: Aha! I know how to load from the ini file now. Really hard to find a tut on this (eneded up not finding one). The point though is that you can definitely do this with what you want here.
Edit2: Nevermind I had a false positive.
Edit3: Nevermind again I had a false negitive and have throughly tested it this time. It does work. Late hereso I'll just post what I have gotten. You'd need this utility module here[pastebin.com] to get the methods needed. thenin the difficulty script just before the declaration of the difficulties write the following
In your Game.ini file located in the root folder of your project ad the line at the bottom
How we do that is when you've decided that the player has won the game place in a n event somewhere at that time the following line of code
This will modify the value in the INI file and will enable the new names.
Not only this, but I assume with this utility script I can add all sorts of variables to the configuration ini and read from them across the entire game to do all sorts of advanced things now too?
But again, thank you so much! I accomplished exactly what I wanted to do!
As an example here is a volume settings example that was given by this group here that initially taught me how to save at least.
Also if you want to store these into another file (example: Custom.ini) you would add that field onto the end of those like so:
Also when searching for the file it starts at the root of the project folder. So this means that if you have the Custom.ini in the System folder of the project you would change that last field to "System\Custom.ini"(I may be wrong about if it is a back or a forward slash).
Have fun with your new found knowledge and power.