Deck Scale mod

Discuss thug2 modding, post your own, share your ideas, ask questions.
shaun
Posts: 13
Joined: Tue Jan 17, 2017 1:27 am
Contact:

Deck Scale mod

Postby shaun » Tue Jan 17, 2017 3:32 am

When I try to install the THUG2 scaling mod from thmods.com, it gives me an error saying Game\Data\pre\mainmenu_scripts.prx contains invalid data. I checked the file myself and it seems to be completely vanilla, so I don't know what's wrong. I was able to create my own scaling mod by following ProHad's tutorial (http://www.thmods.com/forum/viewtopic.php?t=119) but this doesn't include deck scaling. Does anyone know how to make a mod that affects deck scaling? I would really appreciate it.

Also, if I set any of the max scale values in scalingmenu.txt to -1.#QNAN0, the .qb won't compile. It just spits out a temp.dump. Thankfully though I can get around this by just setting max scale to a high value like 999999.

I am using the roq cmd compiler.
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Deck Scale mod

Postby WhoElseButMe » Tue Jan 17, 2017 8:13 am

You have to add the board bone group to the scaling options.
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.
shaun
Posts: 13
Joined: Tue Jan 17, 2017 1:27 am
Contact:

Re: Deck Scale mod

Postby shaun » Tue Jan 17, 2017 8:53 am

WhoElseButMe wrote:You have to add the board bone group to the scaling options.
I figured as such. I'm really lost on how to do that, though. I tried copying from a THUG1 scaling mod, but I can't get it to work. I'm sure whatever I wrote is total gibberish. This is all quite new to me.

scalingmenu.txt:

Code: Select all

...

:i $scalingmenu_constraints$ = :a{
   ...
   
   :i :s{$part$ = call $board_bone_group$ arguments
         $male_min$ = %f(0.000000)$male_max$ = %f(150.000000)$female_min$ = %f(0.000000)$female_max$ = %f(150.000000):s}
   :i :a}
:i $board_bone_group$ = :a{
   :i $Bone_Board_Root$
   :i $Bone_Board_Nose$
   :i $Bone_Trucks_Nose$
   :i $Bone_Board_Tail$
   :i $Bone_Trucks_Tail$
   :i :a}
