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. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    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

DeeZire

Some Interesting Ped Tidbits

Recommended Posts

tomworld10

Hi

I'm making a suggestion to avoid the main part size limit

Well in the B2R mod some much goes in the main part (petrol, carcrack, passenger, ejector seat, and now the give'n take, and so much.....) so everytime i'm adding something to the mod (which all the time goes in the main part) i just get so close or over the limit!!!!!! and this time it does (again). But the only way too make it shorter would be to call the external script HOMEBRAINS with the $something=3 instead of having these 8 lines :

 

066A: attach_particle "PETROLCAN" to_actor $3 offset 0.0  .58 -.08  0.0  .01  0.0  1 @17;; this create the particules that make the little drops  tahnks to spaceeinstein to find 0669 which is really close to it0615: start_action sequence @3                             ;; this is for starting the action_sequence0605: unknown_action_sequence $3 "PISS_IN" "PAULNMAC"  4.0  0  0  0  0 -1064C: make_particle_visible  @17                           ;; make the particule @17 visible, thanks to spaceeinstein to find the opcode0605: unknown_action_sequence $3 "PISS_LOOP" "PAULNMAC"  4.0  0  0  0  0  -10605: unknown_action_sequence $3 "PISS_OUT" "PAULNMAC" 4.0  0  0  0  0 -10001: wait  6000 ms0650: destroy_particle @17           ;; destroy the little drops0616: end_action_sequnece @3          ;; this is for ending the action_sequence

;

 

but it only saves me 8 lines (even not 8 because it would take 2 or 3 lines to call homebrains with $something=3) So i don't think it's real line saving isn't it ?

 

@32 and @33 are the coolest like you said, it's actually a shame ther isn't more of them!!!!

 

The sitting part would be real fun if i get to find a crap particle !!!!!!!

or making a little check to see if it's a male or female skin (i think i saw a opcode like that) to know if he got to sit or stand up while pissing. I actaully thought of so many things that would make the code so much longer, like a z_anlge check (because you don't have to piss in the toilets but just being close to it), or showing you where is the closest bathroom, or giving a wanted star only when a cop sees you, or many other things i can't remember...

 

Don't thank me (well if you want to, do so...smile.gif) for posting my finding because first i get so much proud finding them myself cool.gifsigh.gif and i find it normal to do because no one is going to deposit a brevet or a copyright on it, i mean it's not like as if it worths money !!!!! And i'll be very happy if someone is using my findings in a great mod !!!!!!!!!!!!!

 

Well HAVE FUN

 

Share this post


Link to post
Share on other sites
Demarest

