Author |
Topic: Translation Game |
delutto |
General Member Since: May 31, 2011 Posts: 3 Last: Jul 21, 2011 [view latest posts] |
|
|
|
delutto |
General Member Since: May 31, 2011 Posts: 3 Last: Jul 21, 2011 [view latest posts] |
|
|
Category: CoDWW General Posted: Wednesday, Jun. 8, 2011 05:05 pm |
|
Anyone? |
|
|
|
Sevenz |
|
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
|
delutto |
General Member Since: May 31, 2011 Posts: 3 Last: Jul 21, 2011 [view latest posts] |
|
|
Category: CoDWW General Posted: Thursday, Jul. 21, 2011 05:49 am |
|
Sevenz.
This is not a problem, I'm willing to try.
But as you did to translate the texts?
Awaiting your reply eagerly. |
|
|
|
Sevenz |
|
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
Category: CoDWW General Posted: Thursday, Jul. 21, 2011 06:59 am |
|
attachment: image(174.5Kb) |
I'll explain using the CoD4 mod tools, as I don't have WaW for testing. but CoD4 is very similar.
- almost all texts are in raw\english\localizedstrings\
- Example: ac130.str
Code: REFERENCE HINT_CYCLE_WEAPONS
LANG_ENGLISH "Press ^3[{weapnext}]^7 to cycle through weapons."
you can change the text in the quotes, like
LANG_ENGLISH "Drücke ^3[{weapnext}]^7 um zwischen den Waffen zu wechseln."
- After translation, you need to compile the localizations.
- I created a new folder inside CoD4\mods\ and called it translation. In this folder i got a batch script to compile, a zone file to specify the files to get compiled and another batch script to quickly run CoD with my mod.
- Compile script: makeMod.bat
Code: @echo off
del mod.ff
copy /Y mod.csv ..\..\zone_source
cd ..\..\bin
rem -compress
linker_pc.exe -language english -compress -cleanup mod
cd ..\mods\translation\
copy ..\..\zone\english\mod.ff
pause
- zone file: mod.csv
Code: ignore,code_post_gfx
ignore,common
localize,killhouse
localize,menu
localize,messagebox
localize,jeepride
localize,introscreen
localize,game
localize,exe
localize,embassy
localize,marksman
localize,launchfacility_a
localize,launchfacility_b
localize,icbm
localize,hunted
localize,rallypoint
localize,rank
localize,rivertown
localize,sandstorm
localize,school
localize,scoutsniper
localize,null
localize,objectives
localize,village_defend
localize,village_assault
localize,vidsubtitles
localize,starts
localize,armada
- localize is the keyword to specify a *.str file, after a comma goes the str filename (as you see, without file extension and path). I added a bunch of the stock localizations above, 'cause i wanted to test how many assets are possible.
- run script: runModSP.bat
Code: @echo off
cd ..\..\
iw3sp.exe +set developer 1 +set fs_game mods/translation
- Double-click the makeMod.bat and see the compiler working. When done, a file called mod.ff should be in your mod folder.
- Double-click runModSP.bat to launch the game. With the above zone file, CoD crashes immediately (see attached picture), as there are too many localize-assets - max. is 6144. Note, that i did not add all SP *.str files yet but it's already not working.
|
|
|
|
Sevenz |
|
General Member Since: Apr 24, 2006 Posts: 2390 Last: May 10, 2013 [view latest posts] |
|
|
Category: CoDWW General Posted: Thursday, Jul. 21, 2011 07:45 am |
|
attachment: application(38.2Kb) |
attached my test files as mentioned in my above description.
i just tried something different: i decompressed the common.ff, which seems to contain a lot of localization assets
then i edited one asset using a hex editor. i used exactly the same number of letters; generally, it should be possible to change the size, as long as you keep the structure intact and change sizes only within localize asset blocks. So the overall size and the position of other asset types in fastfile need to stay.
i re-compressed the data using zlib, added the original 12 header bytes and replaced the stock common.ff with it.
game loads without problems and changed text shows up ingame!
downsides: you need to overwrite the stock fastfiles. for SP it's ok, for MP not.
SP: You would have to edit many fastfiles. If you're lucky, then the translations are spread over a few only, but there might be assets in each fastfile. In the worst case, you'd have to provide 1.55 GB changed fastfiles.
MP: MP should have way less localize assets, so it might be possible to use a mod.ff instead of hex-editing the existing files (depends on the number of assets, whether you hit the limit or not) |
|
|
|