Skill descriptions, referencing a line in a list and line breaks with script

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
89
Reaction score
11
First Language
Swedish
Primarily Uses
N/A
Hello!

So I have made a rather extensive system of skill creating that generates everything from mana costs, descriptions, notetags, formulas and what not in Google sheets(Kinda excel). Up front I am using YEP_message core with expansion 1 and extension 2. I am also using Wayne95's WAY_EvalText. I am also having access to YEP's pateron library of plugins if anything there would help.

And if I make a change to something in this list, let's say I want to change the way I describe how healing works. Then I currently need to individually copy every skill description that heals and then again individually paste it back into the skill.

Since I am sure that it would be next to impossible to make the game read an excel list I am looking for other solutions. What I am hoping to do is to just copy the entire column "E" from my google sheet document and then just paste that column into something in RPG maker MV. First I was hopeful that I could just do this by using the \N[x] in the skill description and then just paste the column of descriptions into the actor name list. This doesn't work since you can't copy text into the list of actors. I kind of assumed as much since it doesn't work for anything else but I wanted to try it. EDIT: And of course actor name referencing doesn't take coding within the name into account.

Now I am curious if I can somehow utilize plugins or scripts to access say line X in document Y and apply it as a description within a skills description.

Something else I would like is the possibility of adding line breaks to the skill description via a command. I've tried several usages of the "br" string command for javascript. The only thing that gives an output is ${<br>} which returns SyntaxError: Unexpected token <. But I do believe that <br> is javascript for line break. So I am unsure what is wrong there.

Something else that might work is if I can have a plugin that will apply a description to a certain skill, so in a way make it reverse. It's easy for me to add in any type of scripted text into my generated descriptions and copy/paste the entire column along with script calls and such.
Example description:
1596288604467.png

Any thoughts and/or comments regarding this issue and potential solutions are greatly appreciated.

Best regards,
 
Last edited:

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,716
Reaction score
1,165
First Language
EN
Primarily Uses
RMMV
<br> is the HTML new-line tag; in JavaScript it's the string '\n'. However, it looks like your spreadsheet is stringified before input, meaning that your example input gets encoded something like this:
Code:
`This does ${Math.round(4 * a.mat)} - ${Math.round(6 * a.mat)} fire damage and has a 30% chance to \\N[141] for 3 turns on the target.`
Basically, the backslash is encoded as \\, since backslash is used for escape notation.

Two ideas (untested):
  1. Use ${'\n'}, hopefully it will evaluate as a line break.
  2. Otherwise, you could try putting a line break in your spreadsheet (Alt+Enter).
:)
 

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
89
Reaction score
11
First Language
Swedish
Primarily Uses
N/A
<br> is the HTML new-line tag; in JavaScript it's the string '\n'. However, it looks like your spreadsheet is stringified before input, meaning that your example input gets encoded something like this:
Code:
`This does ${Math.round(4 * a.mat)} - ${Math.round(6 * a.mat)} fire damage and has a 30% chance to \\N[141] for 3 turns on the target.`
Basically, the backslash is encoded as \\, since backslash is used for escape notation.

Two ideas (untested):
  1. Use ${'\n'}, hopefully it will evaluate as a line break.
  2. Otherwise, you could try putting a line break in your spreadsheet (Alt+Enter).
:)
I will try using \n, but I was wondering if you misinterpreted \N[141] as a line break attempt? That is referencing actor name 141 which is where I have the description for the burn effect.

However, I have noted more issues with my attempt. I've been playing with variables and the issue emerging is related to what you were just saying that when using say "\N[141]" it encodes whatever is within there as a string so whatever code I use within it will be ignored.

Which means simply referencing a string would not work in my case...

I am considering trying to implement my description generator directly into the skills description. Would make it so if I change a skill in game it would immediately update the skills description.

But with myy original idea the description has to add the descriptions as is, meaning with readable code from the base string. Also meaning that if the string is $gameVariables.setValue(x, 'Does ${Math.floor(2*3)} damage' it will need to be added into the skills description without the '' which might unforunately be impossible. But if it can be done that would actually be great.

best regards,
 

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
89
Reaction score
11
First Language
Swedish
Primarily Uses
N/A
Hehe!

YEP_messagecore solved the line break problem I had... Apparently word wrap can be assigned to ONLY descriptions which made it easier.
1596295049071.png
This essentially makes it so if text goes outside the textbox it creates a line break.

So the line break issue is solved. Still working on the other issue...
 

ATT_Turan

Veteran
Veteran
Joined
Jul 2, 2014
Messages
78
Reaction score
27
First Language
English
Yanfly has a macro plugin. You could use that and in the plugin parameters you'd type your description of what healing does; then, you'd reference it in your game with \heal. If you need to change anything, you change the descriptive text in the parameters and it'll be automatically replaced anyplace you've used the macro.
 

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

Latest Threads

Latest Profile Posts

One 3-day jam and a Game Awards... this month is moving... \o/
Maker-ing has been being the best thing that happened to me this year so far. it is so good to rescue some old skills fo creativity and the people I have met are really incredible. I love my coffelanders and tocudos buddies. Maybe one day I will reach other countries folks too. S2
Well... My game plays better at 1920x1080, so I guess that's the new resolution. Still runs at 60FPS. :LZSexcite: Also... I really want a boss to be able to build new maps around the player... Mostly because it's visually spectacular! I'm er... not quite sure yet how I can do that without making MV explode.... But I'll find a way, anything in service to the "sparkles"! :kaopride:
How to change your netbooks screen resolution

Forum statistics

Threads
100,795
Messages
979,604
Members
132,437
Latest member
Vollar45
Top