Need a script for longer choices

RedKnight1981

Villager
Member
Joined
Jun 26, 2019
Messages
8
Reaction score
3
First Language
English
Primarily Uses
RMMV
Resource Type: Script

Maker Format: MV

Description: I am wondering if anyone can make a script that would allow me to extend the number of letters that fit into my choice box. Currently I can only make extremely short sentences, which is incredibly limitting. Basically, anything longer than "Good day! How can I help you on this fine day?" doesn't fit! If I wish to make longer sentences, most of it gets outside the boundries of the box, which has made me pull out huge amounts of my hair recently! Please, for the love of sanity, is there anyone who can help me with this?

Wouldn't it be awesome if you could write a few sentences all under 1 choice?

Thanks for any reply in advance!
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
6,181
Reaction score
4,300
First Language
Dutch
Primarily Uses
RMXP
Plugins have their own section.

I've moved this thread to Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.

 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,322
Reaction score
446
First Language
Dutch
Primarily Uses
RMMV
SRD_WindowUpgrade can do that while its uses its windowskin.
the bad side probably, it uses a variable, than choices so you need to use if statements.
like use this plugin command: "CreateChoiceWindow [variableId] [choice1, choice2, choice3, …] "
than you do the following:
if choice = 0 (first choice)
do stuff
end

if choice = 1 (2nd choice)
do stuff
end

and so on :)
 

RedKnight1981

Villager
Member
Joined
Jun 26, 2019
Messages
8
Reaction score
3
First Language
English
Primarily Uses
RMMV
SRD_WindowUpgrade can do that while its uses its windowskin.
the bad side probably, it uses a variable, than choices so you need to use if statements.
like use this plugin command: "CreateChoiceWindow [variableId] [choice1, choice2, choice3, …] "
than you do the following:
if choice = 0 (first choice)
do stuff
end

if choice = 1 (2nd choice)
do stuff
end

and so on :)
I checked the plugin, but it doesn't seem to affect the number of letters that you can put into the choice. The only thing it does is change how the choices are presented visually. So if I want really long sentences in my choices, this plugin is not what I'm looking for - unless I am missing something? Another problem is that commas count as a new choice. So if I want to make a really long sentence with commas, I can't do it. :(
 

RedKnight1981

Villager
Member
Joined
Jun 26, 2019
Messages
8
Reaction score
3
First Language
English
Primarily Uses
RMMV

Attachments

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
2,609
Reaction score
3,786
First Language
English
Primarily Uses
RMMV

@RedKnight1981 , please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.

 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
1,322
Reaction score
446
First Language
Dutch
Primarily Uses
RMMV
yes, comma ends the choice which should be avoided. but you can commit it by
edit a font (you would need yanfly load font by than too), is to edit the default font or add the
same font but name it with a 2 behind it, and edit the . (period) into a comma like a duplicate)
specially for making choices.

you can try this one that create a longer list of choices, but not sure about the width though
 

Magnus0808

Software Developer
Veteran
Joined
Feb 2, 2019
Messages
134
Reaction score
141
First Language
Danish
Primarily Uses
RMMV
I wrote this plugin a long time ago when I just started getting into making plugins for MV. It is honestly a bit of a mess but it should work.

The way it works is allowing you to use '/n' to add a new line to a choice. E.g. "Good day! How can I help you on this fine day?\n I hope you will have a wonderful day." will be a two line choice.

I should probably update the plugin at some point, however it should fix your problem for now. The only thing is you have to insert the '\n' yourself, but that shouldn't be a problem.
 

Attachments

RedKnight1981

Villager
Member
Joined
Jun 26, 2019
Messages
8
Reaction score
3
First Language
English
Primarily Uses
RMMV
Omg! Thank you so very much! This is exactly what I was looking for. It's not perfect, but it will help me stop pulling my hair out. You have no idea how much I needed this! :)

I almost gave up on my project, because shortening long sentences was just not doable. Thank you! Thank you! :) :) :)

EDIT! There seems to be a slight conflict with YEP_MessageCore script, which I am also using. Namely, that script allows one to use a plugincommand to hide certain choices and then upon later show them again. The problem is that your script makes the choice window bigger than it should be when dealing with hidden choices.

