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 Cayo Perico 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. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA VI

      1. St. Andrews Cathedral
    3. GTA V

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

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

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

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

      1. Guides & Strategies
      2. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. 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. Design Your Own Mission
      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

Help with Codebreaker\Weather cheats (PS2)


FF_Sefirot

Recommended Posts

OrionSR

Baffled! Again!  I thought I had a good save ready to test but most of the text failed to display when the script was ported to PS2. I tried a few modifications to see if I could isolate the problem but only made things worse. I'm starting to get annoyed so time to give it a rest. Most of my frustration is predictable, and much of the reason I don't work with PS2 mods much anymore.

 

It just takes forever to get from a save I want to test, to an AR-Max archive with PS2 Save Builder, to a copy on USB, to getting AR-Max to finally boot and then another long load time to get the memory manager working so I can deleted the old SA folder and uncrunch the max file to the memory card before rebooting again and waiting for SA to finally load a stable save before I can finally load the test save to see if it works. It's not so bad when things are working but terribly frustrating when all I want to do is make a small change and try again.

 

However, I was planning to change how the text is displayed anyway. I just wanted to get a test save out without changing any more than necessary in the previously working script. But since that strategy isn't working I may as well invest a little more time into experimenting with the other text opcodes. Maybe the current issue will work itself out in the process. 

 

I found an interesting bug in the time control feature. I have some ideas about fixing the issue but haven't tried yet. When time is slowed so the clock doesn't advance and then released, the clock quickly scrolls to catch up 

  • Like 1
Link to post
Share on other sites
FF_Sefirot

Well, maybe elimimating the text? As long as it works you can see the changes by yourself in the weather. Or having a description with the order in wich cycle.

 

About the bug, it also happens with the button cheats to set the time. If you dessactive the cheat the time speeds up till it catch the "real" time. I thinks is something perfectly forgivatable if it can't be solved. 

 

I have less problems testing saves, with FreeMcBoot is as simple as plug an Usb with the ".b" file. But yeah, having to convert to Armax etc must be annoying!

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

Well, maybe elimimating the text?

What? No way. I'm not giving up that easily. Text was working before and it will work again. I just need to figure out what I did wrong, or what's different about PS2. And it'll look better too. Medium sized gold text in the middle of the screen gets the message across but is in the way, and liable to conflict with other displayed messages. There are other opcodes for displaying text; this one was just easy and obvious - fine for a test but a proper script can do better.

 

I've got a few ideas on fixing the rubberband in the clock. I'll test them out while debugging the text. Otherwise, this part of the script seems to be working as expected. I also put out some questions in a programmer's channel looking for risks of using this slowTime strategy, and alternative strategies to freeze time, but... If PS2 is mentioned in question then experts tend to ignore it completely, so I don't hold out much hope of finding any help.

  • Like 1
Link to post
Share on other sites
FF_Sefirot
3 minutes ago, OrionSR said:

What? No way. I'm not giving up that easily.

Certainly is nice to see someone so dedicated and perfectionist.

 

I wish I could be more helpful!

 

And yeah, Ps2 doesn't seems to have the attention that Pc/Android has 😐

Link to post
Share on other sites
OrionSR

PS2v2TimeTooDB - Figured it out! Well... the text part anyway. Now it's time for proper play testing while I clean up the script and make things pretty.

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

Dumb mistake. I forgot that my script was already running on PS2 and would remember previously set local variables. Once I got past worrying about the missing text I noticed that the forced weather was seriously messed up, like you'd get if out of range weatherIDs were set, and wondering why the script wasn't rolling over to normal LA weather again. Duh, cuz I was starting out of range and working up.  Proper coding habits will fix that.

 

And my strategy for stopping the clock from scrolling when normal time is restored works well enough. I'd prefer for it to advance immediately to the next second but adding a second and evaluating for rolling over minutes to hours and hours to days is a lot of extra code for an immediate reaction. Had to do that for advancing the hour though.

 

2 hours ago, FF_Sefirot said:

I wish I could be more helpful!

 You're up. Play test away, and keep providing detailed observations. 

 

In order to anticipate issues with slowing time, I suggest researching any Real Time mods that exist. Any issues reported for a realtime mod might also plague our strategy.

I'm going to work on bells and whistles for a more integrated look.

______________________________________________

 

Controls are not appropriate for in-vehicle use due to conflicts with radio controls, and continuously firing an uzi when driving a bike and holding the Action/Secondary Fire button (L1). We either need to restrict the time and weather controls while in a vehicle or change to a different control scheme. Any suggestions?

 

