Language File System

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by DerTraveler, Sep 10, 2013.

  1. DerTraveler

    DerTraveler Veteran Veteran

    Messages:
    48
    Likes Received:
    38
    Location:
    Osaka, Japan
    First Language:
    German
    Language File System v1.4.2
    by DerTraveler


    Introduction

    This script enables you to load any of the game's text content from external files. This includes messages, choices, and any database text. With this script it is much easier to manage your in-game text content, since all of your dialogue is at one central place instead of being spread over hundreds and thousands of events.

    Another major use is the ability to translate your game, without the need to create a new project for each language and edit every field in the database. You don't have to make sure that you miss any single of your messages anymore.


    Content Extraction

    With the newest version it is now possible to extract ALL of your in-game text content into language files with a single script call. At the same time converted copies of all Map-Files and Common Events in your project will be created in a subfolder. These copies have all their message windows, choices, name changes and scrolling text replaced with the corresponding script calls or message codes.

    Especially if you already have a big project this will save you a whole lot of time! Or perhaps you want to finish your project by the usual way in RPG Maker before translating it. Or you want to translate an existing RPG Maker VX Ace game to make it available to a wider audience ;) . This is now possible, and all that's left to you is the hard translation work ;)

    Other Features
    • Text Viewer Add-on allows in-game preview of your created messages
    • Converting the files into a RPG Maker style data file in the Data-Folder. Thus when encrypting your Content into an archive it will also be included
    • Language-dependent constants and variables
    • Language-dependent pictures
    Example File Contents

    Short example of a Dialogues.rvtext file
    <<Introduction>>
    <<scroll_speed: 4>>
    Once upon a time there was a kingdom which wasrules by a wise king...Blablablablabla...
    <<Soldier Greeting>>
    <<face: People4, 6>>
    \C[6]Soldier:\C[0]
    Greetings! Don't make any trouble!
    <<Find Dragonball>>
    <<position: middle>>
    Congratulations!You have found one of the seven dragonballs!
    <<Evil Sorcerer Speech>>
    <<position: middle>>
    <<background: transparent>>
    So you finally made it into my lair?
    Prepare to die a slow and horrible death!
    HAHAHAHAHAHAHAHAHA!

    Short example of a DatabaseText.rvtext file

    <<actors/3/name>>
    Bob
    <<states/11/message4>>
    is no longer confused. (The first character is a space)
    <<class/1/learnings:3>>
    <special learning notetag: some-property>
    <<constants/Vocab/ShopBuy>>
    Buy some stuff

    See script header for more details!


    How to Use

    Paste it anywhere in the Materials section.

    Please read the script header of the Core Script carefully!

    Demo
    Download here (Still using version 1.0, sorry... will be updated someday)

    Script

    Core script can be found here.

    TextViewer addon can be found in here.

    Credit and Thanks
    - DerTraveler

    Author's Notes
    Free to use in any non-commercial project. For use in commercial projects (be it new projects or translation of existing commercial projects) please mail me.
     
    Last edited: Feb 5, 2019
    #1
    Ebanyle, Tokumei No, Ally and 12 others like this.
  2. DerTraveler

    DerTraveler Veteran Veteran

    Messages:
    48
    Likes Received:
    38
    Location:
    Osaka, Japan
    First Language:
    German
    Updated:

    • Rewriting of some logic to increase compatibility
    • Last used language is now saved in Game.ini instead of a separate file
    • Bugfix: USE_DIALOGUE_FILES and USE_DATABASE_FILES now also work when setting a new language
    • Bugfix: Nonexisting text IDs in choice options are now ignored (just as with normal messages)
    • Bugfix: Accessing an base item that isn't included in the database text file now doesn't result in a crash anymore.
    • Bugfix: Included some Exception handling for erroneous database text file IDs
     
    #2
  3. Ewaldar

    Ewaldar Villager Member

    Messages:
    20
    Likes Received:
    1
    First Language:
    French
    Hi,

    I come from the french communauty, and I was asking about your script. I try to understand how to use it, but I failed...

    I have a current project, and I'd like to have three languages (french, german and English).

    The thing is, I've already done a lot, and I'm searching for a way to extract all what I have in order to translate them, but I can't find it. And if I have to find each dialogue, each page of each event of each map to translate, I'll never be done with that.

    Thanks in advance,

    Jonathan
     
    #3
  4. DerTraveler

    DerTraveler Veteran Veteran

    Messages:
    48
    Likes Received:
    38
    Location:
    Osaka, Japan
    First Language:
    German
    Hi Jonathan, welcome on the Board :)

    did you try to look into the demo that I uploaded? If you look into the events there and into the files "DatabaseTextGerman.rvtxt", "DatabaseTextEnglish.rvtxt", "DialoguesGerman.rvtxt" and "DialoguesEnglish.rvtext" you should get a general idea of how it works. But if you still have questions, you can write me a personal message here and we can make an appointment so I can explain it to you.

    And about your issue with already having a lot of content. That's true, its a really big effort to convert an big existing project to use my script. But thank you for the idea :) It should be easy to extend the script so it extracts ALL of your content into files and change all your maps so it automatically uses the references to these files :) .

    There is also a Text Debug Window in production, where you can scroll through and preview all of your existing texts in-game, so you don't have to create a dummy event to preview all of your text.

    Just have a little bit of patience. ;)
     
    #4
  5. Marcio

    Marcio Roadrunner for Lighnting and Strike Detonator Veteran

    Messages:
    63
    Likes Received:
    2
    First Language:
    German
    Maybe this is the Solution for you? http://forums.rpgmakerweb.com/index.php?/topic/17444-extract-events-to-text-file/

    @DerTraveler Bist du Deutscher? ^^

    Nice script, it work well but I find it a little confusing using all the <<>> etc...
     
    #5
  6. Ewaldar

    Ewaldar Villager Member

    Messages:
    20
    Likes Received:
    1
    First Language:
    French
    Thanks :p

    I dl the demo, and when I say the content, I was a little bit affraid ;) But, I assume that with the explanations, I will be alright (I hope). I can wait,

    I have time, I worked on my project for 2 years, now, so !

    Marcio = I've checked this, maybe seems to work, I'll test, but the thing is, it's only to extract, and not to compile or something like this, si, even if

    I extract all the content and I translate, I won't be able to use it into my game, will I ?

    Ok, so, I'll be waiting, because, I think that I have more than 200 Word pages just for the dialogues, so, it not gonna be "possible" not using a tool to extract

    or something like this

    Otherwise, I can "just" translate the dialogues, and not the database, or make three projects, but I won't be able to handle the amount of work ;)

    Thanks for the answer, I test a little bit more, and I come back,

    Jonathan
     
    #6
  7. DerTraveler

    DerTraveler Veteran Veteran

    Messages:
    48
    Likes Received:
    38
    Location:
    Osaka, Japan
    First Language:
    German
    @Marcio: Jo... wie meine Muttersprache unten links vermuten lassen würde ;)

    Well about the <<...>>...

    I needed something unique that would never come in any kind of game message, because I didn't want to come up with complicated regular expressions ;)

    Single <> wouldn't work because the script also supports multilanguage notes and the notetag format that became accepted uses <>.

    [] was not possible either because they are used in message codes.

    But I think once you get used to it doesn't really matter which kind of markup you use.

    @Ewaldar:

    Don't worry. One more day or so and I should have an feature that extracts ALL of your event messages and choices into a Dialogue file and replaces them in your maps with corresponding message codes and/or script calls. And it also extracts your whole database into a DatabaseTextFile.

    This won't affect your original Map and Event data in your project but will create copies of all map files in another folder.

    Then you can copy your project (better don't try it with your original project :D I'm not sure yet if there will be unwanted side effects) and replace all your map files with the newly created ones. Then load this project in RPG Maker and hope it doesn't blow up ;) - No worries I will of course test it beforehand.
     
    Last edited by a moderator: Sep 25, 2013
    #7
  8. Marcio

    Marcio Roadrunner for Lighnting and Strike Detonator Veteran

    Messages:
    63
    Likes Received:
    2
    First Language:
    German
    If you can make this happen it would be awesome!

    I use another external File System but I have allready a lot of text going on in "hard coding" so if this works, I can get every line to correspond with the script! :D

    Mach es möglich! :D
     
    #8
  9. Ewaldar

    Ewaldar Villager Member

    Messages:
    20
    Likes Received:
    1
    First Language:
    French
    +1

    And the script I tested didn't work anyway, so ;)
     
    #9
  10. DerTraveler

    DerTraveler Veteran Veteran

    Messages:
    48
    Likes Received:
    38
    Location:
    Osaka, Japan
    First Language:
    German
    Two major updates with v1.2:

    Content Extraction

    With the newest version it is now possible to extract ALL of your in-game text content into language files with a single script call. At the same time converted copies of all Map-Files and Common Events in your project will be created in a subfolder. These copies have all their message windows, choices, name changes and scrolling text replaced with the corresponding script calls or message codes.

     

    Especially if you already have a big project this will save you a whole lot of time! Or perhaps you want to finish your project by the usual way in RPG Maker before translating it. Or you want to translate an existing RPG Maker VX Ace game to make it available to a wider audience  ;) . This is now possible, and all that's left to you is the hard translation work ;)

     

    Text Viewer

    I also provided an add-on script, which lets you preview all of your predefined messages.
     
    #10
  11. Ewaldar

    Ewaldar Villager Member

    Messages:
    20
    Likes Received:
    1
    First Language:
    French
    Hi,

    Thank you sincerely, I'll test all this awesome script and I give you my mind !
     
    #11
  12. flipsomel

    flipsomel Villager Member

    Messages:
    10
    Likes Received:
    3
    Location:
    Lisbon
    First Language:
    Portuguese
    This is awesome!

    Tip of the hat for you sir.
     
    #12
  13. Marcio

    Marcio Roadrunner for Lighnting and Strike Detonator Veteran

    Messages:
    63
    Likes Received:
    2
    First Language:
    German
    Hi there, I have tried using your new script and the script call show_dialogue(Text ID) don't function or I'm too stupid to use it corectly.

    I tried show_dialogue(translator) and I have a scriptcall error.

    If I use it in a show text event it runs like a charm...
     
    #13
  14. DerTraveler

    DerTraveler Veteran Veteran

    Messages:
    48
    Likes Received:
    38
    Location:
    Osaka, Japan
    First Language:
    German
    Ah sorry...

    You have to put the Text ID into quotation marks, if you use the show_dialogue command. For me as a scripter that was probably too obvious to write it into the documentation :D

    I will also soon update the demo with the new features...
     
    #14
  15. Marcio

    Marcio Roadrunner for Lighnting and Strike Detonator Veteran

    Messages:
    63
    Likes Received:
    2
    First Language:
    German
    Oh my bad... I knew this and didn't realise it. *lol* Okay, this work! :)

    Another "issue": Is there a solution for defining global text codes?

    I use Yanflys Equipmenu where you can "make" new Equipslots like "Earring" or "Back" for Earrings and sort of Cloaks.

    I don't know who to translate those Items. I formaly used another script in which you could just use global text codes anywhere (Victor Script) and define it in the external textscript as

    [Key] Back

    Cloak

    In the Script I just had to type

    "\\t[back]"

    Is this possile with your script?
     
    #15
  16. Ewaldar

    Ewaldar Villager Member

    Messages:
    20
    Likes Received:
    1
    First Language:
    French
    Hi,

    I'm back :p

    I've been using this script to understand it, and I need some extra explanations.

    With the newest version, it's not possible to a have a face in the message, but with the oldest, yes !

    I hope that I don't have to put all my custom resources in the RTP folder, because, that'd mean, the game'd have a very large size !

    And, when I write a dialogue, and I test the game, the files with the dialogues don't update, so I have to manually add the commands in french and English, so It's faster to create 2 projects.

    Thanks for the answer, and by the way, I'd like to sell my game if the people like it, and I read that I have to contact you ;)

    Jonathan
     
    #16
  17. DerTraveler

    DerTraveler Veteran Veteran

    Messages:
    48
    Likes Received:
    38
    Location:
    Osaka, Japan
    First Language:
    German
    @Marcio: As already mentioned in our private message conversation, I'm working on a feature that allows to set any class/module variable or constant via Language File. Since I am quite busy at the moment, I can't guarantee when I will add that feature.

    @Ewaldar: I will write you a private message to give you more explanations. But now already some information:

    Faces should work fine with new version, and you don't have to put any resource anywhere to make the script work. If it is an RTP face, it should also be fine.

    About dialogue. You either have to write every new dialogue into the language file or you have to finish your game manually and then use the extraction mechanism to extract ALL of your dialogue at once and then translate it.

    That is of course some work, but I think it will still be more work to create two projects. On the one hand, you could easiliy miss one event or one page of an event when translating in RPG Maker and never realize if it is somewhere in the middle of the game. On the other hand, if you make subsequent changes to your game, you have to start over translating the changed events and/or maps again, which would not happen with the script, since you don't have two (or more) projects to manage.
     
    #17
  18. Ewaldar

    Ewaldar Villager Member

    Messages:
    20
    Likes Received:
    1
    First Language:
    French
    My faces aren't RTP, they are made by the Generator or custom and they are alone (1 picture/face), and I write index 0, because it's the only one, but it doesn't work...

    I'll do the second option, I write my game manually and I extract, but the thing is, I can't find the extractor tool, I read 10 times all the script, but I miss it, I suppose ;)
     
    #18
  19. Marcio

    Marcio Roadrunner for Lighnting and Strike Detonator Veteran

    Messages:
    63
    Likes Received:
    2
    First Language:
    German
    I think you didn't read the whole documentation.

    # 3.4. Extracting all your text content

    # If you already have a lot of in-game text content, this script allows you to

    # extract ALL of this content (all messages, choices, scrolling texts, name

    # changes in all of your map and common events as well as every text field in

    # in the database) with one script call.

    #

    #   LanguageFileSystem::extract_all_data

    Use this to extract everything. :)
     
    #19
  20. Ewaldar

    Ewaldar Villager Member

    Messages:
    20
    Likes Received:
    1
    First Language:
    French
    ...

    ...

    ...

    I became red :p

    Thanks guy, I'll test this

    EDIT : Wouah it works !! Now, I understand the usage of the script, because all my database is extracted too, that's awesome !
     
    Last edited by a moderator: Oct 18, 2013
    #20

Share This Page