Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

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

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    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. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. 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. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    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
    1. Announcements

    2. Support

    3. Suggestions

[SA] Adding water crashes game (solved!)


Jaapio
 Share

Recommended Posts

Hi Folks,

 

Edit: Solved, the positions have to be even numbers and the lengths have to be divisible by 4.

 

I ran into a weird issue with my map, I had only one body of water and things seemed to work fine. But after adding a few more the game just started to crash and I have no idea what is wrong with my water file.

 

Below is my water file, the line that starts with -132.000000 -112.000000 is the initial body of water that seemed to work just fine. But after adding the rest of the lines the game started to crash as I was looking at the water from certain angles.

processed
-132.000000 -112.000000 -2.750000 0.000000 0.000000 0.000000 0.000000    -112.000000 -112.000000 -2.750000 0.000000 0.000000 0.000000 0.000000    -132.000000 -117.000000 -2.750000 0.000000 0.000000 0.000000 0.000000    -112.000000 -117.000000 -2.750000 0.000000 0.000000 0.000000 0.000000
105.000000 -230.000000 -2.000000 0.000000 0.000000 0.000000 0.000000    145.000000 -230.000000 -2.000000 0.000000 0.000000 0.000000 0.000000    105.000000 -315.000000 -2.000000 0.000000 0.000000 0.000000 0.000000    145.000000 -315.000000 -2.000000 0.000000 0.000000 0.000000 0.000000
-192.000000 -112.000000 -2.750000 0.000000 0.000000 0.000000 0.000000    -132.000000 -112.000000 -2.750000 0.000000 0.000000 0.000000 0.000000    -192.000000 -138.000000 -2.750000 0.000000 0.000000 0.000000 0.000000    -132.000000 -138.000000 -2.750000 0.000000 0.000000 0.000000 0.000000
-152.000000 -64.000000 -2.750000 0.000000 0.000000 0.000000 0.000000    -40.000000 -64.000000 -2.750000 0.000000 0.000000 0.000000 0.000000    -152.000000 -112.000000 -2.750000 0.000000 0.000000 0.000000 0.000000    -40.000000 -112.000000 -2.750000 0.000000 0.000000 0.000000 0.000000
65.000000 -214.000000 -2.000000 0.000000 0.000000 0.000000 0.000000    105.000000 -214.000000 -2.000000 0.000000 0.000000 0.000000 0.000000    65.000000 -263.000000 -2.000000 0.000000 0.000000 0.000000 0.000000    105.000000 -263.000000 -2.000000 0.000000 0.000000 0.000000 0.000000

 

Help would be much appreciated.

Edited by Jaapio
Solved it with the help of Zaz
Link to comment
Share on other sites

 

Each side length of a water square must be divisible by 4

 

Example

62.0 572.0 5.0 0.0 -0.4 1.0 1.0	170.0 572.0 5.0 0.0 -0.4 1.0 1.0	62.0 740.0 5.0 0.0 -0.4 1.0 1.0	170.0 740.0 5.0 0.0 -0.4 1.0 1.0  1

the 4 corner coords:
62.0 572.0, - 170.0 572.0, - 62.0 740.0, - 170.0 740.0

x-lenght of the square = 170.0 - 62.0 = 108.0
y-lenght of the square = 740.0 - 572.0 = 168.0


108.0 /4 = 27

168.0 /4 = 42

 

 

btw. i'm not a full time gtaforums member, i just have a look every day to this forum

  • Like 2
  • Best Bru 1
Link to comment
Share on other sites

  • 2 weeks later...
On 3/7/2022 at 6:05 PM, ZAZ said:

 

Each side length of a water square must be divisible by 4

 

 

Hi Zaz,

 

Thanks for you response, its been a while but I got around to testing with the water lenght set to be divisible by 4, things looked good but gta still crashes when I approach the water from certain angles. My water shape should be 20 by 20 so I am not sure what is going on. Am I missing anything else?

 

processed
75.000000 -224.000000 -2.000000 0.000000 0.000000 0.000000 0.000000    95.000000 -224.000000 -2.000000 0.000000 0.000000 0.000000 0.000000    75.000000 -244.000000 -2.000000 0.000000 0.000000 0.000000 0.000000    95.000000 -244.000000 -2.000000 0.000000 0.000000 0.000000 0.000000

 

Link to comment
Share on other sites

 

last parameter is missing

 

please read [SA|DOC] water.dat

 

steve-m wrote:

 

X, Y, Z:     coordinate
F1:     water current speed along X axis
F2:     water current speed along Y axis
F3:     unknown, influences waves, maximum is 1.0
F4:     wave height

The parameter at the end of each line defines the water type, and can have a value from 0 to 3:

 

.... and the parameter being an integer value

 

so a water cube definiton should be done in this way

X, Y, Z, F1, F2, F3, F4  X, Y, Z, F1, F2, F3, F4  X, Y, Z, F1, F2, F3, F4  X, Y, Z, F1, F2, F3, F4, last parameter(integer value)

 

my example from above

62.0 572.0 5.0 0.0 -0.4 1.0 1.0	170.0 572.0 5.0 0.0 -0.4 1.0 1.0	62.0 740.0 5.0 0.0 -0.4 1.0 1.0	170.0 740.0 5.0 0.0 -0.4 1.0 1.0  1

 

when i make xxx as visible separation

62.0 572.0 5.0 0.0 -0.4 1.0 1.0	xxx 170.0 572.0 5.0 0.0 -0.4 1.0 1.0	xxx 62.0 740.0 5.0 0.0 -0.4 1.0 1.0 xxx 170.0 740.0 5.0 0.0 -0.4 1.0 1.0 xxx 1

X, Y, Z, F1, F2, F3, F4 xxx X, Y, Z, F1, F2, F3, F4 xxx X, Y, Z, F1, F2, F3, F4 xxx X, Y, Z, F1, F2, F3, F4, xxx last parameter(integer value)

 

 

btw. you can spare these many zeros

 

then this should be your water cube definition

75.0 -224.0 -2.0 0.0 0.0 0.0 0.0    95.0 -224.0 -2.0 0.0 0.0 0.0 0.0    75.0 -244.0 -2.0 0.0 0.0 0.0 0.0    95.0 -244.0 -2.0 0.0 0.0 0.0 0.0 1

 

but consider steve-m's usage:

Quote

The corner points should be defined in the order NE-NW-SE-SW, or also SW-SE-NW-NE:

 

Edited by ZAZ
Link to comment
Share on other sites

Posted (edited)
16 hours ago, ZAZ said:

please read [SA|DOC] water.dat

Doh, I found it, the numbers have to be even, 75 and 95 are not even. Changing them to even numbers fixed the issue. Thanks the first time I totally read over the even part.

 

I also experimented with the last parameter, not putting it in seems to make the game fallback to either 1 or 3 but putting it in seems like the right thing to do, I somehow forgot to write that back into the text file after reading it. 

 

16 hours ago, ZAZ said:

btw. you can spare these many zeros

Yeah, it was just a quick sprintf call. I always forget how to do proper formatting with sprintf.

Edited by Jaapio
Link to comment
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
 Share

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