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 2.0 - API documentation

Discussion in 'Tutorials and Tips by the Developer' started by yobuddy, Sep 23, 2016.

  1. Arazok

    Arazok Member

    Joined:
    Mar 26, 2018
    Messages:
    161
    Occupation:
    Computer scientist
    Location:
    Germany
    Balance:
    951Coins
    Ratings:
    +30 / 0 / -0
    My Motion Simulator:
    2DOF
    mh, strange.
    I will check again, but meanwhile my VB.net plugin is running, no need to use the C# template anymore...
  2. llluis

    llluis Active Member Gold Contributor

    Joined:
    Mar 30, 2017
    Messages:
    165
    Location:
    Quebec
    Balance:
    1,630Coins
    Ratings:
    +103 / 1 / -0
    My Motion Simulator:
    6DOF
    Now I’m curious to know what happened. :)
    Send the files to me so I can try to check.
  3. Arazok

    Arazok Member

    Joined:
    Mar 26, 2018
    Messages:
    161
    Occupation:
    Computer scientist
    Location:
    Germany
    Balance:
    951Coins
    Ratings:
    +30 / 0 / -0
    My Motion Simulator:
    2DOF
    you have pm
  4. llluis

    llluis Active Member Gold Contributor

    Joined:
    Mar 30, 2017
    Messages:
    165
    Location:
    Quebec
    Balance:
    1,630Coins
    Ratings:
    +103 / 1 / -0
    My Motion Simulator:
    6DOF
    @vthinsel nailed!

    There was one place missing in @Arazok code to be changed. I will post here for future reference:

    upload_2019-4-28_17-13-25.png
    • Like Like x 1
  5. Arazok

    Arazok Member

    Joined:
    Mar 26, 2018
    Messages:
    161
    Occupation:
    Computer scientist
    Location:
    Germany
    Balance:
    951Coins
    Ratings:
    +30 / 0 / -0
    My Motion Simulator:
    2DOF
    yep, I overlooked it ! Thanks for your help, guys. Much appreciated !
  6. SimPotato

    SimPotato Member

    Joined:
    May 17, 2017
    Messages:
    47
    Occupation:
    Designer
    Location:
    Gardiner, NY USA
    Balance:
    479Coins
    Ratings:
    +53 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    How about making a short 3 min youtube video showing a typical plugin modification example for us dyslexic speed freaks.
  7. feniks270392

    feniks270392 New Member

    Joined:
    Jun 6, 2019
    Messages:
    6
    Occupation:
    Risuuan
    Location:
    Saint-Petersburg
    Balance:
    346Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    3DOF, 6DOF
    hello everyone! i've done my first plugin. but i have some problems. I don't need patch my app. how can i get around this?
    i delete bodu of methods - PatchGame, UnpatchGame, but simtools still need patch my app and can't do that. When i trying patch my app with empty methods - i recieve warning from Sim Tools game manager - Game Did Not Patch.
  8. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,902Coins
    Ratings:
    +5,027 / 16 / -0
    Set the var "Private Const _RequiresPatchingPath As Boolean = False"

    And then: return True for game patched...
    Code:
    'Used by GameManager to Patch a Game.
        Public Function PatchGame(ByVal MyPath As String, ByVal MyIp As String) As Boolean Implements IPlugin_Game.PatchGame
               'Change as Needed
            MsgBox("Patch Installed!", MsgBoxStyle.OkOnly, "Patching info")
            Return True
        End Function
    • Informative Informative x 2
  9. AndreyGudymovich

    AndreyGudymovich New Member

    Joined:
    Aug 7, 2019
    Messages:
    4
    Balance:
    29Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    Hi!
    I made UDP type plugin (from DIRT2). I develop my own game application. It looks like UDP packets don't go to plugin. I use C# UdpClient class. For testing I made simple receiving app and it gets my UDP packets well. Can you give me working c/c# example HOW to send UDP packets to plugin?
  10. syedhs

    syedhs New Member

    Joined:
    Jun 10, 2009
    Messages:
    5
    Balance:
    16Coins
    Ratings:
    +0 / 0 / -0
    I am having the same problem .. udp packets doesnt arrive via Process_PacketRecieved.
  11. AndreyGudymovich

    AndreyGudymovich New Member

    Joined:
    Aug 7, 2019
    Messages:
    4
    Balance:
    29Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    Hi! The problem was in my case - _ProcessName fileld was set wrong. Let's say t is strange but it MUST be set by exactly name of your application.
  12. syedhs

    syedhs New Member

    Joined:
    Jun 10, 2009
    Messages:
    5
    Balance:
    16Coins
    Ratings:
    +0 / 0 / -0
    In my case, the ProcessName was exactly the same down (and even down to case sensitive). AxisAssignment has been done and Interface output has also been set. Very strange..

    upload_2019-8-21_12-40-27.png
  13. syedhs

    syedhs New Member

    Joined:
    Jun 10, 2009
    Messages:
    5
    Balance:
    16Coins
    Ratings:
    +0 / 0 / -0
    Since I can no longer edit my post (due to 1 minute restriction)..
    the ip in the image above has been confirmed to be correct. And in previous attempts, I also tried 127.0.0.1 ...
  14. AndreyGudymovich

    AndreyGudymovich New Member

    Joined:
    Aug 7, 2019
    Messages:
    4
    Balance:
    29Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    Hi!

    I guess the Interface settings which you've done is about SimTools OUT. You plugin is for getting data from your source TO SimTools (you can ask SimTools tech. support for details)
    So if you set this Network type it means the SimTools will send data got from your plugin to this address and port. May be you use same port? In this case will be conflict.
    So check this and check that you implemented patch functions properly. Your plugin must make patch. Patching can be nothing but patch methods must return needed results.
    • Like Like x 1
  15. syedhs

    syedhs New Member

    Joined:
    Jun 10, 2009
    Messages:
    5
    Balance:
    16Coins
    Ratings:
    +0 / 0 / -0
    Thanks for the replies. Greatly appreciate it!!

    This is interesting. I do not know that there are SimTools OUT and TO. Btw my code is based on https://github.com/ddkclaudio/QuplaySimTools and from there I simply change a few parameters (port remain the same - 4123)
    As for the rest
    1) patch is done (the green indicator changed to green in GamesManager.
    2) port conflict - I have run a simple udp listener at port 4123 and it receives all data nicely. The plugin now listens to port 4123 and it should receive the data (but it doesn't so far - that is the problem).
  16. AndreyGudymovich

    AndreyGudymovich New Member

    Joined:
    Aug 7, 2019
    Messages:
    4
    Balance:
    29Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    3DOF
    I looked at your plugin code. All must work. Le me describe what I did and I was sure that plugin is working.
    I complied my plugin. I run SimTools plugin updater and istalled my plugin. After it I started SimTools Manager and selected my plugin. I opened SimTools turning center and saw my data values from my game. mt.jpg My game name is Motion Theater. Game Data Input fields were filled with my data.
    You can call me in Skype gudymchick
  17. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,902Coins
    Ratings:
    +5,027 / 16 / -0
    @syedhs is quite correct.
    If SimTools is both trying to recieve data on port 4123 and also send the data on port 4123 there will be a port conflict.
    For now, I would simply set the output interface port to 5555 or something else.
    You you probably will not get any data...

    Take care!
    yobuddy
  18. syedhs

    syedhs New Member

    Joined:
    Jun 10, 2009
    Messages:
    5
    Balance:
    16Coins
    Ratings:
    +0 / 0 / -0
    What you did was something simple and it is not that different that mine. Most probably something silly mistake that I overlooked.

    Thanks for the pointer. Btw I am aware from the beginning of port conflicts. My Simtool plugin currently listen to port 4123, and the app that sends telemetry send to udp port 4123 too. There should be no port conflict in that area (but maybe other areas). I have to double-triple checked.

    Thanks both.
  19. KWhale

    KWhale New Member

    Joined:
    Aug 29, 2019
    Messages:
    10
    Balance:
    182Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    6DOF
    Anybody been able to get the Quplaysimtools repository to produce a functional solution lately? It compiles for me, but the validator in the /release directory says "no plugins found" The validator in the /debug directory does show a valid plugin, but I don't get a new game in the game manager when I zip the solution into the updater. Any suggestions would be welcome, thanks!
  20. yobuddy

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

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,902Coins
    Ratings:
    +5,027 / 16 / -0
    Sounds like you need to set the compiler for release rather than debug?

    I believe the example plugin still has the name set to "Live for Speed" so your just replacing that plugin?

    Some things to check anyway,
    Take care,
    yobuddy