Help Mee :*

Discuss thaw modding, post your own, share your ideas, ask questions.
UAntiH
Posts: 12
Joined: Sun May 15, 2011 6:24 am
Contact:

Help Mee :*

Postby UAntiH » Tue Jul 26, 2011 5:00 pm

Hello, pliz help me.
How to create a model format .skin on the map.
Video:
http://www.youtube.com/watch?v=9-r8wjpV ... rofilepage
I tried this code but it does not work!
Help please.

Code: Select all

:i $Skater$.$Obj_GetPosition$
:i $CreateCompositeObject$:s{
:i $Components$ = :a{
:i :s{
:i $component$ = $model$
:i $model$ = %s(34,"models/peds/Ped_OldLady_Fullbody/Ped_OldLady_Fullbody.skin")
:i :s}
:i :a}
:i $params$ = :s{$name$ = $oldlady$
:i $pos$ = (%GLOBAL%$pos$ + %vec3(40.000000,20.000000,0.000000))
:i $NeverSuspend$
:i :s}
:i :s}
Anteara
Posts: 268
Joined: Thu Oct 14, 2010 2:55 am
Contact:

Re: Help Mee :*

Postby Anteara » Thu Jul 28, 2011 7:41 am

I'm not sure if I understand what you mean, you should be able to decompile a levels qb and look in the array... find something like

Code: Select all

   :i :s{
      :i $Pos$ = %vec3(-79.554703,-3271.641113,634.625366)
      :i $Angles$ = %vec3(-3.141593,-1.064651,3.141593)
      :i $Name$ = $TRG_Ped_Sub01$
      :i $Class$ = $Pedestrian$
      :i $Type$ = $Ped_F_From_Profile$
      :i $AbsentInNetGames$
      :i $PedAI_Type$ = $Stand$
      :i $SkeletonName$ = $Ped_Female$
      :i $AnimName$ = $animload_ped_female$
      :i $profile$ = $random_female_profile$
      :i $SuspendDistance$ = %i(0,00000000)
      :i $lod_dist1$ = %i(80,00000050)
      :i $lod_dist2$ = %i(120,00000078)
      :i $TriggerScript$ = $TRG_Ped_Sub01Script$
   :i :s}


Then use

Code: Select all

:i call $create$ arguments
   $name$ = $the name as shown above$


I don't know how to change the model from the default one. Maybe someone can help you..

but if people can't understand you... I think the question is simply...

"How does one spawn a ped?"
UAntiH
Posts: 12
Joined: Sun May 15, 2011 6:24 am
Contact:

Re: Help Mee :*

Postby UAntiH » Thu Jul 28, 2011 12:53 pm

Yes, I want to learn how to create ped on the map.
And make sure to play the animation as a video mode 23
As I understand the code should be such?
But it does not work. :nope:

Code: Select all

:i $Skater$.$Obj_GetPosition$
:i call $create$ arguments
   $name$ = $random_girl$
   :i :s{
      :i $Pos$ = %GLOBAL%$pos$
      :i $Angles$ = %vec3(-3.141593,-1.064651,3.141593)
      :i $Name$ = $random_girl$
      :i $Class$ = $Pedestrian$
      :i $Type$ = $Ped_F_From_Profile$
      :i $AbsentInNetGames$
      :i $PedAI_Type$ = $Stand$
      :i $SkeletonName$ = $Ped_Female$
      :i $AnimName$ = $animload_ped_female$
      :i $profile$ = $random_female_profile$
      :i $SuspendDistance$ = %i(0,00000000)
      :i $lod_dist1$ = %i(80,00000050)
      :i $lod_dist2$ = %i(120,00000078)
      :i $TriggerScript$ = $TRG_Ped_Sub01Script$
   :i :s}
:i endfunction

