Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 19/4/17 19:28

souvlaki
Member
From: mother Russia
Registered: 19/4/17

Mac version localization

Hello

I've got english version of Oni 1.21 up and running on macOS 10.12 (had to add a -novideos option though)

I also happen to have russian Windows release of Oni, and I absolutely love localization Бука has done. I also highly doubt they did a Mac release.

Is there any way of localizing the Mac version? Copying-and-pasting the "GameDataFolder" from ru release does not work.

Offline

#2 19/4/17 22:20

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Mac version localization

Hi there.  Yes, copying over the GDF from the Buka release won't work because Windows Oni data is not compatible with Mac Oni.  If you are technically-inclined, see my post here about converting the Windows data to Mac data: http://oni.bungie.org/forum/viewtopic.p … 530#p51530


byproducts are fine, but where's the beef?

Offline

#3 20/4/17 1:50

jackoverfull
Member
From: San Mauro Torinese, Italy
Registered: 12/1/09
Website

Re: Mac version localization

On point, though, I remember trying the cocoa build of Oni with my Italian version (Feral actually provided it on the CD!) and it didn't work properly, all the texts were garbled up. Reason I always played on os 9 back then, using the carbon version (that didn't run properly on recent versions of OS X anyway).


"To the future, blinkin' an eye to the past!"

Offline

#4 20/4/17 8:08

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Mac version localization

Hmm, not sure why that would have happened.  Does the Mac Italian data work with the current Intel Mac build of Oni?


byproducts are fine, but where's the beef?

Offline

#5 20/4/17 8:16

jackoverfull
Member
From: San Mauro Torinese, Italy
Registered: 12/1/09
Website

Re: Mac version localization

No idea, as my italian cd is very far from here, but didn't when I tried in 2011 or so.


"To the future, blinkin' an eye to the past!"

Offline

#6 20/4/17 9:01

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Mac version localization

I see.  Well, the Intel build released in 2011 was an early beta and the current build is more reliable, but since I don't know what the issue was with the Italian data, I don't know if it would be more likely to work with the current 1.2.1 build.  If you ever try it again, let me know if it still has a problem.


byproducts are fine, but where's the beef?

Offline

#7 21/4/17 20:00

souvlaki
Member
From: mother Russia
Registered: 19/4/17

Re: Mac version localization

Iritscen wrote:

Hi there.  Yes, copying over the GDF from the Buka release won't work because Windows Oni data is not compatible with Mac Oni.  If you are technically-inclined, see my post here about converting the Windows data to Mac data: _http://oni.bungie.org/forum/viewtopic.php?pid=51530#p51530

Thanks! Here is what I tried:

LEVEL="level1_Final.dat"

# extract wavs
mono OniSplit.exe -extract:wav ${LEVEL}_win/ ${RUWIN_GDF}${LEVEL}

cd ${LEVEL}_win

# convert to aiff
for i in `ls | grep wav`
do ffmpeg -loglevel panic -i $i -acodec adpcm_ima_qt "${i%.wav}.aif"
done

# remove wavs
rm *.wav

cd ..

# pack wavs into .oni
for i in `ls ${LEVEL}_win/ | grep .aif.aif`
do mono OniSplit.exe -create ${LEVEL}_new ${LEVEL}_win/$i
done

# unpack the level
mono OniSplit.exe -export ${LEVEL}_winall ${RUWIN_GDF}${LEVEL}

