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

    1. GTANet.com

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

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

    1. Red Dead Redemption 2

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

    1. Grand Theft Auto Series

    2. GTA 6

      1. St Andrews Cathedral
    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    1. Announcements

    2. Support

    3. Suggestions

FF_Sefirot

Help with Codebreaker\Weather cheats (PS2)

Recommended Posts

FF_Sefirot

Hello everybody,

 

I´m on a quest that unfortunately seems to be in a dead end for the PS2 version of the game.

 

For so long I´ve been looking for codes\ways that allows to change the weather to other variations of the 6 button cheats. For example, being able to get the typical purple sky of the desert or Angel´s Pine pink sky. Back on the day I did it in the PAL version with some Gameshark type device. Also in PC\Android with the Cleomod you can get almost every weather variation in the game.

 

My guess is that manipulating Codebreaker codes I´ll be able to repeat it, but I have a problem, the weather cheats that I have for the Codebreaker 9.2 (NTSC Greatest hits edition) doesn´t fix the weather permanently, if I restart the game after save without CB the effect is gone. I need codes or methods that sets the weather permanently (until you start some mission) just like the button cheats does. The goal is to create a savegame that I can export and don´t depend on the Codebreaker every time.

 

So my question has two parts:

-Someone has Codebreaker 9.2 codes to other weather variations? I´m using the NTSC Greatest hits edition. Here for example the Foggy weather is 

6224B5C5 32C2CD97

-Is there any method (via Cobebreaker, save mod, glitches, etc) to fix the weather and prevent this to keep changing. That way I could wait till the desired weather and use it.

 

I know is a very specific and complicated question, but any help will be very appreciated, this is something I´ve been looking and trying for years.

 

 

Best regards!

Share this post


Link to post
Share on other sites
OrionSR
Posted (edited)
2 hours ago, FF_Sefirot said:

The goal is to create a savegame that I can export and don´t depend on the Codebreaker every time.

How easy is it for you to import and export save games between PS2 and PC? I've been working on a project to embedding cleo-like scripts within San Andreas save files. I made some progress recently that resolved a couple of the major limitations to the strategy so I've been looking for an opportunity to test how it works on PS2.

 

Are you interested? If so I'll petition to have this topic moved to the III Era Modding/Coding sub-forum. Codebreaker questions are appropriate in this forum but what I have in mind definitely qualifies as coding. 

 

Please describe your experience with Cleo on PC and Android. Can you code?

 

Added: RAW code converted from example above using Omni-Convert.

2066C4A8 00000009

Omni-Covert code format worked with Codebreaker v7.  Max-Convert's v6 format didn't work. I balked at the installer for the PCSX2 Converter. Omni-Convert provided the necessary information. 


What the code does (continuosly in a loop):

20 = write one byte, probably - it's been a while

66C4A8 = memory address to modify

000000 = padding for writing 2 or 4 bytes

09 = value of the byte written to memory

 

Edited by OrionSR

Share this post


Link to post
Share on other sites
FF_Sefirot
Posted (edited)
1 hour ago, OrionSR said:

How easy is it for you to import and export save games between PS2 and PC? 

 

Really easy. I´m using FreeMcboot in Ps2, so is as easy as plug an USB. I´ve been doing heavy research on the question of manipulating saves. Right now I can convert between PAL and Ntsc, convert to Ps3 (both DVD and Ps2 Classics version), etc.

I´m very familiar with the differents formats of the saves (max, cbs, psu, psv) so I guess I can help with that question. 

 

You won´t believe me, but soon after I wrote I discovered your post about the "Save game editor 2.8" from 2008. I´ve been messing with it a little bit an discover some interesting things. Setting the time from 1hour-1000 mls to 1-1000000 practically fix the time and weather forever (sadly you can only set a concrete hour).

 

About Cleo... I had the Android version and used it, but that was some years ago. I don´t recall being difficult to use, but I,m not really familiar.

 

I can´t code, I have 0 idea in that regard, I don´t even fully understand how Codebreaker and other similar devices works. I guess I should investigate more in that field. All that I know is about omniconverter and how use it.

 

Anyways, if I can help you somehow you can count with me for sure, just tell me what I have to do.

 

 

Regards!

Edited by FF_Sefirot
add info

Share this post


Link to post
Share on other sites
OrionSR
Posted (edited)
On 6/2/2020 at 1:23 PM, FF_Sefirot said:

can count with me for sure, just tell me what I have to do

Please describe your goal in the context of a proper script that can change behavior based on mission status, button combinations, player location, time of day, etc. You might be able to find inspiration and examples by reviewing similar mods on PC. Avoid "cheat" related strategies unless your goal is to modify a standard cheat.

 

Don't worry about Android; the strategy should work but that path isn't necessary to get from PC to PS2. Can you compile a text script with Sanny Builder 3 and test it with Cleo on San Andreas for PC?  (It would be best to work all the bugs out of the script on PC before porting to PS2.)

 