:i $skateshop_scaling_options$ = :a{
   :i :s{
      :i $text$ = %sc(4,"Deck")
      :i $submenu$ = $face_scale_menu$
      :i $scaling_params$ = :s{call $affectX$ arguments
            $affectY$$affectZ$$affectXY$$affectXYZ$:s}
      :i $should_add_scaling_options$
      :i $bone_group$ = $board_bone_group$
      :i $board$
      :i $cam_anim_sub$ = $legs$
   :i :s}
   
   ...
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Deck Scale mod

Postby WhoElseButMe » Tue Jan 17, 2017 1:11 pm

In 'master_scaling_list' you need to add a structure to the array for board_bone_group

Code: Select all

:s{
  :i $part$ = $board_bone_group$
  :i $bone_scaling$ = %i(1,0)
:s}
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.
shaun
Posts: 13
Joined: Tue Jan 17, 2017 1:27 am
Contact:

Re: Deck Scale mod

Postby shaun » Tue Jan 17, 2017 9:19 pm

I found master_scaling_list, but I can't figure out where exactly to put your array structure. This is the only occurrence of "master_scaling_list" in scalingmenu.txt.

Code: Select all

:i function $cas_really_reset_all_scaling$
   :i $cas_cancel_reset_all_scaling$
   :i call $process_cas_command$ arguments
      $cas_command$ = $cas_reset_scale$$editable_list$ = $master_scaling_list$
   :i $GetCurrentSkaterProfileIndex$
   :i call $RefreshSkaterModel$ arguments
      $profile$ = %GLOBAL%$currentSkaterProfileIndex$$skater$ = %i(0,00000000)$no_board$ = $no_board$
:i endfunction
:i function $cas_reset_scale$
   :i $GetCurrentSkaterProfileIndex$
   :i if call $gotParam$ arguments
         $male_cas_part$
      :i call $GetSkaterSex$ arguments
         $player$ = %GLOBAL%$currentSkaterProfileIndex$
      :i if call $gotParam$ arguments
            $is_male$
         :i if  (%GLOBAL%$is_male$)
            :i %GLOBAL%$cas_part$ = %GLOBAL%$male_cas_part$
         :i else
            :i %GLOBAL%$cas_part$ = %GLOBAL%$female_cas_part$
         :i endif
         :i call $scalingmenu_reset_to_default$ arguments
            $part$ = %GLOBAL%$part$$cas_part$ = %GLOBAL%$cas_part$
         :i return
         
      :i endif
   :i endif
   :i %GLOBAL%$x$ = %i(100,00000064)
   :i %GLOBAL%$y$ = %i(100,00000064)
   :i %GLOBAL%$z$ = %i(100,00000064)
   :i $GetCurrentSkaterProfileIndex$
   :i call $SetPlayerAppearanceScale$ arguments
      $player$ = %GLOBAL%$currentSkaterProfileIndex$$part$ = %GLOBAL%$part$$x$ = %GLOBAL%$x$$y$ = %GLOBAL%$y$$z$ = %GLOBAL%$z$$use_default_scale$ = %i(1,00000001)
:i endfunction
:i :end
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Deck Scale mod

Postby WhoElseButMe » Tue Jan 17, 2017 11:38 pm

The name of the array is master_scaling_list it won't be inside a function.
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.
shaun
Posts: 13
Joined: Tue Jan 17, 2017 1:27 am
Contact:

Re: Deck Scale mod

Postby shaun » Tue Jan 17, 2017 11:57 pm

scalingmenu.qb does not have a master_scaling_list array. The only occurrence of "master_scaling_list" is in that function. Should I be looking in another .qb file?
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Deck Scale mod

Postby WhoElseButMe » Wed Jan 18, 2017 2:54 am

Then it isn't in scalingmenu.qb. Pretty sure it's in one of the qb scripts like cas_parts.
What you're referring to isn't an array it's a reference to said array something = master_scaling_list.
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.
shaun
Posts: 13
Joined: Tue Jan 17, 2017 1:27 am
Contact:

Re: Deck Scale mod

Postby shaun » Wed Jan 18, 2017 4:01 am

Like this?

cas_parts.txt:

Code: Select all

:i $master_scaling_list$ = :a{
   :s{
      :i $part$ = $board_bone_group$
      :i $bone_scaling$ = %i(1,0)
   :s}
   :i :s{$part$ = call $headtop_bone_group$ arguments
         $bone_scaling$ = %i(1,00000001)$male_cas_part$ = $skater_m_head$$female_cas_part$ = $skater_f_head$:s}
   :i :s{$part$ = call $Jaw_bone_group$ arguments
         $bone_scaling$ = %i(1,00000001)$male_cas_part$ = $skater_m_head$$female_cas_part$ = $skater_f_head$:s}
   :i :s{$part$ = call $nose_bone_group$ arguments
         $bone_scaling$ = %i(1,00000001)$male_cas_part$ = $skater_m_head$$female_cas_part$ = $skater_f_head$:s}
   :i :s{$part$ = call $head_bone_group$ arguments
         $bone_scaling$ = %i(1,00000001)$male_cas_part$ = $skater_m_head$$female_cas_part$ = $skater_f_head$:s}
   :i :s{$part$ = call $torso_bone_group$ arguments
         $bone_scaling$ = %i(1,00000001):s}
   :i :s{$part$ = call $stomach_bone_group$ arguments
         $bone_scaling$ = %i(1,00000001):s}
   :i :s{$part$ = call $upper_arm_bone_group$ arguments
         $bone_scaling$ = %i(1,00000001):s}
   :i :s{$part$ = call $lower_arm_bone_group$ arguments
         $bone_scaling$ = %i(1,00000001):s}
   :i :s{$part$ = call $hands_bone_group$ arguments
         $bone_scaling$ = %i(1,00000001):s}
   :i :s{$part$ = call $upper_leg_bone_group$ arguments
         $bone_scaling$ = %i(1,00000001):s}
   :i :s{$part$ = call $lower_leg_bone_group$ arguments
         $bone_scaling$ = %i(1,00000001):s}
   :i :s{$part$ = call $feet_bone_group$ arguments
         $bone_scaling$ = %i(1,00000001):s}
   :i :s{$part$ = call $board_bone_group$ arguments
         $bone_scaling$ = %i(1,00000001):s}
   :i :s{$part$ = $object_scaling$:s}
   :i :a}

I can get cas_parts.qb to compile, but I can't compile scalingmenu.qb when I try to add the board bone group. I just get a temp.dump. What am I doing wrong?

scalingmenu.txt:

Code: Select all

:i $scalingmenu_constraints$ = :a{
   :i :s{$part$ = call $object_scaling$ arguments
         $male_min$ = %f(90.000000)$male_max$ = %f(120.000000)$female_min$ = %f(90.000000)$female_max$ = %f(120.000000):s}
   :i :s{$part$ = call $headtop_bone_group$ arguments
         $male_min$ = %f(80.000000)$male_max$ = %f(130.000000)$female_min$ = %f(80.000000)$female_max$ = %f(130.000000):s}
   :i :s{$part$ = call $head_bone_group$ arguments
         $male_min$ = %f(85.000000)$male_max$ = %f(115.000000)$female_min$ = %f(85.000000)$female_max$ = %f(115.000000):s}
   :i :s{$part$ = call $nose_bone_group$ arguments
         $male_min$ = %f(20.000000)$male_max$ = %f(150.000000)$female_min$ = %f(20.000000)$female_max$ = %f(150.000000):s}
   :i :s{$part$ = call $Jaw_bone_group$ arguments
         $male_min$ = %f(60.000000)$male_max$ = %f(130.000000)$female_min$ = %f(60.000000)$female_max$ = %f(130.000000):s}
   :i :s{$part$ = call $torso_bone_group$ arguments
         $male_min$ = %f(90.000000)$male_max$ = %f(130.000000)$female_min$ = %f(90.000000)$female_max$ = %f(150.000000):s}
   :i :s{$part$ = call $stomach_bone_group$ arguments
         $male_min$ = %f(90.000000)$male_max$ = %f(130.000000)$female_min$ = %f(90.000000)$female_max$ = %f(100.000000):s}
   :i :s{$part$ = call $upper_arm_bone_group$ arguments
         $male_min$ = %f(90.000000)$male_max$ = %f(130.000000)$female_min$ = %f(90.000000)$female_max$ = %f(120.000000):s}
   :i :s{$part$ = call $lower_arm_bone_group$ arguments
         $male_min$ = %f(90.000000)$male_max$ = %f(130.000000)$female_min$ = %f(90.000000)$female_max$ = %f(120.000000):s}
   :i :s{$part$ = call $hands_bone_group$ arguments
         $male_min$ = %f(90.000000)$male_max$ = %f(130.000000)$female_min$ = %f(90.000000)$female_max$ = %f(120.000000):s}
   :i :s{$part$ = call $upper_leg_bone_group$ arguments
         $male_min$ = %f(90.000000)$male_max$ = %f(150.000000)$female_min$ = %f(90.000000)$female_max$ = %f(120.000000):s}
   :i :s{$part$ = call $lower_leg_bone_group$ arguments
         $male_min$ = %f(90.000000)$male_max$ = %f(150.000000)$female_min$ = %f(90.000000)$female_max$ = %f(120.000000):s}
   :i :s{$part$ = call $feet_bone_group$ arguments
         $male_min$ = %f(90.000000)$male_max$ = %f(150.000000)$female_min$ = %f(90.000000)$female_max$ = %f(120.000000):s}
   :i :s{$part$ = call $board_bone_group$ arguments
         $male_min$ = %f(0.000000)$male_max$ = %f(150.000000)$female_min$ = %f(0.000000)$female_max$ = %f(150.000000):s}
   :i :a}
:i $skateshop_scaling_options$ = :a{
   :i :s{
      :i $group_title$ = %s(13,"SCALE OPTIONS")
      :i $text$ = %sc(4,"Body")
      :i $submenu$ = $face_scale_menu$
      :i $should_add_scaling_options$
      :i $scaling_params$ = :s{$affectXYZ$:s}
      :i $bone_group$ = $object_scaling$
   :i :s}
   :i :s{
      :i $text$ = %sc(8,"Head Top")
      :i $submenu$ = $face_scale_menu$
      :i $should_add_scaling_options$
      :i $scaling_params$ = :s{call $affectX$ arguments
            $affectY$$affectZ$:s}
      :i $bone_group$ = $headtop_bone_group$
      :i $cam_anim_sub$ = $head$
      :i $male_part$ = $skater_m_head$
      :i $female_part$ = $skater_f_head$
   :i :s}
   :i :s{
      :i $text$ = %sc(4,"Face")
      :i $submenu$ = $face_scale_menu$
      :i $should_add_scaling_options$
      :i $scaling_params$ = :s{call $affectX$ arguments
            $affectY$$affectZ$:s}
      :i $bone_group$ = $head_bone_group$
      :i $cam_anim_sub$ = $head$
      :i $male_part$ = $skater_m_head$
      :i $female_part$ = $skater_f_head$
   :i :s}
   :i :s{
      :i $text$ = %sc(4,"Nose")
      :i $submenu$ = $face_scale_menu$
      :i $should_add_scaling_options$
      :i $scaling_params$ = :s{call $affectX$ arguments
            $affectY$$affectZ$:s}
      :i $bone_group$ = $nose_bone_group$
      :i $cam_anim_sub$ = $head$
      :i $male_part$ = $skater_m_head$
      :i $female_part$ = $skater_f_head$
   :i :s}
   :i :s{
      :i $text$ = %sc(3,"jaw")
      :i $submenu$ = $face_scale_menu$
      :i $should_add_scaling_options$
      :i $scaling_params$ = :s{call $affectX$ arguments
            $affectY$$affectZ$:s}
      :i $bone_group$ = $Jaw_bone_group$
      :i $cam_anim_sub$ = $head$
      :i $male_part$ = $skater_m_head$
      :i $female_part$ = $skater_f_head$
   :i :s}
   :i :s{
      :i $text$ = %sc(5,"Chest")
      :i $submenu$ = $torso_scale_menu$
      :i $scaling_params$ = :s{$affectXY$:s}
      :i $should_add_scaling_options$
      :i $bone_group$ = $torso_bone_group$
      :i $cam_anim_sub$ = $adjtorso$
   :i :s}
   :i :s{
      :i $text$ = %sc(5,"Waist")
      :i $submenu$ = $stomach_scale_menu$
      :i $scaling_params$ = :s{$affectXY$:s}
      :i $should_add_scaling_options$
      :i $bone_group$ = $stomach_bone_group$
      :i $cam_anim_sub$ = $waist$
   :i :s}
   :i :s{
      :i $text$ = %sc(6,"Biceps")
      :i $submenu$ = $upper_arm_scale_menu$
      :i $scaling_params$ = :s{$affectXY$:s}
      :i $should_add_scaling_options$
      :i $bone_group$ = $upper_arm_bone_group$
      :i $cam_anim_sub$ = $adjtorso$
   :i :s}
   :i :s{
      :i $text$ = %sc(8,"Forearms")
      :i $submenu$ = $lower_arm_scale_menu$
      :i $scaling_params$ = :s{$affectXY$:s}
      :i $should_add_scaling_options$
      :i $bone_group$ = $lower_arm_bone_group$
      :i $cam_anim_sub$ = $adjtorso$
   :i :s}
   :i :s{
      :i $text$ = %sc(5,"Hands")
      :i $submenu$ = $hands_scale_menu$
      :i $scaling_params$ = :s{$affectXY$:s}
      :i $should_add_scaling_options$
      :i $bone_group$ = $hands_bone_group$
      :i $cam_anim_sub$ = $legs$
   :i :s}
   :i :s{
      :i $text$ = %sc(6,"Thighs")
      :i $submenu$ = $upper_leg_scale_menu$
      :i $scaling_params$ = :s{$affectXY$:s}
      :i $should_add_scaling_options$
      :i $bone_group$ = $upper_leg_bone_group$
      :i $cam_anim_sub$ = $legs$
   :i :s}
   :i :s{
      :i $text$ = %sc(6,"Calves")
      :i $submenu$ = $lower_leg_scale_menu$
      :i $scaling_params$ = :s{$affectXY$:s}
      :i $should_add_scaling_options$
      :i $bone_group$ = $lower_leg_bone_group$
      :i $cam_anim_sub$ = $calves$
   :i :s}
   :i :s{
      :i $text$ = %sc(4,"Feet")
      :i $submenu$ = $feet_scale_menu$
      :i $scaling_params$ = :s{$affectXY$:s}
      :i $should_add_scaling_options$
      :i $bone_group$ = $feet_bone_group$
      :i $cam_anim_sub$ = $Feet$
   :i :s}
   :i :s{
      :i $text$ = %sc(4,"Deck")
      :i $submenu$ = $face_scale_menu$
      :i $scaling_params$ = :s{call $affectX$ arguments
            $affectY$$affectZ$$affectXY$$affectXYZ$:s}
      :i $should_add_scaling_options$
      :i $bone_group$ = $board_bone_group$
      :i $cam_anim_sub$ = $legs$
   :i :s}
   :i :a}

Also, is there a pre file I have to dummy to load cas_parts.qb?
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Deck Scale mod

Postby WhoElseButMe » Wed Jan 18, 2017 11:54 am

shaun wrote:Like this?

Exactly like that.

shaun wrote:I can get cas_parts.qb to compile, but I can't compile scalingmenu.qb when I try to add the board bone group. I just get a temp.dump. What am I doing wrong?

What version of roq compiler are you using? 2.1 rebuilds the tables.
Also, upload the text version of the script you're trying to compile and the dump file.
shaun wrote:Also, is there a pre file I have to dummy to load cas_parts.qb?

qb_scripts.prx
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.
shaun
Posts: 13
Joined: Tue Jan 17, 2017 1:27 am
Contact:

Re: Deck Scale mod

Postby shaun » Wed Jan 18, 2017 8:20 pm

WhoElseButMe wrote:What version of roq compiler are you using? 2.1 rebuilds the tables.

I'm using the roq.exe and cmd GUI in QB Explorer 2.1.rar from thps-mods.com/tools.php. I'm sure the problem is with my script and not the compiler. All I've done is add board_bone_group to $scalingmenu_constraints$ and $skateshop_scaling_options$. I feel like the script should be a lot more detailed than that.
WhoElseButMe wrote:Also, upload the text version of the script you're trying to compile and the dump file.

Here you go: https://www.mediafire.com/?chd6wjg86h9mhde
shaun
Posts: 13
Joined: Tue Jan 17, 2017 1:27 am
Contact:

Re: Deck Scale mod

Postby shaun » Wed Jan 18, 2017 11:25 pm

I figured it out. I had to add "#addx 0xac66013c "board_bone_group"" to the qb table. So deck scaling works! However, I'm still having issues with -1.#QNAN0. roq just refuses to compile anything that contains -1.#QNAN0. Any idea why?
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Deck Scale mod

Postby WhoElseButMe » Wed Jan 18, 2017 11:56 pm

As I said you need version 2.1 and it will rebuild the table for you.
The tool doesn't support NaN as a value.

Directory of some tools that might come in handy
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.
shaun
Posts: 13
Joined: Tue Jan 17, 2017 1:27 am
Contact:

Re: Deck Scale mod

Postby shaun » Thu Jan 19, 2017 3:21 am

Got it. Now I just have two more questions:

1. Can I make the deck show when I'm in the deck scale menu? I tried adding $Deck$$show_deck$ to $cam_anim_sub$ but it still just shows the skaters legs.

2. I added this code to each item in $skateshop_scaling_options$ to let me scale the X, Y and Z axes individually:

Code: Select all

:i $scaling_params$ = :s{call $affectX$ arguments
      $affectY$$affectZ$$affectXY$$affectXYZ$:s}

Unfortunately this causes the game to crash sporadically when exiting scale menus. Is there any way to fix this?

Thanks for all your help, BTW. I really appreciate it.
WhoElseButMe
Posts: 419
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: Deck Scale mod

Postby WhoElseButMe » Thu Jan 19, 2017 3:27 am

I forget what I ended up doing to make the deck show up off the top of my head. I had to edit a script to support it though.
Adding the options like that shouldn't crash. The only issue I ever had with that was the menu positions weren't designed for it so elements would overlap. I'll see if I can find my board show fix.
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 22 guests