Author Topic: Police Quest 1 VGA  (Read 701 times)

0 Members and 1 Guest are viewing this topic.

Offline hrvg

Police Quest 1 VGA
« on: October 31, 2018, 04:06:53 PM »
Hello,
I translated "Police quest 1 VGA" in French. But, I have a problem. When driving vehicles. It is "MPH" and not "KM". I found the file where it is write "%d MPH". I translated MPH -> KM. But, not the speed by 5: 5, 10, 15, 20, etc... I do not find how to change 5 by 10. For have: 10, 20, 30, etc. I searched with this code: 83c005. I do not have this code in the game. I do not know how to use dosbox debugger. SCICompanion does not work for this game. I would like to know if it is possible to modify (change) the number "5" by "10", thank you? It is possible or not, thanks?
« Last Edit: October 31, 2018, 04:09:55 PM by hrvg »



Offline Kawa

Re: Police Quest 1 VGA
« Reply #1 on: October 31, 2018, 05:39:01 PM »
SCI Companion most certainly does work for this game, and you don't need the DOSBox debugger for this.

Though it's certainly possible to convert from MPH to KM, it's... pretty much spread over the script file, with various values in MPH, and a graphical element that has the correct cel set by math based on a speed in MPH.

I can see that the changeSpeed Script instance changes the speed value (local9) by fives, at least.

Also, as the screenshot shows, there is no "%d MPH" -- those are two separate strings, "%d" and "MPH" ;)

Offline hrvg

Re: Police Quest 1 VGA
« Reply #2 on: November 01, 2018, 04:56:16 AM »
Hello Kawa,
I thank you for your quickly answer.

I do not understand. It is technical.
I open PQ1VGA game with SCICompanion. I click on "Debug game" button. I have this message:
Quote
Timed out trying to start debugging functionality. This requires a compatible template game.

I only want to modify the speed x: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65 MPH, which is displayed in game window... Change (modify) x: 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120 and 130 MPH (KM)
If it is possible.

Offline Kawa

Re: Police Quest 1 VGA
« Reply #3 on: November 01, 2018, 07:37:46 AM »
That's not how Debug Game works, haha.

Again, you can change the speeds as you describe, but even the single added multiplication would require recompiling from an .sc file.

Offline hrvg

Re: Police Quest 1 VGA
« Reply #4 on: November 01, 2018, 07:57:48 AM »
I have 500.scr file. But I do not know what (how) to change (modify) in this file.
Someone explained to me that I could find "string" to edit with a debugger.

Offline Kawa

Re: Police Quest 1 VGA
« Reply #5 on: November 01, 2018, 08:51:45 AM »
What you'll want to do is decompile the .scr file into a human-readable .sc file, giving you what was in my screenshot. Then you can find the routine that draws the speed on screen, where you changed the "MPH" to "KM", and add a multiplication in there. Recompile, hope for the best, and it might work out.

In fact, here. Catch. I haven't tried to play this, but here's a 500.scr/hep with that multiplication added.

Offline hrvg

Re: Police Quest 1 VGA
« Reply #6 on: November 01, 2018, 09:12:33 AM »
Super, It is excellent ! I tested with the 3 cars... It is good. I thank you very much for your help.  :)
« Last Edit: November 01, 2018, 10:18:32 AM by hrvg »

Offline hrvg

Re: Police Quest 1 VGA
« Reply #7 on: November 01, 2018, 12:47:33 PM »

Offline hrvg

Re: Police Quest 1 VGA
« Reply #8 on: November 08, 2018, 11:12:06 AM »
Hello,
I would like to translate "Police Quest 3."
I examined game (play).
I found two problems for the moment:
My first problem...
These are the active keys on the keyboard.
Files:
199.p56 (perhaps), 200.p56, 201.p56. 811.v56, 197.v56. No 199.scr, 811.scr, 197.scr files. I found 200.scr and 201.scr files.
I looked for these keys:
Computer 200.p56.
Home:
D, H, P, T, Q
DMV
D, V, P, Q
Homicide
R, N, S, Q
Personnel
Q 17

The car computer 199.p56:
D, V, P, F, Q

I looked for these codes in the files: 200.scr, 201.scr, 203.scr, 204.scr, 205.scr and 255.scr.


C /  3 / 03 // MAJ 67 / 43 // MIN  99 / 63
D /  4 / 04 // MAJ 68 / 44 // MIN 100 / 64
F /  6 / 06 // MAJ 70 / 46 // MIN 102 / 66
H /  8 / 08 // MAJ 72 / 48 // MIN 104 / 68
N / 14 /  E // MAJ 78 / 4E // MIN 110 / 6E
P / 16 / 10 // MAJ 80 / 50 // MIN 112 / 70
Q / 17 / 11 // MAJ 81 / 51 // MIN 113 / 71
R / 18 / 12 // MAJ 82 / 52 // MIN 114 / 72
S / 19 / 13 // MAJ 83 / 53 // MIN 115 / 73
T / 20 / 14 // MAJ 84 / 54 // MIN 116 / 74
V / 22 / 16 // MAJ 86 / 56 // MIN 118 / 76

I did not find these "actives" keys.
How do I change active keys, please?


