JBeam Beam property groups: useless duplicates ?

Discussion in 'Content Creation' started by GregBlast, Oct 30, 2013.

  1. GregBlast

    GregBlast
    Expand Collapse

    Joined:
    Aug 12, 2013
    Messages:
    224
    Alright this is gonna be pretty straightforward. Can anyone please just confirm that the first line is useless in the following jbeam sample (as each of its properties gets repeated in another group before the next beam) ?
    Code:
    [B]{"beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0}[/B],
    //anti stretch
    {"beamSpring":0,"beamDamp":0,"beamDeform":1000000,"beamStrength":10000000},
    {"beamLimitSpring":3151000,"beamLimitDamp":250},
    {"beamPrecompression":1, [B]"beamType":"|BOUNDED"[/B], [B]"beamLongBound":0.1[/B], [B]"beamShortBound":1.0[/B]},
    ["b1rr","b5rr"],
    
    Thanks in advance
     
  2. gabester

    gabester
    Expand Collapse
    Vehicle Director
    BeamNG Team

    Joined:
    Jun 6, 2012
    Messages:
    2,653
    Yes, I have that line copied and pasted at the beginning and end of every beams section in order to "reset" things to their default state. There are some redundant lines here and there. They don't cause any harm ;)
     
  3. GregBlast

    GregBlast
    Expand Collapse

    Joined:
    Aug 12, 2013
    Messages:
    224
    That's not about harm. That's about knowing if removing them would do harm. I'm trying to decide how to organize the beam section in my editor. That's why I'm asking this. If every single property will be taken into account only ONCE for ONE beam then I'll just store them all in different lists and the saving process will generate a group for each single prop (or a single group for all of them). In the other case I need to somehow group the properties to save them exactly like they were in the file.

    Some things are confusing me though. If I check 'Beams' I see that some properties can be part of different groups. I just guess that those group names are just an easy way to explain how it works but the properties remain the same. And thus if a beam type is specified then all following properties (or all the ones found since the last beam, which means actually all of those between 2 beams) refer to that beam type and will characteriez the next beam as such type.

    Please tell me I'm assuming right here. It would save me a lot. But with questions like that in my head I can only prepare controls and stuff but can't really test a whole open / save process so doing concrete jobs will not make working vehicles.

    - - - Updated - - -

    By that do you simply mean that if you were to add beams in between things would be reset because you changed those properties ? Or in more common cases I suppose in case you want to omit specifying those for the next beams ? Or does the engine really do something with that for the next beam(s) to come, aka ["b1rr","b5rr"] and maybe following ones ? I'm thinking it won't affect them. Just need to be really sure.
    Personally if it's no problem I think I'll keep the last one and get rid of the other same properties since the last beam. That way I can keep things organized with keyed beam properties as for nodes. Which means each property is in an individual keyed list for which the key is the beam index (because they do not have any ID) and the value is the property value.
     
  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