I'll need a test save to use for the embedding process. You have a little time to prepare something, or... since you have such good control over your saves, check out my Chain Game for PS2 starter save - CG4PS2. The AR Max archives include a debug version of the starter save that unhides all the added vehicles, boost CJ's stats, and unlocks the map for testing - which also breaks the save midway through the first LS strand. These are the saves I'm most familiar with, and I was hoping to update them with Save Anywhere, Teleport to Marker, and Coords Hud scripts. (SaveAnywhere and Teleport to Marker can be ready for PS2 soon. It'll take a while to work the bugs out of custom text before I can get a coords hud to look right on PS2.)

Speaking of custom text, I figured out how to do it on PC, it'll probably work on PS2, but this should be considered a limited commodity. Try to work with standard GXT whenever possible. 

Cheat Code Creation - My old cheat device codes for PS2 topic. This was created shortly after making the CG4PS2 save. Back in the day, players seemed to prefer cheat code strategies that could be adapted to modifying their saves rather than manage save files. 

 

Embedding Scripts in Save Files - My current topic on embedding scripts. The strategies used eventually broke down so the documentation is a bit messed up. I think I worked out the bugs though - that's what I'm hoping to test. Still, you should be able to get the general idea of how it works.

 

San Andreas Save File Companion - You'll eventually run into trouble using standard save editors on PS2 saves. But the tool described in this topic can parse the save data for PC, PS2, and mobile. It's a binary template for the 010 Editor, a high powered hex editor with a decent trial period. The template allows for a great deal of control over save data, but it's also pretty easy to break things if you don't know what you are doing. Save Editors generally try to bullet proof the modifications. The template will let you break whatever you want.

 

Edited by OrionSR

Share this post


Link to post
Share on other sites
FF_Sefirot

Wow!!! Too much info :D

 

I´m a complete ignorant in the code/modding thing, so all the things you said about binary templates, scripts, etc, sound completely new and overwhelming to me.

I didn´t even know about the save mod comunity untill now. I was aware of the possibility of modding the iso, I even played a thing called SA Ptmg Edition in Ps2 that basically is a San Andreas with a menu similar to Cleo. But never imagined that something like that was posibble modifyng a save and using the original game.

 

I can help you providing save games and testing your work, but other than that I´m afraid I won´t be very helpful :/ By the way I tryed your CG4PS2 save and works perfectly fine.

 

1 hour ago, OrionSR said:

Please describe your goal in the context of a proper script that can change behavior based on mission status, button combinations, player location, time of day, etc. You might be able to find inspiration and examples by reviewing similar mods on PC. Avoid "cheat" related strategies unless your goal is to modify a standard cheat.

Well, my obsession has always been have full control of weather and time. Being able to change the time, freeze the clock and fix the weather so it doesn´t change unnaturally, something that happens using the button cheats to stop the clock at 21:00 / 0:00 unless you combine it with weather button cheats.

Of course been able to rotate thru all the weather options, not just the typical sunny/rainy/foggy/cloudy that are in the button cheats already.

 

Other than that any other feature would be very welcome.

 

 

 

Share this post


Link to post
Share on other sites
OrionSR
29 minutes ago, FF_Sefirot said:

Wow!!! Too much info :D

That's okay. I'm just gathering my references and will probably use the links more than you. Don't worry. This is new to me too, so I was planning on doing all the coding and embedding. What I really need help with is testing on PS2, and more importantly, someone interested in using the mod. I don't play on PS2 anymore. Hopefully everything will work as expect and I won't need to try to get this old hardware and software working one more time. Moving saves around with AR-Max was never an efficient process.

 

Can you run an SA Cleo script on PC?

Do you use the PCSX2 emulator?

 

30 minutes ago, FF_Sefirot said:

I didn´t even know about the save mod comunity untill now.

Community? Where? I thought it was just me doing the old man on the mountain thing.

 

Found these standard GXT text keys for weather in the Main Table. What button combinations would you like to use to increase or decrease the weather value? Weather display and control might be decent feature to include with the Coords Hud.

DEBW0		// EXTRA SUNNY LA
DEBW1		// SUNNY LA
DEBW10		// SUNNY VEGAS
DEBW11		// EXTRA SUNNY VEGAS
DEBW12		// CLOUDY VEGAS
DEBW13		// EXTRA SUNNY COUNTRYSIDE
DEBW14		// SUNNY COUNTRYSIDE
DEBW15		// CLOUDY COUNTRYSIDE
DEBW16		// RAINY COUNTRYSIDE
DEBW17		// EXTRA SUNNY DESERT
DEBW18		// SANDSTORN DESERT
DEBW19		// EXTRA COLOURS 1
DEBW2		// EXTRA SUNNY SMOG LA
DEBW20		// EXTRA COLOURS 2
DEBW3		// SUNNY SMOG LA
DEBW4		// CLOUDY LA
DEBW5		// SUNNY SF
DEBW6		// EXTRA SUNNY SF
DEBW7		// CLOUDY SF
DEBW8		// RAINY SF
DEBW9		// FOGGY SF
WEATH21		// EXTRAcolorS 1
WEATH22		// EXTRAcolorS 2
WEATH0		// WEATHER NORMAL

