Released Flood 1.4

Ever wanted to flood a map without using the level editor? Now you can with this script

  1. daniel-w

    daniel-w
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 28, 2017
    Messages:
    282
    This thread is to share ideas or report issues about the mod

    Mod link: Flood | BeamNG
    Full changelog is here: Flood - Updates | BeamNG

    How to use
    1. Open the Controls in the Options
    2. Search for "Flood"
    3. Bind a key
    4. Press that key and the menu will open, from there you can control the flood (This will only work when you have loaded into a map)

    Troubleshooting
    If the key isn't opening the menu, try reloading the mod, or press CTRL + L to do a full reload of the Lua instance, this should ensure the mod get loaded correctly. However, I don't think this should be an issue anymore.

    If the menu is grayed out, it means it could not find an ocean. If the map does have an ocean, then share the map name and I'll see what I can do.

    Latest Update Changelog

    New Features/Changes:
    • Added this wonderful help menu
    • Added "Stop when submerged option", this stops the flooding once your vehicle has been submerged by the water
    • Changed "Enable" toggle to a Start/Stop Button
    • Reset button now disables flooding
    • When water reaches the heightLimit, it will now stop flooding
    • Changed max speed from 1 to 50 (also exposed it so you can modify it from the console `flood.maxSpeed = numberHere`)
    • Flood speed now respects bullet time (slow motion)
    • Made the UI look slightly better
    • Disabled UI elements when there is no ocean
    • Improved tooltips
    • Added presets, might be useful for flood maps with difficulty settings
    • You can now only select "Decrease" or "Gradual Return", you can't do both
    • Improved resizing window height when the rain section is hidden
    • It will keep the size if you manually resized it, otherwise it will resize itself to fit the new content height

    Fixes:
    • I'm fairly certain I've fixed the "attempt to index global 'flood'" for some users, let's pray
    • Gradual Return will now decrease the water level to the precise starting position
    • Fixed flood with rain not functioning correctly (it didn't work when `Speed` was 0)
    • Fixed mission file changes, we now use `onClientStartMission` and `onClientEndMission` instead of checking in `onUpdate`
    • Time in environment options is now synced with the in-game time. I have also made it match the slider (time from 12 -> 0 -> 12) instead of 0-24
    • Renamed "Decrease to initial" to "Gradual Return"

    Changes you probably don't care about:
    • Removed skyColor and related functions, they never got used
    • Added comments to the code
    • Changed from deprecated `registerCoreModule` to `setExtensionUnloadMode`
    • Simplified and improved a lot of the code
    • Added a `defaults` table for variables
    • Moved `floodui` to the utility folder, that way I don't have to worry about it being loaded before the flood mod itself.
     

    Attached Files:

    • Italy.png
    • Menu.png
    • Menu_Presets.png
    #1 daniel-w, Jul 23, 2022
    Last edited: Jan 20, 2024
    • Like Like x 9
    • Agree Agree x 1
  2. Toivio

    Toivio
    Expand Collapse

    Joined:
    Jul 15, 2018
    Messages:
    352
    Intersting.
     
  3. JamesM3E36

    JamesM3E36
    Expand Collapse

    Joined:
    Dec 11, 2019
    Messages:
    66
    i keep getting lua errors with the mod, no matter what i do with it

    upload_2022-7-23_15-24-35.png this is from trying to open the ui in singleplayer


    Edit: Never mind, just was a problem it being not in the main mod folder, instead it was in my own mod folder inside the mod folder to make it less cluttered.
     
    #3 JamesM3E36, Jul 23, 2022
    Last edited: Jul 23, 2022
  4. daniel-w

    daniel-w
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 28, 2017
    Messages:
    282
    It's unable to find the mod for some reason, can you press CTRL+L? This reloads the Lua State, hopefully it correctly loads the mod this time
     
  5. Yash_gamin144

    Yash_gamin144
    Expand Collapse

    Joined:
    Apr 24, 2021
    Messages:
    1,959
    I love this! maybe in the future could you make it so it works with small rivers too?
     
  6. daniel-w

    daniel-w
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 28, 2017
    Messages:
    282
    Appreciate the support :)
    I don't think rivers would work well, they're different on each map and they require a different way of flooding. This would be increasing the size and the position. I might give it a go soon just to see though, thanks for the suggestion.
     
    • Like Like x 1
  7. thegamerpt

    thegamerpt
    Expand Collapse

    Joined:
    Jun 15, 2022
    Messages:
    118
    It's not decreasing the water levels for me, but everything else works fine!

    Edit: Nevermind, now its working
     
    #7 thegamerpt, Jul 23, 2022
    Last edited: Jul 23, 2022
  8. daniel-w

    daniel-w
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 28, 2017
    Messages:
    282
    Was it a mistake on your side? If not then let me know what fixed it, just need to make sure it doesn't happen again :)
    --- Post updated ---
    Changed up the UI slightly, added more options and now you can flood with rain :)
    upload_2022-7-23_17-57-58.png
     
    • Like Like x 1
  9. thegamerpt

    thegamerpt
    Expand Collapse

    Joined:
    Jun 15, 2022
    Messages:
    118
    I don't know, I was pressing the decrease option with the enable option activated and the water was coming up instead of going back down, but now it's working fine. Also, idk if you added that in the latest patch but I wish we could be a bit more precise with how fast the water goes up/down.
     
  10. DanBeam

    DanBeam
    Expand Collapse

    Joined:
    Jul 10, 2022
    Messages:
    1
    uh, i seem to get an error when i wanted to download the file also can you fix that because as the error message says. "The requested attachment could not be found."
     
  11. Nazu

    Nazu
    Expand Collapse

    Joined:
    Dec 22, 2021
    Messages:
    1,339
    interesting
     
  12. daniel-w

    daniel-w
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 28, 2017
    Messages:
    282
    Yes, very :)
     
  13. daniel-w

    daniel-w
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 28, 2017
    Messages:
    282
    Updated to 1.3.1 :)
    UI looks a lot better, you can now set time of day and there's some fixes and general improvements
     
    • Like Like x 1
  14. Yash_gamin144

    Yash_gamin144
    Expand Collapse

    Joined:
    Apr 24, 2021
    Messages:
    1,959
    theres 2 downloads which one do I download?
     
  15. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,350
    The newer one
     
  16. Yash_gamin144

    Yash_gamin144
    Expand Collapse

    Joined:
    Apr 24, 2021
    Messages:
    1,959
    thanks
     
    • Like Like x 1
  17. daniel-w

    daniel-w
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 28, 2017
    Messages:
    282
    With version 1.3.1, there seems to be an issue with the menu height and it not finding the ocean. I'll fix that soon, about to eat.
    I've fixed menu height but I'll have to fix the ocean soon, for now, I suppose use 1.3 until it's fixed. (It works on some maps like east coast USA but it no longer works on west coast, not sure what other maps it doesn't work on)
    --- Post updated ---
    upload_2022-7-24_19-7-45.png
    There we go, all fixed :)
    This version: 1.3.4
     
    • Like Like x 1
  18. rodrigomanuel764

    rodrigomanuel764
    Expand Collapse

    Joined:
    Jul 28, 2021
    Messages:
    26
    can't open menu on italy map
     
  19. daniel-w

    daniel-w
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 28, 2017
    Messages:
    282
    Works for me, please can you open your console and check for errors?
     
  20. rodrigomanuel764

    rodrigomanuel764
    Expand Collapse

    Joined:
    Jul 28, 2021
    Messages:
    26
    I've also decided to close the game and reopen it and it worked
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice