Easier text loading with Enelvon External text

CodeHunterEx

Hunter of the Perfect Code
Veteran
Joined
Nov 26, 2016
Messages
133
Reaction score
64
First Language
English
Primarily Uses
RMVXA
I am adding text in a script like this:

Notice: This shows the old way I was loading the text.
The new format is Script: text("Book*Chapt*")
* is a value between 1 and 66 for books and 1-?? for chapters.

TextScript.png

Is there a better way to accomplish this?

Example: Call text(Book\VChapt\V[c]) or something like that.

\V where \V is a variable and b is the book value.
\V[c] where \V is a variable and c is the chapter value.

Maybe create a string that holds the filename to load and call the script with the file name?

Hopefully this makes sense.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,594
Reaction score
6,525
First Language
Indonesian
Primarily Uses
RMVXA
Do this script call instead
Code:
text("Chapt#{$game_variables[9]}")
 

CodeHunterEx

Hunter of the Perfect Code
Veteran
Joined
Nov 26, 2016
Messages
133
Reaction score
64
First Language
English
Primarily Uses
RMVXA
Do this script call instead
Code:
text("Chapt#{$game_variables[9]}")
Thank you.

I tried that but it isn't working. Is there a way to get a look at the output?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,661
Reaction score
563
First Language
English
Primarily Uses
RMVXA
script -> msgbox_p($game_variables[9])
 

CodeHunterEx

Hunter of the Perfect Code
Veteran
Joined
Nov 26, 2016
Messages
133
Reaction score
64
First Language
English
Primarily Uses
RMVXA
Thank you.

Here is the script I am using: Script: text("B1C#{$game_variables[9]}")

In the text file text.txt I have the following keys:

[Key] B1C1
[Key] B19C150
[Key] B50C14
Etc.

The first one B1C1 works but when I choose a higher value nothing happens.

Should I make a small demo and share it?
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,594
Reaction score
6,525
First Language
Indonesian
Primarily Uses
RMVXA
The operand #{} within string is a ruby code that will be executed, and the result will be added into the string.
For example, if you use "B1C#{$game_variables[9]}" and the value of variable 9 is 1, it will be B1C1. If the value is 10, then it will be B1C10.
If you use "B1C#{100+50}" it will be B1C150

You get what I mean?
 

CodeHunterEx

Hunter of the Perfect Code
Veteran
Joined
Nov 26, 2016
Messages
133
Reaction score
64
First Language
English
Primarily Uses
RMVXA
Yes, I do get it. Makes perfect sense, but still doesn't work and I am just trying to figure out why.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:

Forum statistics

Threads
105,883
Messages
1,017,236
Members
137,608
Latest member
Arm9
Top