Control time? Um... I might know how to freeze time but I'm not sure of the consequences on weather. Do you know of other examples where this type of mod works correctly? Changing the time should be easy enough, the tricky part is designing a user interface. How will the change time feature be activated and how will the numbers be controlled? Are 5 minute increments close enough or do you need more control? Time control can be a separates script. Let's work on this after we get the other stuff working.

 

Weather and time control are appropriate additions to what I was working on in general, a set of basic tools to help with developing more complex scripts. 

 

Anyway, it'll take a bit of time for me to wrap my mind around the details and gear up for the project. I'm hoping to code a weather script for PC later today. Then I'll start researching what I need to know to get things working on PS2. I haven't done this on PS2 before so it might take a while. Hopefully I can still find my old memory dumps from PCSX2 - hence my earlier question.
 

Share this post


Link to post
Share on other sites
FF_Sefirot
Posted (edited)
52 minutes ago, OrionSR said:

Found these standard GXT text keys for weather in the Main Table. What button combinations would you like to use to increase or decrease the weather value? Weather display and control might be decent feature to include with the Coords Hud.

DEBW0		// EXTRA SUNNY LA
DEBW1		// SUNNY LA
DEBW10		// SUNNY VEGAS
DEBW11		// EXTRA SUNNY VEGAS
DEBW12		// CLOUDY VEGAS
DEBW13		// EXTRA SUNNY COUNTRYSIDE
DEBW14		// SUNNY COUNTRYSIDE
DEBW15		// CLOUDY COUNTRYSIDE
DEBW16		// RAINY COUNTRYSIDE
DEBW17		// EXTRA SUNNY DESERT
DEBW18		// SANDSTORN DESERT
DEBW19		// EXTRA COLOURS 1
DEBW2		// EXTRA SUNNY SMOG LA
DEBW20		// EXTRA COLOURS 2
DEBW3		// SUNNY SMOG LA
DEBW4		// CLOUDY LA
DEBW5		// SUNNY SF
DEBW6		// EXTRA SUNNY SF
DEBW7		// CLOUDY SF
DEBW8		// RAINY SF
DEBW9		// FOGGY SF
WEATH21		// EXTRAcolorS 1
WEATH22		// EXTRAcolorS 2
WEATH0		// WEATHER NORMAL


 

Well, something like hold R1+L1 and then UP and DOWN in the DPAD to navigate thru those options. About time, being able to freeze the clock and then move in 1hour fractions is more than enough, no need to have more control than that. Freeze the time doesn´t affect the weather, the weather just keep changing and you see sudden changes from sunny to rainy (for example). But being able to set the weather that wouldn´t be a problem.

 

I can´t run the Cleo on Pc and I don´t use emulator, just PS2 and PS3 to run the game.

 

If you want I can provide you a save in whatever format it´s easier to work, even directly the folder BASLUS-20946GTA50000 with the saves in ".b" inside.

 

And certainly, it seems you are the only one that keeps working on this, wich is fantastic in 2020. 

 

 

Edited by FF_Sefirot

Share this post


Link to post
Share on other sites
OrionSR
Posted (edited)

For now I'm using the Ped_Answer_Phone key combined with Conversation_Yes to increase and Conversation_No to decrease. It should be easy enough to adapt to whatever L1+R1 is once we've got the buttons mapped out to the actions. I'm reading key presses that are mapped to actions. I don't remember if PS2 had alternate controller settings, but on PC they can be remapped to different buttons on a controller and the keyboard. The key press strategy should make the script much more compatible with other systems as it's starting to look like I won't need to do any memory management, but the buttons are liable to have different actions if implemented on foot or in a vehicle - something extra we'll have to work out as the make more progress.

 

The weather script seems to be working well. It takes a little time before the weather change takes effect but I think that's by design; the sky has a chance to darken and the wind picks up before the rain sets in. The reset to default that occurs when a mission is started is rather abrupt, which is also as it should be, imo. Currently the script displays the weather ID number, which doesn't help all that much. I still need to figure out how I'm going to work those GXT keys into the script so the weather change message has a little more meaning.

 

Please don't quote any more text in my posts than necessary. Particularly the reference stuff like the GXT list that's liable to get updated and just clutters the topic either way if repeated. If you simply react to my post it'll get my attention, or just a short quote to get the conversation started is good too. 

 

For now I'm just going to build off the debug save from CG4PS2. We can worry about a favorite save of your's when we get a little further along. I'm planning on sharing just the (*.b) save files through GTASnP.com and letting you figure out how best to manage the files on your systems.

________________________________

 

Update: The Weather script seems to be working as I hoped as a cleo script on PC. Tomorrow I'll try embedding it in a PC save, and if that goes well the port to PS2 shouldn't be too difficult. 

