Running OutSim.lua

Discussion in 'Programming' started by value1, Jul 26, 2014.

  1. value1

    value1
    Expand Collapse

    Joined:
    Dec 19, 2013
    Messages:
    5
    I'm pretty much a noob to LUA. So if you don't want to be bothered with noob questions, dont read on ;)

    Here my questions:
    1. How can I run the OutSim.lua (contained in ..\BeamNG.drive\alpha_prerace\lua\vehicle) so that it outputs the time every 100 ms?
    2. Where can I find the telemetry values, which are currently not implemented in the script?
    Thank you for your help in advance!
     
    #1 value1, Jul 26, 2014
    Last edited: Jul 26, 2014
  2. value1

    value1
    Expand Collapse

    Joined:
    Dec 19, 2013
    Messages:
    5
    Come on, guys, it can't be that no one knows anything about how to run such a lua script!
    I will not bother you with more n00b questions after this one!
    Promised ;)
     
  3. Incognito

    Incognito
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    246
    Sockets should be enabled in race update.
     
  4. value1

    value1
    Expand Collapse

    Joined:
    Dec 19, 2013
    Messages:
    5
    Re: So here is how you run outsim.lua

    • Enable the use of LuaSocket by right clicking on BeamNG.drive in your Steam inventory > click properties > set launch options & enter "-luasocket"
    • In your directory ..\Steam\SteamApps\common\BeamNG.drive\lua\vehicle modify the file default.lua:
    remove the two "--" in front of:
    --outsim = require("outsim")
    --outsim.init()
    --outsim.updateGFX(dt)

    • Enable the script in outsim.lua by changing
    local OutSim_Enabled = true
    • Run the game and enjoy!

    In the current outsim.lua the data structure is not filled with data except time. So you may also want to fill the data structure with values in the lua script.
    You can also run your own lua script by modifying default.lua and adding the filename 3× similarly to above.
     
  5. value1

    value1
    Expand Collapse

    Joined:
    Dec 19, 2013
    Messages:
    5
    Re: And here the accompanying video…

    …showing the successful connection between BeamNG.drive and SimTools. SimTools then controls a motion platform that mimics the movements/acelerations of the car.


     
    #5 value1, Sep 14, 2014
    Last edited by a moderator: Oct 21, 2015
  6. estama

    estama
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 7, 2012
    Messages:
    267
    Re: And here the accompanying video…

    Oh shit!

    I assume that you are using the values from the g-meter. Please be careful to not crash while in that machine.
     
  7. IBsenoj

    IBsenoj
    Expand Collapse

    Joined:
    Sep 28, 2013
    Messages:
    819
    Re: And here the accompanying video…

    Same thing I was thinking. :rolleyes:
     
  8. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,031
    Re: And here the accompanying video…

    yaw-dropping, thanks for sharing :)

    Mind to share the lua code you used, maybe we can improve it together with you?
     
  9. logoster

    logoster
    Expand Collapse

    Joined:
    Sep 5, 2012
    Messages:
    2,082
    wow, that looks awesome, although i imagine crashing wouldn't be a good idea while in that
     
    • Like Like x 1
  10. Nish01

    Nish01
    Expand Collapse

    Joined:
    Aug 9, 2013
    Messages:
    222
    oh my god! thats amazing man great work. mind sharing some rig info? price, parts, wheel etc. just the basics nothing to detailed.

    I see your a SimTools staff member, thanks for your hard work on this, and SimTools bud
     
  11. JDMClark

    JDMClark
    Expand Collapse

    Joined:
    Aug 10, 2013
    Messages:
    1,347
    :O... Was thinking good lord i hope they have coded limitations to g forces.. Gives you that real and true feeling to not want to wreck haha...
     
  12. kevinmce

    kevinmce
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    61
    WoW! That is amazing!

    Never even seen a setup like that. You really have taken gaming to the next level!
     
  13. rt389g@hotmail.c

    rt389g@hotmail.c
    Expand Collapse

    Joined:
    Jun 9, 2014
    Messages:
    111
    Yeah that does look cool and would be good for flying programs as well. I just don't know if I would want to be bouncing around so much. How much approximately was that setup, I would guess 6K?

    [Edit] Searched a little and found this one http://www.profisim.cz/race-3/ that is about 11K without computer or monitors of course. I guess the kits could be the way to go.
     
    #13 rt389g@hotmail.c, Sep 16, 2014
    Last edited: Sep 16, 2014
  14. clayton8or

    clayton8or
    Expand Collapse

    Joined:
    Aug 26, 2013
    Messages:
    1,052
    All you need now is an Oculus Rift!
     
  15. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,031
    the new Oculus SDK changed things completely, that will take a while to fix ... :/
     
  16. logoster

    logoster
    Expand Collapse

    Joined:
    Sep 5, 2012
    Messages:
    2,082

    so you guys are going to be fixing it though? (even if not for a while)

    sweet, nice to know the facebook thing didn't stop you guys
     
  17. value1

    value1
    Expand Collapse

    Joined:
    Dec 19, 2013
    Messages:
    5
    Re: default.lua missing (EDIT: has been replaced by "main.lua")

    In the latest build it seems "default.lua" has been removed. Is there another way to start the "outsim.lua" scipt?

    EDIT: Sorry, apparently "main.lua" does the job now ;)
     
    #17 value1, Aug 15, 2015
    Last edited: Aug 15, 2015
  18. Real_20dka

    Real_20dka
    Expand Collapse

    Joined:
    Feb 5, 2015
    Messages:
    11
    Can someone help me get outsim working in 2016?

    I found outsim in BeamNG.drive\lua\vehicle\extensions but I have no idea how Lua works...
     
  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