Something else you might be able to help with: I've got a google sheet with San Andreas Constants that I use instead of numbers to help make my scripts easier to read. Is it within your skill set to help me update this list with PS2 button names? Just the raw name, like "L1" and "Circle", the common reference. I'll update the sheet with PS2 constants later. And any format is fine, doesn't seem worth the hassle of providing permission to edit.

Edited by OrionSR
  • Like 1
Link to post
Share on other sites
FF_Sefirot

Well, after a couple of hours of playing I´d say it works flawlessly.

 

I think the use of the L1+DPAD is the best option. While on food it doesn´t interfere with any other action. In a vehicle is not problematic.

Yes, up and down will change the radio station, but that also happen with "normal" button cheats. Any other combination will perform some action. The only risk of accidentally fire the uzi is while driving a bike: pressing L1 will fire straight. Also the Hydra fire the missiles with L1.

 

The only alternative that I can think is use "L3" instead of "L1". That migh interfere less, but is really uncomfortable press and hold L3 and then the DPAD.

 

Personally I wouldn´t change anything in that regard. Is easy and comfortable to perform, you won´t use the cheats accidentally and the worst thing that can happen is change the radio station and shot a uzi blast while on a bike.

 

Now, some observations:

 

-This time if you save after change the weather the effect remains when you load. Also you don´t get any message with the selected weather after load (something that happened in the first script).

-The weather backs to "normal" after any mission or activity.

-You can change weather and freeze the clock during missions.

-Freezing the clock doesn´t stop the chrono in races, etc, but in missions\activities like burglary where the limit is a certain hour of the day, it provides infinite time.

-Certain missions\activities starts with a concrete weather and at a certain hour, so even if you start with other selected it will turn to that one. The frozen effect remain however. For example the "Boat school" always starts its test at 12:50 with "Contryside weather". Once started you can change the weather.

-Freezing the time prevent the weather to change naturally, but the missions\activities mentioned before will change the weather/hour anyways.

-After any mission weather will be back to normal. If you have activated the frozen clock you won´t see any change as the game needs time, but as soon as you unfreeze it will take effect.

-If you freeze and save, when you load the time will remain frozen (+6hours).

-Accelerating the time excessively will easily cause CJ to feel hungry and loss fat and muscle, just as it would happen naturally after those hours.

 

I´ll keep playing to check if I see something strange, but everything works perfect so far. 

 

Also, would it be possible embed the script in a given save?

 

Great job by the way! You are a wizard! :lol:

 

Edited by FF_Sefirot
  • Like 1
Link to post
Share on other sites
OrionSR
1 hour ago, FF_Sefirot said:

Now, some observations:

Wow. That's some high quality play testing. Nice job. I was wondering how to explain some of the odd quirks to check but I think you covered everything I thought of and a few more.

 

1 hour ago, FF_Sefirot said:

I think the use of the L1+DPAD is the best option.

Good. I really like the on-foot controls and I'm working that into the next update. Instead of displaying a large message whenever a change is made, I want a box to pop up with the Stats box whenever L1 is held that displays weather status without needing to make any changes. Initial tests suggest the box will look better if I break this part out into a separate script - something that can be built into the HUD that I wanted to make anyway. I haven't worked with the draw text commands much so it'll take a while to experiment with the various options and find something that looks nice.

 

2 hours ago, FF_Sefirot said:

Also, would it be possible embed the script in a given save?

Yeah. I figured you'd want to use this in your own save soon. Would you like to learn how to embed the scripts? Actually, never mind. I'm not ready to explain the process. Stick with me a bit longer and I'll customize your save once I get things clean up and looking sharp.

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

Stick with me a bit longer and I'll customize your save once I get things clean up and looking sharp.

Absolutely, count with me for all that I migh help!

Link to post
Share on other sites
OrionSR

PS2v2TeaTimeDB -  It's pronounced Teh-ah-tim-eh, sir.

 

This looked fine on PC, but when ported to PS2 the weather text looks terrible. I can't tell if it's an issue with text scaling on PS2 or the component up-scaling on this terrible monitor. But the save seems to work so you may as well test it while I fiddle with other options. How does it look to you?

 

The text has been removed from the script that controls time and weather. A new script was added to display weather status in a box in the upper left corner. The brighter text on bottom is current weather and the darker text in the upcoming weather. White text is normal, gold text is forced. 

 

 

  • Like 1
Link to post
Share on other sites
FF_Sefirot
41 minutes ago, OrionSR said:

PS2v2TeaTimeDB -  It's pronounced Teh-ah-tim-eh, sir.

