New threads (tutorials) here will go into a moderation queue. You will not see your thread appear when you create it. A moderator will decide if it will be approved or denied.
[-Eventing-] [-Scripting-] Changing the terms In-Game, meaning, while you are playing the game
I was looking for a way how to do this, when I stumbled upon a very easy to use script.
This Tutorial covers how you can make the game change the terms, while you are playing the game
To understand this tutorial, you need to: 1. Understand how common events work 2. Understand how switches work 3. Understand how conditional branches work 4. Know how the Script Editor works 5. Know how to copy and paste
[hr]
Step 1: Installing the script First, go to the Script Editor. All the way to the bottom, but above all other custom scripts you might have installed, create a new section named []KGC scripts, and a new class named KGC_ChangeSystemTerms
It should look like this
QUOTE
... Scene_Gameover
▼KGC Scripts KGC_ChangeSystemTerms
▼Main Process Main
Copy the script below, and paste it in the new class you made.
Spoiler:
CODE
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #_/ ◆ Change System Terms - KGC_ChangeSystemTerms ◆ VX ◆ #_/ ◇ Last Update: 2008/05/28 ◇ #_/ ◆ Translated, Ported, and Updated by Mr. Anonymous ◆ #_/ ◆ KGC Site: ◆ #_/ ◆ http://f44.aaa.livedoor.jp/~ytomy/ ◆ #_/ ◆ Translator's Blog: ◆ #_/ ◆ http://mraprojects.wordpress.com ◆ #_/---------------------------------------------------------------------------- #_/ Installation: Insert above as many custom scripts as possible. #_/============================================================================ #_/ This script allows you to change the vocabulary of certain system-used #_/ terms such as "Gold" or "Skill" with the use of the "Script" event command. #_/---------------------------------------------------------------------------- #_/ ◆ Instructions For Usage ◆ #_/ This command is used in "Script" function in the third page of event #_/ commands under "Advanced". #_/ #_/ * SystemTerms.change(Index, String) #_/ The core of this script. Allows you to alter the text of a given system #_/ term. Where Index = the term's index. Scroll down to the "Initialize" #_/ block below to see the numbered list of alterable system terms. Where #_/ String = the desired string you wish to change the term to. #_/ #_/ Example: SystemTerms.change(0, "Zenny") #_/ This would change the value in index 0 ("Gold" (by default)) to Zenny. #_/ For a better example of how this works, please refer to the "Vocab" system #_/ script, located at the very top of the scripts. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
$imported = {} if $imported == nil $imported["ChangeSystemTerms"] = true
module SystemTerms #-------------------------------------------------------------------------- # ● System Terms Module # index : SystemTerms Index # string : Designated String #-------------------------------------------------------------------------- def self.change(index, string = "") # Change System Term $game_system.system_terms[index] = string # Refresh System Term $game_system.terms_refresh end end
class Scene_File < Scene_Base #-------------------------------------------------------------------------- # ● Read Save Data # file : Saved File #-------------------------------------------------------------------------- alias read_save_data_KGC_ChangeSystemTerms read_save_data def read_save_data(file) # Run original process read_save_data_KGC_ChangeSystemTerms(file) # Refresh system terms $game_system.terms_refresh end end
This part is very important. When the game boots, it loads the terms from the database. Since the script doesn't change the database, it would screw up your terms, and ruin the game.
First, Go to the switches list. (tip: you can find the switches in the event creation screen, under control switches, but you should know that already). Create two switches. Name one "Terms CE switch" and the other after the event that should make your terms change. For example, if you want the terms to change after defeating the Demon King, name it "Demon King defeated".
Second, create a new common event, and name it Change Terms after <certain event name here>. for example, "Change terms after defeating Demon King". Change the trigger to "Parallel", and change the condition switch to "Terms CE switch", that you created before.
In the common event, create a Conditional Branch with as a condition, in the example's case, the switch "Demon King defeated" is ON. The Common Event screen should look something like this
QUOTE
Name:......................................Trigger........Condition Switch [Change Terms after...]...........[Parallel]....[####:Terms CE Sw...] _________________________________________________________________ @>Conditional Branch: Switch [####:Defeated Demon King] = ON .....@> : Else .....@> : Branch End @>
Now copy the following script:
CODE
SystemTerms.change(Index, String)
In the conditional branch, create a "script" event line. (on the 3rd page of the event control panel) and paste the code above. That code is the one actually doing all the work. where "Index" is, enter the index number of the term you want to change. You can find the index number in the script class, or in the spoiler at the bottom of the post. Where "string", enter the name you want the term to get, inbetween quotes. For example, if you want the "skills" term to change into "demonic arts", the code would be:
CODE
SystemTerms.change(19, "Demonic Arts")
and the common event would look like this
QUOTE
Name:......................................Trigger........Condition Switch [Change Terms after...]...........[Parallel]....[####:Terms CE Sw...] _________________________________________________________________ @>Conditional Branch: Switch [####:Defeated Demon King] = ON .....@>Script: SystemTerms.change(19, "Demonic Arts") .....@> : Else .....@> : Branch End @>
Now the Skills term will change as soon as the Defeated Demon King switch is turned on. To make the game change the term back when the switch is turned off again, simply add the same code, but with "Skills" as string, under the Else line. It would look like this.
You can add more then one term change by putting repeating the code with different index numbers. You don't have to add a new branch for each term, just put it in the same branch. _____________________________________________________________________________________________
End of Tut. The rest you will have to find out by experimenting. The Index list is below.
Index list
Spoiler:
0: Name of Currency 1: Level 2: Level Abbrevation 3: Health 4: Health Abbrevation 5: MP 6: MP Abbrevation 7: Attack stat 8:Defense stat 9: Spirit stat 10:Agility stat 11:"Weapon" 12:"Shield 13:Helmet 14:Body Armor 15:Accesory 16:"Weapon 1" 17:"Weapon 2" 18:"Attack" command 19:"Skill" command 20:"Guard" command 21:"Item" command, menu name 22:"Equip" menu name 23:"Status" menu name 24:"Save" command 25:"Game End" command 26:"Fight" command 27:"Escape" command 28:"New Game" command 29:"Continue" command 30:"Shutdown" command 31:"To Title" command 32:"Cancel" command