Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
ceedj

Peds thread

Recommended Posts

random_download

Whoa didn't realise that this topic had changed until now.

Yes, you can use F1, F2 etc. and also combinations eg. Shift + Ctrl + F1 or whatever. Once you have the scm that you are going to use to film, compile it and send it me along with the source and I should be able to find the variables used for the actors. UIf you change the scm after this, it is possible that the vars will change around, and so will need to be updated the hotkey dll.

Share this post


Link to post
Share on other sites
ceedj

 

Whoa didn't realise that this topic had changed until now.

Yes, you can use F1, F2 etc. and also combinations eg. Shift + Ctrl + F1 or whatever. Once you have the scm that you are going to use to film, compile it and send it me along with the source and I should be able to find the variables used for the actors. UIf you change the scm after this, it is possible that the vars will change around, and so will need to be updated the hotkey dll.

The actors are easy; I already have them defined:

 

1 Actor Animation Keys (A-Z, others) ($Grp1Ped1)

 

2 Actors

Two Peds

Ped 1 = SHIFT + Animation Key ($Grp2Ped1)

Ped 2 = CTRL LF + Animation Key($Grp2Ped2)

 

Three Peds

Ped 1 = ATL LF + Animation Key($Grp3Ped1)

Ped 2 = ALT RT + Animation Key($Grp3Ped2)

Ped 3 = CTRL RT + Animation Key($Grp3Ped3)

 

Four Peds (F keys, ect, need to find out which ones are NOT modifiable in-game)

($Grp4Ped1)

($Grp4Ped2)

($Grp4Ped3)

($Grp4Ped4)

 

What I need to know is if you can do this: (This is only an example; the keys will be changed when I am finished)

 

K (Set ped run away) =

009C: set_actor $Grp1Ped1 wander_path_to 0

0319: actor $Grp1Ped1 wander_state_to 1

 

 

L (Set ped stop) =

001C: actor $Grp1Ped1 clear_objective

020F: actor $Grp1Ped1 look_at_player $PLAYER_CHAR

(other actor, if I feel the need - not sure yet)

 

This will give your peds a walk/run setup, useful for getting them from one place to another. Most of the other animations will be one line wait states, but I thought this would be nice for putting a little "action" into a shot.

 

