Change language to spanish "localtext_spanish.qb" file

Discuss thug2 modding, post your own, share your ideas, ask questions.
diegoagnos
Posts: 5
Joined: Sat Dec 12, 2015 3:29 am
Contact:

Change language to spanish "localtext_spanish.qb" file

Postby diegoagnos » Sat Dec 12, 2015 4:12 am

Please help me this can help a lot of people. I want to change the game language to spanish, there is a file called "localtext_spanish.qb" with all the game text information in spanish on the script folder. So what I need to do to make that the game use that file?

I have dummied the "qb_scripts.prx" to make the game use the scripts folder and rename the file "localtext_spanish.qb" to "localtext.qb" because thats the name of the file for the english language... but that didn't work. :nope:

So please... What I need to do? :help
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Change language to spanish "localtext_spanish.qb" file

Postby WhoElseButMe » Sat Dec 12, 2015 11:41 pm

That file really only manages event text like those found in story mode or classic mode goals and cutscenes.
You'll need to physically decompile scripts and manually change the text of everything else to have a fully functional spanish version of thug2.
If you plan on doing that I'd suggest making everything you change point to a script that is the text and use those ID's in the menus.

From my understanding there isn't a spanish qbscripts.prx and you have a extract of the english qbscripts.prx in your scripts directory, this is why you're seeing it in english.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.
diegoagnos
Posts: 5
Joined: Sat Dec 12, 2015 3:29 am
Contact:

Re: Change language to spanish "localtext_spanish.qb" file

Postby diegoagnos » Tue Dec 15, 2015 2:17 am

↓↓↓↓↓↓
Last edited by diegoagnos on Tue Dec 15, 2015 6:11 pm, edited 2 times in total.
diegoagnos
Posts: 5
Joined: Sat Dec 12, 2015 3:29 am
Contact:

Re: Change language to spanish "localtext_spanish.qb" file

Postby diegoagnos » Tue Dec 15, 2015 3:46 am

↓↓↓
Last edited by diegoagnos on Tue Dec 15, 2015 6:12 pm, edited 3 times in total.
diegoagnos
Posts: 5
Joined: Sat Dec 12, 2015 3:29 am
Contact:

Re: Change language to spanish "localtext_spanish.qb" file

Postby diegoagnos » Tue Dec 15, 2015 6:05 pm

WhoElseButMe wrote:That file really only manages event text like those found in story mode or classic mode goals and cutscenes.
You'll need to physically decompile scripts and manually change the text of everything else to have a fully functional spanish version of thug2.
If you plan on doing that I'd suggest making everything you change point to a script that is the text and use those ID's in the menus.

From my understanding there isn't a spanish qbscripts.prx and you have a extract of the english qbscripts.prx in your scripts directory, this is why you're seeing it in english.


Hi, thank you for your reply and help...
The first thing I want is that the game use the "localtext_spanish.qb" because that seem the easiest part and I will be really happy with that, then If you continue helping me I will try make the game full spanish.
I decompiled "localtext_spanish.qb", "localtext.qb" and "localtext_german.qb" using "roq cmd 3" with "qb_old.exe" to compare structures, and have a better idea of how this works, but I'm having problems trying to Compile or even Unpack, it says "complete" and "done" but doesn't create the qb file only creates a "temp.dump" file (this is even without editing the text file). I have run the program as administrator. I tried switching the compatiblity mode because I'm on windows 10... but nothing seems to work. I only can decompile, what's wrong?

I'm really new in this and I don't have any previous knowledge, but I'm trying to understand how the game works. I have read a lot of tutorials and post of this page, but I don't understand a lot of things. I need to know how the scrpits folder are loaded by the game, how scripts connect each other, whats the first script that the game reads? What's the script that point to read those localtext scripts? Sorry... but I'm really lost in this. I need even more help now :/
Attachments
localtext_spanish.rar
Here is the spanish script decompiled in case that anyone wants to check it.
(572.92 KiB) Downloaded 456 times
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Change language to spanish "localtext_spanish.qb" file

Postby WhoElseButMe » Thu Dec 17, 2015 2:00 am

That spanish text file only handles story mode and classic mode goal text and nothing else. It doesnt change menu text at all.

