Introduction to scenarios creation

Discussion in 'Content Creation' started by Nadeox1, Jul 14, 2015.

  1. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Or maybe it's just the vehicle position being outside the map?
     
  2. Tabris

    Tabris
    Expand Collapse

    Joined:
    Aug 9, 2016
    Messages:
    6
    After loading the script. The camera does not appear with the car. Camera appears elsewhere (like the camera appears where is spawnsphere). How to fix it?

    PS: Used google-translator.
     
  3. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Do you have a car in the scenario at least?
     
    • Like Like x 1
  4. Tabris

    Tabris
    Expand Collapse

    Joined:
    Aug 9, 2016
    Messages:
    6
    Yes.

    //--- OBJECT WRITE BEGIN ---
    $ThisPrefab = new SimGroup() {
    canSave = "1";
    canSaveDynamicFields = "1";
    groupPosition = "0.000000 0.000000 0.000000";

    new BeamNGVehicle(tabris) {
    JBeam = "hatch";
    color = "1 1 1 1.2";
    colorPalette0 = "White";
    colorPalette1 = "White";
    colorPalette2 = "White";
    colorPalette3 = "White";
    partConfig = "vehicles/hatch/stock_M.pc";
    renderDistance = "500";
    renderFade = "0.1";
    isAIControlled = "0";
    dataBlock = "default_vehicle";
    position = "-11.232 -644.669 0.242476";
    rotation = "0 0 1 1.49669";
    scale = "1 1 1";
    canSave = "1";
    canSaveDynamicFields = "1";
    licenseText = "Tabris";
    };
    };
    //--- OBJECT WRITE END ---
     
    #144 Tabris, Aug 10, 2016
    Last edited: Aug 10, 2016
  5. Tabris

    Tabris
    Expand Collapse

    Joined:
    Aug 9, 2016
    Messages:
    6
    I found a solution. I did not have to change "BeamNGVehicle(scenario_player0)" on "BeamNGVehicle(tabris)".
    Thank you for trying to help me.
     
  6. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    If you want to change that name, you have to make sure it matches the name in the scenario .json file aswell.
     
    • Like Like x 1
  7. Tabris

    Tabris
    Expand Collapse

    Joined:
    Aug 9, 2016
    Messages:
    6
    Ok.


    Аnother question: When I choose the color of the car in the garage. How do I know the number of that color? To insert the number in the field "color = "1 1 1 1.2";"
     
  8. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    No easy way to do that.

    Use this:
    http://doc.instantreality.org/tools/color_calculator/

    RGB Normalized is the number you need.
    The last number in the scenario file is for the 'Trasparency'. It goes from 0 to 2.
    1 makes the paint 50% reflective. 2 makes it 0% reflective. 0 makes it 100% reflective.
     
    #148 Nadeox1, Aug 10, 2016
    Last edited: Aug 11, 2016
    • Like Like x 1
  9. Tabris

    Tabris
    Expand Collapse

    Joined:
    Aug 9, 2016
    Messages:
    6
    Thank you.

    Is it possible to eliminate or reduce the count of 3 seconds in the scenario?
     
  10. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    I'm not sure. Maybe with some lua scripting, but that's not my strong point.
     
    • Like Like x 1
  11. Tabris

    Tabris
    Expand Collapse

    Joined:
    Aug 9, 2016
    Messages:
    6
    It did not get to set the color of the car by entering RGB Decimal (color = "251 245 24 1"). The car is still white.
    Can I change the color in the editor?
     
  12. Instant Winrar

    Instant Winrar
    Expand Collapse

    Joined:
    Jun 12, 2015
    Messages:
    698
    I would attempt to make a scenario, but I can't get through the first step... after about 30 minutes of trying to understand what is said here I thought that I might be getting somewhere. I download the .zip and out it in the mods folder...

    But sadly I can't drag/drop or copy&paste the 'scenarios' and .prefab into the /levels/Utah folder (that I made inside this .zip) with my program or any program I've tried using. So I'm going to give up at this point yet again by the looks of it, before it even started.

    I really dunno why I'm posting this, but step 1 is hard to read for me.
     
  13. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Yes, you can do it from the editor.
    Just select the car and you should see an option for that in the panel.

    Also, if you do it manually, make sure you are changing the correct values


    Why you can't drag? Have you tried to just extract everything somewhere and then drag it to the folder?
     
    • Like Like x 1
  14. mumboking

    mumboking
    Expand Collapse

    Joined:
    Jun 11, 2015
    Messages:
    1,401
    If you add the colour as a preset, you can look in "BeamNG.drive\settings\game-settings.ini". It should be the last colour in the "userColorPresets" array.

    The colour values are on a scale of 0-1. That colour you tried to use should be closer to this: "0.98431 0.96078 0.09412 1"
    I have a colour converter on my website that may be handy. :)
     
    • Like Like x 1
  15. Instant Winrar

    Instant Winrar
    Expand Collapse

    Joined:
    Jun 12, 2015
    Messages:
    698
    I updated my programs and everything's working now, they were just old and outdated.
     
    #155 Instant Winrar, Aug 11, 2016
    Last edited: Aug 11, 2016
  16. Instant Winrar

    Instant Winrar
    Expand Collapse

    Joined:
    Jun 12, 2015
    Messages:
    698
    Hmmm, so I finish up with the .prefab (packed and all) and close the game to start looking at the .json file, I remember that I had to name my waypoints. So I start the game back up but the scenario is nowhere to be found. It was there every other time I opened the game today but now it's missing. The mod manager shows both the .zip name and default file names included with the starter pack, it says they are activated. Don't know how this happened, I only touched some of the field names in the .json before starting the game (such as my name, and what the scenario is). Any idea why it's not showing up?
    Here's the .json:

    (I expected this post to add onto the one above like usual, but it made a new one for some reason...)
     
    #156 Instant Winrar, Aug 12, 2016
    Last edited: Aug 12, 2016
  17. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    Is that still a JSON file or you turned into a .txt file when saving?
     
  18. Instant Winrar

    Instant Winrar
    Expand Collapse

    Joined:
    Jun 12, 2015
    Messages:
    698
    It lists as 'File' so I'm sure that it's still a .json, all other .txt files are listed as a .txt


    Alright, I decided to copy the .prefab over into the starter pack and insert it into the game allover again, appears to be working. Don't know what caused it but it's fixed now.
    Now I have a few other questions.
    What are the numbers used for different difficulty levels in the .json? (Easy, Hard, Very Hard, etc.)
    How do you include a help image that shows up before starting the scenario (just like on 'High Speed Highway' and 'Canyon Race'), and where can I get a top-down view image of the whole map? Most of it is out of my draw distance when I try.
    How do you set the 'Date created?'
     
    #158 Instant Winrar, Aug 12, 2016
    Last edited: Aug 13, 2016
  19. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    You can make so that the file extensions are always shown on your system, so you with what kind of file you are dealing with.
    https://support.microsoft.com/en-us/kb/865219

    The difficulty numbers goes from 1 to 100 IIRC.
    50 would be Medium or something on that line.

    For help image, see how other scenarios do it (Port Shakedown has that)

    Date is in UNIX.
    Go there : http://www.unixtimestamp.com/
    And copy paste the current UNIX timestamp.
     
    • Like Like x 1
  20. olamercedes

    olamercedes
    Expand Collapse

    Joined:
    Nov 2, 2015
    Messages:
    45
    in the .json file, there is a line that says : "type": "race", ; can i change this?
     
  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