Jump to content

Full Lua API


Tsumanu

Recommended Posts

I would like to ask you for access to the API for Lua because I can not find anything like that. Just looking through the game files I came up with such marvels as sendServerCommand or sendClientCommand. However, they are undocumented. 

 

Yes, I know how to use them due to the fact that we use them. However, I do not know if this will be changed / removed, and as the server side to get a list of players, because as far as the client side getSpecificPlayer player draws me, it server side it is always nil. 

 

Additionally IsoPlayer:getPlayers() returns a list of 4 nil (on the server is 1 player - on the client side is always nil, not even array). 

 

I could report the bug, but simply do not know what and where is the bug. 

 

I would also like to know how it differs from getSpecificPlayer getPlayer? What opportunities has the object returned by getCore () because I noticed that you are using the functions not described in the JavaDoc. What are global functions? Is client-side multi, you can read the data of other players?

 

Thanks in advance

Link to comment
Share on other sites

GetSpecificPlayer and GetPlayers are likely for the disused splitscreen functionality.

Otherwise, there is no full API. A few of us (most recenlty BryBry, I believe) have posted the complete contents of _G in varying degrees of order, but your best bet is to get comfortable with the game's Lua files and start using a Find/grep function.

Link to comment
Share on other sites

I do so, but I think it should not be the basis for modding, and the addition for those who want to do something really cool. Thank you for the advice, but if someone could at least add a comment to the game files would at least know what to expect.

 

And by the way, I would like to ask whether the difference between getSpecificPlayer server and the client is a bug? 
 
How can I get a list of players on the server side? While the side klieta need a very limited amount of information and not actually require any methods outside GetUserName so much on the server side, even as it modifies any data not reading them would be very useful.

Besides OnDisconnected for multiplayer is never triggered.
Link to comment
Share on other sites

You're point of view is understandable, and is the very reason many [potential] modders aren't bothering to start modding until the game is more complete, and a stable LUA API is released.

Until then, any update could remove/break/change the functionality of any current LUA mod, and for that reason, you might be best hanging off until the game is more stable or released.

 

At least that's the view I hold, as well as a few other experienced developers - There's no point putting too much effort into something that can/will change in the foreseeable future.

Link to comment
Share on other sites

  • 5 months later...

I use aborange searcher to search for examples in all the lua-files of the game.

This way, i found lot of examples how to use some ingame-functions.

 

Also there are some interesting mods, where i learned about new functions.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...