TNI development forum


Hi guys,

If you are reading this, it means that you are one of the people who have shown an interest in the Trainz Native Interface concept and appear to be a reasonable candidate for testing the APIs during its initial development. <strike>This forum is private-access so that we can share pre-release downloads, ideas, source code, etc. without them becoming publicly available in the incomplete state.</strike>. Update: Forum now public access.

<strike>Everything shared here by N3V will be covered under an NDA. In short, it means that you may not discuss the topics covered here with other people until they become public knowledge. This is primarily so that N3V may share pre-release builds with you for testing and feedback purposes. Much of the relevant information discussed in this forum will already be public knowledge, however the builds may contain other features (unrelated to TNI) which N3V may not want publicly revealed at this time. In short, you should keep these builds separate from your regular Trainz usage, and address any questions regarding these builds on this TrainzNativeInterface forum and on no other forum or public venue. You should be receiving our standard NDAs through email relatively soon. If you find that the terms of the NDA are too restrictive, then just let me know and I'll remove you from this forum.</strike>
Update: TNI no longer under NDA.

You should have already ready about the Trainz Native Interface on our wiki, but if you have not then please read up on it now. I don't want to waste anybody's time, so if you feel after reading those pages that you are not able to work with the Trainz Native Interface APIs (whether due to lack of time or interest, due to lack of programming know-how, or because you feel that your ideas are prohibited by the restrictions mentioned on the wiki) then please let me know up-front and if your concerns seem justified, I'll remove your from this forum. I'm not expecting any particular results in any particular timeframe, but I am expecting that you'll give the API a try and that you're sufficiently self-motivated to make progress with minimal hand-holding from N3V.

You should also understand that we do not use this API internally, and that there are likely to be significant flaws or limitations in the pre-release builds. One of the purposes of this forum is to find problems with the API or the associated processes and fix them up before we open the API to a larger group. If you are not interested in problem-solving and brainstorming and simply want a final API for your own development purposes, this group may not be for you. TNI is a broad topic and we're going to start with the basics and slowly expose additional features based on demand and limited by internal development bandwidth.

With all of that out of the way, I hope that this forum will live up to your expectations and I look forward to working with you on this.

Last edited by a moderator:
I am very much looking forward to the TNI interface.

I realize initially it will be a rather thin API, but I also feel that getting in on the early part of the process will developers grow their knowledge as the TNI SDK grows.

NDA signed and returned. Somehow, I missed this thread or maybe it wasn't visible. Expect me to be a bit slow getting into TNI as I will be a bit busy in the weeks leading up to Christmas.

I had already read the WiKi articles on TNI. No problem with the principles but the detail may take a little while to sink in. Should I get out of my depth or decide that I am wasting yours and my time then I'll let you know.
No worries. At this stage we're mainly trying to prove that what we've provided is usable by people outside the company- ie. that we haven't made any incorrect assumptions or missed any important steps. From there we'll start to step up the capabilities based on your feedback.

We have removed the requirement for the NDA to help us identify what level of interest there is in the TNI concept. The other caveates in this thread still apply.
Hi Tony,

I have long been interested in a way to make selective parts of Trainz core system and/or data to available 'third party' developers. Way back then (2005/6) I floated the idea of a specific interface and in reply a young Mr Chris B replied to say that this and a lot more would be available as part of the Trainz Native Interface which would be coming soon (TM). I'm still interested but I have a lot of catching up to do as I have not been active in Trainz for a good while.


Chris M
Thank-You for considering me.

I do have some time on my hands, but let me look into this a bit further. To be honest I'm still learning about what I can do with Trainz 2019 as I'm still learning the curve. But I have tremendous respect for what has been done, and the challenges to push the envelope yet try and keep backward compatibility.


Finally I've took a look into TNI physics SDK.
For custom plugins it is not enough to use only default train controls which Trainz provides. We can access from the plugin to the common train settings for the throttle, reverser, brake valve position, etc. For sensible customization of physics more of information is needed about the vehicle state and its actual lever positions. Generally the TNI SDK provides a possibility to transfer data from trainz script (about lever positions for example) to the TNI plugin and back to trainz script. But for tni-physics kind of plugins this way does not work. The LibraryCall() calls do not propagate from trainzscript to TNI. So, I cannot find a way to get any information about custom vehicle state in TNIPhysics plugin. Only general train control settings are available (and static data from configs) to use in vehicle traction/brake calculations and it makes field of using TNIPhysics too narrow.

It would be even better for convenience of data transfer between trainz script and TNI if the Vehicle's GetProperties() and SetProperties() functions were exposed inside TNI. The TNI already works with Soup, can get enginespecs, so it would be essential.