(BTW, I've often seen this: 0319: actor $Grp1Ped wander_state_to 1 (off), but I found out that 0 is walk and 1 is run. Nice for me, anyway, having two codes in one. biggrin.gif )

 

A couple of more general questions (after much friutless searching) :

 

As seen above, 009C sets the path. Does anyone have any idea where these paths are called from? -1 and 1 seem be the same; walk/run after turning. 0 sometimes makes the ped walk in the direction he/she is facing. Is anyone aware of a way to get the actor to ALWAYS walk without turning first?

 

I almost had all the ped skins AND actor skins available, but ran into the 800lb gorilla known as default.ide. My research tells me that the game only looks for objs 0-299 in default.ide. Is there anyway to get past this limitaion? I can add three additional peds (Sonny, or Lance, or whoever) at the bottom (using ID 9001, 9002, 9003) and they will show up, but as soon as I add another one (9004), the game stalls at the loading progress bar. I also tried playing with Steve-M's VCLimitAdjust, but no love there. Am I stuck with this? Not a huge deal though...

 

Weather control and clock-lock are finished though (and are AWESOME!) Should hopefully help me avoid things like that awful lighting shift in the middle of Take3 of my trailer. blink.gif

 

EDIT: DISTRIBUTION QUESTION

 

If other people want to use this, they need to set up their keys to match mine, all in the top row numbers. I do this so that you NEVER press a number to call an amination key. This also helps in moving the player around, (arrow keys stay the same, but action, sprint, etc use 1-9) since if you press an animation key without a ped created, the game will crash to the desktop. I'm not worried so much about that; it's in real big letters in the Read Me. If you're dumb enough to spawn an animation for an actor that doesn't exsist, you deserve to be dumped to your desktop. biggrin.gif I also have a custom setup for the CamHack, using only the number keys.

 

Anyway, the problem is this: remapping the player control keys in Vice is a royal pain in the ass. Would it be advisable to advise people to back up their gtavc.set file and give them mine with the mod? Does this even work?

Edited by ceedj

Share this post


Link to post
Share on other sites
random_download

Yes, the gtavc.set file contains all your controls etc.

To make a ped walk forward without turning you could try:

 

04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $actor offset  0.0  5.0  0.00211: walk_actor $actor to_point @0 @1

 

Running that in a loop should work.

Yeah, I can execute those lines (009C: set_actor $Grp1Ped1 wander_path_to 0) etc.

For the vvars I will need to read it from a compiled scm, it should look like this in a hex editor:

 

009C: set_actor $Grp1Ped1 wander_path_to 09C 00 02 <var> 04 00

 

And I will need to know what <var> is (which should be 2 bytes long btw).

Yeah, so if you can e-mail, or send over msn or whatever the compiled scm that you are using and the source so I can find where I am in it, then I can give you the keypress tool.

Share this post


Link to post
Share on other sites
ceedj

 

And I will need to know what <var> is (which should be 2 bytes long btw).

 

ACK! How do I figure that out? Or will the compiler do that for me?

 

These are the ONLY vars that the keymapper will need. Everything else is controlled by the main.scm and combo presses on the player keys. The scm is actually done; here it is: (zip file below code)

 

 

Toss this in your "Create Threads" section:; ViceStudioThreads004F: create_thread ££Create1PedWait004F: create_thread ££SetWeather004F: create_thread ££FreezeOnToss this after all the labels but before "Mission 0":FreezeOn0001: wait 250 ms00D6: if 100E1: key_pressed 0 700E1: key_pressed 0 8004D: jump_if_false ££FreezeOn00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes:FreezeOff0001: wait 900 ms00C0: set_current_time [email protected] [email protected]: force_weather $WeatherSelect00D6: if 100E1: key_pressed 0 700E1: key_pressed 0 9004D: jump_if_false ££FreezeOff0002: jump ££FreezeOn:SetWeather0001: wait 0 ms0004: $WeatherSelect = 0:SetWeatherWait0001: wait 0 ms00D6: if 100E1: key_pressed 0 700E1: key_pressed 0 13004D: jump_if_false ££SetWeatherWait0001: wsit 250 ms0008: $WeatherSelect += 100D6: if 00038: $WeatherSelect == 6004D: jump_if_false ££ChooseWeather0038: $WeatherSelect == 0:ChooseWeather00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££ChooseWeather0169: set_fade_color 5 5 5016A: fade 0 () 500 ms0001: wait 1500 ms01B6: set_weather $WeatherSelect016A: fade 1 (back) 500 ms0002: jump ££SetWeatherWait:Create1PedWait0001: wait 0 ms00D6: if 100E1: key_pressed 0 700E1: key_pressed 0 16004D: jump_if_false ££Delete1PedWait0050: gosub ££Old1PedCleanup0050: gosub ££Pick1Ped :Delete1PedWait00D6: if 100E1: key_pressed 0 500E1: key_pressed 0 16004D: jump_if_false ££Create2PedsWait0050: gosub ££Old1PedCleanup:Create2PedsWait0001: wait 0 ms00D6: if 100E1: key_pressed 0 700E1: key_pressed 0 19004D: jump_if_false ££Delete2PedsWait0050: gosub ££Old2PedsCleanup0050: gosub ££Pick2Peds:Delete2PedsWait00D6: if 100E1: key_pressed 0 500E1: key_pressed 0 19004D: jump_if_false ££Create3PedsWait0050: gosub ££Old2PedsCleanup:Create3PedsWait0001: wait 0 ms00D6: if 100E1: key_pressed 0 700E1: key_pressed 0 15004D: jump_if_false ££Delete3PedsWait0050: gosub ££Old3PedsCleanup0050: gosub ££Pick3Peds :Delete3PedsWait00D6: if 100E1: key_pressed 0 500E1: key_pressed 0 15004D: jump_if_false ££Create4PedsWait0050: gosub ££Old3PedsCleanup:Create4PedsWait0001: wait 0 ms00D6: if 100E1: key_pressed 0 700E1: key_pressed 0 6004D: jump_if_false ££Delete4PedsWait0050: gosub ££Old4PedsCleanup0050: gosub ££Pick4Peds:Delete4PedsWait00D6: if 100E1: key_pressed 0 500E1: key_pressed 0 6004D: jump_if_false ££CreateCarWait0050: gosub ££Old4PedsCleanup:CreateCarWait0001: wait 0 ms00D6: if 100E1: key_pressed 0 700E1: key_pressed 0 18004D: jump_if_false ££DeleteCarWait0050: gosub ££OldCarCleanup0050: gosub ££PickCar:DeleteCarWait00D6: if 100E1: key_pressed 0 500E1: key_pressed 0 18004D: jump_if_false ££CreateCar2Wait0050: gosub ££OldCarCleanup:CreateCar2Wait0001: wait 0 ms00D6: if 100E1: key_pressed 0 700E1: key_pressed 0 17004D: jump_if_false ££DeleteCar2Wait0050: gosub ££OldCar2Cleanup0001: wait 0 ms0050: gosub ££PickCar2:DeleteCar2Wait00D6: if 100E1: key_pressed 0 500E1: key_pressed 0 17004D: jump_if_false ££ChangeSkinWait0050: gosub ££OldCar2Cleanup:ChangeSkinWait00D6: if 100E1: key_pressed 0 700E1: key_pressed 0 14004D: jump_if_false ££KillAllWait0050: gosub ££PickSkin:KillAllWait0001: wait 0 ms00D6: if 100E1: key_pressed 0 500E1: key_pressed 0 4004D: jump_if_false ££Create1PedWait0050: gosub ££KillAllCleanup0002: jump ££Create1PedWait:Old1PedCleanup034F: destroy_actor_with_fade $Grp1Ped10051: return:Old2PedsCleanup034F: destroy_actor_with_fade $Grp2Ped1034F: destroy_actor_with_fade $Grp2Ped20051: return:Old3PedsCleanup034F: destroy_actor_with_fade $Grp3Ped1034F: destroy_actor_with_fade $Grp3Ped2034F: destroy_actor_with_fade $Grp3Ped30051: return:Old4PedsCleanup034F: destroy_actor_with_fade $Grp4Ped1034F: destroy_actor_with_fade $Grp4Ped2034F: destroy_actor_with_fade $Grp4Ped3034F: destroy_actor_with_fade $Grp4Ped40051: return:OldCarCleanup00A6: destroy_car [email protected]: return:OldCar2Cleanup00A6: destroy_car [email protected]: return:KillAllCleanup034F: destroy_actor_with_fade $Grp1Ped1034F: destroy_actor_with_fade $Grp2Ped1034F: destroy_actor_with_fade $Grp2Ped2034F: destroy_actor_with_fade $Grp3Ped1034F: destroy_actor_with_fade $Grp3Ped2034F: destroy_actor_with_fade $Grp3Ped3034F: destroy_actor_with_fade $Grp4Ped1034F: destroy_actor_with_fade $Grp4Ped2034F: destroy_actor_with_fade $Grp4Ped3034F: destroy_actor_with_fade $Grp4Ped400A6: destroy_car [email protected]: destroy_car [email protected]: return:Pick1Ped0001: wait 250 ms0050: gosub ££ThePeds0050: gosub ££CreateCoordPed009A: $Grp1Ped1 = create_actor 4 $PedSelect at $Fish $Sock $CatFood020F: set_actor $Grp1Ped1 look_at_player $PLAYER_CHAR0249: release_model $PedSelect0051: return:Pick2Peds0001: wait 250 ms0050: gosub ££ThePeds0050: gosub ££CreateCoordPed009A: $Grp2Ped1 = create_actor 4 $PedSelect at $Fish $Sock $CatFood020F: set_actor $Grp2Ped1 look_at_player $PLAYER_CHAR0249: release_model $PedSelect0050: gosub ££ThePeds0050: gosub ££CreateCoordPed009A: $Grp2Ped2 = create_actor 4 $PedSelect at $Fish $Sock $CatFood020F: set_actor $Grp2Ped2 look_at_player $PLAYER_CHAR0249: release_model $PedSelect0051: return:Pick3Peds0001: wait 250 ms0050: gosub ££ThePeds0050: gosub ££CreateCoordPed009A: $Grp3Ped1 = create_actor 4 $PedSelect at $Fish $Sock $CatFood020F: set_actor $Grp3Ped1 look_at_player $PLAYER_CHAR0249: release_model $PedSelect0050: gosub ££ThePeds0050: gosub ££CreateCoordPed009A: $Grp3Ped2 = create_actor 4 $PedSelect at $Fish $Sock $CatFood020F: set_actor $Grp3Ped2 look_at_player $PLAYER_CHAR0249: release_model $PedSelect 0050: gosub ££ThePeds0050: gosub ££CreateCoordPed009A: $Grp3Ped3 = create_actor 4 $PedSelect at $Fish $Sock $CatFood020F: set_actor $Grp3Ped3 look_at_player $PLAYER_CHAR0249: release_model $PedSelect0051: return:Pick4Peds0001: wait 250 ms0050: gosub ££ThePeds0050: gosub ££CreateCoordPed009A: $Grp4Ped1 = create_actor 4 $PedSelect at $Fish $Sock $CatFood020F: set_actor $Grp4Ped1 look_at_player $PLAYER_CHAR0001: wait 0 ms0249: release_model $PedSelect0050: gosub ££ThePeds0050: gosub ££CreateCoordPed009A: $Grp4Ped2 = create_actor 4 $PedSelect at $Fish $Sock $CatFood020F: set_actor $Grp4Ped2 look_at_player $PLAYER_CHAR0249: release_model $PedSelect 0050: gosub ££ThePeds0050: gosub ££CreateCoordPed009A: $Grp4Ped3 = create_actor 4 $PedSelect at $Fish $Sock $CatFood020F: set_actor $Grp4Ped3 look_at_player $PLAYER_CHAR0249: release_model $PedSelect0050: gosub ££ThePeds0050: gosub ££CreateCoordPed009A: $Grp4Ped4 = create_actor 4 $PedSelect at $Fish $Sock $CatFood020F: set_actor $Grp4Ped4 look_at_player $PLAYER_CHAR0249: release_model $PedSelect0051: return:PickCar0050: gosub ££TheCars0050: gosub ££CreateCoordCar00A5:  [email protected] = create_car $CarSelect at  [email protected]  [email protected]  [email protected]: set_car  [email protected] z_angle_to 3150249: release_model $CarSelect01C3: remove_references_to_car  [email protected];; Like turning a car into any random car0001: wait  400 ms0051: return  :PickCar20050: gosub ££TheCars0050: gosub ££CreateCoordCar00A5:  [email protected] = create_car $CarSelect at  [email protected]  [email protected]  [email protected]: set_car  [email protected] z_angle_to 3150249: release_model $CarSelect01C3: remove_references_to_car  [email protected];; Like turning a car into any random car0001: wait  400 ms0051: return:PickSkin0001: wait 250 ms:SkinCheck00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££SkinCheck0169: set_fade_color 5 5 5016A: fade 0 () 500 ms0001: wait 500 ms03BF: set_player $PLAYER_CHAR ignored_by_everyone_to 1 (true)01B4: set_player $PLAYER_CHAR frozen_state 0 (frozen)0352: set_actor $PLAYER_ACTOR skin_to "[email protected]"038B: load_requested_models0353: refresh_actor $PLAYER_ACTOR016A: fade 1 (back) 500 ms0001: wait 500 ms03BF: set_player $PLAYER_CHAR ignored_by_everyone_to 0 (false)01B4: set_player $PLAYER_CHAR frozen_state 1 (unfrozen)0249: release_model $PedSelect0051: return:ThePeds0004: $PedSelect = 10002: jump ££ShowPed:PedSelectForward 0001: wait 0 ms00D6: if 000E1: key_pressed 0 5004D: jump_if_false ££PedSelectBack0002: jump ££NSevenCheck:PedSelectBack 0001: wait 0 ms00D6: if 000E1: key_pressed 0 7004D: jump_if_false ££PedSelect0002: jump ££PSevenCheck:PedSelect0001: wait 0 ms00D6: if 000E1: key_pressed 0 4004D: jump_if_false ££PedSelectForward009b: destroy_actor $Tmp1Ped0051: return:NSevenCheck00D6: if 00038: $PedSelect == 6004D: jump_if_false ££NPed0008: $PedSelect += 20002: jump ££ShowPed :NPed0008: $PedSelect += 100D6: if 00038: $PedSelect == 107004D: jump_if_false ££ShowPed0004: $PedSelect = 10002: jump ££ShowPed:PSevenCheck00D6: if 00038: $PedSelect == 9004D: jump_if_false ££PPed000C: $PedSelect -= 20002: jump ££ShowPed :PPed000C: $PedSelect -= 100D6: if 00038: $PedSelect == 0004D: jump_if_false ££ShowPed0004: $PedSelect = 106:ShowPed 0001: wait 250 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££ShowPed04C4: create_coordinate $Fish $Sock $CatFood from_actor $PLAYER_ACTOR offset 0.0 1.5 0.00247: request_model $PedSelect038B: load_requested_models:ShowPed200D6: if 00248: model  $PedSelect available004D: jump_if_false ££ShowPed2009b: destroy_actor $Tmp1Ped009A: $Tmp1Ped = create_actor 4 $PedSelect at $Fish $Sock $CatFood020F: set_actor $Tmp1Ped look_at_player $PLAYER_CHAR0001: wait 250 ms0249: release_model $PedSelect0002: jump ££PedSelectForward:CreateCoordPed0001: wait 250 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££CreateCoordPed04C4: create_coordinate $Fish $Sock $CatFood from_actor $PLAYER_ACTOR offset 0.0 1.5 0.00247: request_model $PedSelect038B: load_requested_models:CreatePed00D6: if 00248: model  $PedSelect available004D: jump_if_false ££CreatePed0051: return:TheCars0004: $CarSelect = 1300002: jump ££ShakeItUp:CarSelectForward 0001: wait 0 ms00D6: if 000E1: key_pressed 0 5004D: jump_if_false ££CarSelectBack0002: jump ££N180Check :CarSelectBack 0001: wait 0 ms00D6: if 000E1: key_pressed 0 7004D: jump_if_false ££CarSelect0002: jump ££P180Check:CarSelect0001: wait 0 ms00D6: if 000E1: key_pressed 0 4004D: jump_if_false ££CarSelectForward00A6: destroy_car [email protected]: return:N180Check00D6: if 00038: $CarSelect == 179004D: jump_if_false ££NCar0008: $CarSelect += 5 :NCar0008: $CarSelect += 100D6: if 00038: $CarSelect == 237004D: jump_if_false ££ShakeItUp0004: $CarSelect = 1300002: jump ££ShakeItUp:P180Check00D6: if 00038: $CarSelect == 185004D: jump_if_false ££PCar000C: $CarSelect -= 5 :PCar000C: $CarSelect -= 100D6: if 00038: $CarSelect == 129004D: jump_if_false ££ShakeItUp0004: $CarSelect = 236:ShakeItUp 0001: wait  250 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££ShakeItUp00D6: if  080E0:   NOT   player $PLAYER_CHAR driving004D: jump_if_false ££ShakeItUp0172:  [email protected] = actor $PLAYER_ACTOR z_angle04C4: create_coordinate  [email protected]  [email protected]  [email protected] from_actor $PLAYER_ACTOR offset  0.0  4.0  0.00247: request_model $CarSelect038B: load_requested_models:JustWhatINeeded0001: wait  250 ms00D6: if  00248:   model $CarSelect available004D: jump_if_false ££JustWhatINeeded00A6: destroy_car [email protected]:  [email protected] = create_car $CarSelect at  [email protected]  [email protected]  [email protected]: set_car  [email protected] z_angle_to 3150249: release_model $CarSelect01C3: remove_references_to_car  [email protected];; Like turning a car into any random car0001: wait  400 ms0002: jump ££CarSelectForward:CreateCoordCar0001: wait  250 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££CreateCoordCar              00D6: if  080E0:   NOT   player $PLAYER_CHAR driving004D: jump_if_false ££CreateCoordCar0172:  [email protected] = actor $PLAYER_ACTOR z_angle04C4: create_coordinate  [email protected]  [email protected]  [email protected] from_actor $PLAYER_ACTOR offset  0.0  4.0  0.00247: request_model $CarSelect038B: load_requested_models:CreateCar00D6: if 00248: model  $CarSelect available004D: jump_if_false ££CreateCar0051: return

 

 

Also, here is the main.scm file and the gtavs.set file:

 

http://www.cj-ambrosia.com/peds/ViceStudios0_4.zip

 

Not totally sure (my notebook is at home) but I think the keys are like this:

 

Insert=PreWeap

Delete=Next Weap

Enter=Action

Spint=1

Look Behind=2

Enter/Exit=3

Aim/Target=4

Crouch=5

Fire=6

Jump=7

Camera=0

----------------------------------------------------------

UNUSED: (but have to be defined anyway)

PreTarget=8 (not used)

NexTarget=9 (not used)

Zoom In = +

Zoom Out = -

Look Left = PgUp

Look Right = PgDn

Look Up = Home

Look Down = End

Center Camera = ~ (although Enter (Action) seems to do this as well)

-----------------------------------------------------------

 

Arrow keys move player around. Use INSERT + 1 -4 to generate peds, +5, +6 for cars, +7 Change Player Skin

+ 0 to change weather (repress to cycle). Press INSERT + UP ARROW to freeze the game clock; press INSERT + DOWN ARROW to unfreeze. When choosing peds/cars, use INSERT to browse previous, DELETE to browse forward and ENTER to choose.

 

The peds don't DO anything yet, but this is the basic framework. Please let me know if there are any problems. I'll be finishing up the animation setting tonight, but all I know is Barton's VB syntax, so I hope that's ok.

 

Thanks again!

 

EDIT: Removed a gosub from :PickSkin, since I haven't quite decided if I'm going to keep this or not...

Edited by ceedj

Share this post


Link to post
Share on other sites
random_download

OK, that is enough information, I now have the hex data for these vars:

$Grp1Ped1, $Grp2Ped1, $Grp2Ped2, $Grp3Ped1, $Grp3Ped2, $Grp3Ped3, $Grp4Ped1, $Grp4Ped2, $Grp4Ped3, $Grp4Ped4

Now, what code do you want to happen, and on what keypresses?

Share this post


Link to post
Share on other sites
ceedj
OK, that is enough information, I now have the hex data for these vars:

$Grp1Ped1, $Grp2Ped1, $Grp2Ped2, $Grp3Ped1, $Grp3Ped2, $Grp3Ped3, $Grp4Ped1, $Grp4Ped2, $Grp4Ped3, $Grp4Ped4

Now, what code do you want to happen, and on what keypresses?

See, I knew THAT part would be easy. tounge.gif

 

I'm finishing up the aminations tonight (still have a few I want to check first)

 

Again, A-Z and some others will be $Grp1Ped1

 

SHIFT A-Z and some others will be $Grp2Ped1,

CTRL LF A-Z and some others will be $Grp2Ped2, etc.

 

There's only one MAJOR set of animations (I think it's around 30 something - a group of four peds will have much less), but they all have to be copied to the extended keys. 5 Times. So that this:

 