My second problem.
This problem is same as for "Police Quest 1 VGA". This is speedometer in MPH. But, in this game the speed is real. The speedometer goes up to 100 MPH.
@ Kawa
You made me two files (500.hep and 500.scr) for "Police Quest 1 VGA" ...
In this game, I did not find the files (except file "25.p56" where speedometer is displayed). I suppose 25.scr file shows speed.
You could change (modify) MPH speed in KM, please.
1 MPH = 1.6 KM (1 mile = 1.6 km). I thank you.
I am going to abuse your patience, but it is possible to do the same correction on 500.hep and 500.scr files for Police Quest 1 VGA?

Thank you for your help.

Offline Kawa

Re: Police Quest 1 VGA
« Reply #9 on: November 08, 2018, 01:15:06 PM »
Okay, first of all? If it's 1.6 kilometers to a mile, we're gonna have a problem here cos the system only allows integers. So no decimal points. Also, a bunch of parts of 25.scr can't be decompiled and remain as assembler code that I dare not touch.



(Edit: I may have a German version that may or may not use km. If it does, it might be possible to copy whatever is different)

Second, view 197 does indeed contain menu items and such with hotkeys, like "DMV". Looking in rm200.sc, I see this:
Code: [Select]
(instance Dmv of Prop
(properties
x 26
y 10
view 197
priority 15
signal $1800 ;(| skipCheck noTurn)
)

;<cut>

(method (handleEvent pEvent &tmp [temp0 2])
(if (not (& signal $0080)) ;actorHidden, but that's not in sci.sh
(switch (pEvent type?)
(evKEYBOARD
(if
(or
(== (pEvent message?) KEY_d) ;<-- that's it. that's the part we want to change!
(== (pEvent message?) KEY_D) ;in both upper and lower case.
(and
(== (pEvent message?) KEY_RETURN)
(proc255_5 self pEvent)
)
)
(self loop: 1) ;highlight the item
(Animate (gCast elements?) 0) ;show it
(self loop: 0) ;and go back to the regular pic
(Animate (gCast elements?) 0)
(global2 newRoom: 204) ;now go to the DMV screen
(pEvent claimed: 1)
)
)
There's remarkably similar things for the other menu items, each with their own Props.

If you can manage to decompile the game, you can retrace these steps and make the edits you need.

I am not looking forward to PQ2.
« Last Edit: November 08, 2018, 01:31:59 PM by Kawa »

Offline hrvg

Re: Police Quest 1 VGA
« Reply #10 on: November 08, 2018, 02:33:55 PM »
I thank you for your answer.
I apologize, sorry. Because I explained myself badly. The speed is displayed by 5 miles (as in Police Quest 1 VGA).
5 miles = 8 Km. I watch Spanish and German versions. It is in MPH. But, the speedometer does not display MPH (only speed)... So, it is not a problem. I am stupid man, sorry.

 
Quote
Second, view 197 does indeed contain menu items and such with hotkeys, like "DMV". Looking in rm200.sc, I see this:

There's remarkably similar things for the other menu items, each with their own Props.

If you can manage to decompile the game, you can retrace these steps and make the edits you need.

I decompiled the game. I will watch tomorrow. Thank you for your help.

Offline hrvg

Re: Police Quest 1 VGA
« Reply #11 on: November 09, 2018, 08:01:35 AM »
I can not find these letters. I looked in the Deutsch and Spanish versions. I do not understand. Where to find these letters.

Offline Kawa

Re: Police Quest 1 VGA
« Reply #12 on: November 09, 2018, 11:43:13 AM »
In the German version, it uses this to determine if you pressed D for DMV, or W for Wagen:
Code: [Select]
(== (pEvent message?) (proc932_2 100 119))
(== (pEvent message?) (proc932_2 68 87))
The decompiler can't tell what those numbers are, so you don't get KEY_d and such. Looking in keys.sh, we see that KEY_D is $44, and KEY_d is $64. That's 68 and 100 respectively. Working backwards we can see that the other numbers are KEY_W and KEY_w. So proc932_2 is "return either this value or the other one depending on our current language".

Offline hrvg

Re: Police Quest 1 VGA
« Reply #13 on: November 09, 2018, 02:39:04 PM »
I did not understand your message, sorry:

Quote
If you can manage to decompile the game, you can retrace these steps and make the edits you need.

Because it's very technical for me.

Ok, I did "Manage decompilation" with Deutsch and English versions.

For DMV in keys.sh file:
d = 64//100, D = 44//68
w =  77//119, W = 57//87

(Load°rsVIEW°(proc932_2°197°1971))
(Dmv
view:°(proc932_2°197°1971)
x:°(proc932_2°26°30)
init:
)
° It is not the good sign, It is a black point.

1971 It is 1971.v56 for Deutsch version.

I do not understand "26°30" in "proc932_2°26°30".

There is no 811.v56 file in Deutsch version. Everything is in 1971.v56 file.

If I write this:

(Load°rsVIEW°(proc932_2°197))
(Dmv
view:°(proc932_2°197)
x:°(proc932_2°26°30)
init:
)

Active key will be "W, w" and not "D, d"?

I will continue tomorrow... My old brain will explode!
Thank you for your patience and help.

Offline troflip

Re: Police Quest 1 VGA
« Reply #14 on: November 09, 2018, 02:56:22 PM »
Handy tip: you can use the ` character to represent values for keys, instead of KEY_D KEY_d. For instance:

Code: [Select]
(== (pEvent message?) (proc932_2 `d `w))
Check out my website: http://icefallgames.com
Groundhog Day Competition


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.132 seconds with 23 queries.