temp.dump is the dump of the memory of the compile. This happens when there is an error in the file.
Using a hex editor and the bytecode document you can open the temp.dump file and find the last instruction that worked. With a little more work you could pinpoint exactly where in the document your error is.
If temp.dump is empty then make sure you have a table file. The name of the table file will be on the first or second line of the text decompile.

Reverse engineering will tell you more about the order of scripts being loaded. To be honest, I believe aaaaloopchecker.qb is the first script loaded. or in other words, alphabetically.
the list of scripts to be loaded is located in qdir.txt found in the scripts folder.
as long as the script is loaded other scrips can see it without needing to do anything else. For example lets say you add a script named MyScript.qb and reference it in qdir.txt to de loaded on startup and inside that script you have a function named MyFunction then in any other function in any other script including your own can use MyFunction. Same goes for value types.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.
diegoagnos
Posts: 5
Joined: Sat Dec 12, 2015 3:29 am
Contact:

Re: Change language to spanish "localtext_spanish.qb" file

Postby diegoagnos » Sun Dec 20, 2015 7:54 am

WhoElseButMe wrote:That spanish text file only handles story mode and classic mode goal text and nothing else. It doesnt change menu text at all.

temp.dump is the dump of the memory of the compile. This happens when there is an error in the file.
Using a hex editor and the bytecode document you can open the temp.dump file and find the last instruction that worked. With a little more work you could pinpoint exactly where in the document your error is.
If temp.dump is empty then make sure you have a table file. The name of the table file will be on the first or second line of the text decompile.

Reverse engineering will tell you more about the order of scripts being loaded. To be honest, I believe aaaaloopchecker.qb is the first script loaded. or in other words, alphabetically.
the list of scripts to be loaded is located in qdir.txt found in the scripts folder.
as long as the script is loaded other scrips can see it without needing to do anything else. For example lets say you add a script named MyScript.qb and reference it in qdir.txt to de loaded on startup and inside that script you have a function named MyFunction then in any other function in any other script including your own can use MyFunction. Same goes for value types.


Ok thanks for the great and complete response. I understand a little more now.
And thank you for confirming that it only work for that, but menu text is easy to understand it's not that important. I find the dialog text more important, those are long, and there's little time to understand it, for what you say and I think those are not there too. But If I want to put the menu text and dialog text in spanish I need to use the script folder too... Am I right?

Now... I don't understand this... why original scripts have errors? I tried to compile all lenguage txt scripts files with no modifications and always creates a temp.dump file. I have opened the temp.dump file with notepad and is not on full binary format... texts are still intact. And then I go to that same line on the txt file and I don't find nothing inusual.

Also in the qdir.txt file all lines have this path "c:\ports\THUG2\THUG2XB\Skate6\data\scripts\" so when I modify all paths with mine: "D:\Tony Hawk's Underground 2\Game\Data\scripts\" the game crashes at start
Are those scripts all wrong? I tried leaving only one line (one script) in the qdri.txt file and the game also crashes, but could be that this script needs from others to work properly. So how I detect whats wrong? Why the game crashes?
I really appreciate your help and I'm learning but this is so frustrating, nothing seems to work.
Attachments
localtext_spanish.rar
Here is the original script with the temp.dump file too, it would be great if you could test decompile and compile it, because I think that roq CMD is not working properly on my system.
(572.92 KiB) Downloaded 426 times
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Change language to spanish "localtext_spanish.qb" file

Postby WhoElseButMe » Mon Dec 21, 2015 1:09 am

It's the tool not being able to handle some instruction in the original file. It could be a string with a token in it that is making it act funky.

You need to keep the original path that's in qdir.txt up to scripts/ you can then add new folders in scripts and append the partical path to it.
Say you add a directory named MyStuff inside scripts with a script named MyScript.qb
"c:\ports\THUG2\THUG2XB\Skate6\data\scripts\MyStuff\MyScript.qb"
You don't have to add directories but you need to keep the beginning part of the path up to scripts then find the exact location of the file being added within scripts directory.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.

Return to “THUG2 modding”

Who is online

Users browsing this forum: No registered users and 1 guest