A = 0000: animation $Grp1Ped1 wait state 30 2000 ms

 

Has to work as well as this:

 

SHIFT A = 0000: animation $Grp2Ped1 wait state 30 2000 ms

 

This way, the same animation is used, but different key presses will assign the animation to different peds. (I'm sorry if I'm painfully restating the obvious - but it's for my own benefit as well, since I have to juggle three differnent key setups (player, camera, animations), and I want to make sure I've covered all the bases.)

 

Anyway, I'm sure you get that part now - if it's too much (we're setting almost 200 key presses here) let me know, otherwise I should have the rest done this evening.

 

Thanks again! rah.gif

Share this post


Link to post
Share on other sites
random_download

So you want the hotkeys to be like:

 

CTRL + A = animation $Grp1Ped1 wait state 0 2000 ms

CTRL + B = animation $Grp1Ped1 wait state 1 2000 ms

CTRL + C = animation $Grp1Ped1 wait state 2 2000 ms

 

and then:

 

SHIFT + A = animation $Grp2Ped1 wait state 0 2000 ms

animation $Grp2Ped2 wait state 0 2000 ms

 

SHIFT + B = animation $Grp2Ped1 wait state 1 2000 ms

animation $Grp2Ped2 wait state 1 2000 ms

etc.?

 

Then, what are the shift, ctrl etc. for each group? Eg.

NONE = $Grp1Pedx

SHIFT = $Grp2Pedx

CTRL = $Grp3Pedx

ALT = $Grp4Pedx

Share this post


Link to post
Share on other sites
ceedj
So you want the hotkeys to be like:

 

CTRL + A = animation $Grp1Ped1 wait state 0 2000 ms

CTRL + B = animation $Grp1Ped1 wait state 1 2000 ms

CTRL + C = animation $Grp1Ped1 wait state 2 2000 ms

 

and then:

 

SHIFT + A = animation $Grp2Ped1 wait state 0 2000 ms

animation $Grp2Ped2 wait state 0 2000 ms

 

SHIFT + B = animation $Grp2Ped1 wait state 1 2000 ms

animation $Grp2Ped2 wait state 1 2000 ms

etc.?

 

Then, what are the shift, ctrl etc. for each group? Eg.

NONE = $Grp1Pedx

SHIFT = $Grp2Pedx

CTRL = $Grp3Pedx

ALT = $Grp4Pedx

Close, but not quite. Here's what we know:

 

All peds have their own ID ($Grp1Ped1, $Grp2Ped1, etc). What I want to be able to do is assign ANY ped the same animations that are available for everyone. Here are a few examples:

 

Keys for one ped (just an example - these values will change once I finalize them tonight)

Q= wait state one (0000: set actor $Grp1Ped1 to wait state 01 2000 ms)

W= wait state two (0000: set actor $Grp1Ped1 to wait state 02 2000 ms)

R= wait state three(0000: set actor $Grp1Ped1 to wait state 03 2000 ms)

T= wait state four (0000: set actor $Grp1Ped1 to wait state 04 2000 ms)

Y= wait state five (0000: set actor $Grp1Ped1 to wait state 05 2000 ms)

U= wait state six (0000: set actor $Grp1Ped1 to wait state 06 2000 ms)

I= wait state seven (0000: set actor $Grp1Ped1 to wait state 07 2000 ms)

O= wait state eight (0000: set actor $Grp1Ped1 to wait state 08 2000 ms)

P= wait state nine (0000: set actor $Grp1Ped1 to wait state 09 2000 ms)

(would continue on for the next two rows of keys)

 

So for a group of two peds, we need this:

For $Grp2Ped1 (first ped in Group 2)

SHIFT + Q= wait state one (0000: set actor $Grp2Ped1 to wait state 01 2000 ms)

SHIFT +W= wait state two (0000: set actor $Grp2Ped1 to wait state 02 2000 ms)

SHIFT +R= wait state three(0000: set actor $Grp2Ped1 to wait state 03 2000 ms)

SHIFT +T= wait state four (0000: set actor $Grp2Ped1 to wait state 04 2000 ms)

SHIFT +Y= wait state five (0000: set actor $Grp2Ped1 to wait state 05 2000 ms)

SHIFT +U= wait state six (0000: set actor $Grp2Ped1 to wait state 06 2000 ms)

SHIFT +I= wait state seven (0000: set actor $Grp2Ped1 to wait state 07 2000 ms)

SHIFT +O= wait state eight (0000: set actor $Grp2Ped1 to wait state 08 2000 ms)

SHIFT +P= wait state nine (0000: set actor $Grp2Ped1 to wait state 09 2000 ms)

(would continue on for the next two rows of keys)

 

and for $Grp2Ped2 (second ped in group two)

CRTL LF + Q= wait state one (0000: set actor $Grp2Ped2 to wait state 01 2000 ms)

CRTL LF +W= wait state two (0000: set actor $Grp2Ped2 to wait state 02 2000 ms)

CRTL LF +R= wait state three(0000: set actor $Grp2Ped2 to wait state 03 2000 ms)

CRTL LF +T= wait state four (0000: set actor $Grp2Ped2 to wait state 04 2000 ms)

CRTL LF +Y= wait state five (0000: set actor $Grp2Ped2to wait state 05 2000 ms)

CRTL LF +U= wait state six (0000: set actor $Grp2Ped2 to wait state 06 2000 ms)

CRTL LF +I= wait state seven (0000: set actor $Grp2Ped2 to wait state 07 2000 ms)

CRTL LF +O= wait state eight (0000: set actor $Grp2Ped2 to wait state 08 2000 ms)

CRTL LF +P= wait state nine (0000: set actor $Grp2Ped2 to wait state 09 2000 ms)

 

Three peds would work the same way, except change the modifier for $Grp3Ped1 from SHIFT to ALT LF,

change for $Grp3Ped2 from CRTL LF to ALT RT and use CRTL RT for $Grp3Ped3. The Grp4 peds would use the FKeys.

 

I know it seems like a ton of work, but it's really just copy/paste/change some value to reflect the proper peds. This way there is one animation key; just the PedModifier changes (so I'll always know that "K" will make a ped run; if I know what the modifier is for Grp3Ped3, I just press CRTL RT K to make Grp3Ped3 run.)

 

