Community

SCI Programming => SCI Community How To's & Tutorials => Topic started by: Shaklin on June 16, 2022, 01:26:07 PM

Title: Translating Views (The Dagger of Amon Ra)
Post by: Shaklin on June 16, 2022, 01:26:07 PM
Hello :),

I try to translate the Options in The Dagger of Amon Ra into german.
Maybe I am blind, but I cant find the word "both".
In Game:
https://i.imgur.com/lg9PA0g.jpg

In SCICompanion:
https://i.imgur.com/hCmMBBy.jpg

I've already searched all "Views", I can't find it. Anyone know where it could be?
Title: Re: Translating Views (The Dagger of Amon Ra)
Post by: ZvikaZ on June 16, 2022, 04:46:23 PM
Strings to translate can be in texts/messages resources, they can be hard coded in the script themselves (more common as the game is older) and can be in the views.

In your case, I haven't checked it, but anothet possibility is that the 'both' doesn't exist in any of these resources.
ScummVM adds this button in some games that didn't originally had them.
Just open this game in Dosbox and see if that button exists.
If it's there - it's not related to ScummVM.
If it's not there - ScummVM added it.
Then, I don't remember all the details. They based it on some mechanism that was already in the game. But I *think* that the button view is in ScummVM code.

Edit
====
For PQ4 there's a comment in ScummVM's code (https://github.com/scummvm/scummvm/blob/101e016af176d95a43c31b1fdb1dd8338c409843/engines/sci/resource/resource_patcher.cpp#L147) that says that there isn't appropriate view in the game, so they added it.
But I haven't seen such a comment for other games...
Title: Re: Translating Views (The Dagger of Amon Ra)
Post by: Shaklin on June 16, 2022, 05:40:34 PM
Wow, didnt know that :o.
I just tried the game in Virtualbox (Win98) without ScummVM and there is no "both" button.
So I cant change it, without changing the SummVM'S code..
Thank you for your info and help :).
Title: Re: Translating Views (The Dagger of Amon Ra)
Post by: ZvikaZ on June 17, 2022, 03:14:36 AM
Wow, didnt know that :o.
I just tried the game in Virtualbox (Win98) without ScummVM and there is no "both" button.
So I cant change it, without changing the SummVM'S code..
Thank you for your info and help :).

EDIT
====
The solution seems simple.
I have read ScummVM's code (same file, line 354) that injects their 'both' view - it depends (among other things) on the fact that 'View 995, Loop 13' has only 2 cells.
So, you just have to add your translated view as 'View 995, Loop 13, Cel 2' - and then it will (supposedly) be used to show that button, and will not be overridden by ScummVM.

Title: Re: Translating Views (The Dagger of Amon Ra)
Post by: Shaklin on June 17, 2022, 08:37:22 AM
Thank you so much :)! It works:
https://i.imgur.com/i5AeOWb.jpg
So simple, but you have to know that first.
I am very impressed and really thank you for your time and help.
It's very interesting, and it's great that old games aren't forgotten.

Oh and I had already Win98 on VirtualBox, so it was faster ^^. But I will install DosBox :).