I'm rather new to programming, I have a few questions: Q: How do I use an API? A: Q: Do I need to import the DLL into an executable to be able to use it? A: Q: Can I access it remotely? A: not unless you/someone else programs it that way Q: Is somone working on a way to access the data the API can provide that is as easy as telnet? A: Q: Are there any useful links on how game APIs work? A:
Q: How do I use an API? A: It is best to make a C# project. You can look at the samples in the repository https://github.com/lostinplace/sample-empyrion-mod and you can also read an overview in the wiki here https://empyrion.gamepedia.com/Game_API Q: Do I need to import the DLL into an executable to be able to use it? A: You will need to import the Mif.dll as it is the interface Empyrion will access. Q: Can I access it remotely? A: not unless you/someone else programs it that way Q: Is somone working on a way to access the data the API can provide that is as easy as telnet? A: The API's purpose is to avoid using telnet. Q: Are there any useful links on how game APIs work? A: The ones listed in the first question.
That looks like a Yes but is there any other way to do it? Either I phrased the question wrong or you misunderstood, this doesn't answer the question.
No. The API information is specifically made to do it programmatically. To support Telnet or some webservice, you would need to write a one. I don't know of anyone currently writing a telnet or webapi interface. A webapi interface would be challenging as calls to the API are asynchronous. Difficult, but not impossible.
Q: How do I use an API? A: (this is a Guess) Create an executable program that imports the mif.DLL file, this program needs to send requests to the functions of the DLL the DLL then tags the request with a unique number and the request sits in the DLL's buffer Empyrion occasionally accesses the DLL's buffer to see if there are any new requests When there are unfulfilled requests, Empyrion reads the request and returns data or an error code to the DLL the DLL then stores that Data or Error in the Same buffer using the same unique number as the request Your program will need to accesses the DLL's buffer occasionally to see if it's request has been fulfilled Your program does whatever you requested that data for
You don't make an executable, you make a library. Empyrion will load your library as one of it's own and call it.
But... That means... OMG!!! Oh man, I thought this was going to be some monumental ordeal, teaching myself yet another new programming language, copying all the functionality of my old program over, create an actual executable, convince server host to run the executable, etc etc etc. If all I have to do is create a DLL... All I really need to do is learn just enough c# to program a few functions and I'm done.
If you look at the GitHub URL I posted earlier, there is the source code for DeathMessenger mod. You can study it as the basis of a simple mod.
I want to tweak some physics settings, particularly vessel movement. Before I get started, is this possible using the API? Are there any significant limitations to the API?
Thanks for that instant reply. That's a shame really. How would one go about suggesting some improved physics for thrusters? My idea was to mod and test them myself, but since that's off the table... any suggestions?
At this time, none. There is no way to modify individual blocks in any way. I'm not sure if that is on the list, or when it will be. I'd recommend posting in the suggestions the ability to modify game elements.
Q: How to detect attacking structure? (get intruders and victim structures) A: Thats not possible at the moment.
Thats not possible at the moment. We thought about it, but it might cost a lot of performance to inform the mod about every shot. Is postponed for a later time.
but where do you draw the border. when is it a "new attack" and then the game has to save all those informations about attacks... will think about it, but it might take time.
does the API work in a Linux Environment? Like for example if I wanted to make a Gnome Shell Extension for managing a server?
Q: What is Eleon.Modding.GlobalStructureInfo.lastVisitedUTC and how to convert human date ? A: Its a Binary Date. Use a function like Date.FromBinary(lastVisitedUTC)