Hogfather!:D

 

The script seems to work as good as the previous.

The text in my screen doesn´t look bad, it displays the weather as described in a little box (maybe is too small for your monitor?) in the upper left side.

 

HOWEVER...It shows up every time you push L1. So if you are firing the uzi, missiles, or any other action with L1 it will display and is very distracting.

Ideally it would only appear when you change the weather like in the previous version.

Appart from that...aesthetically is less intrusive that the other I guess, but personally I liked more how it was display in te previous one, even if it was in the upper middle of the screen with a bigger font, I found it more attractive. But that´s a matter of tastes!

  • Like 1
Link to post
Share on other sites
OrionSR

Hm... Okay. This monitor isn't very good so I was holding out hope it'd work for you. It's difficult to fit the full text of Extra Sunny Countryside. I'll give it another go and see if I can work a nice text box into the main script. Should be easier if I ignore the next weather; might try to get it to scale with the text this time. What I liked about the eHUD weather was I could watch how the current and next weather cycled by hour, transitions I wasn't able to watch before. But that's not necessary for the current script. 

Edited by OrionSR
  • Like 1
Link to post
Share on other sites
FF_Sefirot

Yeah, that feature is nice. I was flying from one city to other holding L1 and observing how the weather was changing in the hud. The problem is what I mentioned, if you are just playing and using L1 to fire or other things the box appear even if you are not using the script.

Link to post
Share on other sites
OrionSR

PS2v2TeaTime2DB - This time, just a simple help text box. Easy to code but I don't have any control over it's position or text style.

 

I might continue to develop the next weather feature into a hud that displays other useful game info. But to do that well I need to figure out how to do custom text on PS2.  I'm not quite there yet. When this script is done I was planning on updating the teleport to marker script for PS2 before working on a coords hud, which also needs custom text, so I'll get there eventually.

Edited by OrionSR
Link to post
Share on other sites
FF_Sefirot

This one is much better.

The box and the font is bigger in capital letters and displays only when changing the weather. I'd say is the best version so far.

  • Like 1
Link to post
Share on other sites
OrionSR

PS2v2eWarp3DB - (L1+L3) Action-Duck to warp to the target marker. Won't warp when no marker is set. Works with vehicles and for exiting interiors.

 

I realize this goes beyond your original quest, but... Please play test.

 

