Released Flood 1.4

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

  1. vulcan-dev

    vulcan-dev
    Expand Collapse

    Joined:
    Jan 28, 2017
    Messages:
    245
    Hello, thanks for the kind words :)
    Regarding BeamMP, you should be able to make a really simple plugin/addon to enable/disable it on all clients. I'm not very familiar with BeamMP but I think you would need to:
    1. Create a mod and register a function to disable/enable
    2. In the server code, you would call that function from the client
    Server (Not tested, never scripted for BeamMP before)
    Code:
    function message_handler(id, name, message)
        if message == "toggle_flood" then
            for id, _ in pairs(MP.GetPlayers()) do
                MP.TriggerClientEvent(id, "toggle_flood")
            end
            return 1
        else
            return 0
        end
    end
    
    MP.RegisterEvent("onChatMessage", "message_handler")
    Client (this will be the mod that the client will download. you could even modify the flood mod to do this)
    Code:
    local function toggle_flood()
        flood.enabled = not flood.enabled
    end
    
    AddEventHandler("toggle_flood", toggle_flood)
     
  2. LeatherCap

    LeatherCap
    Expand Collapse

    Joined:
    Aug 15, 2017
    Messages:
    2
    Okay but what if I were quite stupid and didn't know how to do any of that? Would it be possible/simple to just add a keybind to toggle the Enable function?
     
  3. ZachUzumaki27

    ZachUzumaki27
    Expand Collapse

    Joined:
    Feb 12, 2022
    Messages:
    53
    Hi i have some issue on this mod when i press y which is the bind i set it on its not showing the menu thing
     
  4. vulcan-dev

    vulcan-dev
    Expand Collapse

    Joined:
    Jan 28, 2017
    Messages:
    245
    Well this is mainly for multiplayer mods (BeamMP & KissMP), if you want true sync then you'll have to do this (or the server can keep track of the water level, that's true sync).
    Anyways, if you're in singleplayer, opening the menu and pressing the checkbox isn't that bad.

    If it is for multiplayer, you can read the documentation for the multiplayer mods, both are relatively simple.
    BeamMP: https://wiki.beammp.com/en/Scripting/new-lua-scripting
    KissMP: https://kissmp.online/docs/srv_lua/lua_api.html
     
  5. JTubeYT

    JTubeYT
    Expand Collapse

    Joined:
    Mar 21, 2022
    Messages:
    68
    Yes I Look Through The Mods Quite A Lot (So I Can Make More Videos) I have Been Trying To Make Videos On BeamNG Racing Crashes But It Can Be Quite Fiddley To Set Up The Races And The Cameras. I Also Cleared The Game Cache And It Removed Most Of My Mods (Like 250 Out Of 300). I Will Probably Be Working On Some BeamNG Videos Later This Year Though
     
  6. Fla07

    Fla07
    Expand Collapse

    Joined:
    Dec 8, 2021
    Messages:
    266
    Good to know. Good luck on your channel, keep it up!
     
  7. JTubeYT

    JTubeYT
    Expand Collapse

    Joined:
    Mar 21, 2022
    Messages:
    68
    Thanks!
     
    • Like Like x 1
  8. Muffin27

    Muffin27
    Expand Collapse

    Joined:
    Aug 12, 2022
    Messages:
    2
    I downloaded the flood 134 file and this still comes up. what can I do? do I need to remove the repo version?
    upload_2022-8-11_15-54-12.png
     

    Attached Files:

    • upload_2022-8-11_15-53-31.png
  9. vulcan-dev

    vulcan-dev
    Expand Collapse

    Joined:
    Jan 28, 2017
    Messages:
    245
    If you manually downloaded it, remove it and get it on the repo instead.
    If that doesn't work then restart the game since it should load it
     
  10. elias7731

    elias7731
    Expand Collapse

    Joined:
    Feb 15, 2021
    Messages:
    2
    Hey i cant seem to get it to work i try to open the menu but i cant open it

    btw does this work on utah usa ???
     
  11. vulcan-dev

    vulcan-dev
    Expand Collapse

    Joined:
    Jan 28, 2017
    Messages:
    245
    Hello, you might have to restart the game in order for it to update the key bindings. Once reloaded, go into controls and search for "Flood", you should then bind a key for the menu.
    As for Utah, no. There's no ocean but I'm thinking of making a way to automatically spawn one, you'll just have to set the initial height though so it's perfect. Sadly can't figure that out in code (unless I make some sort of json file and manually set it for every map that doesn't have an ocean, good idea actually).
     
  12. elias7731

    elias7731
    Expand Collapse

    Joined:
    Feb 15, 2021
    Messages:
    2
    i got it to work but ty for the help
     
  13. Muffin27

    Muffin27
    Expand Collapse

    Joined:
    Aug 12, 2022
    Messages:
    2
    I have both the repo and the one from the thread because it wasn't working when I only had the repo one installed despite it saying version 1.3.5 so I came here and downloaded it as I assumed my version was out of date or something
     
  14. Richard Brooks

    Richard Brooks
    Expand Collapse

    Joined:
    Feb 16, 2022
    Messages:
    65
    sometimes on this if you already had assigned a control for it before removing it to clear files and added it back, sometimes you may have to re-assign to a different unused button
     
  15. nickbaxwar

    nickbaxwar
    Expand Collapse

    Joined:
    Jan 15, 2017
    Messages:
    34
    cant seem to get it to work, ive got the newest version of the game but so far when enabled the water level marker goes back to normal and cant move it, no matter the level, only the rain part works
     
  16. Da_BOI

    Da_BOI
    Expand Collapse

    Joined:
    Feb 11, 2021
    Messages:
    1
    I have the mod placed into the mods folder and its zipped up so its properly installed, however when i look for flood in options->controls then i search up flood nothing pops up, is this mod compatible with beamng version 0.21.3? or is it not?
     
  17. Sumguy

    Sumguy
    Expand Collapse
    Banned

    Joined:
    Jan 31, 2022
    Messages:
    22
    The ui just straight up doesnt show for me o_O
     
  18. Its_Upzxc

    Its_Upzxc
    Expand Collapse

    Joined:
    Jun 29, 2022
    Messages:
    3
    I watched youtubers use this mod and I'm so excited. However, when I bind a key to it and press it, the UI doesn't show up. Is there something I can do about this?
     
  19. Proloisius

    Proloisius
    Expand Collapse

    Joined:
    Aug 26, 2022
    Messages:
    1
    i cant find it in my UI Apps
     
  20. Average Person

    Average Person
    Expand Collapse

    Joined:
    Jul 8, 2015
    Messages:
    583
    This is such a cool mod, also sorry for the weird question but how did you figure out BeamNG's lua system? Does the game already come with lua files that are a good reference for writing custom stuff?
     
  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