If this is still too confusing (it can be for me, and I came up with it!), let me know and I'll try again...

 

Thanks!

 

rah.gif

Share this post


Link to post
Share on other sites
random_download

Is it OK if the keys are like A = wait_state 1, B = 2, C = 3 etc.? Only that way I could use a loop to set them up instead of copy+paste it all.

Share this post


Link to post
Share on other sites
ceedj

 

Is it OK if the keys are like A = wait_state 1, B = 2, C = 3 etc.? Only that way I could use a loop to set them up instead of copy+paste it all.

So from my non C++ coding background, would this mean that you would set A = wait_state 1, and then just add the var (Ped) to determine where it goes?

 

What you're saying is this:

 

A = Ani1

B = Ami2

C= Ami3

 

And peds

 

SHIFT LF = Grp1Ped1

CTRL LF = Grp2Ped1

ALT LF = Grp2Ped2

ALT RT = Grp3Ped1

CTRL RT = Grp3Ped2

SHIFT RT = Grp3Ped3

F1, F2, etc = Special Four Ped Keys

 

So you would call SHIFT LF + A = grp1ped1 + ani1

and CRTL LF + A = grp2ped1 + ani1

 

If that works and it's eaiser, then by all means, yes!

 

How about better crash protection; can you make it so that if you just press a letter key, nothing happens? (Kinda like I do in the main.scm). So it would REQUIRE a modifier plus the animation key to work? Then we'd only have crashes from trying to play an animation on a ped that doesn't exsist (see above three or so posts). This also may eliminate the need to have people swap out the gtavc.set file...

 

