1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Tutorial How to write a Game Plugin for SimTools 1.0 - API documentation

Discussion in 'SimTools Plugins' started by yobuddy, Aug 6, 2013.

  1. Dave Berry

    Dave Berry New Member

    Joined:
    Dec 2, 2015
    Messages:
    11
    Location:
    Burton on Trent, UK
    Balance:
    263Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, SCN5, SCN6, Motion platform
    Hi!

    Thanks for the great post. So... I can't get SimTools to read from the suspension outputs from the game to translate directly into actuator movement? I was hoping to try something different rather than "the usual" types of simulator, I was hoping to either use the "extra" lines or just to try cheating and pointing the data to one of the normal data lines to get this working.

    I'm not too worried if the idea doesn't pan out - I am tinkering with my SimXperience rig, so have SimCommander to fall back on if it doesn't work out! Just wanted to try something different, but if it isn't possible I suppose I can always try something else.

    Thanks also for the advice, will try to understand what you mean here... Is this a command prompt input? While I've done some programming before, it's been a while so I'm not up to speed on syntax / tools or such like any more!

    Thanks agasin,

    Dave
  2. vthinsel

    vthinsel Well-Known Member

    Joined:
    Feb 20, 2015
    Messages:
    439
    Location:
    FRANCE
    Balance:
    6,010Coins
    Ratings:
    +564 / 2 / -0
    My Motion Simulator:
    Arduino, 4DOF
    Maybe you can use some extra fields to capture suspension and base the axes preset on those, but in the end, it should behave the same. Nice exercise though.
    No command prompt input; just a console to display/debug things in a few lines of code.
    • Useful Useful x 1
  3. Dave Berry

    Dave Berry New Member

    Joined:
    Dec 2, 2015
    Messages:
    11
    Location:
    Burton on Trent, UK
    Balance:
    263Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, SCN5, SCN6, Motion platform
    Yes, that was my intention - to use the suspension position and suspension acceleration for each wheel as the basis of each axis - in my mind, that would reduce the artifice / approximation of using calculations etc to convert "hard" telemetry output into axes of motion. My thought is to try and get the most realistic simulator feel I can - this is more about motion cueing than it is about g-force simulation, as I mentioned earlier.

    Still confused as to how I get your 'simple application' to work however! I have also tried the one you included with the Project Cars plugin but it doesn't seem to register anything - I'm presuming that this is designed around network listening rather than internal UDP? Either that, or I am even more of an idiot than I had previously assumed.... :)
  4. vthinsel

    vthinsel Well-Known Member

    Joined:
    Feb 20, 2015
    Messages:
    439
    Location:
    FRANCE
    Balance:
    6,010Coins
    Ratings:
    +564 / 2 / -0
    My Motion Simulator:
    Arduino, 4DOF
    The simple app is just a .exe file you have to launch and that will process UDP packets received on a given port (5606 for PCars) and display/process the UDP bytes. It doesn't register or do anything fancy. Just listen to a UDP port for incoming UDP datagram sent by an app like a game or PacketSender which I also used when PCars wasn't UDP enabled.
    • Useful Useful x 2
    • Informative Informative x 1
  5. Dave Berry

    Dave Berry New Member

    Joined:
    Dec 2, 2015
    Messages:
    11
    Location:
    Burton on Trent, UK
    Balance:
    263Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, SCN5, SCN6, Motion platform
    Ahh cool, that makes sense. Is there any way to change the packet listen port? I presume decompile and edit the source? I need to find packets on port 20777...
  6. vthinsel

    vthinsel Well-Known Member

    Joined:
    Feb 20, 2015
    Messages:
    439
    Location:
    FRANCE
    Balance:
    6,010Coins
    Ratings:
    +564 / 2 / -0
    My Motion Simulator:
    Arduino, 4DOF
    source is on previous page/posts. Just change
    Dim UDPlistener As New UdpClient(5606)
    to the port you want.
    • Winner Winner x 1
  7. Dave Berry

    Dave Berry New Member

    Joined:
    Dec 2, 2015
    Messages:
    11
    Location:
    Burton on Trent, UK
    Balance:
    263Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, SCN5, SCN6, Motion platform
    Perfect!

    Thanks again, really helpful info my man.
  8. xwbxn

    xwbxn New Member

    Joined:
    Feb 24, 2016
    Messages:
    2
    Location:
    china
    Balance:
    255Coins
    Ratings:
    +0 / 0 / -0
    Thank you for this tutorial, it is useful
  9. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,201Coins
    Ratings:
    +5,093 / 18 / -0
    @IJOJOI,
    I would just delete the gtr2_plugin.dll in the path its complaining about.
    You want the plugin in the release folder anyway when your done.
    yobuddy
    • Useful Useful x 1
  10. Boomslangnz

    Boomslangnz Active Member SimAxe Beta Tester Gold Contributor

    Joined:
    Oct 26, 2014
    Messages:
    346
    Balance:
    4,166Coins
    Ratings:
    +243 / 1 / -0
    My Motion Simulator:
    2DOF
    Would anyone be able to share how to add into a plugin a memory address such as Physics.dll+4444C

    It assigns an actual numbered memory address only once the game has started so I guess its like a pointer address
  11. AlexinChina

    AlexinChina Member

    Joined:
    Sep 2, 2015
    Messages:
    71
    Location:
    China
    Balance:
    371Coins
    Ratings:
    +8 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    I like to study to make a plugin for blur...
    What kind of way does blur give its telemetry??
  12. value1

    value1 Nerd SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Jan 9, 2011
    Messages:
    2,184
    Location:
    Zug, Switzerland
    Balance:
    14,751Coins
    Ratings:
    +3,322 / 11 / -1
    My Motion Simulator:
    2DOF, DC motor, JRK, Joyrider
  13. TheLoneRonin

    TheLoneRonin Working at my first 2DOF Simulator...

    Joined:
    Dec 29, 2014
    Messages:
    8
    Balance:
    77Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hello,

    i want to code a plugin for "Mech Warrior online", but i dont know how to find out were i get the telemetry data cause i am a total noob at programming.
    I opend the Example "Plugin.vb" File with Visual Basic and i saw the following set up.

    Private Const _GameName As String = "Live for Speed" 'The displayed Name for this Game. (DLL_Name ==> "Live for Speed.dll")
    LFS DLL Example.PNG


    I found the "Life for Speed.dll" in my Life for Speed folder and i found several .dll files in the MechWarriorOnline (MWO) "bin 64" folder like:
    upload_2016-3-26_11-6-14.png
    There is a "CryRender D3D9.dll" file, and a "CryRender D3D11.dll". Is this the file compared to the "Live for Speed.dll" file in the plugin example? Does that meand MWO exports Telemetry Data with UDP Packets like LFS? Do i have to set up this Filename in my Plugin? The game is powered by CryEngine by the way. Maybe you know how CryEngine games export Telemetry Date.
    The other .dll folders are from Steam, DirectX or Microsoft, i dont think this are the right ones. In the MWO folder is a Bin34 Folder with .dll files to, but i got a 64 System.



    And i got a another question:

    In the first Example of the Tutorial are "UDP Packets", is this a sort of file like the .dll, cause i didn´t found any of these in LFS and MWO. I only found .pak Packets in MWO.

    Sorry for my bad english by the way :D.

    Greetings:
    TheLoneRonin
    (working on a 2Dof Simulator to setup MWO with Oculus rift DK2 and a Dof Simulator)
  14. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,032
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,890Coins
    Ratings:
    +10,880 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    I very much doubt Mech Warrior provides telemetry data like LFS does @TheLoneRonin.

    If that is the case have a look at the memory hook method instead.
  15. TheLoneRonin

    TheLoneRonin Working at my first 2DOF Simulator...

    Joined:
    Dec 29, 2014
    Messages:
    8
    Balance:
    77Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Ok, thanks for the answer.
    But where i can find the memory hooks? I got a .pak file with a .xml file contained called "ForceFeedbackEffects.xml":

    MWO GameForceFeedback.PNG

    Maybe there i can find the memory hooks.

    Greetings:
    LoneRonin
  16. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,032
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    147,890Coins
    Ratings:
    +10,880 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  17. TheLoneRonin

    TheLoneRonin Working at my first 2DOF Simulator...

    Joined:
    Dec 29, 2014
    Messages:
    8
    Balance:
    77Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Ok, but i dont want to change values in MWO. I hope MWO dosn´t missunderstand me writhing a cheat.
  18. TheLoneRonin

    TheLoneRonin Working at my first 2DOF Simulator...

    Joined:
    Dec 29, 2014
    Messages:
    8
    Balance:
    77Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    If i colect telemetry Data out of the Game Memory, does VAC (Valve Anti-Cheat) ban me, like someone who tryes to intall an aimbod?
  19. SilentChill

    SilentChill Problem Maker

    Joined:
    Jul 19, 2014
    Messages:
    2,643
    Occupation:
    Railway Maintenance
    Location:
    Morecambe, Lancashire, England
    Balance:
    20,557Coins
    Ratings:
    +3,487 / 34 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF

    No you are not changing any data you are only reading the data no cheating going on at all so its all safe, well as far as I know
    • Like Like x 2
    • Informative Informative x 1
  20. TheLoneRonin

    TheLoneRonin Working at my first 2DOF Simulator...

    Joined:
    Dec 29, 2014
    Messages:
    8
    Balance:
    77Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino