DerTraveler

Veteran
Veteran
Joined
Jun 19, 2013
Messages
48
Reaction score
38
First Language
German
Primarily Uses
Updated the script to version 1.3.1. (mainly bugfixes and removal of annoying behaviour - no new features)

  • Bugfix: Battle Events are now extracted too (Thanks to masterdragonson for pointing it out)
  • Bugfix: Fixed bad unsafe array accesses which forced the database file to have an entry if you don't want your game to crash when that particular text is accessed.
  • Bugfix: Extracting all data now produces database files with the current version number.
  • Removed the useless USE_XXXX flags. All the features now just work depending on whether the respective files exist and/or there is an entry or not in that file.
  • Added alert dialogues to the extraction.



@Cloud_FFVII:


Your bug should now be fixed if you use the updated script. Be sure to set your languages and default languages again after overwriting the old one.


@srazysnake
The easiest way to use my script would be to first finish the game in one language and then to extract all of your text data automatically into the Dialogue.rvtext file....

The basic function of the script is like this:
Instead of your actual text you write "\dialogue[XYZ]" into your messages, where XYZ is some unique name of that textblock.

Then in your Dialogue.rvtext file you would have an entry like this:


<<XYZ>>
Hello, good morning.


Where "Hello, good morning" would of course be your actual dialogue text.


And then you would create a Dialogue.rvtext file for each of your languages - each with the same IDs (the part between << and >>) but of course the respective translation below. For example your could have DialogueEnglish.rvtext, DialogueKorean.rvtext.

Finally you need to define your languages in the script itself - which is explained in the script itself below all of the green script documentation...

if you have any further questions feel free to send me a Private Message....
 
Last edited by a moderator:

Cloud_FFVII

Veteran
Veteran
Joined
Dec 31, 2015
Messages
31
Reaction score
1
First Language
Spanish
Primarily Uses
Hi! Thanks for the update! I updated the script and added the languages. Exported the database and dialogues and replaced...But right now I have another error. :c I don't know what could it be.


    def put_database_entry(db, line_name, line)
      group, param1, param2, param3 = line_name.split("/")
      case group
        when "system", "names", "variables", "eval"
          db[group.to_sym][param1.to_sym] = line
        when "types", "terms"
          db[group.to_sym][param1.to_sym][param2.to_i] = line
        when "constants"
          db[:constants][param1.to_sym] ||= {} 
          db[:constants][param1.to_sym][param2.to_sym] = line
        else
          if group == "classes" && param2 == "learnings"
            learn_hash = db[group.to_sym][param2.to_sym]
            class_id = param1.to_i
            # Create class learnings array copy
            learn_hash[class_id] ||= $data_classes[class_id].
              instance_variable_get("@learnings").clone
            learn_hash[class_id][param3.to_i].note = line
          else
            db[group.to_sym][param2.to_sym][param1.to_i] = line
          end
      end
    end


Exactly on the:             db[group.to_sym][param2.to_sym][param1.to_i] = line


Thanks!


new.PNG


EDIT: Now I noticed, If I delete the DatabaseTextEnglish from the directory the game works without problems.

EDIT 2: If I re-extract the maps (those already extracted) the SHOW CHOICES COMMAND dissapears. : (
 
Last edited by a moderator:

DerTraveler

Veteran
Veteran
Joined
Jun 19, 2013
Messages
48
Reaction score
38
First Language
German
Primarily Uses
And another update (also one that feels as if it should have been included ages ago >_< sorry!)

Version 1.4

  • Added detailed error log for database file errors

@Cloud_FFVII : Can you update your script and then look at the error? Maybe that's already enough to fix it... otherwise please post it again here...

Edit: Since GitHub Raw seems to always take some time to update the content - here the direct link to the file on GitHub for now.... in case the link from the original post should still show version 1.3.1 (but should be updated soon in a few minutes? hours?)

Edit2: Oh I just now saw your edits.... if you have already extracted your game once... Then you need to add the content of the newly created Dialogues.rvtext to your old one... NOT Replace it.....
 
Last edited by a moderator:

Cloud_FFVII

Veteran
Veteran
Joined
Dec 31, 2015
Messages
31
Reaction score
1
First Language
Spanish
Primarily Uses
Okay, replaced the script and configured the languages...Now the game don't crash when open...but it show this...


"Missing parameters(s) for maps" ? that's weird...
 
Last edited by a moderator:

DerTraveler

Veteran
Veteran
Joined
Jun 19, 2013
Messages
48
Reaction score
38
First Language
German
Primarily Uses
Wow... that was a bug that went unrecognized for about 2 years I guess? (Because no one seems to actually use map display names and notes)...

I fixed this now in the new version...

What you need to do (apart from updating the script for the future) is this: Edit your DatabaseText file at the specified line.... The error is the colon (:).... replace the colon in all specified lines with a slash (/) and it should work....
 

Cloud_FFVII

Veteran
Veteran
Joined
Dec 31, 2015
Messages
31
Reaction score
1
First Language
Spanish
Primarily Uses
Alright, let me try and report back!


Now...let me explain the other problem, just in case you can check it....


The problem with RE-extracted maps is not on the Dialogues Files, it's with the maps. I mean, it literally DELETES the "Show Choices" command from the maps. You can still see the "When: Option1" and "When: Option2" but I doesn't show the "SHOW CHOICES" command above those.
 

DerTraveler

Veteran
Veteran
Joined
Jun 19, 2013
Messages
48
Reaction score
38
First Language
German
Primarily Uses
Done.... just update your script and redo the re-extraction.

Wow today is really bugfixing day....
 
Last edited by a moderator:

Cloud_FFVII

Veteran
Veteran
Joined
Dec 31, 2015
Messages
31
Reaction score
1
First Language
Spanish
Primarily Uses
Done.... just update your script and redo the re-extraction.

Wow today is really bugfixing day....


hahaha! You're right, and I really appreciate the help :D


however (this is my lucky day hahaha!) I have another error opening the game now:


DatabaseTextEnglish.rvtext:60 - Missing paramaters(s) for names: \name[]


I'm going crazy with this hahahaha! BTW the choice stuff is now working great! :D
 

DerTraveler

Veteran
Veteran
Joined
Jun 19, 2013
Messages
48
Reaction score
38
First Language
German
Primarily Uses
And the next fix... update the script and it should work...

This is really good.... I guess now 80% of the sleeping bugs have been fixed this afternoon :D
 
Last edited by a moderator:

Cloud_FFVII

Veteran
Veteran
Joined
Dec 31, 2015
Messages
31
Reaction score
1
First Language
Spanish
Primarily Uses
And the next fix... update the script and it should work...

This is really good.... I guess now 80% of the sleeping bugs have been fixed this afternoon :D


Awesome! But don't kill me yet  :D  hahaha! Now I only have 3 errors when opening the game.


DatabaseTextEnglish.rvtext:75 - Missing paramaters(s) for names



And the same error but on another two different lines...


Now, on line 75 of the database file it shows: 


<<names/>>


I'm wondering what are those lines and what will happen if I delete them. XD


EDIT: Deleted the lines, ran the game and it's working fine. But I'm not sure if I'll cause any problems later... :(  I have 3 characters without name on the RPGMaker database (they are used to create password puzzles and all that)....the <<names/>>... could be those?

EDIT 2: Now checking the Database File again, I noticed that the script is exporting all the map names as "Small Corridor" (which is the name of one of my maps), so I guess it's not exporting the map names (like an MapName and it's not doing the i++, I don't know, I'm just using some "beginner logic" XD). Or  maybe it's renaming the maps as the first ones... XD

 
Last edited by a moderator:

DerTraveler

Veteran
Veteran
Joined
Jun 19, 2013
Messages
48
Reaction score
38
First Language
German
Primarily Uses
I guess I understand your first issue... you reset the name (set them to "", i.e. empty) before doing the name entry right....?
And I already saw the reason for the other one... I will fix those later.. in 2 or 3 hours I guess since i'm now busy....



