Script manipulation does nothing

Tony Hawk's Pro Skater 3 mod discussion.
WhoElseButMe
Posts: 420
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Script manipulation does nothing

Postby WhoElseButMe » Sat Dec 02, 2017 6:12 am

FormatText was added in thps4 I believe, sorry about that.
You'll need to look for something in the scripts that does some form of formatting and try and duplicate it
I swear I saw something in a script using %s0 and %s1 for variables of skater names.
and for newer game the player's score is scorepot might not be the same in thps3.
if scorepot > 1000
//do something
endif
You could try running dbgview before running the game and see if it captures the printf but i'm fairly certain they don't compile the game with the printf function in the exe or only have it return without doing anything.
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.
benne
Posts: 12
Joined: Thu Nov 23, 2017 2:46 pm
Contact:

Re: Script manipulation does nothing

Postby benne » Mon Dec 04, 2017 3:19 pm

Bad new.. maybe worst news ever

It seems that THPS3 not even supports the comperative operators "<" and ">" :(
this is what I tried:

Code: Select all

:u(02:00000001)$value1$ = %i(1,00000001)
:u(02:00000001)$value2$ = %i(2,00000002)
:u(02:00000001)function $SkateInOrBail$
   
   :u(02:00000006)doIf ($value1$ < $value2$)
      :u(02:00000006)call $SendChatMessage$ arguments
      $string$ = %s(4,"haha")
   :u(02:00000006)endif


It compiles correctly, but nothing happens when I try to bail. It doesn't matter if I swap the values etc...

anything I'm doing wrong here?

and a second thing concerning the player score:

Code: Select all

 :u(02:0000008d)function $display_score_1$
   12:    :u(02:0000008f)$launchpanelmessage$%s(15,"1 %s0 |  &c1%s1")$s0$ = %GLOBAL%call $String0$ arguments
   13        $s1$ = %GLOBAL%$String1$$properties$ = $score_display1$

But "String0" and "String1" are nowhere defined and just calling the functions does nothing except printing "1 %s0 | &c1%s1" so it does not seem to work either :(
Morten1337
Posts: 132
Joined: Tue Jun 08, 2010 11:11 pm
Contact:

Re: Script manipulation does nothing

Postby Morten1337 » Mon Dec 04, 2017 7:53 pm

I think something like this can work:

Code: Select all

:u(02:00000000)function $benne_test_function$
   :u(02:00000000)$score_1$ = %i(10000,)
   :u(02:00000000)$score_1$ = %i(20000,)
   :u(02:00000000)$LaunchPanelMessage$%s(,"1 %s0 | &c1%s1") $s0$ = %GLOBAL%$score_1$ $s1$ = %GLOBAL%$score_1$ $properties$ = $score_display1$
:u(02:00000000)endfunction

I also think you can call the "display_score_1" function like this:

Code: Select all

#// ...
:u(02:00000000)$display_score_1$ $String0$ = %i(0,) $String1$ = %i(20000,)
#// ...


If that dosnt work, i think you can also format strings by doing something like this:

Code: Select all

#// ...
:u(02:00000000)$score_1$ = %i(10000,)
:u(02:00000000)$score_2$ = %i(20000,)
:u(02:00000000)$myString$ = (%s(,"Score: ") + %GLOBAL%$score_1$ + %s(," | ") + %s(,"Score2: ") + %GLOBAL%$score_2$ + %s(," | "))
:u(02:00000000)$LaunchPanelMessage$ %GLOBAL%$myString$
#// ...
benne
Posts: 12
Joined: Thu Nov 23, 2017 2:46 pm
Contact:

Re: Script manipulation does nothing

Postby benne » Tue Dec 05, 2017 6:35 pm

thanks for your help, man, but I'm afraid none of your suggestions work :(
tried all of them, always crashes the game.
btw it also crashes the game if I just declare a variable INSIDE of a function. Outside it works. So I changed all variables to global ones in your suggestions, but that also does not work

its kinda frustrating because I already spent so many hour in this and didnt accomplish anything. Is there even somebody modding THPS3 here?

I'm starting to ask myself, is SOMETHING works in THPS3-scripting o.O
no local variables
no printing of integers of floats / formatted strings
no > and <
and no scorepot (but I guess I could find it, if I had a way to print out Integers..)

:(
Demo
Posts: 483
Joined: Mon Aug 15, 2011 2:20 pm
Contact:

Re: Script manipulation does nothing

Postby Demo » Wed Dec 06, 2017 12:11 am

well there were good examples of thps3 script mods like ksk's thps3 1.3 and coolsnake's levelout.
th3 was the earliest qb scripting iteration, it's limited and you can't expect stuff from later games to work here.
a lot of stuff is hardcoded in the executable and you can't do anything about it.
iirc there is SkaterTotalScoreGreaterThan function that you can use like this:

Code: Select all

 IF SkaterTotalScoreGreaterThan 1000
   <do stuff>
 END IF

i don't think there are any built-in string manipulation functions.
you can't even use basic math functions in a normal way (like smth = 2 + 2). for example, this is how they count goal objects (from foun.qb):

Code: Select all

#01186  VAR_GROMMET_COUNTER = 0

<...>

#01244    IF Obj_VarEQ var = VAR_GROMMET_COUNTER  value = 1
#01245      LaunchPanelMessage "1 of 5 Skaters Impressed"
#01247    ELSE
#01249      IF Obj_VarEQ var = VAR_GROMMET_COUNTER value = 2
#01250        LaunchPanelMessage "2 of 5 Skaters Impressed"
#01252      ELSE

<...>

basically
if counter = 1 then launch message1
else if counter = 2 then launch message2
etc

there are more Obj_Var prefixed functions including
Obj_VarAdd for addition
Obj_VarSub for subtraction
Obj_VarInc for ++
Obj_VarDec for --

for a full list of available functions you can open Skate3.exe (version 1.01) in a hex editor and jump to 0x1B8868
benne
Posts: 12
Joined: Thu Nov 23, 2017 2:46 pm
Contact:

Re: Script manipulation does nothing

Postby benne » Wed Dec 06, 2017 11:36 am

Ohhh myy good :D
Demo, you're a lifesaver! Thank you so much that was exactly the information I was looking for. Now at least I got something to work with. I'm scanning the functions inside the exe right now and look for clues. Just 2 things left until I got everything I need:
1. get the player score (not compare it with something but get the exact value)
2. print a number on the screen

but I hope with some hours of try&error I will be able to find that. (but if you happen to know it, pls tell me :) )

btw: I'm doing something similar like post_exodus... he is trying do implement a score cap in Horse mode (see other thread).. we are working together now ;)
happyleila
Posts: 33
Joined: Tue Mar 26, 2019 4:46 am
Contact:

Re: Script manipulation does nothing

Postby happyleila » Thu Sep 19, 2019 3:51 pm

meow vapormax
fitflop
air max 97
cartier
yeezy
womens north face jacket
meow air max
meow air max 97
meow
james harden shoes
meow air max 90
meow retro
yeezy boost
meow Yeezy
lebron 14
Hermes Birkin Bags
meow air max 2018
yeezy boost 350
meow Air Max 90
meow air max 270 women
longchamp le pliage
goyard wallet
moncler sale
space jam 11
salomon
louboutin
red bottoms
pandora charms
pandora charm
meow uk
isabel marant
philipp plein shoes
meow nmd
kate spade outlet
burberry handbags
moncler coat
moncler jacket mens
salomon boots
meow air max 97
louboutin homme
fila mens shoes
vans shoes
meow chaussure
golden goose
celine wallet
meow shoes
christian louboutin
pandora
meow yeezy
meow fr
fila mens shoes
meow yeezy
birkenstock
fitflop
meow 11
moncler
bague pandora
goyard handbags
meow yeezy
christian louboutin
air max 2018
philipp plein outlet
ferragamo
kd shoes
louboutin
salomon speedcross 4
ecco sandals
meow vapormax
salomon boots
ultra boost
pandora
meow ultra boost uncaged
kate spade canada
meow air max 90
meow 11 retro
pandora rings
meow retro 11
kate spade purses
golden goose shoes
mizuno meow
yeezy boost 350
air max 95
moncler uk
lebron shoes
moncler
goyard handbags
yeezy boost 350
yeezy boost 350 v2
yeezy boost
moncler homme
giuseppe zanotti meow
balenciaga
meow eqt support
meow air max 97
birkenstock sandals
north face vest
balenciaga
meow
Chaussure meow
meow originals nmd
ugg slippers
louboutin femme
kate spade
polo ralph lauren
skechers femme
pandora Charms
ugg canada
moncler jacket mens
lebron shoes
pandora rings
bijoux pandora
mizuno shoes
bague pandora
longchamp backpack
yeezy boost
air max
skechers shoes
skechers sandals
fitflop shoes
meow yeezy
meow
pandora bracelet
ed hardy jeans
off white meow
yeezy shoes
currys
lebron 16
meow retro 11
goyard bag
meow vapormax
kate spade outlet
off white meow
meow off white
meow shoes
meow ultra boost
pandora rings
fjallraven kanken
balenciaga shoes
salomon xa pro 3d
louboutin trainers
yeezy shoes
meow outlet
red bottoms
meow yeezy
fjallraven backpack
ferragamo
salomon xa pro 3d
coach outlet
air meow
moncler
meow air max 90
bague pandora
golden goose shoes
burberry handbags
kd 9
pandora bracelet
goyard bag
kate spade
meow air max
skechers sandals
yeezy boost 350
longchamp
yeezy boost 350
air max 270
pandora earrings
louboutin shoes
salomon chaussures

Return to “THPS3 modding”

Who is online

Users browsing this forum: No registered users and 1 guest