Thoughts?

Share this post


Link to post
Share on other sites
random_download

Yes, I can run a loop as letters are next to each other in ASCII code. Yeah, I can make it so that a modifier is required, just need there to be enough of them.

Share this post


Link to post
Share on other sites
ceedj

Ok, I'll set up the keys when I get home, and leave out the ped vars. Let's go with what I put on the other page for peds:

 

SHIFT LF = Grp1Ped1

CTRL LF = Grp2Ped1

ALT LF = Grp2Ped2

ALT RT = Grp3Ped1

CTRL RT = Grp3Ped2

SHIFT RT = Grp3Ped3

 

I like this, because it almost goes "around" the keyboard. I'm trying to keep this as easy to use as possible. :-)

 

You should have the finished definitions tonight (and thanks for the create_coord idea; I tried that, but not with the walk_actor_to opcode. I shall mess around.)

 

Many, super, duper, froopy thanks for all this! biggrin.gif

Share this post


Link to post
Share on other sites
Y_Less

Random, if you're doing this, could you get it so when you press a certain key, it stores a value (e.g. use binary values so a=1, b=2, ab=3, c=4 etc) in a memory location (reduce sizes by storing half the alphabet in one adress, the other in another) within the SCM variables area of memory so you could directly access them with a DMA SCM editor so you could use any keypress within the SCM e.g:

 