Edited by OrionSR

Share this post


Link to post
Share on other sites
FF_Sefirot

Ok, perfect!

 

The L1+R1 combination is unused and the Dpad (at least in Ps2 default configurarion) is only to answer certain pedestrians and change the radio station, so I guess it shouldn't interfere with any regular action. But was just an example, use the combination that you consider.

 

Currently I'm using the Ntsc greatest hits version (v.3 in some places). I never tried to use an external save by just dragging the "1 whatever.b" file directly and deleting the original, but I should try as it seems a faster and more efficient way.

  • Like 1

Share this post


Link to post
Share on other sites
OrionSR
Posted (edited)

PS2v2WeatherDB1 - Give this save a shot. My confidence would be higher if I hadn't made so many mistakes on my PC test, but I think I have something that should work for you. I'll be reviewing my progress and possibly updating the link, so be sure to refresh for the latest version before downloading and testing.

 

When the save is loaded a Launch message should be displayed a couple seconds after the screen fades in. 5 seconds later the main script becomes active, and if the game doesn't crash then the weather controls should be active. Important observations include how soon before or after the launch message does the game crash, or if it seems to work as expected.


Ped_Answer_Phone + Conversation_Yes to increase the weather ID.

Ped_Answer_Phone + Conversation_No to decrease.

Text describing the new weather type will be displayed when changed.

For normal weather scroll down from 0, EXTRA SUNNY LA.

It takes about a minute for the new weather to take full effect.

Weather control is disabled during missions, and should reset to the previous setting at the end of the mission.

_____________________________________

 

Whoops, found a bug, but I doubt it can effect the test. The Weather script is a bit too large for the safe-space where it is stored - an array used for the dialog in Where Flowers in Your Hair. But I'm pretty sure the extra variables overwritten are also late game mission vars so it's unlikely to cause any trouble on a debug save that can't progress beyond the early missions.

However, the bug means I need to find a new place to stash the script and/or make it more efficient, and that'll delay the update I had planned to add the SaveAnywhere script to the test save. 

 

Edited by OrionSR

Share this post


Link to post
Share on other sites
FF_Sefirot
Posted (edited)
10 hours ago, OrionSR said:

 Important observations include how soon before or after the launch message does the game crash, or if it seems to work as expected.

I've been able to load the save successfully but the game crash after a few seconds. Even without moving or trying anything the game crash in 5/7 seconds. So I couldn't test the script.

Edited by FF_Sefirot
  • Like 1

Share this post


Link to post
Share on other sites
OrionSR
Posted (edited)
5 hours ago, FF_Sefirot said:

I've been able to load the save successfully but the game crash after a few seconds.

Bummer. Don't be discouraged. I'm out of practice and probably made a basic mistake. This is a complex manual edit; I need to automate this process to eliminate errors. Did the Launch message display before the crash?

 

I made a lot of progress on optimizing the Weather script. It's now roughly half the previous size, and the strings are implemented so a Coords Hud or other scripts can also take advantage of the text. I'm still having problems finding safe places to hide the codes, but I've got a plan for that. 

 

I'm going to start over and test things on PS2 a step at a time. Trying to implement a complex script on a new system as too large a leap to make all at once. When I pick this project up again this afternoon I'll take things much more slowly and work up to the fancier scripts a step at a time.

 

So keep checking back. I hope to have a few incremental type test saves ready later today.

 

Edited by OrionSR

Share this post


Link to post
Share on other sites
FF_Sefirot

Yeah, I get the launch message and soon after crash. I´ll keep trying later!

And thank you for your amazing work!

 

 

  • Like 1

Share this post


Link to post
Share on other sites
OrionSR
Posted (edited)
2 hours ago, FF_Sefirot said:

Yeah, I get the launch message and soon after crash.

Awesome, a partial success. The script hijack strategy probably worked correctly but I probably made an error launching the weather script. 

 

PS2v2ExtraVarsDB - This is a template save I want to build on. It's the same as the CG4PS2 debug save except I've expanded the available variable space to make room for embedded scripts and data. There are no extra scripts or anything to test; you shouldn't notice any difference. If the save loads correctly then please re-save and send me the link so I can verify the internal structure of the save.

 

I'm going to assume the above save will work and start building a simple hijack test: Can I make a default script display a unique message before returning to normal operation? Since the Launch message worked before I'm not expecting any trouble with this part.

 

PS2v2HijackDB - This save should display a message and play a tune before returning the Odd Vehicle script to normal operation. If the message and tune work properly please verify that the BMX Challenge still triggers. You can also test any of the courier assets like Roboi's Food Mart, the NRG Challenge, or Chiliad Challenge, but if BMX works they all should work.

Edited by OrionSR

Share this post


Link to post
Share on other sites
FF_Sefirot
Posted (edited)

 

https://we.tl/t-D7UIVAPxNd

 

