THAW Decompiled Script

Discuss thaw modding, post your own, share your ideas, ask questions.
EnglishBen
Posts: 2
Joined: Thu Jan 04, 2018 7:26 pm
Contact:

THAW Decompiled Script

Postby EnglishBen » Thu Jan 04, 2018 7:34 pm

Hey guys just wondering if anyone has a properly decompiled script of THAW i could look at. I've used QB and taken a look at the scripts themselves but the bytecode is quite hard to follow with my current level of knowledge. I have been told in the past that fully decompiled scripts existed but I have yet to stumble across one.

In the instance that such a script doesn't exist, i will ask my question here that is the reason i want a decompiled script in the first place.

When you complete goals for the bum, he can give you $25/$50/$75 etc based on the difficulty of the challenge. However it is possible to get $50 for an easy goal, although rarely. I want to see 1. why this happens and 2. how to possibly manipulate it so you can get $50 consistently rather than it just being a fluke.
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: THAW Decompiled Script

Postby WhoElseButMe » Thu Jan 04, 2018 8:31 pm

There isn't a public tool to support full qb file decompilation.
You can use queenbee and export section scripts and decompile section scripts.
However, blubs tool can't decompile instruction 0x4A, 0x4B or 0x4C and the section scripts don't have an opening function token or checksum so you'll either need to add that manually with a hex editor or stop the tool.
The bums give cash based on the number of times you've completed a specific type of goal.
The first script is how the goals are setup. The second script is one type of goal to show how they award cash, it's like that in all types.

Code: Select all

script cash_goals_add_goals
   printf "cash_goals_add_goals"
   if NOT CD
      while
         if IsCreated skater
            break
         endif
         wait 1 gameframe
      repeat
   endif
   if NOT InSplitScreenGame
      if GameModeEquals is_career
         GetRandomValue name = ped_num a = 1 b = (cash_goals_num_goal_peds) integer
         if (<ped_num> = (cash_goals_last_goal_ped))
            <ped_num> = (<ped_num> + 1)
            if (<ped_num> > (cash_goals_num_goal_peds))
               <ped_num> = 1
            endif
         endif
         change cash_goals_last_goal_ped = <ped_num>
         if (<ped_num> < 10)
            FormatText ChecksumName = ped_name "%z_TRG_Ped_CashGoal%f%n" z = <zone> f = 0 n = <ped_num>
            FormatText ChecksumName = restart_name "%z_TRG_Restart_CashGoal%f%n" z = <zone> f = 0 n = <ped_num>
         else
            FormatText ChecksumName = ped_name "%z_TRG_Ped_CashGoal%n" z = <zone> n = <ped_num>
            FormatText ChecksumName = restart_name "%z_TRG_Restart_CashGoal%n" z = <zone> n = <ped_num>
         endif
         if NOT IsInNodeArray <ped_name>
            <ped_num> = 1
            change cash_goals_last_goal_ped = <ped_num>
            FormatText ChecksumName = ped_name "%z_TRG_Ped_CashGoal%f%n" z = <zone> f = 0 n = <ped_num>
            FormatText ChecksumName = restart_name "%z_TRG_Restart_CashGoal%f%n" z = <zone> f = 0 n = <ped_num>
         endif
         if NOT IsInNodeArray <ped_name>
            return
         endif
         GetArraySize cash_goals_available_goals
         GetRandomValue name = index a = 0 b = (<array_size> - 1) integer
         if (<index> = (cash_goals_last_goal))
            <index> = (<index> + 1)
            if (<index> = <array_size>)
               <index> = 0
            endif
         endif
         change cash_goals_last_goal = <index>
         (cash_goals_available_goals[<index>]) zone = <zone> ped = <ped_name> restart = <restart_name>
         return cash_goal_id = <goal_id>
      endif
   endif
endscript

Code: Select all

script cash_goals_init_high_combo
   GoalManager_GetTimesWonGoal name = <goal_id>
   if (<times_won> > 4)
      GetRandomValue name = score a = 16 b = 40 integer
      <score> = (<score> * 1000)
      <cash_reward> = 75
      <time> = 60
      shot_text = [
         {
            text = "Well, you're pretty good.  I wonder how good your combos are though."
            stream = high_combo_hard_1_lip
         }
         {
            text = "Lets make it hard.  If you can do a hard high combo then I'll hand over some cash."
            stream = high_combo_hard_2_lip
         }
      ]
   else
      if (<times_won> > 2)
         GetRandomValue name = score a = 8 b = 20 integer
         <score> = (<score> * 1000)
         <cash_reward> = 50
         <time> = 60
         shot_text = [
            {
               text = "You're not too bad.  Let's see if your combos have improved."
               stream = high_combo_med_1_lip
            }
            {
               text = "I'll make it a little harder.  Bust out a medium high combo for some extra money."
               stream = high_combo_med_2_lip
            }
         ]
      else
         GetRandomValue name = score a = 2 b = 10 integer
         <score> = (<score> * 1000)
         <cash_reward> = 25
         <time> = 60
         shot_text = [
            {
               text = "So you want to test your skills?  Let's see what kind of combos you can do"
               stream = high_combo_easy_1_lip
            }
            {
               text = "I'll start off pretty easy.  Pull off an easy high combo and you can get some cash."
               stream = high_combo_easy_2_lip
            }
         ]
      endif
   endif
   FormatText TextName = goal_text "Land a %s point combo in %t seconds." s = <score> t = <time>
   GoalManager_EditGoal name = <goal_id> params = {
      cash_reward = <cash_reward>
      goal_text = <goal_text>
      score = <score>
      time = <time>
   }
   cash_goals_edit_IGCs {
      ped_name = <ped_name>
      restart_name = <restart_name>
      shot_text = <shot_text>
      igc_name = "high_combo"
   }
   KillSpawnedScript name = cash_goals_reinit_goal_ped
   SpawnScriptLater cash_goals_reinit_goal_ped params = {goal_id = <goal_id>}
endscript
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.
EnglishBen
Posts: 2
Joined: Thu Jan 04, 2018 7:26 pm
Contact:

Re: THAW Decompiled Script

Postby EnglishBen » Fri Jan 05, 2018 3:11 pm

Thanks for the reply, it's a great help. My only concern with this is that it still doesn't answer the question as to why sometimes you can boot the game fresh, do a single cash goal and get $50? This is what I am trying to troubleshoot and i'm still not sure why this happens.
jackson
Posts: 1
Joined: Mon Oct 22, 2018 9:03 pm
Contact:

Re: THAW Decompiled Script

Postby jackson » Mon Oct 22, 2018 9:05 pm

Thanks for the script. It greatly helped.
Put this noocube site online.

Return to “THAW modding”

Who is online

Users browsing this forum: No registered users and 29 guests