Easier text loading with Enelvon External text

● ARCHIVED · READ-ONLY
Started by CodeHunterEx 7 posts View original ↗
  1. 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.

    Spoiler
    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.
  2. Do this script call instead
    Code:
    text("Chapt#{$game_variables[9]}")
  3. TheoAllen said:
    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?
  4. script -> msgbox_p($game_variables[9])
  5. 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?
  6. 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?
  7. Yes, I do get it. Makes perfect sense, but still doesn't work and I am just trying to figure out why.