WIP Beta released Part Randomizer...?

Discussion in 'Content Creation' started by umustbeloggedintododat, Apr 4, 2021.

  1. grouchylemur18

    grouchylemur18
    Expand Collapse

    Joined:
    Jun 9, 2021
    Messages:
    6
  2. Geraldo_o_geral

    Geraldo_o_geral
    Expand Collapse

    Joined:
    Jan 30, 2021
    Messages:
    211
    the new update broke it upload_2021-7-1_11-28-24.png
     
  3. umustbeloggedintododat

    umustbeloggedintododat
    Expand Collapse

    Joined:
    Feb 16, 2019
    Messages:
    1,359
    We will need to find a fix, it broke many other custom UI apps too.
     
    • Like Like x 1
  4. Geraldo_o_geral

    Geraldo_o_geral
    Expand Collapse

    Joined:
    Jan 30, 2021
    Messages:
    211
    bread mod broke too, but there is a fix on the last page
     
  5. stefan-0870

    stefan-0870
    Expand Collapse

    Joined:
    Apr 13, 2021
    Messages:
    14
    Did the new update break it? It's invisible for me.
     
  6. S.Ali.M

    S.Ali.M
    Expand Collapse

    Joined:
    Jan 12, 2021
    Messages:
    1,076
    The new update broke all UI app mods, so it's normal that this mod doesn't work on 0.23
     
  7. Agent_Y

    Agent_Y
    Expand Collapse

    Joined:
    Jul 10, 2020
    Messages:
    6,799
    Temporary solution to get it to work: When you have this mod installed, paste this in console:
    Code:
    scripts_crazycontraptions_extension.rolldice()
     
  8. stefan-0870

    stefan-0870
    Expand Collapse

    Joined:
    Apr 13, 2021
    Messages:
    14
    Did I do something wrong?
     

    Attached Files:

    • Screenshot233.png
    • Agree Agree x 1
  9. Agent_Y

    Agent_Y
    Expand Collapse

    Joined:
    Jul 10, 2020
    Messages:
    6,799
    That's weird, it works for me every time, maybe it's a conflicting mod on your side
     
  10. stefan-0870

    stefan-0870
    Expand Collapse

    Joined:
    Apr 13, 2021
    Messages:
    14
    I have a random vehicle spawner mod, but it was disabled
     
  11. umustbeloggedintododat

    umustbeloggedintododat
    Expand Collapse

    Joined:
    Feb 16, 2019
    Messages:
    1,359
    I don't really play this game anymore
    so I don't know when the fix will be coming
    sorry about that :(
     
    • Like Like x 1
  12. walsht

    walsht
    Expand Collapse

    Joined:
    Aug 5, 2021
    Messages:
    1
    Would you be open to someone forking the mod to make the needed update? I'm a software developer and WoW mod author so Lua isn't something new to me. If so, PM me and we can figure it out.
     
  13. Agent_Y

    Agent_Y
    Expand Collapse

    Joined:
    Jul 10, 2020
    Messages:
    6,799
    Still works for me and supports my trailer mod, I just got one of the coolest things ever
    rsdsafasf.png
    It's very fast and looks cool
     
    • Like Like x 2
  14. S.Ali.M

    S.Ali.M
    Expand Collapse

    Joined:
    Jan 12, 2021
    Messages:
    1,076
    Trailer has no wheel lol
    Also love the giant hood exhaust
     
  15. Agent_Y

    Agent_Y
    Expand Collapse

    Joined:
    Jul 10, 2020
    Messages:
    6,799
    Just fixing the bug where the wheels don't work when the trailer is used on H-Series lol
     
  16. S.Ali.M

    S.Ali.M
    Expand Collapse

    Joined:
    Jan 12, 2021
    Messages:
    1,076
    Oh wait... the mod is out! It looks amazing! I didn't look at the mod page today...
     
  17. Agent_Y

    Agent_Y
    Expand Collapse

    Joined:
    Jul 10, 2020
    Messages:
    6,799
    Prerunner with 12 speed automatic transmission and hilariously mismatched wheel sizes
    fggfd.png
     
    • Like Like x 3
  18. Agent_Y

    Agent_Y
    Expand Collapse

    Joined:
    Jul 10, 2020
    Messages:
    6,799
    Lol I just got a LeGran that instantly fell apart and then a piano fell from the sky on it
    sdasddsad.png
     
    • Like Like x 2
  19. angelo234

    angelo234
    Expand Collapse
    Junior Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    429
    Hey guys, so I'm gonna be taking over the project from now on since @umustbeloggedintododat isn't gonna be working on it anymore and I'm not so busy now and want to fix this mod (I got his permission to do so). I'm gonna be uploading the mod as a new mod on the repo soon. A new feature I'm adding is when you scramble the parts, there won't be any incompatible parts (e.g. diesel engine will spawn with a diesel fuel tank and will not spawn with a battery or gasoline fuel tank).
    --- Post updated ---
    Alright it should be up by tomorrow: https://www.beamng.com/resources/crazy-contraptions-remastered.20226/
     
    • Like Like x 3
  20. _N_S_

    _N_S_
    Expand Collapse

    Joined:
    Oct 28, 2017
    Messages:
    46
    cool
    I hope the remaster will use all the slots for the parts and there will be a random color change
    I also improved the randomizer for myself, here is the code that I got -

    Code:
        local objID = be:getPlayerVehicleID(0)
        local veh = be:getObjectByID(objID)
        local vd = extensions.core_vehicle_manager.getVehicleData(objID)
        vd.config.paints = vd.config.paints or {}
        local index = 0
        local all_slots = require('jbeam/io').getAvailableSlotMap(extensions.core_vehicle_manager.getPlayerVehicleData().ioCtx)
        local all_parts = require('jbeam/io').getAvailableParts(extensions.core_vehicle_manager.getPlayerVehicleData().ioCtx)
    
        for slot_name, curr_part in pairs(all_slots) do
            if all_slots[slot_name] then
                local keyset = {}
                for k in pairs(all_slots[slot_name]) do
                    table.insert(keyset, k)
                end
                local random_part = all_slots[slot_name][keyset[math.random(#keyset)]]
                all_parts[slot_name] = random_part
            end
        end
    
        for i=1, 3 do
            index = index + 1
            local paint = createVehiclePaint({x = math.random(0, 100) / 100, y = math.random(0, 100) / 100, z = math.random(0, 100) / 100, w = math.random(0, 200) / 100}, {math.random(0, 100) / 100, math.random(0, 100) / 100, 0, 0})
            vd.config.paints[index] = paint
            extensions.core_vehicle_manager.liveUpdateVehicleColors(objID, veh, index, paint)
        end
        extensions.core_vehicle_partmgmt.setPartsConfig(all_parts, true)
    
     
    • Like Like x 4
  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