There are some odd quirks about this stripped down teleport script but the only thing unexpected was the fairly long wait times between activating and teleporting. This is almost instantaneous on PC and Mobile. It might be worth the trouble to restore the fades ZAZ included with the original script. (The fades didn't work right on mobile, so just took them out rather than fix them.)

 

This save builds on previous versions in this topic. The eWarp script was added, and variable space increased by another 8000 bytes to make room for memory dumps to help me with future projects. 

//  MarkerOffset = 0x6FF970  // PS2v1
//  RadarOffset = 0x701F00  // PS2v1
//  SCMoffset = 0x6B1FF0  // PS2v1
  MarkerHandleOffset = 0x7004D0  // PS2v2
  RadarPoolOffset = 0x702A80  // PS2v2
  SCMoffset = 0x6B2770  // PS2v2
//  MarkerOffset = 0xBA6774  // PCv1
//  RadarOffset = 0xBA86F0  // PCv1
//  SCMoffset = 0xA49960  // PCv1

 

Edited by OrionSR
Link to post
Share on other sites
OrionSR

TeaTime.es - Text version of the working Weather script.

 

Do you have your own save ready for embedding? Which scripts would you like included?


I'm trying to finish up the documentation for this project since the eWarp script was the last of my original goals. An overall goal is to be able to use cleo-like script as compiled by Sanny Builder. Originally I was trying to keep the scripts as compact as possible because I needed to manually adjust the jump addresses. For the various Weather scripts, I decided to practice with high-level constructs in order to demonstrate the flexibility of the embedding process. And... there aren't all that many examples of cleo script with high-level constructs so I figured I'd post this one as an example, and documentation of the process used.
 

Spoiler

 

{$CLEO .es}
//TeaTime.txt  // It's pronounced Teh-ah-tim-eh, sir.

CONST
  PED_ANSWER_PHONE=4
  GROUP_CONTROL_FWD=8
  GROUP_CONTROL_BWD=9
  CONVERSATION_NO=10
  CONVERSATION_YES=11

  mytime = 2000
  mystyle = 5
  lastID = 22  
  weatherID = [email protected]
  current_hours = [email protected]
  current_minutes = [email protected]

  slowTime = 0x7FFFFFFF
  normalTime = 1000
  unforcedWeather = 0xFFFF

//  SCMoffset = 0x6B1FF0  // PS2v1
//  GameMinuteOffset = 0x66B79C  // PS2v1
//  ForcedWeatherOffset = 0x66BD2C  // PS2v1

  SCMoffset = 0x6B2770  // PS2v2
  GameMinuteOffset = 0x66BF1C  // PS2v2
  ForcedWeatherOffset = 0x66C4AC  // PS2v2

//  SCMoffset = 0xA49960  // PCv1
//  GameMinuteOffset = 0xB7015C  // PCv1
//  ForcedWeatherOffset = 0xC81318  // PCv1
END

//--------------------------------------------------//

//03A4: name_thread 'TeaTime' 
//wait 5000
//gosub @sub_embed_gxt

wait 0  // 4 byte offset from baseIP

0006: [email protected]  = ForcedWeatherOffset  // ForcedWeatherType
000E: [email protected] -= SCMoffset
0016: [email protected] /= 4 // ADMA index

0006: [email protected]  = GameMinuteOffset  // MillisecondsPerGameMinute
000E: [email protected] -= SCMoffset
0016: [email protected] /= 4 // ADMA index


while true 
  wait 0

// -- Increase weatherID and force_weather_now
    if and  
      00E1:   player 0 pressed_key PED_ANSWER_PHONE
      00E1:   player 0 pressed_key CONVERSATION_YES
    then
      :Wait1
      wait 0
      if and
        00E1:   player 0 pressed_key PED_ANSWER_PHONE
        00E1:   player 0 pressed_key CONVERSATION_YES
      then
        jump @Wait1
      end
      if 
        lastID > weatherID
      then
        weatherID += 1
      else
        weatherID = 0
      end  
      01B6: force_weather_now weatherID
      03E5: show_text_box $11000(weatherID,24s)
    end

// -- Toggle unforcedWeather On and Off 
    if and  
      00E1:   player 0 pressed_key PED_ANSWER_PHONE
      00E1:   player 0 pressed_key CONVERSATION_NO
    then
      :Wait2
      wait 0
      if and
        00E1:   player 0 pressed_key PED_ANSWER_PHONE
        00E1:   player 0 pressed_key CONVERSATION_NO
      then
        jump @Wait2
      end
      if
        &0([email protected],1i) == unforcedWeather
      then
        01B6: force_weather_now weatherID
        03E5: show_text_box $11000(weatherID,24s)
      else
        01B7: release_weather  
        0915: set_weather_to_appropriate_type_now
        03E5: show_text_box 'WEATH0'  // Weather Normal
      end
    end
    
// -- Increase current_hours 
    if and  
      00E1:   player 0 pressed_key PED_ANSWER_PHONE
      00E1:   player 0 pressed_key GROUP_CONTROL_FWD
    then
      :Wait3
      wait 0
      if and
        00E1:   player 0 pressed_key PED_ANSWER_PHONE
        00E1:   player 0 pressed_key GROUP_CONTROL_FWD
      then
        jump @Wait3
      end
      00BF: current_hours = current_time_hours, current_minutes = current_time_minutes      
      if
        current_hours == 23
      then
        current_hours = 0
        088E: set_next_day
      else
        current_hours += 1
      end
      00C0: set_current_time current_hours current_minutes
    end
   
// -- Toggle slowTime On and Off 
    if and  
      00E1:   player 0 pressed_key PED_ANSWER_PHONE
      00E1:   player 0 pressed_key GROUP_CONTROL_BWD
    then
      :Wait4
      wait 0
      if and
        00E1:   player 0 pressed_key PED_ANSWER_PHONE
        00E1:   player 0 pressed_key GROUP_CONTROL_BWD
      then
        jump @Wait4
      end
      if
        &0([email protected],1i) == normalTime
      then
        &0([email protected],1i) = slowTime
      else
        00BF: current_hours = current_time_hours, current_minutes = current_time_minutes      
        wait 0
        00C0: set_current_time current_hours current_minutes
        &0([email protected],1i) = normalTime
      end
    end
    
end

/*
:sub_embed_gxt
  05A9: s$11000[0] = "DEBW0"		// EXTRA SUNNY LA
  05A9: s$11000[1] = "DEBW1"		// SUNNY LA
  05A9: s$11000[2] = "DEBW2"		// EXTRA SUNNY SMOG LA
  05A9: s$11000[3] = "DEBW3"		// SUNNY SMOG LA
  05A9: s$11000[4] = "DEBW4"		// CLOUDY LA
  05A9: s$11000[5] = "DEBW5"		// SUNNY SF
  05A9: s$11000[6] = "DEBW6"		// EXTRA SUNNY SF
  05A9: s$11000[7] = "DEBW7"		// CLOUDY SF
  05A9: s$11000[8] = "DEBW8"		// RAINY SF
  05A9: s$11000[9] = "DEBW9"		// FOGGY SF
  05A9: s$11000[10] = "DEBW10"		// SUNNY VEGAS
  05A9: s$11000[11] = "DEBW11"		// EXTRA SUNNY VEGAS
  05A9: s$11000[12] = "DEBW12"		// CLOUDY VEGAS
  05A9: s$11000[13] = "DEBW13"		// EXTRA SUNNY COUNTRYSIDE
  05A9: s$11000[14] = "DEBW14"		// SUNNY COUNTRYSIDE
  05A9: s$11000[15] = "DEBW15"		// CLOUDY COUNTRYSIDE
  05A9: s$11000[16] = "DEBW16"		// RAINY COUNTRYSIDE
  05A9: s$11000[17] = "DEBW17"		// EXTRA SUNNY DESERT
  05A9: s$11000[18] = "WEATH16"		// WEATHER SUNNY DESERT
  05A9: s$11000[19] = "DEBW18"		// SANDSTORN DESERT
  05A9: s$11000[20] = "FEC_DUW"		// Dive underwater
  05A9: s$11000[21] = "DEBW19"		// EXTRA COLOURS 1
  05A9: s$11000[22] = "DEBW20"		// EXTRA COLOURS 2
  05A9: s$11000[23] = "WEATH0"		// WEATHER NORMAL
  0051: return
*/

For efficiency, the gxt array was copied and pasted from another save so I wouldn't need to waste space to write these values to the variable space.

 

 

 

Edited by OrionSR
  • Like 1
Link to post
Share on other sites
FF_Sefirot

I´ve tested eWarp and it works pretty well. Usually using this kind of features with Codebreaker or other devices makes the games crash.

 

Some observations:

-It takes about 5/6 seconds to teleport.

-It seems that the closer the market is it to your current position the shorter is the load time.

-You can use it in missions. It might very useful to almost insta-complete certain tasks. 

-If you teleport in to the sea you won´t appear swiming: you will be walking thru the sea ground. You need to reach the coast to start swiming or teleport again. 

With boats if you teleport in to another sea-area you will appear submerged but you will float and emerge to the surface. Cars sticks to the sea ground.

-You can use it while in interiors without problems.

-You can use with any vehicle BUT if you are flying an aircraft you´ll probably gonna crash because you'll appear at ground level. I haven´t tried with trains. It might be funny :D

-If you put the market in a high building you´ll appear on top. 

-I haven´t had any crashes or problems spawning inside any texture.

 

About my save, yes, I have it ready. I´ll pass you the link:

https://we.tl/t-GXbuOsmrZL

 

Iniatally I was only interested in the weather (TeaTime2) but this last one with the warp works pretty well and includes the weather features.

My question is: the fact that have more script lines (weather and teleporting) affects the game somehow? The memory used doesn´t impact other aspects? If not I´d like the eWarp3 embed and still testing it with my own save.

 

 

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

About my save, yes, I have it ready. I´ll pass you the link:

What? Something you didn't like about GTASnP.com? Why send me to a site with adds?

 

5 hours ago, FF_Sefirot said:

The memory used doesn´t impact other aspects?

Not that I'm aware of, we are pioneering new ground, however. Still, I anticipate no issues with resources. The most likely annoyance would be less compatibility with save editors due to the expanded variable space, but editors that are that picky don't usually work on PS2 anyway. The space that's being used to store the script isn't needed by the game anymore by the time it starts loading the save. There's about 16000 bytes to work with, and all three scripts so far are only using 1248. Usually only about 35 of 96 running script slots are ever used at the same time; adding 3, or quite a few more, shouldn't cause any issues.

 

5 hours ago, FF_Sefirot said:

With boats if you teleport in to another sea-area you will appear submerged but you will float and emerge to the surface.

There you go again. That's something I hadn't noticed before. Nice work. At one point I made a lot of additions to the teleport script so boats would spawn on the surface if over water (not sure what I did about upper Sherman Dam though), or helicopter would spawn in at ground level plus a safe height with engines running, and planes would get a speed boost in the direction of the heading. But... I think I may have overwritten this file. I can't find it anywhere, and there's a nagging annoyance associated with the search that suggests I did something stupid and destroyed it. Anyway, if you are interested, we could continue to develop these scripts further.

 

I still don't have the info I need to do this properly on PC, but... What would you think about a Warp script that (perhaps as an option) would automatically teleport CJ to the marker and then remove it whenever the marker is placed? 

 

I'm pretty sure the long lag before teleporting is due to the load time for the new environment. If you are close to the destination then most of that environment is already loaded. Considering the slow transfer rate of a DVD drive, the extra lag is not surprising. There's probably nothing to be done about it other than cover it up with fades like an interior transition.

 

Small Details: The goal is to avoid rapidly repeating the commands if the button combo is held for any length of time. The Weather and Time controls are coded to activate when the button combo is released. I wanted a faster response for teleporting so it activates when the combo is pressed and won't accept more input until the combo is released. Holding to activate hasn't had any problems with repeats. What I haven't tried yet is slowly scrolling through next hour or next weatherID as the combo is held.


I'm not expecting any trouble getting your save set up and script embedded, but it'll take a while before I can get started.
(No eSave script, huh? That's always the first one I embed. Probably because I rely so much on the save data for testing.)

Edited by OrionSR
  • Like 1
Link to post
Share on other sites
FF_Sefirot
31 minutes ago, OrionSR said:

(No eSave script, huh? That's always the first one I embed. Probably because I rely so much on the save data for testing.)

Well, if it's possible to embed all that we have tested without problems, the better. It would be amazing to have all the features in one save, so if it isn't a lot of extra work for you let's do it.

As I said count with me to keep testing if you decide to work in further improvements.

About GTASnP...  I'm no registered. I usually use Wetransfer as it's quick and easy, but I'll give it a shot to GTASnP. 

Do you have the save anyways?

 

Nevermind, GTASnP is better:

 

https://gtasnp.com/eotMYY

 

Edited by FF_Sefirot
Link to post
Share on other sites
OrionSR

SaveWarpTeaTime - This is your save modified with the requested scripts. 

 

You've got the Basketball Glitch. You may want to let SnP fix that for you when you download your save. It'll also move the save disk at Madd Dogg's Crib to a room down the hall a little so it won't glitch again. Also, at 100 hours you are at the "Minor" Traffic Glitch level. In another 50 hours the traffic will get pretty bad. You would probably notice an improvement if you applied the Traffic Fix - fewer cars backward in traffic or making sudden j-turns. This resets all in-game timers so you lose your time played stat. The effects are a bit different on PS2. Try with and without by downloading to different slots.

 

I resisted the urge to make other improvement, like forcing the PCJ to spawn when loading at the airstrip.

Edited by OrionSR
  • Like 1
Link to post
Share on other sites
FF_Sefirot

Thank you so much! You have fulfilled a long time quest!

I´ll follow your advice and give it a try with and without fixes. I knew that the Save editors have the option to fix glitches but this was a "pure" save with out any mod o fix.

 

If you need testers for upcoming mods count with me. I´ll keep experimenting with the current ones and reporting if I see something remarkable.

  • Like 1
Link to post
Share on other sites
OrionSR

You're welcome. And I fulfilled my goal get finally getting these embedding strategies working on PS2. Time to celebrate...

 

That was fun. What next? I still need to port custom text to PS2. I might push through to get that HUD working while you're still active - another simple mod to display critical info to anyone that needs coordinates for their coding project, with a minimum of custom text required. Still, I'm having trouble finding addresses on PS2, especially v2. I need to develop better strategies for mapping and searching memory. 

 

What helped before was the PCSX2 emulator. The save states it created were easy to modify into memory dumps. But more recent save state versions appear to be much more efficient, and I can't figure out how to piece them together into anything useful. Maybe PCSX2 can be configured to use old-style save states, but I'm confident my computers are not up to the task. My primary powers down or crashes when I play games or videos. My secondary can barely play the PC version of SA well enough to test my scripts with cleo first. 

 

I might have to sign up for a PCSX2 forum. I generally don't join many sites but the PCSX2 scene seems like my best chance of finding more people that might want to play with and develop this modding strategy. I'm not terribly motivated to play SA anymore, especially on PS2, but I still enjoy save editing. My progress on a particular project depends a lot on someone else showing an interest in playing, so your input is more valuable than you probably realize.

 

Thanks.

______________________________________________

 

Update: Never mind what I said about the new PCSX2 save states. It looks like I can use the eeMemory.bin file without modification. There was a player here recently that needed help extracting save files from a corrupt virtual memory card that passed me a save state to return the favor. At the time I couldn't find my way around the v2PAL data, but now that have a bit more practice with v2NTSC I didn't have much trouble finding the GXT data I need for custom text.
 

Edited by OrionSR
Link to post
Share on other sites
FF_Sefirot
13 hours ago, OrionSR said:

 Time to celebrate...

Maybe not a total celebration. Converting to PAL and PS3 I found that the saves doesn´t work.

I tried to convert the unfixed version (just in case) and still freezes after the "Load succesful".

Is strange as it works perfectly in Ps2 Ntsc and I have converted dozens of saves from Ntsc to PAL and PS3. So at least it should work in PS2 PAL, but no :dontgetit:

 

Could you send me my save just with the weather embed? I´m gonna try converting the TeaTime2 save to check if at least that works and therefore it might be a problem with the other scripts.

 

EDIT: neither TeaTime2 or eWarp3 works in PAL/PS3. With those saves it loads the game but after a couple of seconds in the street it freezes. Strange :bored:

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

neither TeaTime2 or eWarp3 works in PAL/PS3

Does that mean the test save with eSave only worked on PAL or PS3? Because that would be interesting.

 

I think I mentioned that the modified saves would be NTSC specific when I first got the embedded addressing working properly. At the time I was frustrated that the trick I was using on PC to automatically embed the addressing didn't work on PS2 and instead of figuring out a more complex strategy I resorted to editing running scripts directly into the save. However, if the trick had worked or new method developed, the modified save might have been compatible but any subsequent saves would put us in the same situation.

 

There are ways around the embedded addressing issues but there's another problem, also related to addressing... The issue with embedded addresses is related to destination "labels" for script commands like goto (jump), else_goto and gosub. And then there's memory addresses. You may have noticed that raw PAL and NTSC cheat device codes are slightly different; PAL addresses = NTSC+0x100. So, if the label addressing problems are resolved, any script that manages memory would need to be aware of the regional environment and able to adjust the memory addresses accordingly in order to maintain compatibility.

 

So, if that eSave script actually works on PAL and PS3 then... that would be very interesting indeed.

 

Link to post
Share on other sites
FF_Sefirot
1 hour ago, OrionSR said:

Does that mean the test save with eSave only worked on PAL or PS3? Because that would be interesting.

I didn't tried in PAL or Ps3.

In Ntsc it worked and thought it would be compatible.

 

I did now (eSave4) and the save loads. The game doesn't freezes immediatelly as happened with TeaTime and eWarp, but as soon as I tried to use the save feature it crashed.

 

Also notice that when I say Ps3 I'm talking of the spanish Ps Store version (yeah, I'm from Spain, that's why my english sucks 😂) which is PAL. I'm positive that the script would work fine in the Ntsc Ps3 version considering that the fail is related to different codification.

 

I didn't realized that the scripts would be also uncompatibles as it happens with Codebreaker codes.

 

Edited by FF_Sefirot
  • Like 1
Link to post
Share on other sites
OrionSR
57 minutes ago, FF_Sefirot said:

game doesn't freezes immediatelly as happened with TeaTime and eWarp

Huh? Maybe because there's a whole lot of nothing ahead of the eSave script, and 0000 is interpreted as a NOP by the game, so it just does nothing until it returns to the top of script - maybe. I'll keep trying to wrap my head around the numbers in the hope of finding exploits to help make things more compatible, but for now the emphasis is on keeping things simple. I should start adding more details to the notes in the header. Basically the script is the same and all I do to switch to another format is comment and uncomment different constants.

 

//{Unverified Example}
//  MarkerOffset = 0x6FF970  // PS2v1 NTSC
//  RadarOffset = 0x701F00  // PS2v1 NTSC
//  SCMoffset = 0x6B1FF0  // PS2v1 NTSC
//  MarkerOffset = 0x6FFA70  // PS2v1 PAL
//  RadarOffset = 0x702000  // PS2v1 PAL
//  SCMoffset = 0x6B20F0  // PS2v1 PAL
  MarkerHandleOffset = 0x7004D0  // PS2v2 NTSC
  RadarPoolOffset = 0x702A80  // PS2v2 NTSC
  SCMoffset = 0x6B2770  // PS2v2 NTSC
//  MarkerHandleOffset = 0x7005D0  // PS2v2 PAL
//  RadarPoolOffset = 0x702B80  // PS2v2 PAL
//  SCMoffset = 0x6B2870  // PS2v2 PAL
//  MarkerOffset = 0xBA6774  // PCv1
//  RadarOffset = 0xBA86F0  // PCv1
//  SCMoffset = 0xA49960  // PCv1

I'm not sure what to make of PS3. Can you tell me more about it?
A save from PS3 might fill in some key details needed for addressing.

  • Like 1
Link to post
Share on other sites
FF_Sefirot

Well, there's two ways Ps2 games saves in Ps3:

 

-When is a Fat Ps3 and you use the original DVD (or other ilegal methods to run the Iso) the system creates a virtual memory cards and the saves files are ".PSV"

 

-When is a Ps2 game from the store (labeled as Ps2 classics) it creates another kind of files in a folder (.VME)

 

I don't know if it might help. The saves from Ps3 are basically Ps2 in other formats. 

 

NTSC V.2 is equivalent to PAL V.2 which is the one in the Store (also I have that version in original Dvd).

 

I've been able to convert Ntsc 2 to all the compatible Pal versions (Ps2 and Ps3 in their two forms).

 

That's why I assumed the saves I've been testing would work in Pal and didn't tried the convertion until now.

 

If you want I can provide you with Pal saves in any format. Tell me the best way to send you the files and I'll do it.

 

Anyways don't feel obliged to keep working on the Pal. The Ntsc is an already great achivement!

Edited by FF_Sefirot
Link to post
Share on other sites
OrionSR

Okay, thank. For reference, the PS4 version seems to be using PS2v2 scripts, which suggests that the saves would be compatible if they could be accessed. And there's a PS3 Remastered version with Achievements/Trophies that's a port of the Xbox 360/One version based on the mobile port. The remastered scripts/saves are similar to but not compatible with mobile. And currently we aren't concerned with any of these formats.

 

When I looked a PSV files several years ago I could extract saves from PSV and export them back to PS2 but I couldn't modify a save without corrupting the PSV. I'm unfamiliar with VMEs but have some experience with the VMCs used by PCSX2.  No worries. The basic rule is that the .b save file is compatible if the script is compatible, but I'm breaking the rules by, basically, embedding cheat device-like codes (memory tweaks) into the save.

 

There are values saved in normal running scripts that allow me to calculate the offset to the Start of SCM - a critical value for the address calculations. It would not be wise to assume this value is the same as NTSC or PAL. The important factor here is the game engine last used to on that save. A useful test would be to load an identical save file (not a progression) on each system and save again. Include NTSC too, and zip them all up in a folder for reference. Renaming the file to describe the file works well on PS2 saves for SA.

 

Work will progress on PAL it turns out, because my current memory dumps are from PAL; so I'll find and document those addresses first and then convert to NTSC for testing. NTSC is our common format. I can edit PAL saves but can't test them. In the end though, porting to PAL should be pretty easy.

 

I'm going to keep plugging away at this coord hud script. I think I have the basic info needed, but I'm starting from scratch with this script; might take a while. The basic HUD will display XYZ coordinates and heading at the top the screen, and I was planning to make the hud an option that can be toggled on and off by holding Up for 4 seconds. 

  • Like 1
Link to post
Share on other sites
OrionSR

Minor Update: 

 

The eCoords script is working well on PC, and I've gathered the info I need for the port from PALv2 and transposed those values to NTSCv2. I was hoping to be able to run some tests on PS2 today but real life had other plans. To be continued...

 

Early in the development of the eCoords script I was anticipating that I'd need to use most of the 32 available local variables, so I tried to save a local by performing some basic calculations manually and recording it as a constant. It didn't help; for technical reasons this value needs to be stored in a variable anyway, and even though it saves a little code space, I prefer to show all of the calculations to make the process easier to understand. However, I noticed something interesting in the process.

 

When I ran the calculations for NTSC I noticed the end result matched the value from PAL. The difference between NTSC and PAL seems to be evened out by the process. This make sense, sort-of, kind-of. I'm having a hard time wrapping my head around the number but I've had this nagging suspicion that the memory addresses compatibility might work itself out, and now I have some numbers that hint in that direction.

 

So... I'm going to bed, and I'll try to dream up a simple test script that can test memory management on NTSC or PAL without the current embedded addressing issue causing problems.

  • Like 1
Link to post
Share on other sites
FF_Sefirot

Amazing!

There's no hurry, I've been playing Ntsc with all the scripts and it works like a dream. No glitches, freezes or undesired effects so far.

 

Teleporting while in a train transports you to the closest track of the selected spot. I was anticipating maybe something catastrophic but it makes something logical.

 

I'll keep playing Ntsc. The only down side is that I have to do it in Ps2, in Ps3 it has graphical enhances and a smoother control.

But is fine.

 

Eventually if the Pal works I'll do it the same exhaust testing.

  • Like 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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.