Store keypress value at SCM memory location 4?? and 6?? (2 bytes per half).

 

 

0084: $keypressed1 = 4??0084: $keypressed2 = 6??0004: $keysearch1 = 1? \\ Search for letter 'a' from first half0004: $keysearch2 = 0? \\ Search for nothing from second half0050: gosub ££lettersearch000D6: if 0?0038: $keypressreturn = 1? \\ Was your letter pressed?004D: jump_if_false ££whereever\\\\\\\\\\\\\\\\\\\\\ Letter search function \\\\\\\\\\\\\\\\\\\\\\\:lettersearch0\\ Check for binary values - not nice code - may be simplifiable0004: $keypressreturn = 0?0004: $secondhalfdone = 0?00D6: if 0?0018: $keysearch1 > 0?004D: jump_if_false ££lettersearchpart20084: $keytesting = $keypressed10084: $keytofind = $keysearch1:lettersearchpart10004: $letteron = 4096&& \\ 4096 = m, 2048 = l, 1024 = k etc:testletter00D6: if 0?001C: $keytesting > $letteron004D: jump_if_false ££letterdivide00D6: if 0?003A: $letteron = $keytofind \\ If true your letter has been pressed004D: jump_if_false ££lettertakeaway0008: $keypressreturn += 1?:lettertakeaway0060: $keytesting -= $letteron:letterdivide00D6: if 0?0038: $letteron = 1? \\ Is it on the last letter?004D: jump_if_false ££lettersearchpart20014: $letteron /= 2? \\ Go to next letter0002: jump ££testletter:lettersearchpart200D6: if 21?0038: $keypressreturn = 1? \\ Was the first half successful?0038: $secondhalfdone = 1? \\ Or has this bit been done?004D: jump_if_false ££lettersearchend \\ If first half sucessful, no need to check!00D6: if 0?0018: $keysearch2 > 0? \\ Any letter from the second half needed?004D: jump_if_false ££lettersearchend \\ Not needed to check at all0084: $keytesting = $keypressed20084: $keytofind = $keysearch20004: $secondhalfdone = 1?0002: jump ££testletter:lettersearchend0051: return

 

 

