[Project Civ. 1] translation to Spanish

rhaul

Warlord
Joined
Mar 25, 2010
Messages
221
Location
Madrid

I open this thread in order to have the entire project centralized here.

I'm not entirely sure if this Spanish translation project would be of interest to an English-speaking audience, but I noticed that when writing a post to Darkpanda about the patch, there was an increase in downloads (before there was only one download that I did precisely to test), and also so I have my doubts and requests to help more centralized in this thread

https://forums.civfanatics.com/resources/civ-esp-spanish-translation-traducción-al-español.29768/

I also hope that this project serves as an inspiration for other users to translate this great game into other languages, since unfortunately this game only had official translations into English, French and German.
That said, this translation is done with a hex editor and thanks to this forum you have all the information and tools you need to do the translation in other languages.

Font and miscellaneous editor:
- https://forums.civfanatics.com/threads/jcived-a-toolbox-for-civilization.486470/
 
Last edited:

rhaul

Warlord
Joined
Mar 25, 2010
Messages
221
Location
Madrid
@darkpanda Another request for help...

To access through the keyboard you must use "alt" + the first letter (white color), but for the translation the initial letter is different in the words marked with a circle.



Could those initial keyboard access letters be edited?
 
Last edited:

tupi

Warlord
Joined
Jun 25, 2011
Messages
214
Location
Russia
I know where the game checks these.
First, here are some key values (so you will know how to replace them to a letter you want). Little-endian order for convenience, so it's just how it is in exe in hex form:

0010 alt+Q (by default: quit the game dialog)
0011 alt+W ("world" menu by default)
0012 alt+E
0013 alt+R (by default: randomize leaders)
0014 alt+T
0015 alt+Y
0016 alt+U
0017 alt+I
0018 alt+O ("orders" menu by default)
0019 alt+P
...
001E alt+A ("advisors" menu by default)
001F alt+S
0020 alt+D
0021 alt+F
0022 alt+G ("game" menu by default)
0023 alt+H (by default: "general princilpes" help messages on chieftain difficulty)
0024 alt+J
0025 alt+K
0026 alt+L
...
002C alt+Z
002D alt+X
002E alt+C ("civilopedia" menu by default)
002F alt+V (by default: toggle sound on/off)
0030 alt+B
0031 alt+N
0032 alt+M (by default: fix the mouse driver?)

You should not use the same value for two different purposes.

So, if I guess correct, you should use alt+J (0024) for "Juego" and alt+M (0032) for "Mundo".
 
Last edited:

tupi

Warlord
Joined
Jun 25, 2011
Messages
214
Location
Russia
in version .05 en:

3d 00 23 75 03 e9 d6 fd - in bold: alt+H to show help messages on chieftain difficulty. Address: 0x7AD9

3d 00 10 75 03 e9 8c fd - in bold: alt+Q to quit the game (alternatively, ESC key). Address: 0x7B3E

3d 00 11 75 03 e9 20 ff - in bold are the keys for "world menu" shortcut. Address: 0x7B6E.
3d 00 13 75 03 e9 83 fc - in bold are the keys to randomize leaders. Address: 0x7B76 (next to previous string).
3d 00 18 75 03 e9 e6 fe - in bold are the keys to show "orders" menu. Address: 0x7B7E (next to previous string).
3d 00 1e 75 03 e9 f3 fe - "advisers" menu. Address: 0x7B86 (next to previous string)
3d 00 22 75 03 e9 c1 fe - "game" menu. Address: 0x7B8E (next)

3d 00 32 75 03 e9 17 fa - fix mouse driver (alt+M). Address: 0x7BC3

3d 00 2e 75 03 e9 f0 fe - "civilopedia" menu. Address: 0x7BB3.
3d 00 2f 75 03 e9 a7 fc - on/off sound (alt+V). Address: 0x7BBB (next to previous).

EDIT: Because of how the code and if/elses are organised, some of the keys will not work as replacement.
 
Last edited:

rhaul

Warlord
Joined
Mar 25, 2010
Messages
221
Location
Madrid
Thanks for the help @tupi

Indeed, I have been able to change the shortcuts as you have written, but I have a small problem.

World in Spanish is "Mundo", so when trying to use the "M" it doesn't work, I was able to find out that the "M" was already in use, but when I change it back to another letter to release the "M" it still doesn't work .
 

tupi

Warlord
Joined
Jun 25, 2011
Messages
214
Location
Russia
Yes, you are right, alt+M is not working for some reason. Will look into this. alt+N and alt+B are not working too. Probably there's range check condition somewhere before? Should check and fix this.
 
Last edited:

tupi

Warlord
Joined
Jun 25, 2011
Messages
214
Location
Russia
Sorry I deleted my previous comment, I just messed up decimal and hex.

Alt+M is actually used in Civilization to fix mouse driver or something. I forgot about this. But still strange why alt+B and alt+N are not working too. Still looking into Alt+M fix.

EDIT: according to how organized if/else conditions in the code, it will be not so easy to fix.
Maybe the only solution is to somehow change "mouse driver fix" code to "call the world menu" code...
 
Last edited:

tupi