I know I'm asking for much, but could you perhaps look into it? Maybe there is an easy fix with just one or two lines of code.
 

Attachments

Last edited:

Magnus0808

Software Developer
Veteran
Joined
Feb 2, 2019
Messages
134
Reaction score
141
First Language
Danish
Primarily Uses
RMMV
I updated the plugin a bit and changed the way it calculates some stuff which should make it compatible with the choice options from YEP_X_ExtMesPack1. I haven't done any thorough testing, but it seems to fix the problem you had at least :)
 

Attachments

RedKnight1981

Villager
Member
Joined
Jun 26, 2019
Messages
8
Reaction score
3
First Language
English
Primarily Uses
RMMV
I updated the plugin a bit and changed the way it calculates some stuff which should make it compatible with the choice options from YEP_X_ExtMesPack1. I haven't done any thorough testing, but it seems to fix the problem you had at least :)
Hmm... I tested your second version and while it does fix the problem I mentioned earlier, it also introduces a bunch of new issues. Check the screenshots for more details.

As you can see in the thumbnails, while the choice box doesn't expand due to hidden choice anymore, now it is so short that I can't fit in almost anything :(

"Bug1" and "Bug2" thumbnails are without "\n" command, since they are very short choices to begin with. "Bug" thumbnail is what happens when I use a very long sentence with the "\n" command and then go back to the part where I am not using the "\n" command. The long sentences with "\n" commands also don't show the full choice, but cut off somewhere in the mid section just like "Bug1" screenshot.

PS. I also tried digging around your code from your first version (MultiLineChoices.js) a bit, since that one had only 1 tiny problem. I can't code, but being the curious person that I am, I noticed that if I delete the line:

Window_ChoiceList.prototype.maxRows = function() {
return this.calcTotalLines();
};

Then everything works as it should, but then the problem is that I can't scroll when I have really long choices that go beyond 7 rows, so the part where the options should start scrolling gets cut off. I don't know if any of this is helpful information, but if it is, hopefully you can make it work. Perhaps avoiding the scroll altogether and making the choice box fit 12 instead of 7 rows would do the trick? Just suggestion. Unfortunately, I don't know how to code, so maybe my suggestions is stupid?
 

Attachments

Last edited:

Magnus0808

Software Developer
Veteran
Joined
Feb 2, 2019
Messages
134
Reaction score
141
First Language
Danish
Primarily Uses
RMMV
Try it now. The problem was that I had switched to use the command names instead of the direct choice names to do the calculations and stuff (since that would allow it to ignore hidden choices) but I had forgotten to update the command list before it calculated the size of the window. So it would use the size the previous window should have had.

I also found another small bug which I have also fixed. Hopefully, it works as intended now :)
 

Attachments

RedKnight1981

Villager
Member
Joined
Jun 26, 2019
Messages
8
Reaction score
3
First Language
English
Primarily Uses
RMMV
Try it now. The problem was that I had switched to use the command names instead of the direct choice names to do the calculations and stuff (since that would allow it to ignore hidden choices) but I had forgotten to update the command list before it calculated the size of the window. So it would use the size the previous window should have had.

I also found another small bug which I have also fixed. Hopefully, it works as intended now :)
Yeah, that did the trick! It seems to be working great now. Thanks so much for all the help! This is exactly what I was looking for! :)
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
2,609
Reaction score
3,786
First Language
English
Primarily Uses
RMMV
@RedKnight1981 If your question has been answered be sure to report your post as solved so we, the moderators, can close it. Thank you.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Hope y'all are staying healthy, safe and informed. Maybe pick up a new hobby or skill while you're at it.
Wanted to post a video of location i've finished but it doesn't work...
The game jam has done a lot of good in actually kicking my butt into action. I've even gotten over my crippling hatred of mapping thanks to it! :LZSexcite:

(Okay, there's also schoolwork forcing me to get on the computer, but I like to give credit where credit is due.)
Decided to start working on my second biome/area...


I'm sure I'll end up hating and changing things a whole lot over the next week. :LZSexcite:
I feel bad sometimes around others, I hate, and I mean HATE being touched, and I know they don't know I hate it so much

Forum statistics

Threads
95,656
Messages
930,810
Members
125,991
Latest member
harleyquinn
Top