Thats the link to PS2v2ExtraVarsDB after saving in a warehouse. The name has change to "In the beggining.b" but thats the save and works perfectly fine.

 

I also tested v2Hijack, after the "Load succesfully" and the song everything works normally. I tried both Bmx and Chiliad challenge and both triggers and works.

Edited by FF_Sefirot
  • Like 1

Share this post


Link to post
Share on other sites
OrionSR
Posted (edited)

PS2v2EsaveDB - Same save as before, this time the hijacked script will launch the emedded SaveAnywhere script. A single launch message should be displayed shortly after fade-in. The Esave script should be activated by holding the GROUP_CONTROL_BWD key for 4 continuous seconds. The save screen should not be shown when the player is in a vehicle or on a mission. It would be best to avoid saving near an active basketball or pool player; I haven't worked in glitch prevention yet.

 

I wanted to stick with baby steps but needed to take a giant leap with this version of the save. If I can get the shared subroutine worked out to fix the addressing it'll make the rest of the scripts a lot easier to implement. The Weather script isn't quite as simple as Esave, but will only be a two step test if this version of the save works as expected.

 

GROUP_CONTROL_BWD: Heavy on the Dpad controls. The hold mechanic hasn't been implemented in the game so that should help avoid conflicts. Holding to activate is an effective strategy on Android where it's a little trickier to press multiple touchpoints. Anyway, keep track of the strategies, what works on-foot only, or on-foot and in-vehicle, and consider a broader strategy for triggering scripts with button combos. 

________________________________

 

PS2v2Weather2DB - Another shot at getting the Weather script working. This save builds on the previous save, so if SaveAnywhere doesn't work then this won't either.  Two Launch messages should be displayed; after that both the Esave and Weather scripts should be active. Check the previous post for Weather controls.

 

The extra variable space allows me to make almost identical changes to PC and PS2. The main difference now is that I need to compile using the proper edit mode so Sanny will get custom variables like $OnMission set correctly. So, there's a much better chance this save will work as expect.

 

Edited by OrionSR

Share this post


Link to post
Share on other sites
FF_Sefirot

PS2v2EsaveDB doesn't work.

As soon as it loads and you appear in the street the game crash (no message).

 

I haven't tried PS2v2Weather2DB (as you suggest it shouldn't work either).

 

One question. What does "GROUP_CONTROL_BWD" refers to? Hold the Dpad? But wich one? (Up,down,right,left).

  • Like 1

Share this post


Link to post
Share on other sites
OrionSR
Posted (edited)
4 hours ago, FF_Sefirot said:

One question. What does "GROUP_CONTROL_BWD" refers to? Hold the Dpad? But wich one? (Up,down,right,left).

Whatever the command is to tell your recruited gang members to hold back or disperse.

 

4 hours ago, FF_Sefirot said:

As soon as it loads and you appear in the street the game crash (no message).

Thanks. I will reconsider my strategies.

____________________________________

 

Update: I managed to get my old fatty working and track down all the hardware and software I needed to confirm that the Hijack save works correctly and the Esave file freezes the game. So... any updated saves are much more likely to work correctly. 

 

Edited by OrionSR

Share this post


Link to post
Share on other sites
FF_Sefirot

Ok, great!! Let me know when you update to try it.

Share this post


Link to post
Share on other sites
OrionSR
4 hours ago, FF_Sefirot said:

Let me know when you update to try it.

I'm hoping to have another test of the Weather script ready shortly. So it might worth checking back.

 

I found the current problem. The strategy I was using to manipulate memory local to the current script isn't working on PS2, so the easy method of embedding the addresses isn't working. But it looks like the trick for working with global memory still works, so I should be able to work out a more complex strategy eventually. 

 

In the meantime I want to test if a script will work... as if it had already been launched with addressing adjusted and saved. Basically, duplicate an existing running script and tweak it so it runs the embedded script instead. The goal is to test if the end result will actually run before going through the hassle of working out a more complex strategy for adjusting the addressing.

So... Esave first, and if that works I practice on the Weather script too. 

Share this post


Link to post
Share on other sites
OrionSR
Posted (edited)
9 hours ago, FF_Sefirot said:

Ok, great!!

PS2v2Esave4DB - Qapla!  Got one working finally. Hold down on the dpad to trigger the save screen.

 

Hopefully, now that I've got the Esave script working, the Weather script will be working soon too.

 

PS2v2Weather4DB - And the Weather script too. Hold left bumper to trigger the stats menu and use dpad right to increase and dpad left to decrease. Also works while in a vehicle but is liable to fire a weapon. Now that we've got some working examples we can reconsider the controls.

 

FYI: It looks like the strategy used to embed the addressing of the scripts means the saves are specific NTSC.

Edited by OrionSR

Share this post


Link to post
Share on other sites
FF_Sefirot

Fantastic! Great job!

 

I´ve tested both saves and works. Minor observations:

 

-Esave: as you said you can´t save while on a vehicle. Other than that works fine. About the button strategy I guess it might interfere with the "recruit gang members" if you play missions.

 

 