Warlord
Joined
Jun 25, 2011
Messages
214
Location
Russia
To change "mouse driver fix" call to "world menu" call for alt+M pressing:

3d 00 32 75 03 e9 17 fa (address: 0x7BC3)
change it to
3d 00 32 75 03 e9 cb fe

I tested, it werks. Pretty ugly solution, but program flow should be ok. But now we have both alt+W and alt+M to show "World" menu and strange "mouse driver fix" no longer works (did anybody really use this?) The only thing left to do is to delete original alt+W call. For example, you can change alt+W to alt+M here, so it will no longer work.
 
Last edited:

tupi

Warlord
Joined
Jun 25, 2011
Messages
214
Location
Russia
I didn't have .04 so I patched .03 to .04 with update.exe (hope result is correct).
But new problem arose: Ghidra does not like OpenJDK it seems, because it's not possible to open new .exe. Albeit all other functionality had worked and I didn't run into any problems before... Well, I had to re-install old jdk 11. So finally I have .04 civ.exe dissected. I hope both mine and yours .04 are actually identical. CRC32 hash of my file is 40D34607. Now I should find this Alt+M place in this version and then I can create a fix.
 

rhaul

Warlord
Joined
Mar 25, 2010
Messages
221
Location
Madrid
Yes, it should be enough, after all it is the same version as the translation patch
(I imagine you don't use my Spanish translated version because you don't understand the language.)
 

tupi

Warlord
Joined
Jun 25, 2011
Messages
214
Location
Russia
As far as I understand, I should have the original game files to use your translation patch. So I still should get v .04 somehow before. Or does your patch already contain full exe? Anyway.

Here is solution for version .04 en:

go to 0x7465
you will find this string:
3d 00 32 75 03 e9 50 fb
change it to
3d 00 32 75 03 e9 58 ff
If your version has this string and its address is same as stated above, most likely our versions are identical and this fix will work.

EDIT: sorry, typo!! should be 58 ff in edited string, not 50 ff.
 
Last edited:

rhaul

Warlord
Joined
Mar 25, 2010
Messages
221
Location
Madrid
Yes, it has the complete exe, although in the next version of the patch I will add some things that are theoretically necessary beforehand.

Have you tried if it works? I don't know if I'm doing something wrong or if it doesn't work.

I take advantage of the fact that we now have the same version to ask you about the "world menu" string 3d 00 11 75 03 e9 20 ff, I can't find it, but I guess it's 3d 00 11 74 A1 but are missing bytes.

There is another chain that can create a conflict that may be referring to the alt+M call: 3d 00 32 75 03 e9 50 fb
 

tupi

Warlord
Joined
Jun 25, 2011
Messages
214
Location
Russia
I applied your patch and I should say that solution in my previous post works! Your exe contains the same string at the same position. No difference between our versions. Well, there's was a typo here, I quickly fixed it but maybe you tried before that. New offset shoud be 58 FF. Expected result: you press Alt+M, "Mondo" menu appears.
 

rhaul

Warlord
Joined
Mar 25, 2010
Messages
221
Location
Madrid
ajaajjajj
I had read 5B and not 58. I'm clumsy.

I am now going to change "Game" to "P"

Edit: Thanks @tupi all good without problems, In the end I put "Partida" instead of "Juego", just like in civilization II.


 
Last edited:

tupi

Warlord
Joined
Jun 25, 2011
Messages
214
Location
Russia
Yep, just ignore the last 2 bytes from my post here
(they are offset for relative jump back or forward and their values are different in various versions)
with them, in your version this part looks like this:
3d 00 22 75 03 e9 59 FF (address: 0x7436)
 

rhaul

Warlord
Joined
Mar 25, 2010
Messages
221
Location
Madrid
Yep, just ignore the last 2 bytes from my post here
(they are offset for relative jump back or forward and their values are different in various versions)
with them, in your version this part looks like this:
3d 00 22 75 03 e9 59 FF

Yeah I know, in your first post I knew the string was different because of my version, but I shortened the string until the hex editor's browser found the match. It's what I always do when darkpanda writes me the hexadecimal strings

I'm going to have to rewrite the translation credits for you XD
 

rhaul

Warlord
Joined
Mar 25, 2010
Messages
221
Location
Madrid
Changing the subject, I have a special interest in what alt+R (by default: randomize leaders) does. Leaders are exchanged in diplomatic talks and can we see Napoleon as Chinese?
 

tupi

Warlord
Joined
Jun 25, 2011
Messages
214
Location
Russia
AI leaders have 3 traits: aggressiveness (aggressive/normal/peaceful), expansionism (expansionist/normal/perfectionist) and militarism (militaristic/normal/civilized). For example, Gandhi is [-1,-1,0]: peaceful, pefrectionist and neither militaristic nor civilized. When you press alt+R, all AI leaders get some random traits. It can be fun as it make you game more random, but I prefer to know what to expect from them. But main problem that new traits are not saved anywhere when you save your game so when you load your game AI traits are restored to normal. To save new random traits you should either finish your game in one sitting or use some external save functionality (save full game state in emulator, for example). BTW, your own civ traits also has some cosmetic effects: city production advices and AUTO and advice about what to research next (exists only on Chieftain).
 
Last edited:
Top Bottom