everytime i'm adding something to the mod (which all the time goes in the main part) i just get so close or over the limit!!!!!! and this time it does (again).
Well since you're adding stuff to main, that would require a new game to be started. Since you're not aiming for savegame compatibility, there's a few things I've noticed in original code (assuming you're adding your mods to original code). As seen in the sniff code for Reuniting The Families
00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££LA1FIN_5100D6: if  00038:   $ON_MISSION ==  0 ;; integer values004D: jump_if_false ££LA1FIN_5100D6: if  000FF:   actor $PLAYER_ACTOR  0 ()near_point_on_foot $462 $463 $464 radius  1.0  1.0  2.0004D: jump_if_false ££LA1FIN_5100D6: if  00038:   $SWEETS_MISSIONS_PASSED ==  9 ;; integer values004D: jump_if_false ££LA1FIN_5100D6: if  00038:   $SMOKES_MISSIONS_PASSED ==  4 ;; integer values004D: jump_if_false ££LA1FIN_5100D6: if  00038:   $STRAP_MISSIONS_PASSED ==  5 ;; integer values004D: jump_if_false ££LA1FIN_5100D6: if  00038:   $RYDERS_MISSIONS_PASSED ==  3 ;; integer values004D: jump_if_false ££LA1FIN_5100D6: if  00038:   $CRASH_MISSIONS_PASSED ==  2 ;; integer values004D: jump_if_false ££LA1FIN_5100D6: if  00038:   $CESAR_1_MISSIONS_PASSED ==  1 ;; integer values004D: jump_if_false ££LA1FIN_5100D6: if  003EE:   player $PLAYER_CHAR controllable004D: jump_if_false ££LA1FIN_51

Noticed how the checks all have the same jf address, with no DIFFERENT jf address in between? This means that the conditionals can be lumped together. But GTA only supports 8 conditionals per if check, so we would need to use 2 if checks. Which is just as well since one is is_player_defined, which should come before the 2 that reference the player. Personally, I would make the lumps as even as possible so that our lumping does not impact system overhead too much, possibly like so

00D6: if  00256:   player $PLAYER_CHAR defined0038:   $ON_MISSION ==  0 ;; integer values0038:   $SWEETS_MISSIONS_PASSED ==  9 ;; integer values0038:   $SMOKES_MISSIONS_PASSED ==  4 ;; integer values0038:   $STRAP_MISSIONS_PASSED ==  5 ;; integer values004D: jump_if_false ££LA1FIN_5100D6: if  00038:   $RYDERS_MISSIONS_PASSED ==  3 ;; integer values0038:   $CRASH_MISSIONS_PASSED ==  2 ;; integer values0038:   $CESAR_1_MISSIONS_PASSED ==  1 ;; integer values00FF:   actor $PLAYER_ACTOR  0 ()near_point_on_foot $462 $463 $464 radius  1.0  1.0  2.003EE:   player $PLAYER_CHAR controllable004D: jump_if_false ££LA1FIN_51

You've accomplished the exact same thing, but 88 bytes smaller. The only downside is that you must start a new game. Since your mod already does that, there's 88 more bytes you can play with smile.gif

 

 

But the only way too make it shorter would be to call the external script HOMEBRAINS with the $something=3 instead of having these 8 lines :
066A: attach_particle "PETROLCAN" to_actor $3 offset 0.0  .58 -.08  0.0  .01  0.0  1 @17;; this create the particules that make the little drops  tahnks to spaceeinstein to find 0669 which is really close to it0615: start_action sequence @3                            ;; this is for starting the action_sequence0605: unknown_action_sequence $3 "PISS_IN" "PAULNMAC"  4.0  0  0  0  0 -1064C: make_particle_visible  @17                          ;; make the particule @17 visible, thanks to spaceeinstein to find the opcode0605: unknown_action_sequence $3 "PISS_LOOP" "PAULNMAC"  4.0  0  0  0  0  -10605: unknown_action_sequence $3 "PISS_OUT" "PAULNMAC" 4.0  0  0  0  0 -10001: wait  6000 ms0650: destroy_particle @17          ;; destroy the little drops0616: end_action_sequnece @3         ;; this is for ending the action_sequence

but it only saves me 8 lines (even not 8 because it would take 2 or 3 lines to call homebrains with $something=3) So i don't think it's real line saving isn't it ?

*9 lines wink.gif It's not about lines at all. Consider the difference between opcodes 064C and 066A in your code there. The both take up only one line, but 064C is 5 bytes whereas 066A is 56 bytes! BIG difference. Hell, anytime you see a word between " " in SA code, that's 16 bytes just for that! For that matter, the 9 lines you would be cutting out weighs 237 bytes. That's a lot for just 9 lines. What happens when you get rid of the last 2 0605's? They're 52 bytes each so remove as many as you can. I can't see the entire code, but you might be better off farming the entire thing out to its own external.

 

 

@32 and @33 are the coolest like you said, it's actually a shame ther isn't more of them!!!!
Keep in mind that that is two PER THREAD. Locals are indigenous to the thread they're used in. Each and every thread running can be using both @32 and @33. I myself rarely have the need for a single thread to have 2. I've never had a need for 3. You can use globals for timers with the 014E opcode, but that puts it on screen.

 

 

Don't thank me (well if you want to, do so...smile.gif) for posting my finding because first i get so much proud finding them myself  cool.gifsigh.gif  and i find it normal to do because no one is going to deposit a brevet or a copyright on it, i mean it's not like as if it worths money !!!!! And i'll be very happy if someone is using my findings in a great mod !!!!!!!!!!!!!
I agree 100%. And you're always reminding us to have fun. I like your style. Hat's off to you yin-yang.gif

Share this post


Link to post
Share on other sites
JernejL

hey, sorry to bump this up, but i can't be bothered editing the script myself, could someone post a pre-compiled script with pissing & drunk code on bums and hookers and CJ please?

 

Share this post


Link to post
Share on other sites
Un3462

small detail, dem; those long strings in sa are stringlength+2 bytes in the scm, not always 16. the way they're encoded is: byte=partype, byte=stringlength, bytes=characters. in variables and arrays however, variable length strings are messy to deal with, so instead they simply set them to always be 16 bytes there, with a terminating null byte.

Share this post


Link to post
Share on other sites
mageezer

Sorry, this question is slightly off topic to the general conversation, but not to the thread. I wanted to know if you could put the originally intended motorbike cops from SF and LV back into the game. Their models/txds are:

sfpdm1

lvpdm1

Is there some kind of code to reactivate them?

Share this post


Link to post
Share on other sites
demonj0e

just find the cops and replace the their models with those models(make sure they are named corectly)

btw where did u find them models?

Share this post


Link to post
Share on other sites
DeeZire

 

Sorry, this question is slightly off topic to the general conversation, but not to the thread. I wanted to know if you could put the originally intended motorbike cops from SF and LV back into the game. Their models/txds are:

sfpdm1

lvpdm1

Is there some kind of code to reactivate them?

Yeah Ive done that but its a major PITA.

 

I used the 2 spare slots in peds.ide to add them in (the models are already in the game) then added them to the relevant cities' pedgroups. I then attached an external script to them to stick them straight onto a cop bike and assign them a car path. In mine, I made a random chance (75%) that they get on the bike and act normally, or 25% chance that they stay on foot and direct traffic using the traffic cop anims (depending on time of day when theres a lot of traffic but sometimes they get run over LOL).

 

They behave and act like cops as they should, but the only downside is that whenever you have a wanted level ONLY the LA cop bike guy will spawn and chase you - after a lot of trial and error, I found that ped was hardcoded to (i) spawn like other cops and (ii) appear on the cop bike when you are wanted - unfortunately, the cop bike/bike cops dont work like the cop cars and other cops so theres only one for the whole of SA rather one for each city sad.gif

 

For completeness, you would need to edit main.scm to replace the LAPDM1 peds with the others, as in some SF and LV missions the game still uses the LA biker cop instead of that cities' one.

 

While you're at it, add DSHER to the pedgroup for desert folk, he doesnt normally appear (Desert Sheriff) and if you're really adventurous you can add CDEPUT (in the game but totally unused) to the pedgroup for farmers to get a country yokel type deputy smile.gif

Edited by DeeZire

Share this post


Link to post
Share on other sites
BogdanR

deezire could you release that mod(with drunken behaviour and cop directing traffic and the window cleaners)????

Share this post


Link to post
Share on other sites
DeeZire

I'll be releasing a mod with all my tweaks in pretty soon smile.gif

 

I dropped the window cleaner thing BTW because the animation is glitchy, theres a weird loop but no logical start and end to it, not that I can see anyways, unless anyone wants to peek at poor.ifp and see otherwise.

 

I've also managed to cram another 12 peds in the game without losing any of the existing ones - its crafty but it works well and makes quite a drastic improvement to the streets of San Andreas! It gives you extra gang members, new peds, a journalist and a few more as well as those I mentioned above.

Share this post


Link to post
Share on other sites
BogdanR

nice then. hope you don't change your mind.

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.


  • 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.