Staunton Assassin 2,545 Posted February 15, 2019 Share Posted February 15, 2019 (edited) AI Weapon Walkstyles by @Staunton Assassin About: Spoiler When the player character holds a weapon, the player character's walkstyle is changed to the proper one-handed or two-handed one that is appropriate to the weapon. But when a ped holds a weapon, the ped's walkstyle remains the same. Regardless of what weapon they're holding, all peds just stand, walk, run, sprint and "begin-to-walk" as if they're not holding anything. AI Weapon Walkstyles implements a proper weapon-based walkstyle system for the peds in III, VC and SA which works just like the one designed for the player character. Not only it changes the peds' walkstyles to the one-handed or two-handed ones, but it also restores the walkstyles back to the default ones when the one-handed or two-handed weapon is no longer being held. Screenshots: Spoiler Credits: Spoiler A few coding snippets - @Junior_Djjr Camera position coordinate memory addresses for VC - @spaceeinstein Camera position coordinate memory addresses for III - @ThirteenAG The rest of the mod - @Staunton Assassin Download: Spoiler https://www.mediafire.com/file/6jxzr0kjigkpqry/III.VC.SA.AIWeaponWalkstyles.zip/file Edited February 27 by Staunton Assassin 27 2 Link to post Share on other sites
thalilmythos 1,025 Posted February 17, 2019 Share Posted February 17, 2019 Great mod man 1 Link to post Share on other sites
SlingShot753 434 Posted February 17, 2019 Share Posted February 17, 2019 I loved it! It was something that I've been waiting for a long time. Amazing work! 1 Link to post Share on other sites
recapa 21 Posted February 20, 2019 Share Posted February 20, 2019 (edited) I think the archive is corrupted Edited May 15, 2020 by reCAPTCHA Link to post Share on other sites
Staunton Assassin 2,545 Posted February 20, 2019 Author Share Posted February 20, 2019 (edited) 11 minutes ago, reCAPTCHA said: Archive is corrupt(?) Hmm, the mod is working flawlessly on my end. Try downloading again. Edited February 20, 2019 by The Eddo Link to post Share on other sites
Junior_Djjr 2,924 Posted February 25, 2019 Share Posted February 25, 2019 Finally someone did it... Just a little problem: The mod doesn't recognize added weapons without replacing because it uses IDs. The most correct way is to check the animation set for that weapon, but I don't have any snippet here (you will need to use some memory stuffs). 1 Link to post Share on other sites
Staunton Assassin 2,545 Posted February 25, 2019 Author Share Posted February 25, 2019 15 hours ago, Junior_Djjr said: Finally someone did it... Just a little problem: The mod doesn't recognize added weapons without replacing because it uses IDs. The most correct way is to check the animation set for that weapon, but I don't have any snippet here (you will need to use some memory stuffs). Thank you, Junior. I really appreciate you commenting on this mod, it's a real pleasure. The added weapons? Hmm. Well, I don't know anything about memory hacking except for applying values to memory addresses. But I guess we can work together to find out. And wow, I just can't believe that one of my mods actually made it to MixMods! Thank you so much for your cooperation, my friend. P.S: Can you make a screenshot of the mod being tested on III? I don't have III and I really doubt if it actually works there. 1 Link to post Share on other sites
Junior_Djjr 2,924 Posted February 25, 2019 Share Posted February 25, 2019 (edited) 7 hours ago, The Eddo said: And wow, I just can't believe that one of my mods actually made it to MixMods! Thank you so much for your cooperation, my friend. Thanks 7 hours ago, The Eddo said: P.S: Can you make a screenshot of the mod being tested on III? I don't have III and I really doubt if it actually works there. Hm, It isn't working. I tested a lot of IDs (until they walk backwards, lol) and using "2" they walk like this: Looks nice, I didn't find the player-like animation. Using your "4" they walk like gangs I think. Edited February 26, 2019 by Junior_Djjr Link to post Share on other sites
Staunton Assassin 2,545 Posted February 26, 2019 Author Share Posted February 26, 2019 19 hours ago, Junior_Djjr said: Hm, It isn't working. I tested a lot of IDs (until they walk backwards, lol) and using "2" they walk like this: Looks nice, I didn't find the player-like animation. Using your "4" they walk like gangs I think. Strange, I had set the right walkstyle IDs. Maybe, perhaps a video would help me understand it better. Link to post Share on other sites
Junior_Djjr 2,924 Posted February 26, 2019 Share Posted February 26, 2019 5 hours ago, The Eddo said: Maybe, perhaps a video would help me understand it better The animation of this image? Anyway, if this ID is wrong the others are too, for some reason the list you consulted is wrong. With a quick search I found no other list. Link to post Share on other sites
Staunton Assassin 2,545 Posted May 5, 2019 Author Share Posted May 5, 2019 @Junior_Djjr: So, it seems that I broke something when I counted the animation groups in "animgrp_iii.dat" to "consider" the correct walkstyle IDs for the III version. As a consequence, Gangster Walk Fix gets it's first (minor) update!: * Fixed the wrong walkstyle IDs that were being used in the III version, hopefully. Link to post Share on other sites
Staunton Assassin 2,545 Posted May 17, 2019 Author Share Posted May 17, 2019 (edited) So here's another update! I've totally fixed the III version's animation group IDs now. OP is updated, so go get it! @Junior_Djjr: You haven't updated my mod over at MixMods, please update it. Edited May 17, 2019 by The Eddo 1 Link to post Share on other sites
Staunton Assassin 2,545 Posted August 3, 2019 Author Share Posted August 3, 2019 "Ah, shoot. Here we go again..." - CJ So, after finally getting around to working on this mod again, here's a rather major update for Gangster Walk Fix! Go and grab the new version from the OP now! * Camera position coordinates are now used instead of the player position coordinates when the three scripts check for peds (because we SEE the peds, y'know?). * Any dead peds are now ignored by the scripts, which means that the walkstyles won't be applied on the dead peds and the script is more likely to apply walkstyles on living peds. * SA version's thread name changed from "WALKSTYL" to "WALKSTL" to match III and VC versions and prevent any possible issues. * VC and SA versions now use the opcode 02D8 to check for weapons like in the III version. * All three scripts now check for weapons and set walkstyles in the same order in which the walkstyles are internally defined in III, VC and SA. * VC version is now slightly more compact. The next version will feature support for added weapons, new idle stance for the Molotov, "1armed" walkstyle support for SA and a lot more! Stay tuned. 5 Link to post Share on other sites
Wakka387 647 Posted August 3, 2019 Share Posted August 3, 2019 at first there was the Gangster Sit Fix now there is a new fix in town. The Gangster Walk Fix! 1 Link to post Share on other sites
firedihm 172 Posted August 4, 2019 Share Posted August 4, 2019 Waiting for Gangster Run Fix that would make peds compatible with "Running with heavy weapons" mod Link to post Share on other sites
Staunton Assassin 2,545 Posted August 4, 2019 Author Share Posted August 4, 2019 19 minutes ago, firedihm said: Waiting for Gangster Run Fix that would make peds compatible with "Running with heavy weapons" mod Gangster Run Fix was accidentally created and auto-integrated into Gangster Walk Fix during this mod's crafting, don't worry. 1 Link to post Share on other sites
Staunton Assassin 2,545 Posted August 5, 2019 Author Share Posted August 5, 2019 Okay, this here is that latest update for Gangster Walk Fix! * III and VC versions lose "all-EXE-friendliness". * III and VC versions now really use camera coordinates to check for peds (the previous update was released early). * Increased the ped-checking radius to check for peds in the entire map. The "new idle stance for the SA Molotov" idea got flopped and the added weapons support was requiring WAY TOO MANY variables. So now, I suppose that this is the final update... 1 Link to post Share on other sites
AshGamer007 241 Posted August 5, 2019 Share Posted August 5, 2019 (edited) 1 hour ago, The Eddo said: * III and VC versions lose "all-EXE-friendliness". Wait does it mean it will only work on v1.0? Edited August 5, 2019 by PiashGamer007 Link to post Share on other sites
Staunton Assassin 2,545 Posted August 5, 2019 Author Share Posted August 5, 2019 1 hour ago, PiashGamer007 said: Wait does it mean it will only work on v1.0? Yes. And besides, why would you want any other EXE than US v1.00 for III and VC anyway? Most of the modding researches and finds in this great modding community were done using the US v1.00 EXEs. Link to post Share on other sites
AshGamer007 241 Posted August 5, 2019 Share Posted August 5, 2019 (edited) 10 minutes ago, The Eddo said: Yes. And besides, why would you want any other EXE than US v1.00 for III and VC anyway? Most of the modding researches and finds in this great modding community were done using the US v1.00 EXEs. I was just asking.Anyway in the beginning of mission rub out Lance Vance can be seen sprinting with M4 in one hand can you fix it? Edited August 5, 2019 by PiashGamer007 Link to post Share on other sites
Staunton Assassin 2,545 Posted August 5, 2019 Author Share Posted August 5, 2019 (edited) 2 minutes ago, PiashGamer007 said: I was just asking.Anyway in the beginning of mission rub out Lance Vance can be seen sprinting with M4 in one hand can you fix it? That's a bug in the game's core, unfortunately. It seems rather extremely difficult to fix. Edited August 5, 2019 by The Eddo Link to post Share on other sites
Irsis 75 Posted August 5, 2019 Share Posted August 5, 2019 (edited) After pedestrian run out of ammo/change into knife or fist, the holding-weapon animation still stay. Edited August 5, 2019 by Irsis Link to post Share on other sites
Staunton Assassin 2,545 Posted August 6, 2019 Author Share Posted August 6, 2019 8 hours ago, Irsis said: After pedestrian run out of ammo/change into knife or fist, the holding-weapon animation still stay. This bug can (probably) be fixed but the problem is that it would affect other peds' walkstyles too. What this mod intends to do is to make peds use two-handed walkstyles only when wielding the appropriate two-handed weapons, so they still use their default walkstyles when wielding one-handed weapons. Link to post Share on other sites
thalilmythos 1,025 Posted August 7, 2019 Share Posted August 7, 2019 A "fix" could be giving them an animation based on their pedtype, but that leaves out "oldamales" "fatmales" and "oldladys" Despite that it could work. Link to post Share on other sites
Staunton Assassin 2,545 Posted August 8, 2019 Author Share Posted August 8, 2019 I do have an idea, but I have doubts if it'll actually work. The idea is that when a ped loses a weapon that caused his/her walkstyle to change, the ped's old walkstyle is restored (whichever it was). But this would require somewhat really clever memory-editing stuff, which makes me want to look up to Junior_Djjr for it. 1 Link to post Share on other sites
Junior_Djjr 2,924 Posted August 14, 2019 Share Posted August 14, 2019 (edited) GTA SA: {$cleo} 0000: while true wait 0 0AB5: store_closest_entities $PLAYER_ACTOR vehicle_to [email protected] ped_to [email protected] if [email protected] > 0 then 0665: get_char_model [email protected] store_to [email protected] 0AA7: call_function_return 0x00403DA0 num_params 1 pop 1 [email protected] store_to [email protected] [email protected] += 0x24 //CPedModelInfo.m_nAnimType 0A8D: [email protected] = read_memory [email protected] size 4 vp false 0AD1: print_formatted_now "model %d is %d" time 1 [email protected] [email protected] end end GTA VC: Instead of 0x00403DA0, is 0x00591AA0 Instead of 0x24, is 0x30 edit: 0AB5: doesn't exist in VC, but, well... GTA III: {$cleo} 0000: while true wait 0 0A8D: [email protected] = read_memory 0x6FAD2C size 4 virtual_protect 1 0A8D: [email protected] = read_memory 0x6FAD30 size 4 virtual_protect 1 0A8D: [email protected] = read_memory 0x6FAD34 size 4 virtual_protect 1 if 0AE1: [email protected] = random_actor_near_point [email protected] [email protected] [email protected] in_radius 5.0 find_next 0 pass_deads 0 // find just one near then 0A96: [email protected] = actor [email protected] struct [email protected] += 0x5C //CEntity.m_nModelIndex 0A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0 0A8D: [email protected] = read_memory 0x004010E3 size 4 vp true //CModelInfo::ms_modelInfoPtrs[] 0085: [email protected] = [email protected] [email protected] *= 4 0058: [email protected] += [email protected] 0A8D: [email protected] = read_memory [email protected] size 4 vp false [email protected] += 0x34 //CPedModelInfo.m_nAnimType 0A8D: [email protected] = read_memory [email protected] size 4 vp false 0AD1: print_formatted_now "model %d is %d" time 1 [email protected] [email protected] end end Edited August 14, 2019 by Junior_Djjr 1 Link to post Share on other sites
Staunton Assassin 2,545 Posted August 14, 2019 Author Share Posted August 14, 2019 (edited) On 8/14/2019 at 3:38 PM, Junior_Djjr said: (insert really helpful code here) Oooh, that seems really helpful! Thank you so much, Junior. Gangster Walk Fix shall continue! But what about the support for added weapons? Can you help me out with that? I tried to add the added weapons support like this: [RocketLauncher] ; Weapons defined under this section will use the "rocket launcher" walkstyle. FirstCustomWeaponID=70 LastCustomWeaponID=71 [2Armed] ; Weapons defined under this section will use the "two-handed weapon" walkstyle. FirstCustomWeaponID=72 LastCustomWeaponID=73 [BBBat] ; Weapons defined under this section will use the "baseball bat" walkstyle. FirstCustomWeaponID=74 LastCustomWeaponID=75 [CSaw] ; Weapons defined under this section will use the "chainsaw" walkstyle. FirstCustomWeaponID=76 LastCustomWeaponID=77 [1Armed] ; Weapons defined under this section will use the "one-handed weapon" walkstyle. FirstCustomWeaponID=78 LastCustomWeaponID=79 But when I realized it's requiring too many local variables, I kind-of failed at it. What I'm thinking about is some SilentPatch-like INI file where you just enter the weapon IDs (one per line) under the appropriate "RocketLauncher", "2Armed" etc. sections and you're good to go. Edited May 12, 2020 by The Eddo Link to post Share on other sites
MatthewFarrell 26 Posted November 25, 2019 Share Posted November 25, 2019 Some news? Link to post Share on other sites
Staunton Assassin 2,545 Posted December 16, 2019 Author Share Posted December 16, 2019 On 11/25/2019 at 9:15 PM, MatthewFarrell said: Some news? I'm considering an update, it will hopefully arrive by the start of next year. Stay tuned. 1 Link to post Share on other sites
Staunton Assassin 2,545 Posted February 15, 2020 Author Share Posted February 15, 2020 (edited) Happy birthday, Gangster Walk Fix! In case if you were unfortunate enough to not know, today is the day when Gangster Walk Fix was first released last year. That's right, on the 15th of February in 2019! Anyway, on the event of this honorable day, I've decided to make, announce and release a new update. First of all, I would like to give many, MANY thanks to @Junior_Djjr. If it wasn't for his great assistance and cooperation, this modification might have never existed... * Finally playtested the III version. * If a pedestrian stops wielding a weapon that caused his or her walkstyle to change, the script will now obtain the pedestrian's default walkstyle and restore it. * The modification now checks for the pedestrians' current walkstyle first before it applies any new ones. * As a result, the scripts will apply the new walkstyle only once on each pedestrian instead of applying the same walkstyle to the same pedestrian over and over. * Moreover, there is also quite much of a probability that the scripts will move onto other pedestrians due to this. * Made overall minor improvements in all three scripts' codes and shortened them all quite a lot. * The SA version of the script is now compatible with the US v1.00 EXE only. * The entire ReadMe file has completely remade, redone, rebranded, reworked, and remastered. * And what-not. Well, why are you still here? What are you waiting for? The modification has been released! Go get the latest update from the OP! Edited February 15, 2020 by The Eddo 4 Link to post Share on other sites