I was curious whether this tutorial will be updated to include information on creating a scenario from scratch. Also, it currently says: In my experience, that's not true - failing to delete the prefab_filename value only results in the prefab being automatically saved to Documents/BeamNG.drive/levels/levelname/, rather than the editor asking for a location.
The link under item 1 points to http://www.beamng.com/attachment.php?attachmentid=67338&stc=1&d=1436870071, but should point to http://www.beamng.com/attachments/scenario_starking_kit-zip.67338/.
When I pack my prefab, right after I save it the player vehicle goes away. If I try to load it (the scenario), it won't. (Because there's no vehicle) How do I prevent the car from disappearing when saving/packing the prefab?
I'm currently on v4.3.x and I am able to skip this step. My prefab contains several waypoints and the player position. The coordinates for these things are maintained correctly, and BONUS, I don't have to fool with the prefab being saved in the wrong place! When I click "Pack Prefab" it packs it into BeamNG.drive/levels/mylevel/prefabnamehere.prefab I'm not sure if having other objects is a problem, but right now it's much smoother than the old workflow I was using (deleting the 'prefab_filename' line, moving files around, etc).
I don't see "My First Scenario" in my list of scenarios. My guess is that its not up-to-date with 0.5's new mod format, but I'm just a new driver peasant who has no clue, just a good idea for a scenario and the will to learn how to make it possible.
Oh yes, since 0.5 changed how unpacked stuff in /mods works, that method doesn't really work. Will put a big notice for now, until we have a better way to use unpacked mods. Using Documents/BeamNG.Drive/levels 'should' work too, haven't tried.
Hey, the tutorial was really helpful, thanks for making. It worked fine in the unpacked directory. I've got two small questions though; - While making a scenario is there a way to remove objects from the map without compromising the map itself? - Is there a way to make a lua file which can detect if a certain breakgroup is triggered? This way is could be possible to make a scenario which one will fail when a trailer is detached.
1. If the object is part of the map, no. You can only 'add' objects with .prefabs. 2. Should be doable. LUA scripts are totally supported from scenarios (I don't think we have an example of that)
Hey, thanks for the reply. I'll try some creating the trigger, I'll ask around if it doesn't work out. If you've got any ideas, please let me know. I found the existing scenario lua files, the damage limit looks a bit like it but it isn't what I'm looking for. I couldn't find the 'Broken truck' scenario, that one looks likes it triggers random breakgroups while driving. Any idea where I can find the corresponding lua file? I couldn't find it in the east coast(/scenarios) folder.
In reference to removing static objects: I haven't tried it yet, but Scepheo made a suggestion about that in post #4 of my (related) thread over here. Pretty clever, but clearly fragile. In reference to the Broken Truck scenario: The files are named "minimum speed" rather than "broken truck". IIRC once you look at how the scenario works it becomes obvious why. ;-) In order to check about whether a breakgroup is broken I think you'll need to write a brief function using "obj:beamIsBroken(beam.cid)", a function which came up in post #12 of this discussion. I'd just copy the function breakBreakGroup from beamstate.lua and tune it up a little. Loop through the breakgroup and set the return value to 1 for every broken beam. If the return value is =/= 0 then the breakgroup is broken. That said... why not just skip all of that and check a single beam from inside the breakgroup? As long as one beam in the group is broken then the whole group is broken, right?
Ah, that's not going to work right now. Change your path please: Documents/BeamNG.drive/mods/levels/Industrial/ changes to Documents/BeamNG.drive/levels/Industrial/ IMO that is the best path to use for the creation process. After you are done you'll need to create a zip file containing the "levels" folder. That zip file will be placed in the /mods/ folder as usual. Please read through the rest of the thread if you'd like. I'm not sure that Nadeox1 necessarily agrees with Scepheo's and my own input, but it's there if you want. (look at post #21 and #27 - that advice may streamline the process for you a bit)