EDIT: So should be fixed now!
 
 
Last edited by a moderator:

Cloud_FFVII

Veteran
Veteran
Joined
Dec 31, 2015
Messages
31
Reaction score
1
First Language
Spanish
Primarily Uses
I guess I understand your first issue... you reset the name (set them to "", i.e. empty) before doing the name entry right....?
And I already saw the reason for the other one... I will fix those later.. in 2 or 3 hours I guess since i'm now busy....



EDIT: So should be fixed now!
 


it's working great now!!!! no errors! Wow! Sir, you are one of the best ruby programmers I've seen.


Thank you so much for the quick bug fix!!! Also I'm glad I could report and help this script to be even more AWESOME!!! :D


One last NOOB question :D : I created the "databasetextspanish.rvtext" and modified some lines just to see if the game "see it"...When opening the game, everything else is translated, but the database lines I changed are still in English. Do I need to make a script call when opening the game to change the database? The items on the RPGM database are still with their english names. Should they change to some reference? (like the dialogue(<<<XXXX/XXXX/XXX>>) )
 

DerTraveler

Veteran
Veteran
Joined
Jun 19, 2013
Messages
48
Reaction score
38
First Language
German
Primarily Uses
In the filenames of both files DialogueXXX and DatabaseXXX the XXX part must be exactly like the languages defined in the LANGUAGES and DEFAULT_LANGUAGE options (without the leading colon :) - that would be the only thing that comes to my mind spontaneously....

Since the game does not give any feedback (i.e. crashing the game) anymore on missing files, these kind of errors are not so obvious anymore....

If it's not that, then... well might be another bug, though I can't really tell where that might be....
 
Last edited by a moderator:

Cloud_FFVII

Veteran
Veteran
Joined
Dec 31, 2015
Messages
31
Reaction score
1
First Language
Spanish
Primarily Uses
In the filenames of both files DialogueXXX and DatabaseXXX the XXX part must be exactly like the languages defined in the LANGUAGES and DEFAULT_LANGUAGE options (without the leading colon :) - that would be the only thing that comes to my mind spontaneously....

Since the game does not give any feedback (i.e. crashing the game) anymore on missing files, these kind of errors are not so obvious anymore....

If it's not that, then... well might be another bug, though I can't really tell where that might be....


I'll check some solutions and let you know. Thanks for the help! :D
 

DerTraveler

Veteran
Veteran
Joined
Jun 19, 2013
Messages
48
Reaction score
38
First Language
German
Primarily Uses
Version 1.4.2, a bug fix, was released. It can be found here (and in the original post)

