Solved Change jato lua file name for compatibility with other mods

Discussion in 'Mod Support' started by Taza, Apr 16, 2018.

  1. Taza

    Taza
    Expand Collapse

    Joined:
    Nov 8, 2015
    Messages:
    1,335
    My pigeon mod pack has the new jato lua re-purposed as a turbine lua. It's named "jato.lua" at the moment, and I want to change that in case someone else wants to use the jato lua in their mod. My lua file is modified a bit, so it's not ideal to have the same name. I guess I should change the lua variables too.

    If I change the lua name to "jato_taza" and the controller name in jbeam to "jato_taza" the lua loads, but it can't read the jbeamData values. So I guess I need to change something in the lua?

    So, I reverted back to how it was before (and what the version on repo looks like). In short, how can I change the lua file name without breaking everything? Jbeam and lua attached. I know I'm not good at explaining what I want to do.
     

    Attached Files:

  2. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    you just need to change line 23 in the jbeam file
    "jato":{
    to
    "jato_taza":{
     
  3. Taza

    Taza
    Expand Collapse

    Joined:
    Nov 8, 2015
    Messages:
    1,335
    I tried that already, but changing that line results in the pigeon not loading at all. This is the error I get in the console:
    183.57047|E|libbeamng.lua.V.prepare|*** Invalid attribute name 'jato_taza'
    183.57053|W|libbeamng.lua.V.jbeam.compile|*** preparation error
    183.57056|E|libbeamng.lua.V.main|unable to load vehicle: aborted loading

    This doesn't really make sense to me, since that should work. I then tried to change the naming to "jatotaza" and that worked. I think the "_" is not allowed somewhere causing the error. Thanks for your help.
     
  4. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,957
    You probably can't use underscores there ;) Ie rename that file to jatoTaza and use that name throughout.
    But in any case, if this is about turbines, why do you keep calling it "jato"?
     
    • Informative Informative x 1
  5. Taza

    Taza
    Expand Collapse

    Joined:
    Nov 8, 2015
    Messages:
    1,335
    Because I have no idea how any of the lua works and I want to just not break anything:p And it works at it's current state.
    I might try renaming everything, but eh we'll see.
     
  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