Help Me pls :(
quazz
Posts: 185
Joined: Sat May 01, 2010 5:57 pm
Contact:

Re: Help Mee :*

Postby quazz » Thu Jul 28, 2011 8:48 pm

I think he wants to spawn a ped using composite object not using the node array. But at any rate he almost had it. I promise to post something here shortly.

That last code isn't gonna work, you were closer with the first one. Just missing a few pieces.
UAntiH
Posts: 12
Joined: Sun May 15, 2011 6:24 am
Contact:

Re: Help Mee :*

Postby UAntiH » Fri Jul 29, 2011 8:49 am

I tried to write new code. Something like this:
But it does not work :(

Code: Select all

:i $exit_pause_menu$
:i $Skater$.$Obj_GetPosition$
:i $CreateCompositeObject$:s{
:i $Components$ = :a{
:i :s{
:i $component$ = $profile$
:i $profile$ = $mv_pro_alva$
:i :s}
:i :s{
:i $component$ = $animLoadScript$
:i $animLoadScript$ = $animload_THPS7_human$
:i :s}
:i :s{
:i $component$ = $SkeletonName$
:i $SkeletonName$ = $THPS7_human$
:i :s}
:i :a}
:i $params$ = :s{$name$ = $spawn_ped_alva$
:i $pos$ = (%GLOBAL%$pos$ + %vec3(40.000000,00.000000,0.000000))
:i $NeverSuspend$
:i $defaultAnim$ = $Ped_M_Idle1$
:i :s}
:i :s}
:i endfunction

and

Code: Select all

:i $exit_pause_menu$
:i $Skater$.$Obj_GetPosition$
:i $CreateCompositeObject$:s{
:i $Components$ = :a{
:i :s{
:i $component$ = $creation_params$
:i $creation_params$ = $ped_m_creation_params$
:i :s}
:i :s{
:i $component$ = $pedlogic_params$
:i $pedlogic_params$ = $Vato_pedlogic_params$
:i :s}
:i :s{
:i $component$ = $ped_head$
:i $desc_id$ = $Ped_Vato_HEAD1$
:i :s}
:i :s{
:i $component$ = $ped_body$
:i $desc_id$ = $Ped_Vato$
:i :s}
:i :s{
:i $component$ = $ped_board$
:i $desc_id$ = $ped_board$
:i :s}
:i :s{
:i $component$ = $body_shape$
:i $body_shape$ = $Fatman_scale_info$
:i :s}
:i :a}
:i $params$ = :s{$name$ = $spawnped_vato$
:i $pos$ = (%GLOBAL%$pos$ + %vec3(40.000000,00.000000,0.000000))
:i :s}
:i :s}
:i endfunction
Anteara
Posts: 268
Joined: Thu Oct 14, 2010 2:55 am
Contact:

Re: Help Mee :*

Postby Anteara » Fri Jul 29, 2011 2:54 pm

I tried to make my own function for what you need... tested in thug2... same for thaw, except thps6 might be thps7...

Edit: OKAY - This WILL spawn a ped on the map.


Code: Select all

:i function $anteara_ped12lol$
   :i $Skater$.$Obj_GetPosition$
   :i $CreateCompositeObject$:s{
      :i $Components$ =
      :i :a{
         :i :s{
            :i $component$ = $motion$
         :i :s}
         :i :s{
            :i $component$ = call $Suspend$ arguments
               $NeverSuspend$
         :i :s}
         :i :s{
            :i $component$ = call $skeleton$ arguments
               $SkeletonName$ = $THPS6_human$
         :i :s}
         :i :s{
            :i $component$ = $model$
         :i :s}
         :i :s{
            :i $component$ = call $animBlender$ arguments
               $SkeletonName$ = $THPS6_human$
         :i :s}
         :i :a}
      :i $Params$ = :s{
            :i $Name$ = $le_ped$
            :i $pos$ =  (%GLOBAL%$pos$ + %vec3(40.000000,0.000000,0.000000))
      :i :s}
   :i :s}
:i$le_ped$.$Obj_InitModel$ arguments
   $model$ = %s(29,"Peds/Ped_Judge/Ped_Judge.skin")$use_asset_manager$ = %i(1,00000001)
:i endfunction


The last part where i load the .skin, you may change that to whatever you want.

I don't know how to do AI and stuff yet, but it is now loading a ped online as a composite object.


Edit: So yeah.. All I can do is spawn the ped, i can't make it act like a ped.. does anyone else know how to do that?
polak
Posts: 23
Joined: Fri Mar 04, 2011 8:37 pm
Contact:

Re: Help Mee :*

Postby polak » Fri Jul 29, 2011 9:25 pm

i made this and it's dosent work

Code: Select all

#/ function start
:i$le_ped$.$Obj_InitModel$ arguments
   $model$ = %s(29,"models/peds/ped_bodyguard01/Ped_Bodyguard01.skin")$use_asset_manager$ = %i(1,00000001)
:i call $MangleChecksums$ arguments
   $a$ = %GLOBAL%$name$$b$ = $marker_cone1$
:i $skater$.$Obj_GetPosition$
:i $CreateCompositeObject$:s{
   :i $Components$ =
   :i :a{
      :i :s{$Component$ = $Motion$:s}
      :i :s{$Component$ = $LockObj$:s}
:i :s{$Component$ = $skeleton$:s}
      :i :s{$Component$ = $THPS7_human$:s}

      :i :s{$Component$ = call $model$ arguments
            $model$ = %GLOBAL%$model$:s}
      :i :a}
            :i $params$ = :s{$pos$ = %GLOBAL%$pos$:s}:i :s}
:i %GLOBAL%$mangled_id$.call $Obj_LockToObject$ arguments
   $Obj_InitModel$ = %GLOBAL%$name$%vec3(-60.000000,0.000000,0.000000)
:i call $MangleChecksums$ arguments
   $a$ = %GLOBAL%$name$$b$ = $marker_cone2$
:i $CreateCompositeObject$:s{
   :i $Components$ =
   :i :a{
      :i :s{$Component$ = $Motion$:s}
      :i :s{$Component$ = $LockObj$:s}

      :i :s{$Component$ = $THPS7_human$:s}

      :i :s{$Component$ = call $model$ arguments
            $model$ = %GLOBAL%$model$:s}
      :i :a}
            :i $params$ = :s{$pos$ = %GLOBAL%$pos$:s}
:i :s}
:i %GLOBAL%$mangled_id$.call $Obj_LockToObject$ arguments
   $ObjectName$ = %GLOBAL%$name$%vec3(60.000000,0.000000,0.000000)
:i endfunction
UAntiH
Posts: 12
Joined: Sun May 15, 2011 6:24 am
Contact:

Re: Help Mee :*

Postby UAntiH » Sat Jul 30, 2011 9:01 am

it does not work :wat: :nope:
I replaced thps6 on thps7 and still is not working. :cry:
Maybe I did something wrong. Correct please. :help
Help me please

Code: Select all

:i $exit_pause_menu$
:i $le_ped$.$Obj_InitModel$
   $model$ = %s(29,"models/peds/ped_bodyguard01/Ped_Bodyguard01.skin")$use_asset_manager$ = %i(1,00000001)
:i call $MangleChecksums$ arguments
   $a$ = %GLOBAL%$name$$b$ = $marker_cone1$
:i $skater$.$Obj_GetPosition$
:i $CreateCompositeObject$:s{
   :i $Components$ =
   :i :a{
      :i :s{$Component$ = $Motion$:s}
      :i :s{$Component$ = $LockObj$:s}
:i :s{$Component$ = $skeleton$:s}
      :i :s{$Component$ = $THPS7_human$:s}

      :i :s{$Component$ = call $model$ arguments
            $model$ = %GLOBAL%$model$:s}
      :i :a}
            :i $params$ = :s{$pos$ = %GLOBAL%$pos$:s}:i :s}
:i %GLOBAL%$mangled_id$.call $Obj_LockToObject$ arguments
   $Obj_InitModel$ = %GLOBAL%$name$%vec3(-60.000000,0.000000,0.000000)
:i call $MangleChecksums$ arguments
   $a$ = %GLOBAL%$name$$b$ = $marker_cone2$
:i $CreateCompositeObject$:s{
   :i $Components$ =
   :i :a{
      :i :s{$Component$ = $Motion$:s}
      :i :s{$Component$ = $LockObj$:s}

      :i :s{$Component$ = $THPS7_human$:s}

      :i :s{$Component$ = call $model$ arguments
            $model$ = %GLOBAL%$model$:s}
      :i :a}
            :i $params$ = :s{$pos$ = %GLOBAL%$pos$:s}
:i :s}
:i %GLOBAL%$mangled_id$.call $Obj_LockToObject$ arguments
   $ObjectName$ = %GLOBAL%$name$%vec3(60.000000,0.000000,0.000000)
:i $RunScriptOnObject$$id$ = %GLOBAL%$mangled_id$$set_ped_anim_handlers$
:i $le_ped$.call $Obj_PlayAnim$ arguments
       $Anim$ = $Ped_M_Punch$
:i endfunction
polak
Posts: 23
Joined: Fri Mar 04, 2011 8:37 pm
Contact:

Re: Help Mee :*

Postby polak » Sat Jul 30, 2011 9:14 am

hmm your script for thug2 dosent work on thaw
maybe add more component ? rigid body ?
ps: i ediit my script for spawn objects near skate
Morten1337
Posts: 132
Joined: Tue Jun 08, 2010 11:11 pm
Contact:

Re: Help Mee :*

Postby Morten1337 » Sat Jul 30, 2011 2:16 pm

Code: Select all

      :i $skater$.$Obj_GetPosition$
            :i $CreateCompositeObject$ :s{
               :i $Components$ =
               :i :a{
                  :i :s{$component$ = $motion$ :s}
                  :i :s{$component$ = call $Suspend$ arguments
                        $NeverSuspend$:s}
                  :i :s{$component$ = call $skeleton$ arguments
                        $SkeletonName$ = $THPS7_human$:s}
                  :i :s{$component$ = $model$:s}
                  :i :s{$component$ = $projectileproximity$:s}
                  :i :s{$component$ = call $animBlender$ arguments
                        $SkeletonName$ = $THPS7_human$:s}
                  :i :a}
            :i $Params$ = :s{$pos$ = %GLOBAL%$pos$$model$ = %s(0,"models/peds/ped_bodyguard01/Ped_Bodyguard01.skin")$name$ = $pedestrian$:s}
            :i $pedestrian$.call $PlayAnim$ arguments
                  $Anim$ = $Ped_M_Idle1$$cycle$
polak
Posts: 23
Joined: Fri Mar 04, 2011 8:37 pm
Contact:

Re: Help Mee :*

Postby polak » Sat Jul 30, 2011 8:50 pm

crash
quazz
Posts: 185
Joined: Sat May 01, 2010 5:57 pm
Contact:

Re: Help Mee :*

Postby quazz » Sat Jul 30, 2011 9:10 pm

Morten you forgot to close it?

Code: Select all

      :i $skater$.$Obj_GetPosition$
            :i $CreateCompositeObject$ :s{
               :i $Components$ =
               :i :a{
                  :i :s{$component$ = $motion$ :s}
                  :i :s{$component$ = call $Suspend$ arguments
                        $NeverSuspend$:s}
                  :i :s{$component$ = call $skeleton$ arguments
                        $SkeletonName$ = $THPS7_human$:s}
                  :i :s{$component$ = $model$:s}
                  :i :s{$component$ = $projectileproximity$:s}
                  :i :s{$component$ = call $animBlender$ arguments
                        $SkeletonName$ = $THPS7_human$:s}
                  :i :a}
               :i $Params$ = :s{$pos$ = %GLOBAL%$pos$$model$ = %s(0,"models/peds/ped_bodyguard01/Ped_Bodyguard01.skin")$name$ = $pedestrian$:s}
               :i $pedestrian$.call $PlayAnim$ arguments
                  $Anim$ = $Ped_M_Idle1$$cycle$
            :i :s}
polak
Posts: 23
Joined: Fri Mar 04, 2011 8:37 pm
Contact:

Re: Help Mee :*

Postby polak » Sat Jul 30, 2011 10:03 pm

crash ;(
Anteara
Posts: 268
Joined: Thu Oct 14, 2010 2:55 am
Contact:

Re: Help Mee :*

Postby Anteara » Sun Jul 31, 2011 8:43 am

Okay, I've figured out how to spawn the ped as a composite object, and I've figured out how to play anims on the ped. It's possible to change the anim, etc.

Firstly, as it took me a while to figure this out, i'll tell you how to play the anims...
This is what you must know....

For the anim you want to play, go to the THAW equivalent of the allanims file. (I'm going to show functions / anims from THUG2, it should work for THAW, I don't see any reason why it wouldn't be the same)

Find an anim you want, for example I want $Ped_Bikini_LyingFrontToBack$.

The function it is in is called

Code: Select all

:i function call $animload_Ped_Bikini$ arguments
      $LoadFunction$ = $LoadAnim$
   :i call $SetReferenceChecksum$ arguments
      $Ped_Female$


take note of the function name and checksum.

Go back to your composite object script,

Code: Select all

:i function $anteara_ped12lol$
   :i $Skater$.$Obj_GetPosition$
      :i $CreateCompositeObject$:s{
         :i $Components$ =
         :i :a{
            :i :s{$component$ = $motion$:s}
            :i :s{$component$ = call $Suspend$ arguments
                  $NeverSuspend$:s}
            :i :s{$component$ = $skeleton$
               :i $SkeletonName$ = $Ped_Female$
               :i $max_bone_skip_lod$ = %i(0,00000000)
            :i :s}
            :i :s{$component$ = $model$
            :i :s}
            :i :s{$component$ = $AnimBlender$
               :i $AnimName$ = $animload_Ped_Bikini$
               :i $SkeletonName$ = $Ped_Female$
            :i :s}
            :i :a}
         :i $params$ = :s{$pos$ = %GLOBAL%$pos$$model$ = %s(43,"Peds\Ped_FemaleFull01\Ped_FemaleFull01.skin")$name$ = $Pedestrian$:s}
      :i :s}
   :i $Pedestrian$.call $Obj_PlayAnim$ arguments
      $anim$ = $Ped_Bikini_LyingFrontToBack$$cycle$
:i endfunction


Code: Select all

            :i :s{$component$ = $skeleton$
               :i $SkeletonName$ = $Ped_Female$
               :i $max_bone_skip_lod$ = %i(0,00000000)
            :i :s}


The skeleton name must be $Ped_Female$, or else the anim won't play. This is because (I think) the ReferenceChecksum is called Ped_Female.

Code: Select all

            :i :s{$component$ = $AnimBlender$
               :i $AnimName$ = $animload_Ped_Bikini$
               :i $SkeletonName$ = $Ped_Female$
            :i :s}


Here, again, the skeleton name is $Ped_Female$. The AnimName is $animload_Ped_Bikini$ because that is the function name.

Code: Select all

:i function call $animload_Ped_Bikini$ arguments


The function $anteara_ped12lol$ should work in THAW, you just need the change the skeleton, the AnimBlender component, the model, and the Anim Name to what you want.

Again... I don't see why this would crash in THAW.. The format for THUG2 and THAW CompositeObjects are exactly the same.


Edit: I don't have THAW at the moment, so can anyone with it (Morten, Quazz, Whoelse, etc) that is capable of doing this properly please test this code + fixes for thaw and tell me if it works for THAW as well? I ask this because I don't see why the code morten supplied would crash the OP and Polak, it seems like a perfect code...
UAntiH
Posts: 12
Joined: Sun May 15, 2011 6:24 am
Contact:

Re: Help Mee :*

Postby UAntiH » Sun Jul 31, 2011 10:26 am

Morten1337 wrote:

Code: Select all

      :i $skater$.$Obj_GetPosition$
            :i $CreateCompositeObject$ :s{
               :i $Components$ =
               :i :a{
                  :i :s{$component$ = $motion$ :s}
                  :i :s{$component$ = call $Suspend$ arguments
                        $NeverSuspend$:s}
                  :i :s{$component$ = call $skeleton$ arguments
                        $SkeletonName$ = $THPS7_human$:s}
                  :i :s{$component$ = $model$:s}
                  :i :s{$component$ = $projectileproximity$:s}
                  :i :s{$component$ = call $animBlender$ arguments
                        $SkeletonName$ = $THPS7_human$:s}
                  :i :a}
            :i $Params$ = :s{$pos$ = %GLOBAL%$pos$$model$ = %s(0,"models/peds/ped_bodyguard01/Ped_Bodyguard01.skin")$name$ = $pedestrian$:s}
            :i $pedestrian$.call $PlayAnim$ arguments
                  $Anim$ = $Ped_M_Idle1$$cycle$

it does not work :cry: crash thaw

Return to “THAW modding”

Who is online

Users browsing this forum: No registered users and 3 guests