Solved Having trouble understanding how the slot hierarchy works...

Discussion in 'Mod Support' started by Kelwyvern, Oct 19, 2018.

  1. Kelwyvern

    Kelwyvern
    Expand Collapse

    Joined:
    Jul 24, 2014
    Messages:
    8
    So firstly, I'm a coding noob. But willing to learn!

    I've been attempting to make a diesel engine setup for the Sunburst to emulate my own car, but I've been having trouble getting my parts to show up in the selector for reasons I haven't been able to find in the wiki. The way I currently understand it; the "slots" array should link to the "slotType" variable of the other parts, but it hasn't been as predictable as I thought.

    My engine jbeam ( https://puu.sh/BNINW/3203a7da3d.png ) seems to have shown up fine and so has the turbocharger ( https://puu.sh/BNIX2/eaf3e3ae0c.png ) (but only if it has it's own jbeam file; for some reason it wouldn't recognise when in the engine.jbeam... no idea why so I would like an explanation for this XD).

    So anyway, these two have been recognised and work great: https://puu.sh/BNITI/48173eb7bf.png, but I haven't been able to get a custom transmission ( https://puu.sh/BNIZj/dcfab49367.png ) to show up the same way and I'm stumped.

    Any help much appreciate! :)
     
  2. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,685
    Think it as a parent/child grouping.

    slotType
    is the parent.
    slot is the child.

    Example:
    A part has the slotType named 'A'.
    All the parts that have the slot named 'A' as well, will become subparts of the parent part.

    So your reasoning is correct.


    The issue you are having is related to else.
    I'd check the brackets.
    If you got some extra closing bracket, the Jbeam file may be closing too early, and supposedly your defined part is after that, it's not getting read.
    Notepad++ can help you highlighting the brackets sections to better view that. In short make sure that the very first bracket is being closed at the very end, and not earlier.
     
  3. Kelwyvern

    Kelwyvern
    Expand Collapse

    Joined:
    Jul 24, 2014
    Messages:
    8
    Yeaaaah... the issue was a capitalisation in one instance and not the other; I noticed it AS SOON AS I opened up the file this morning. But the closing brackets were definitely responsible for most of the issues I've encountered so far.

    Thanks for the help anyways! :)
     
  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