-Weather: once more, as you said, it takes some in-game minutes to take effect. You got the message with the weather you turned to an soon after it changes.

The button strategy seems fine to me, L1+LEFT\RIGHT in the Dpad doesn´t seems to interfere.

 

However there are some things to be considered. Almost any event like buy a property reset the weather to normal an then starts to change again to the one you choosed. Also saving the game. Let´s say that you turn weather to "Rainy SF", wait to the weather to change and save. When you load automatically get the message of "Rainy SF" but the weather is normal and have to wait a little bit again.

 

Unfortunately this means I can´t freeze the  clock (with Codebreaker or Savegame Editor) because the game needs time to cycle to that specific weather unlike when you use "weather change cheats buttons" that takes effect inmediately and permanently until you start a mission. You know if that would be possible? Maybe modifying the cheats button? Other solution might be integrate a freeze time script and being able to rotate the clock at your will as we said at the beggining of the post.

 

Anyway thank you so much for your time and hard work!

 

Share this post


Link to post
Share on other sites
OrionSR
Posted (edited)
6 hours ago, FF_Sefirot said:

I´ve tested both saves and works.

Thanks for the feedback. I'm not spending much time testing things beyond just getting the scripts to trigger properly so your observations are critical.

 

-Esave: The ShowSaveScreen command simply will not operate if CJ is in a vehicle. This is a function of the command, no which keys are used to trigger it. I suspect the requirement is that CJ is on-foot so more than likely the script will not work if CJ is swimming or falling as well.

 

