Fixed and updated - sorry, could have sworn I posted a reply, but it looks like I didn't. The problem occurred because it was trying to draw EOL characters, since I was a bit of an idiot and didn't tell it to strip them if you use get_text. Regardless, the problem shouldn't occur if you grab v2.2 from the Pastebin. I'll update the topic name now, since "Now v2.1" is no longer exactly accurate.
In other news, Solistra has convinced me to give this a bit of an overhaul in the near future, so you can look forward to that. Future updates should maintain full compatibility with old text files, of course - they'll simply be more efficient (and perhaps contain a few shiny new features).
I will also be posting a few new (to the internet, anyway) scripts and revising some of my others very soon. Several are just waiting on me to write/update documentation, so you should see a couple of things from me by Sunday or so.
Edit: Glanced back at it and realized I accidentally left in a debug statement. Fairly harmless, but distracting if the console is open. It's gone now.
Yes, that's a known issue that occurs because I changed the backend to allow for manual line breaks and forgot to update the documentation. v3.0 is almost complete, so the documentation will be corrected when that is released.
For some reason when I add color to the name box, the name is positioned to the left side automatically.
[key] Test[Face] Actor1, 0[Name] \c[14]RalphBlah Blah BlahShows the name in the window like this:
[Ralph ]
I also tried manually adding it in to the script with the same results...
Also is it possible to add in other text codes to be used by this script? And if so, where would be the proper place to insert them?
I've been having problems when I have more then 9 entries. Example:
[Key] Intro 1Ola ola[Key] Intro 2Ola ola 2[Key] Intro 3Ola ola 3 [Key] Intro 4Ola ola 4[Key] Intro 5Ola ola 5[Key] Intro 6Ola ola 6[Key] Intro 7Ola ola 7[Key] Intro 8Ola ola 8[Key] Intro 9Ola ola 9[Key] Intro 10Ola ola 10[Key] Intro 11Ola ola 11[Key] Intro 12Ola ola 12[Key] Intro 13Ola ola 13And if I set up and event with a script command doing block_text(/^Intro \d+/)
The result will be:
Ola ola
Ola ola 10
Ola ola 11
Ola ola 12
Ola ola 13
Ola ola 2
..
Probably because 'Ola ola 10' contains 'Ola ola 1'
Am I doing something wrong or is this a known issue and if so is there a work around?
That is alphanumeric sorting instead of numeric sorting - in alphanumeric sorting, 12 is in front of 2 - that is regular result for this sorting.
And unfortunately this is NOT easily solved, because the alphabet isn't as intuitive for computers as it is for humans. You'll see the same if you have windows sort similiar filenames.
I suggest (as done in thousands of programs with the same problem) to use full alphanumeric numbering, that is 'intro 01' instead of 'intro 1' and so on.
the best full proof solution is not to use spaces in your keys. Personally, I keep everything separate by sorting all posts into their respective maps and events.
For example, in Map 32 and Event 4, my key for this event is:
032_Ev4_Intro001
It also helps to point you in the right direction when you're looking over your script and you cant find it in the editor.
My problem was that I was writing all the story conversations on a separate doc file in order to avoid spelling mistakes but it's just a whole lot of work to copy and paste it back to VX Ace and also organize it on the message box. Also after changing something to make more sense on the doc I would have to change it again on VX Ace.. So this script will fit a glove once I get it all organized. 😀
I decide to make a quick function for my own needs here and I hope it helps someone else, follows:
def block_text_b_ex(key, start, finish) i = start; $game_text.keys.each do |k| keys = key + " " + i.to_s(); if keys == k text(k) i = i + 1 if i > finish break end end end endWith this you're able to show, say, the first 5 five entries in your "Intro" Key.
block_text_b_ex("Intro", 1, 5) #Will load the text on your text file from Intro 1 to Intro 5 (inclusive)#You can do something here: play audio, and then continue with the story without needing two keysblock_text_b_ex("Intro", 6, 12) Notice I got read of the ".sort" on the "$game_text.keys.each" do while which was what was making the "Intro 10" be put after "Intro 1". This way the order is the order that you have in your file. So if I have:
[Key] Intro 1Ola 1[Key] Intro 2Ola 2[Key] Intro 3Ola 3[Key] Intro 4Ola 4[Key] Intro 5Ola 5[Key] Intro 6Ola 6[Key] Intro 7Ola 7[Key] Intro 8Ola 8[Key] Intro 9Ola 9[Key] Intro 10Ola 10It will work just fine. It wont show "Ola 10" after "Ola 1". Well, hope it helps someone.
Cheers!
Glad you got things resolved! Sorry that I wasn't around earlier--I've been a little busy. This script will *probably* be getting its v3 soon--I meant to release it months ago, but things happened and it never got completed. It actually has something similar to your block_text_b_ex method, though slightly more efficient and without your sort alteration. I'll probably add in alternate block_text methods without the sort since it seems to have been a problem for you, though. Thanks for the heads up!
Not a problem! Glad you like it!
I'm trying to call the message by script in a Character_Base Class... but I don't figure out how to do it the right way...
How can I call the message inside a method of the RGSS3 editor?
Hey there, Enelvon! Thanks for this awesome script - it's great~
I know v3.0 should contain a fix for the line issue (that is, being able to force a line break instead of relying on text wrapping) but was there any work-around that anyone can suggest? I've a text-heavy project that needs some line-breaks and while I could input all the lines in manually, I've something of a deadline and there's other bits of the game that also need working on so decided this script was perfect for my needs. But, yeah, line breaks... ^.^;
Someone (Hasvers~<3) on another forum presented a fix for this issue with the line break. It's very, very easy.
- Go to line 367
- Add " before and after / and i, respectively. That is, the code should look like so:
v.gsub!("/\[Line\]/i", "\n" )
- That is all. It should now work perfectly as it's supposed to.
Yey~
The v3.0 update is finally released! MultiLang has also been updated to v2.0.
Amazing work! This script is absolutely the best in what it does. I highly recommend it to everyone. I can't imagine working on a project without it (and the MultiLang add-on!).
The code is of the highest quality (I didn't expect less from Enelvon) and the features and MultiLang add-on are very useful and convenient. This script is really a gem that everyone should get.
Thank you very much for sharing it <3