Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 16

Author Topic: Dwarf Fortress localization patch  (Read 47120 times)

Jaso11111

  • Bay Watcher
  • The Emperor protects...
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #30 on: August 27, 2013, 12:50:20 pm »

So where can i download this? I wish too use it for my own mod (with the author's permission of course).
Logged

Jaso11111

  • Bay Watcher
  • The Emperor protects...
    • View Profile
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf Fortress localization patch
« Reply #33 on: August 30, 2013, 12:57:57 am »

Say, what happens to this when DF is updated? I assume the utility has to be changed, at the very least the string-dump...

Just asking, because I cant really update my mod without this. ^^
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #34 on: August 30, 2013, 01:46:41 am »

Yes, both. You'll also have to wait for DFHack :D

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf Fortress localization patch
« Reply #35 on: August 30, 2013, 01:51:16 am »

And Therapist, and isoworld, embark everywhere, nano fortress, stonesense, quickfort, and the updates for the updates because Toady release 3 bug-fix versions in the meantime. ^^
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #36 on: August 30, 2013, 02:20:19 am »

If it helps, I'm pretty sure DFHack has Embark Everywhere now. I think maybe nano, too? It has a Quickfort clone, as well. Stonesense is also included in DFHack. There's a therapist clone in it, too.

Hehe, fun.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf Fortress localization patch
« Reply #37 on: August 30, 2013, 02:48:45 am »

Ui, if nanofortress and embark everywhere could be run automatically when entering the site-selector (together with a opo-up asking about number of dwarves and embark points) that would be fancy indeed. :)

The Quickfort and Therapist in dfhack is lacking in user-interface though, so the original it has to be.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Bitbucket.org
Re: Dwarf Fortress localization patch
« Reply #38 on: September 13, 2013, 08:17:11 am »

Say, what happens to this when DF is updated? I assume the utility has to be changed, at the very least the string-dump...

Just asking, because I cant really update my mod without this. ^^
The utility will work as is without any modifications, assuming that DF will be compiled with the same compiler as previously. Of course the string-dump has to be updated.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf Fortress localization patch
« Reply #39 on: September 13, 2013, 08:32:20 am »

Thanks for the answer. I assume that the dfhack crew and other smart people will be able to find the string-dump. One way or another, I will write you a PM if an update happens... not that there wasnt one for over a year. ^^
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

insolor

  • Bay Watcher
    • View Profile
    • My projects on the Bitbucket.org
Re: Dwarf Fortress localization patch
« Reply #40 on: September 14, 2013, 08:53:04 am »

Another tool for i18n and modding:
https://bitbucket.org/dfint/changetextpy/downloads

In short: Download it and unpack into DF folder, then run install_fake_ttf.bat.
This will rename SDL_ttf.dll to Real_ttf.dll and newly unpacked Fake_ttf.dll to SDL_ttf.dll.
Run the bat-file again and the names will be restored.

What does it do:

When DF wants to render some text (assuming that [TRUETYPE:YES]), it calls a couple of functions from SDL_ttf.dll. The SDL_ttf.dll replaced with our Fake_ttf.dll at first passes the text it get from DF to the ChangeText.dll, that uses a Python script in turn to translate the text or change it in some way.

An example of a script and the result see below


Update 1:
Added output of the Python error message when the changetext.py module import failed (eg. "SyntaxError: invalid syntax" or "ImportError: No module named 'changetext'")
« Last Edit: September 19, 2013, 07:30:19 am by insolor »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf Fortress localization patch
« Reply #41 on: September 14, 2013, 11:43:18 am »

So this new utility does effectively the same as the old one, but can also translate the menu-text, which was slightly encrypted before...

Does it lead to crashes, like the localisation patcher, if you change the length of certain strings? I had some mean crashes after I changed death-messages... my versions were too long it seems.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

scamtank

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #42 on: September 14, 2013, 12:36:06 pm »

You don't give this thing enough credit, Meph.

Spoiler (click to show/hide)

You can just point to a piece of text on your screen and say "This needs to be that instead." It also may be a smidge more safer than prodding around in the executable, since you're just taking a magic marker to the finished package instead of manipulating the starting conditions to make it come out right.
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress localization patch
« Reply #43 on: September 14, 2013, 01:10:27 pm »

Oh and @insolor:

I can't seem to add new lines to the "phrases" part. I can replace the contents of the ready ones with other stuff and everything works just fine, but having one more line than default inside phrases{...} makes it spit up an error at startup and not change anything.

Do you need to declare the amount of altered strings somewhere or am I offending Python in some way?
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dwarf Fortress localization patch
« Reply #44 on: September 14, 2013, 02:29:38 pm »

Well yes, but how does that differ from translating the string dump? I know that you can do it on-the-fly, but I mean for the average player of the mod...

btw, is this your way of saying that seperate should be separate? :P
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::
Pages: 1 2 [3] 4 5 ... 16