Changelog
  • Bugfix:
    Fixed a bug that encrypted language data would not be loaded if the corresponding rvtext does not exist at the same time (which defeated the purpose of encrypting though you still could put an empty rvtext file to make it work without exposing your text.


Thanks for Rachel, who pointed this out to me.
 

Ebanyle

açspasl~d~dfflass
Veteran
Joined
Sep 2, 2016
Messages
330
Reaction score
187
First Language
Portuguese
Primarily Uses
RMVXA
Hi there! You script is really great and covers everything! But I think there might be a issue. I'm using Yanfly System Options and the thing is that the variable can have a lot of strings. How do I make it work?

Example:
Code:
   # :switch    => [Switch, "Name", "Off Text", "On Text",
   #                "Help Window Description"
   #               ],
 
Last edited:

Bukk

Villager
Member
Joined
Jun 20, 2014
Messages
8
Reaction score
1
Primarily Uses
Hello,
first of all, this script is awesome! You've done a really good job.
But I'm having compatibility issues with Galv's menu themes engine. For unknown reasons, it won't translate menu items (like inventory, equip, save, exit).
I've moved all string into Vocab constants and redirected everything from galv's script into Vocab::XX. I was hoping that I can translate only vocab and everything will be fine. But it doesn't work. I even tried putting constants intro GMENU module and point to it via your script like "<<constants/GMENU/InventoryMenu>>" but it still uses the default string from the script page. Any ideas what should I do to make it work? It doesn't take string from the files.
Galv's Script: https://galvs-scripts.com/galvs-menu-themes-engine/

Edit: Found the problem. Galv's and Yanfly modules will load vocab data before language redefinitions. So it will use old values instead of new ones. Problem is similar to post above from Ebanyle. I don't know how to fix it :/
 
Last edited:

Cukin

Warper
Member
Joined
Dec 14, 2019
Messages
1
Reaction score
0
First Language
Spanish (es-AR)
Primarily Uses
RMVXA
Hallo DerTraveler!

I know this whole thread is quite old though I noticed the last edition on the main post was not made long ago, so...

I'm quite new to RPG Maker's Plugins world and I have a lot to learn yet. It seems like your plugin is simple though powerful enough for what I need.

I've been trying to figure out where are the Dialogues<lang>.rvtext files located or, if I have to create them, where to locate them. The demo doesn't seem to be available anymore, and I've thoroughly the Core Script header but I couldn't find an answer.

I'd appreciate any help. Have a great day ^^

~Cukin

EDIT: Thanks, I figured it out! Thanks for this awesome plugin!
 
Last edited:

ekhartpl

Veteran
Veteran
Joined
Apr 18, 2015
Messages
67
Reaction score
34
First Language
Polish
Primarily Uses
RMVXA
@Ebanyle, @Bukk, I've had similar problem just now, trying to find a way to translate some Yanfly stuff, and I might have found a way to do it. Tested it with Yanfly's status menu, on few words.

Just for the sake of testing, I wanted to switch words in this section:

Ruby:
PROPERTIES_COLUMN1 =[
      [:hit, "Accuracy"],
      [:eva, "Evasion"],
      [:cri, "Critical"],
      [:cev, "Critical Dodge"],
      [:mev, "Magic Dodge"],
      [:mrf, "Reflect"],
      [:cnt, "Counter Rate"],
    ] # Do not remove this.
Its' module call would be YEA::STATUS::PROPERTIES_COLUMN1

So in my DatabaseText, I added those bits:
Code:
<<variables/YEA::STATUS::PROPERTIES_COLUMN1[0][1]>>
Celnosc

<<variables/YEA::STATUS::PROPERTIES_COLUMN1[1][1]>>
Unik

<<variables/YEA::STATUS::PROPERTIES_COLUMN1[2][1]>>
Kryt

<<variables/YEA::STATUS::PROPERTIES_COLUMN1[3][1]>>
Kryt unik
and (as seen on attached screenshot) they did work - values in script are as I gave in an example, while game shows values from Database file. Basically you need to refer exactly to the string you're changing, so for @Ebanyle problem, it might look like that:

Code:
<<variables/YEA::SYSTEM::CUSTOM_SWITCHES[:switch][1]>>
This is a new switch
<<variables/YEA::SYSTEM::CUSTOM_SWITCHES[:switch][2]>>
It's now off
<<variables/YEA::SYSTEM::CUSTOM_SWITCHES[:switch][3]>>
It's now on!
<<variables/YEA::SYSTEM::CUSTOM_SWITCHES[:switch][4]>>
A description for window
At least I think that's how it should work :)
 

Attachments

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

Latest Threads

Latest Posts

Latest Profile Posts

Apparently, it's illegal to be drunk on licensed premises: pubs, etc. It's illegal for keepers of public houses to permit drunkenness and disorderly conduct. lol.
Pillow Hero - A 16-bit arcade styled puzzle game, update 0.5 is live now on Itch.io! --> https://bifrost09.itch.io/pillow-hero
Would you pay monthly for your pc if you'd get "free" upgrades every 2 years?
well, I definitely have a type, cute redheads with medusa piercings, met and hit it off with two of them in the last 72 hours, what does it mean lol?
Damian Floyd increased the grand prize for the Driftwood Jam to a $75 steam GC!!! Thank you Damion! :)

Forum statistics

Threads
94,421
Messages
920,834
Members
124,220
Latest member
musikman
Top