Adding glitch prevention: If the game is saved near an active basketball (like the one downstairs in Madd Dogg's Crib, hence the common glitch) or an active pool player (not an issues without mods) then they will never spawn again without a repair. Two options to prevent the glitches are to reset the flags before saving, or to refuse to trigger the save screen if either of theses flags are active. The second option seems less likely to run into trouble with the current pool player while saving, but currently I don't have a strategy to display a message that warns the player to move away and try again. I haven't implemented custom text on PS2 yet, but I'm planning on it eventually. 

 

4 seconds is an awfully long delay; that should reduce conflicts but is a rather annoying wait. Conflicts during missions should not be a factor as the script won't even bother to check the key presses while the $OnMission flag is active. Still, I'm open to more responsive key combos. The thing to keep in mind is, I would not expect all button combos to work the same way on foot and in a vehicle. Since ShowSaveScreen only works while on foot, we should use a button combo that also only works only on foot and save the more flexibly combinations for other scripts.

Weather: I was expecting issues and anxious to make test script available. This process would be a lot easier if you also had SA on PC. The initial goal was to simply get anything to work, so I started with standard in-game commands ("Opcodes") so I wouldn't need to jump straight into memory manipulation. 

01B5: force_weather 1      // Forces the game weather to the specified value.
01B6: force_weather_now 1  // Forces the upcoming weather to the specified type.
01B7: release_weather      // Allows the game to continue it's usual weather pattern after using 01B5.
0915: set_weather_to_appropriate_type_now  // This opcode sets the current weather ID according to the game clock and the players current town number.

I haven't been using 01B6. It didn't seem to implement an immediate change when tested on PC.

The weather set by 01B5 takes a while to cycle in, but sticks around until released by 01B7.

 

0915 is providing a rather jarring reset. Currently it's being triggered after each release, which occurs by setting Weather Normal using the new controls, or each time the $OnMission flag is set to 1. There are lots of events that trigger $OnMission, buying property, just entering a gym, and missions obviously. Your original description included something about not working on a mission so I was trying to work that in. It might be better to just let missions that control the weather do what they're going to do to our weather setting until the mission is over. Anyway, we can rethink the logic to smooth things out but that's what we've got to work with as far as normal commands.

 

Anyway, now that we've got basic normal-opcode scripts working I can can experiment with manipulating memory, and your original codebreaker code is a good place to start.
 

2066C4A8 00000009

I know what to write and where; I still need to learn how on PS2, but that's the next primary test of this strategy anyway. What should I expect this command to do? Is it immediate? How are missions and weather cheats effected? Codebreaker will continuously rewrite this value; I'd prefer to avoid such a brutal process by combining this command with force_weather and a matching type. 

 

I seldom use cheats so I'm unfamiliar with most of the specifics of what they are or what they do. However, based on what I remember about using cheat device codes to change which vehicle is spawned by various cheats, there's a reasonably good chance I can change the weather specified by a particular cheat to implement the weatherID selected by the Weather script instead. I'm not sure how to trigger a cheat without pressing the button combo, yet. 

 

I'm still confused about time control, however, it should be relatively easy to implement increasing and decreasing the time with same combo as the weather controls, except use up and down on the dpad to add or subtract 1 hour. I'm a bit concerned about how subtracting time might effect the weather and thinking Action+Down might eventually be used to freeze time instead, but... may as well test it to see what happens.

 

You mentioned the Savegame Editor v2.8. That tool has been upgraded to v3.x, but I'm not sure how compatible it is, or was, with PS2 saves. I remember tweaking weather settings with that editor when I was first learning to edit save files but haven't messed with it since. I'm looking at 3 weather fields in the save data, old weatherID, new weatherID, and forced weatherID. I think my PC trainer might manipulate weather too; I should figure out how it works as well. Basically, I need to tease out which fields the opcodes, codebreaker codes and cheat funtions are manipulating.

 

And I'm confused about freezing time too. Why is this helpful? Are there alternative solutions? Like, you wouldn't need to freeze time if _______. How are you accomplishing this? I'll re-read your earlier posts but this would be a good time to clarify things in light of new information and working scripts.

 

You've got a lot more experience using this stuff than I do. Given all these various parameters, would you care to make any predictions on how all this stuff fits together and might be used to accomplish your goal. 

 

I'm not sure what I'll work on next. There are some easy tweaks I can try with the weather opcodes, and time control to implement. That shouldn't take too long but I've got other things to do today, And then there's a big investigation to various fields all the opcodes, editors and cheats are manipulating. I'll probably pick up the project with the investigation, so it might be a while before I make any new updated saves.

 

BTW, the configuration of the current save would make it pretty easy to replace the current weather script with another. It's a fairly large leap for someone that's never coded before but a lot easier than all the effort used to get it running in the first place.  Are you interested in testing you own scripts?

Whoops, wall of text. Sorry.

Edited by OrionSR
  • Like 1

Share this post


Link to post
Share on other sites
FF_Sefirot
53 minutes ago, OrionSR said:

Whoops, wall of text. Sorry.

Hahaha, no worries.

 

About the Esave, I haven´t tried to use it near the basketball\pool, so I don´t know about possible glitches. The save works in a logical way, is not a "save state", if you steal a car and save next to it, the car won´t be there when you load. I guess that If you save while having chase stars you won´t have any wanted level if load. Not a complain at all, just info for those who might try it in a future.

 

 

About the weather/time... I´ll try to explain what I have learned by playing, observing and trying.

 

The weather cycle of rain\fog\sun cycle goes randomly. Every second is a in-game minute (more or less). Every zone in the game has its own typical weather and variations of rain, fog, sand-storms (in the desert), etc. The weather changes in a natural way so you don´t see a sudden change from rain to sun, obviously. It changes gradually and radomly (also depending of the zone where you are) in a process that takes a few in-game minutes.

 

Now, the cheats. I only use two types of button cheats. Weather and "always 21:00/00:00".

 

-Always 21:00\00:00 button cheats: this ones technically set and fix the clock in those hours and the time doesn´t pass. But is not exactly true. The weather cycle keeps going. But because minutes doesn´t advance weather changes are sudden and unnatural. From sun to rain instantly (for example). Another thing that happens with this buttons cheats is that the sun cycle keeps going. So suddenly you see a fire ball in the sky while is midnight. My guess is that internally the time keeps going somehow.

 

Codebreaker "freeze time" code or Savegame editor options allows you to effectively stop the clock. So no more weather changes or sun moving.

 

 

-Weather change button cheats: there are like six variations I think. This ones forcefully changes the weather. It doesn´t matter if you use it this cheats with "always 21:00\00:00" or with a freezed time save. Always change the weather instantly  by force and fix the weather. This means the weather cycle stops untill you start a mission\activity.

For example if you use the rain button cheat while free roaming, it doesn´t matter if you save or die 1000 times, the days and hours pass, but the weather remains rainy until you start a mission and the cycle goes back to "normal and random".

 

 

 

Now, with this in mind, the Weather save that you have created: Starts the script process to change the weather "naturally" to the selected option. Thats the reason why it doesn´t work with "freezed time" saves. It requires the internal clock of the game to move to change the weather. However it does work with the "always 21:00\00:00" because as I mentioned before it seems to keep the internal clock and the cycle moving. 

 

 

The conclusion is that the way the weather button cheats works is different. If it helps I´d say Cleo mods also change the weahter instantly instead of spawn the process.

 

 

About my ideal goal: being able to set a certain hour and certain weather so neither the clock or the weather moves. Now, with your save I can do the second. Even if it takes a few in-game minutes the weather remain until you do something. I´m not interested in being able to change weather in missions, just free roaming, thats perfectly fine for me. Unfortunately, because it requires the inernall clock to move, I can´t fix the hour via Codebreaker or Savegameditor, just with the "button cheats" options. Also, oddly, if you save after using the script, the weather backs to normal and resets the script so once more you need the clock to move. 

 

Thats why it would interesting for me to combine it with some script to freeze the time and set the hour. Or to make the weather script forcefully change the weather like the buttons does insted of start the whole process.

 

 

Finally, about the Save game editor, I found (and used) the version 3.2. There was another more complete, but it didn´t work. Anyways any version has weather options so I don´t know.

 

 

 

Wall of text by me this time :D

 

  • Like 1

Share this post


Link to post
Share on other sites
OrionSR
Posted (edited)
2 hours ago, FF_Sefirot said:

Codebreaker "freeze time" code

Please post this code. It'll tell me the appropriate address and values for PS2.

 

Okay, I think I have a good idea of how to modify the Weather script if I can figure out the missing pieces.

 

Revised:

  • Action-Right will increase the weatherID, force the weatherID so it sticks and actives instantly.
  • Action-Left will toggle between releasing and resetting to normal, and re-forcing the selected weatherID instantly.
  • Action-Up will increase the time.
  • Action-Down will toggle the clock to freeze and unfreeze.
  • Let's try letting the script work during missions to see what happens.

 

As it is now, the script cannot tell if the save has been reloaded and will just continue where it left off.

Edited by OrionSR
  • Like 1

Share this post


Link to post
Share on other sites
FF_Sefirot
A6C89B17 EFDF55DE
D51218B2 4504E13B

 

That´s the code for Codebreaker V7+ (NTSC Special Edition, the same one that you are working on).

 

The combination that you propose sounds great if it works.

  • Like 1

Share this post


Link to post
Share on other sites
OrionSR
5 hours ago, FF_Sefirot said:

That´s the code for Codebreaker V7+

Hm... I don't think I want to risk using that code. I don't understand what it's doing well enough. I found some nice reference on cheat codes posted in RAW format, so I can use the addresses directly. Also, it looks like the lists are more complete than similar references and posted for SAPS2v1 and SAPS2v2. The dual lists are handy as it looks like all of my memory dumps are for PS2v1 so I'll need to port the addresses accordingly. In this case, I think I found the addresses I need near other codes listed in these databases. I still need to make some test saves to see if I can actually read and write the data, but at least I know where to look.

 

Looking through the available documentation and cleo scripts to freezing time, it looks like the most common strategies are to "NOP" (no operation) out the functions that update the time, and to continuously reset the time to a specific value. Issues with weird weather are reported with the latter strategy, so the scripts often include some sort of weather tweak that will conflict with our weatherID adjustments. I suspect the codebreaker code you suggested in nopping the function, and examples for PC suggest this would be in protected memory. I don't know how to manipulate protected memory on PS2. I'm still trying to learn to read and write to unprotected memory.

 

Updating the weather instantly is easy. I just need to use the other standard opcode instead. It'll update the current weather, next weather, and locked weather to the same value. So, I don't need to do anything fancy with memory to change the weather. However, I want to read the value of forced weather. If forced weather == -1 (0xFFFF) then forced weather is disabled and I know to toggle it on again, or off if not, even if the weather is released by a mission and not the script.

 

I'm still not sure how to freeze time, but it looks like I can adopt the same strategy you were using with the save editor to slow time to a crawl. I think I found the address near other time related cheat addresses in an area of memory that should be easy to manipulate.

MillisecondsPerGameMinute - The standard setting is 1000 ms per minute, so one second per in-game minute. Realtime would be 60000. Max should be -1. Almost half max and at little risk of being read as negative, is 2 billion. Please test the limits of this setting and suggest and optimal value. In the meantime I'll start testing with your initial suggestion of 1 million.

 

Should Action+Down toggle between normal clock speed and a slow crawl, or cycle between fast, normal, realtime, and crawl?

  • Like 1

Share this post


Link to post
Share on other sites
FF_Sefirot

I can confirm the value 1 - 2billions works for me. With the version 3.2 of the editor that's the maximum (previously "just" 1 million). Using that value practically freezes the time, so if it's a safer way, perfect, no need to force other method.

 

About Action+Down...I prefer the rotation between normal and crawl. Not particularly interested in realtime or fast clock.

Share this post


Link to post
Share on other sites
OrionSR
46 minutes ago, FF_Sefirot said:

I can confirm the value 1 - 2billions works for me.

Yeah, it looks like the Savegame Editor is limiting it to 2147483647 (0x7FFFFFFF), the maximum value for a signed integer. Does that setting do anything weird to the weather when it's not locked?

 

Success! Again! I was way too tired and made too many dumb errors but was too curious to give up, too. My latest test save was able to read the game values for Forced Weather and MillisecondsPerGameMinute, and write a value of 250 to speed up time. 

 

I think I have all the pieces I need to finish this puzzle. I just need to put them all together to form a pretty picture.

  • Like 1

Share this post


Link to post
Share on other sites
FF_Sefirot
2 hours ago, OrionSR said:

Does that setting do anything weird to the weather when it's not locked?

No. That way freezes both clock and weather. For example, I went to countryside, waited to the weather to change and saved. Later I used the editor to change the value and that fixed the clock and weather. Because internally the game clock is so slow it doesn't have time to change the weather. Even if you move to other zone, save, die, etc, with that method is fixed while the value is 2 billions. So, I think this method is even better if you can control it in-game.

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.

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.


  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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