Note: this code has NOT been tested and is written for 0.22 so the DMA will work.

 

 

 

 

Edit: how it (supposedly) works (if you're bothered):

 

It starts from the highest letter in half the alphabet (M or Z), if the binary value of this letter is greater then the binary value of the letters pressed (which if that bit is not on it will be) nothing happens. If its less, that bit MUST be on in than number (because of the way binary numbers work), so you take that number away, eliminating one bit.

 

After either of these results, the number of the bit you are testing is halfed (next binary bit is selected) and the number is retested. As you have already taken away any higher bits, the bit you are testing will be the largest existant bit, so if the number is larger, that bit again MUST be on.

 

If the bit you are testing matches the bit of the letter you want to find, and it returns true, the marker is set. The test currently continues anyway though. You can only currently check for one letter at a time (to search for multiple letters you would need to run the check multiple times). It only checks helf the alphabet though to speed up searches a bit.

 

 

Edited by Y_Less

Share this post


Link to post
Share on other sites
random_download

My Vice City has screwed up and is refusing to detect my audio hardware, which also means that .asi files are not loaded sad.gif progress on the keypress dll will halt until I can fix this.

Share this post


Link to post
Share on other sites
ceedj

Bah, freaking Winblows.

 

I swear if I had the money, I'd go with a Mac. Or maybe I should dig out the old TRS-80 CoCo3? Or even the Timex Sinclair!?!?

 

Take your time man; no huge rush. If you need any troubleshooting help, let me know. I'm REAL good at offering useless suggestions.

 

BTW, my friend Robyn (who is also a fantastic singer to work with) has one of the lead roles in our upcoming production of PEDS. She asked me to pass this along:

 

 

"HURRY UP YOU F*** WANKER! THERE IS NO WAY YOU ARE GOING TO SCREW UP MY BIG ACTING DEBUT! COME ON, MOVE IT!"Love, Robyn.PS - I'm just kidding, please take your time, and thank you for all of your help!Love, Robyn.PPS - WHAT THE F*** ARE YOU WAITING FOR?!?!Love, Robyn.

 

 

Gotta love them rich chicks!

 

Anyway, thanks for the help and good luck on the solving the problem. Think I may have to go pick up GTA:SA today for fun... rah.gif

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.