# replace old sounds with new sounds
cp -r ${LEVEL}_new/* ${LEVEL}_winall/
 
# pack everything
mono OniSplit.exe -import ${LEVEL}_winall/ newmaclevels/${LEVEL}

And of course I copied new level to GameDataFolder. Oni did not launch afterwise and startup.txt did not have the usual "Valid Level level11_Final.dat" line.

Did I get something wrong?

Offline

#8 21/4/17 20:08

souvlaki
Member
From: mother Russia
Registered: 19/4/17

Re: Mac version localization

Oh, I clicked on your link again. Still not completely getting it.

Do I need to preserve the XML data from .oni somehow? Do I need to change ".wav" to ".aif" somewhere inside the XML?

Thanks beforehand.

Offline

#9 21/4/17 21:57

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Mac version localization

Ha, that's funny, it looks like we are working in parallel.  I just arrived at the solution of using ffmpeg to batch-convert WAV->AIFF myself today.  I don't think the XML SNDD data is necessary, but tomorrow I am going to actually try importing into Oni the AIFFs I converted, so I'll let you know how it goes.  At a glance, your script looks like it should work.  If you want to post the contents of debugger.txt and startup.txt here (preferably inside "code" tags), I will see them tomorrow morning before I do anything else, and might be able to determine the problem from that.


byproducts are fine, but where's the beef?

Offline

#10 22/4/17 7:07

paradox-01
Member
From: Germany
Registered: 14/1/07

Re: Mac version localization

What about 44.1 kHz sounds, don't you need to watch out for them to turn them into 22.05 kHz?

Last edited by paradox-01 (22/4/17 7:12)

Offline

#11 22/4/17 7:49

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Mac version localization

Oh yes, somehow I didn't see that last night.  The argument "-ar 22050" should also be supplied after the -acodec argument.  In my experiments with the Russian data, the sounds were already coming out in 22KHz sound, so I'm not sure if that was the problem.  I'll try importing in a bit.


byproducts are fine, but where's the beef?

Offline

#12 24/4/17 21:50

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Mac version localization

I was able to successfully convert the Russian sound data only, using the script:

#!/bin/sh

IFS="
"

IN_DIR="/path/to/SNDD-wav"
OUT_DIR="/path/to/SNDD-aif"

for WAV in `find $IN_DIR | grep .wav$`
do
   FILENAME=$(basename "$WAV")
   echo "Converting $FILENAME to IMA-compressed AIFF..."
   ffmpeg -i "$IN_DIR/$FILENAME" -acodec adpcm_ima_qt -ar 22050 "$OUT_DIR/${FILENAME%.wav}$aif.aif"
done

Note that ".aif" is actually part of the name of every sound resource in Oni, whether it's a Windows .oni file consisting of WAV data or a Mac .oni file consisting of AIFF data.  So you have to make sure that ffmpeg outputs the Mac sounds with a double suffix, ".aif.aif", before converting them back to .oni files with the OniSplit -create command.  Also note the careful use of quote marks around the file name variables — this is necessary to handle a few resources that have spaces in their names.

Now that sounds are working, I will find the time soon to try a full conversion of Windows game data to Mac data.


byproducts are fine, but where's the beef?

Offline

#13 30/4/17 22:04

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Mac version localization

All right, I was successful in using OniSplit plus ffmpeg to convert the game data from an English Windows installation into a GameDataFolder that works with Oni for the Mac.  I even turned it into a nice little bash shell script and placed it on the Depot: http://mods.oni2.net/node/333.  I have not tried it with Russian Windows Oni.  I can tell you that the Mac Oni application does not currently handle foreign characters, so the Cyrillic text that appears in the GUI will be completely absent and you may find it difficult to get around.

The script I created can't work around the language issue, but I suppose that if you performed the conversion process yourself, modeled on the script, you could replace the Russian WMDD resources (which describe the GUI) with the WMDDs from English Oni.  Note that the Anniversary Edition replaces the default Main Menu and Options screen WMDDs with its own, so if you install the AE on top of the converted Windows-to-Mac data, it will "fix" the issue with the Russian WMDDs for those screens by changing them to English.


byproducts are fine, but where's the beef?

Offline

#14 1/5/17 7:52

souvlaki
Member
From: mother Russia
Registered: 19/4/17

Re: Mac version localization

Wow, nice script! Many thanks, it works perfectly!

Except the text, of course. Are fonts/encodings hardcoded into the Mac Oni app?

Offline

#15 1/5/17 9:18

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Mac version localization

The GUI font comes from the game data -- TSFFTahoma.  I can only assume that Buka altered the font to display a Cyrillic alphabet (I'm assuming this because I don't have access to the Russian game data, only the audio files, and also because OniSplit exports the glyphs as raw pixel data in XML format, so it's not clear at a glance what the font looks like in any language!).  I suppose the problem is that the game app is internally encoding text in a way that does not support foreign characters, so it can't map the Russian text strings in the WMDDs to the font glyphs in TSFFTahoma -- something like using ASCII instead of Unicode.  I'm going to investigate this further, but I'm not sure I can do anything about it.


byproducts are fine, but where's the beef?

Offline

#16 1/5/17 15:12

souvlaki
Member
From: mother Russia
Registered: 19/4/17

Re: Mac version localization

I found a nice Windows mod (_http://mods.oni2.net/node/15). Unfortunately it does not work after converting to Mac format (game starts but there is still no text).

The page also says something about Daodan patch, which I think is for the Windows version. Could you please elaborate on that?

Last edited by souvlaki (1/5/17 15:14)

Offline

#17 1/5/17 15:55

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Mac version localization

Oh, I forgot about that old thing.  Yes, that will require the same patch to be made on Macs as was made in Windows.  As far as I know, we've never patched the font buffer size in either the PPC or Intel Mac builds of the game.  The Daodan DLL is what performs all the patches in Windows Oni -- you can download it on its own, or else install the Anniversary Edition which includes it -- but we don't have the Daodan DLL on Macs.  Still, I'm glad you found that, because it tells me what patch actually needs to be made.  Now I can look into our options for fixing that on Mac.

P.S.: There's an article for almost everything on our OniGalore wiki; here's the one for the Daodan DLL: http://wiki.oni2.net/Daodan_DLL


byproducts are fine, but where's the beef?

Offline

#18 3/5/17 9:16

souvlaki
Member
From: mother Russia
Registered: 19/4/17

Re: Mac version localization

Glad I could be of some help. I know about the Daodan DLL and was wondering if the same changes were made in the Mac app. Again, thank you for your answers.

There's also another problem – sometimes one can notice absence some of voices, effects, etc. After going to the main menu and back (Esc - Esc) all the didnt-play sounds play all at once. Seems like another buffer issue (though I'm not keen on low-level programming). Should I start a new thread?

Last edited by souvlaki (3/5/17 9:17)

Offline

#19 3/5/17 10:59

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Mac version localization

Hmm, are you noticing this when using the converted Russian data, or does it happen even with the normal Mac data?


byproducts are fine, but where's the beef?

Offline

#20 4/5/17 4:52

souvlaki
Member
From: mother Russia
Registered: 19/4/17

Re: Mac version localization

Even with the normal Mac data

Offline

#21 4/5/17 7:12

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Mac version localization

Yeah, if you could start a new thread on that, and give some more details (are sounds dropping in cutscenes or general gameplay, how long does it take to notice the problem, does it seem to happen more in some areas than others...), I'll check it out.


byproducts are fine, but where's the beef?

Offline

#22 Today 2:04

Jancy
Member
Registered: Today

Re: Mac version localization

Italian data, I don't know if it would be more likely to work with the current 1.2.1 build.  If you ever try it again, let me know if it still has a problem.

Offline

Board footer

Powered by FluxBB