Quantcast

Jump to content

» «
Photo

CJ turns into a random ped and corrupts my savegame

18 replies to this topic
Euda
  • Euda

    youtube/pascalwaschbrett

  • Members
  • Joined: 11 Sep 2011
  • None

#1

Posted 14 September 2017 - 02:20 PM

Hello GTAF-Community,

 

 

a few weeks ago, after getting inspired by numerous mods that were recently released/updated, I decided to start a new San Andreas save and play the game since some years.

To improve my experience, I installed the following mods, carefully chosen to fit and modernize the atmosphere plus some technical aspects:

 

  • Silent's AsiLoader
  • CLEO
  • SilentPatch
  • exdisp.asi (Ryosuke's Display Settings Extender)
  • noDEP.asi (to eliminate Windows Data Execution Prevention, got it from Junior_Djjr's page mixmods.com.br)
  • wshps.asi (for widescreen HOV+ support)
  • Tuning Mod by Junior_Djjr (incl. indieVehHandlings.cs)
  • madleg's Ragdoll ASI Plugin
  • fastman's GTA IV "fly through windshield on crash" ASI Plugin
  • Mod MixSets by Junior_Djjr (CLEO-script)
  • Real Traffic Fix by Junior_Djjr (CLEO-script)
  • Oil Traces by Junior_Djjr ("Pingar óleo do carro", CLEO-script)
  • Turbo Backfire - Antilag ALS by Junior_Djjr (CLEO-script)
  • In-Game Timecyc Editor (CLEO-script)
  • My custom timecyc.dat
  • Manual Drive-By Remake (CLEO-script by ThirteenAG & Junior_Djjr)
  • Brake-pad sound (CLEO-script by Junior_Djjr, "Som de pastilha de freio")
  • SAAS (San Andreas Ambient Sounds by pep legal)
  • V8 Rumble Car Engine Sounds, installed via modloader (had to convert the files to 16-bit PCM WAVs first to make them work in-game)

 

After playing for while, I noticed that my game was crashing in certain places and situations, mostly when entering an interior (like CJ's house), finishing a mission or in the beginning of a cutscene. For example, after finishing "Cesar Vialpando", I attempted to enter the savehouse and the game crashed. After another try, however, I was able to save without trouble and play further. I played until the mission "Badlands" with some occasional crashes in the mentioned situations (most often it was when entering CJ's savehouse). After that, I got a little fed up of the issue and decided to troubleshoot the issue and write some well-known users from the modding scene here.

Fastman92 (thanks a lot for that) in a TeamViewer-session was able to debug my game and figured out that the scripts "engine.cs" (a script that simply turns vehicles' engines off after exiting them) and "SAAS.ini" caused some trouble with vehicles, so I uninstalled them. Yet the issue did not go away. It took me very long and a lot of troubleshooting to figure out that my problem as well occurs with a "fresh" install of the game – I am using a clean 1.0US Hoodlum version. So it must be related to the savegame. At the moment, the game always crashes when entering the Cluckin' Bell located in Angel Pine (I spawn at the trailer there).

So I was researching for corrupted savegames and how to fix them and found a post by member "OrionSR", leading me to send him a PM and ask if he can help me out on the issue. Just a few hours later (thanks a lot for that too!), he took a look over my savegame and figured out the inconsistency that likely is the cause for my crashes:

CJ is set as a random pedestrian.

 

 

It seems that one of your mods must has turned CJ into a random ped, which led to crashes when using enexes - not sure what else that could effect. This is a new one on me so I don't know what to suggest as a cause or a more natural solution to the problem.

 
I am unaware of any in-game strategies that might fix CJ's usage type. Suicide didn't help. Other strategies that come to mind usually require an interior. 

 

Clueless on how to counteract this, I started a new save last night and played until I noticed that the game crashed again when entering CJ's Mom's House after "Cesar Vialpando". Since that, the game crashes once in a while when trying to enter an interior. I assume that the bug is caused somewhere around this mission in game progress.

 

Now my final question is:

Does any of the pros here know why this weird glitch occured, why it corrupts my savegame and how to fix it or at least strategies to workaround?

I would be really glad if someone could help me out on this as I was enjoying the game a lot more than vanilla, along with these mods.

 

I have uploaded the savegame on GTASnP for you guys: http://gtasnp.com/KClkG1

 

 

Thanks in advance and best regards,

Euda :)


Euda
  • Euda

    youtube/pascalwaschbrett

  • Members
  • Joined: 11 Sep 2011
  • None

#2

Posted 14 September 2017 - 06:40 PM

Bump– has anybody an idea about what the problem could be here?

I already posted my previous issues in an earlier thread but so far I was not able to fix the glitch.

 

Best regards,

Euda :)


OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#3

Posted 14 September 2017 - 09:48 PM Edited by OrionSR, 15 September 2017 - 07:07 PM.

The usual solution is to disable your mods one at a time until the problem goes away, but that's a difficult prospect on an intermittent glitch. I'll take a another look to see if I can find an opcode to detect if CJ is Random or Mission (referred to inaccurately a "ref" and describe more accurately as Usage Type or Owner). Maybe something like is actor needed my mission will present itself and we can write a script that loops and tells you more precisely when the glitch occurs. 

 

In the meantime, reviewing your mod list. I suggest dropping anything not written by Silent, fastman, ThirteenAG and Junior_Djjr since he's working with AG. Maybe hold on to Ryosuke's mod for a while. Try it out for a while and see if something turns up. Or, just work towards figuring out how to make it happen on purpose. If you get lucky and find a reliable repro the mod swapping strategy should narrow things down to the troubled mod.

 

Maybe...

02DD: [email protected] = get_random_ped_in_zone 'SAN_AND' with_pedtype_civilian 1 gang 0 criminal/prostitute 1

Maybe narrow the zone down to the zone CJ is currently in, but there probably won't be any peds in far away areas anyway. So run a loop to check all the random peds and throw out a warning flag if the result to equal CJ's handle. I'll give it a shot but more comfortable working inside of save files.

 

Edit: Whoops. I thought I had fastman's mods on the don't worry about list. Fixed.


OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#4

Posted 15 September 2017 - 01:24 PM Edited by OrionSR, 15 September 2017 - 01:24 PM.

The opcode I posted above only wants to look for civilians, gang, criminals and pros.

0A3E: get_random_char_in_area_offset_no_save $TEMPVAR_FLOAT_1 $TEMPVAR_FLOAT_2 $TEMPVAR_FLOAT_3 radius 0.6 0.6 1.0 store_to [email protected]

This code seems to have all sorts of restrictions designed to make sure it won't catch CJ in it's net.

 

I have failed to find an easy opcode to detect if CJ is Random or Mission owned/usage type, and I don't know enough about this structure to identify this variable's memory offset. Sorry.

 

I made an interesting observation though. Maybe it will help. I wrote a small script that removed reference to CJ with opcode 01C2: which effectively turned him into a Random ped that my other script failed to detect. When CJ became random while on foot I was unable to control his movement, mostly. CJ started walking the paths. Pressing sprint would make him sprint to the next corner where he'd wait for the light to change before sprinting off again. Entering a vehicle restored normal control to CJ but left him random. Entering an interior crashed the game.

 

So, if you aren't noticing a loss of control of CJ as he turns random then that might point to a vehicle related mod, maybe. I suggest running a few tests with and without the Windshield and Drive-By mods. 


Tommy Vercetti Is #1
  • Tommy Vercetti Is #1

    Crackhead

  • Members
  • Joined: 04 May 2016
  • United-States

#5

Posted 15 September 2017 - 02:39 PM

Try this: http://gtaforums.com...-always-freeze/

 

This game crashes a lot when you have more than one core in your cpu. The linked guide above will tell you how to fix this issue. Hope it helps you, since I have not had one crash since.


Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [Modding] 2016
    Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#6

Posted 15 September 2017 - 04:00 PM

Try this: http://gtaforums.com...-always-freeze/
 
This game crashes a lot when you have more than one core in your cpu. The linked guide above will tell you how to fix this issue. Hope it helps you, since I have not had one crash since.


This isn't the case here at all... you clearly ignored the posts above yours, and besides limiting SA to only use one core isn't a proper solution ever.

Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [Modding] 2016
    Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#7

Posted 15 September 2017 - 04:14 PM

CJ indeed seems to be set to a random pedestrian instead of a script created ped. This CLEO script will correct it and also display current PedCreatedBy state for CJ at all times:

https://www.dropbox....eatedby.cs?dl=0

Play around with the game a bit - the value should always stay as 2, if it switches to 1 you got a problem - most likely a malfunctioning CLEO script, since I'm not aware of any ASIs which manipulate this field.
  • OrionSR and Gummy  like this

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#8

Posted 15 September 2017 - 04:29 PM Edited by OrionSR, 15 September 2017 - 04:32 PM.

I was going to test your cleo script against my F6RandomPlayer script that removes references from CJ but it seems that Silent has hit his limit on Dropbox. Can you post the source code? I can recompile and host if necessary. I wanted to test the script anyway. Seems like a useful tool in my line of work.


Tommy Vercetti Is #1
  • Tommy Vercetti Is #1

    Crackhead

  • Members
  • Joined: 04 May 2016
  • United-States

#9

Posted 15 September 2017 - 04:59 PM Edited by Tommy Vercetti Is #1, 15 September 2017 - 05:09 PM.

 

Try this: http://gtaforums.com...-always-freeze/
 
This game crashes a lot when you have more than one core in your cpu. The linked guide above will tell you how to fix this issue. Hope it helps you, since I have not had one crash since.


This isn't the case here at all... you clearly ignored the posts above yours, and besides limiting SA to only use one core isn't a proper solution ever.

 

Um . . . Actually it is. This game WILL crash if you have more than one core. It has been tested and is a hard fact. Even with YOUR Silent patch the game still crashes after long play periods. I ignored the posts above because they weren't solving the problem. I have already experienced crashes when entering houses before as well.

 

Here is the proof that this fix has helped dozens of people: http://steamcommunit...s/?id=252708195

 

Research more into things before attacking people that are just trying to help.

 

Plus, if this fix doesn't help it probably is a bad mod. There are hundreds of bad mods out there for SA that will screw up savegames, just use another one or contact the mod author.


Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [Modding] 2016
    Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#10

Posted 15 September 2017 - 05:23 PM

I was going to test your cleo script against my F6RandomPlayer script that removes references from CJ but it seems that Silent has hit his limit on Dropbox. Can you post the source code? I can recompile and host if necessary. I wanted to test the script anyway. Seems like a useful tool in my line of work.


{$CLEO}
wait 0
01F5: [email protected] = get_player_actor 0
0A96: [email protected] = actor [email protected] struct
[email protected] += 0x484
0A8C: write_memory [email protected] size 1 value 2 virtual_protect 0

while true
    wait 0
    0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0
    0AD1: show_formatted_text_highpriority "PedCreatedBy: %d" time 1 [email protected]
end

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#11

Posted 15 September 2017 - 05:56 PM Edited by OrionSR, 15 September 2017 - 06:02 PM.

RandomPlayerChecker

 

Tested, and works. Well, the detection worked but it didn't get repaired. I'll try again, save, and reload to see if it gets fixed.

 

Yeah, fixes it too. Only thing is though... it fixes it immediately so you don't see the detection before it's repaired. Doesn't matter though. Enexes seem to be a reliable glitch detector, just not terribly specific.


Euda
  • Euda

    youtube/pascalwaschbrett

  • Members
  • Joined: 11 Sep 2011
  • None

#12

Posted 16 September 2017 - 02:34 PM

Hey – thanks to everyone for the detailed answers and the effort You put to help me with this quite unknown issue and of course for the script that finally seems to fix my savegame.

The "PedCreatedBy" output helped me figuring out which of my modifications was causing the issue. Surprisingly, it turned out to be the IV-windshield-ASI by fastman92. Each time I crashed with my car and CJ flew out the windshield, 'PedCreatedBy' changed from 2 to 1 and this was when it started to crash while trying to enter an interior. I will try fastman's script with a fresh installation as well to see if the issue is the plugin itself or an incompatibility among the various mods I use when combined with it.


Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [Modding] 2016
    Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#13

Posted 16 September 2017 - 02:56 PM Edited by Silent, 16 September 2017 - 03:11 PM.

Can you link to this mod?

EDIT:
I'm dumb.

EDIT2:
This isn't ASI, though.

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • Poland
  • Best Conversion 2016 [GTA: Underground] [Contribution]
    Contribution Award [Mods]

#14

Posted 16 September 2017 - 03:37 PM

Problem
if and
  002D:   [email protected] >= [email protected]  // (int)   If car was damaged above [email protected] health 
  [email protected] > 6.0                  // If old speed was greater than 6.0 
else_jump @Test_if_player_should_be_thrown
01EA: [email protected] = car [email protected] max_passengers
[email protected] -= 1

    for [email protected] = -1 to [email protected]
    {
    if and
    [email protected] <> 1
    [email protected] <> 2
    jf continue;
    }
        
        if
        8431:  not car [email protected] passenger_seat_free [email protected]
        then
        0432: [email protected] = get_actor_handle_from_car [email protected] passenger_seat [email protected]
        0085: [email protected]([email protected],9i) = [email protected] // (int)
        Actor.RemoveReferences([email protected]([email protected],9i))
        end    
    end
Doesn't check if it's player ped.

Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [Modding] 2016
    Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#15

Posted 16 September 2017 - 05:15 PM

In fact, you shouldn't be doing that to any character since iirc 0432 doesn't add peds to mission cleanup!

Veigar
  • Veigar

    Dark Sorcerer

  • Members
  • Joined: 21 Apr 2012
  • United-States

#16

Posted 20 September 2017 - 11:26 AM

It might be an Audio zone issue. San Andreas is weird with audio zone mods, and I'm assuming that ambient sound mod has to do with it. In my game I made it so that my favorite radio station plays in safehouses, and it crashes VERY often whenever it's the User Track Player. Even if none of my tracks are corrupted, I could exit an audio zone, enter it again, and the game would most likely crash. It doesn't seem to like modified audio zones,  is what I'm getting at. 

 

Just speculation, though. :p 


Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [Modding] 2016
    Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#17

Posted 20 September 2017 - 11:27 AM

This game crashes a lot when you have more than one core in your cpu. The linked guide above will tell you how to fix this issue. Hope it helps you, since I have not had one crash since.


In the end this was a real issue and setting affinity to just one core would have made it less likely to occur :/

http://gtaforums.com...h/?p=1069850053

OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#18

Posted 20 September 2017 - 03:02 PM

Back to the topic at hand...

 

Will there be an update for the Windshield mod or should players just comment out the offending line and recompile.

//        Actor.RemoveReferences([email protected]([email protected],9i))

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • Poland
  • Best Conversion 2016 [GTA: Underground] [Contribution]
    Contribution Award [Mods]

#19

Posted 20 September 2017 - 06:38 PM

I have enough of work to do.
Remove the unneccessary code and recompile.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users