Page 1 of 1

create mods? Where to start?

PostPosted: Tue Jan 14, 2014 3:17 am
by ZorNiFieD
Would love to get into this if I knew where to start, please give a general Direction MR BEN! It will let me get back into the game, considering, I'm only interested in modding the game.

http://www.wikihow.com/Play-Hopscotch

Re: create mods? Where to start?

PostPosted: Tue Jan 14, 2014 5:58 pm
by MrBenjammin
The docs for the API are available here: http://skynations.net/modapi/annotated.html

At the moment you can add IGameServices which can run constant and update within the server. See TestService.cs in GameData/Scripts. You can also edit commands via Chat.cs. You open the entire project file with Visual Studio at Scripts.csproj in the same directory. If you check out the existing stuff in Chat.cs it's pretty simple to learn from the pre-existing commands in that. Do not hit compile however, the server will compile the scripts when you start it, hitting compile in VS will do nothing. It will stop and show errors during the compilation if it finds any.

Re: create mods? Where to start?

PostPosted: Fri Oct 24, 2014 4:05 pm
by Tritonio
Would it be easy to embed and create plugins in Lua? That would allow users to build mods without compiling a thing and Lua is both fast to run and easy to learn. I think it would give an advantage to SN compared to other modable games.

Maybe this: https://github.com/NLua/NLua

Re: create mods? Where to start?

PostPosted: Fri Oct 24, 2014 5:22 pm
by MrBenjammin
C# is the best choice SN as a scripting language. Since it can directly interface with all of the server easily since the server is written in C#. Maintaining and adding to mod api is very easy development wise because of this, exposing most parts is as simple as creating an interface for them. You could write own Lua stuff via the mod API using some of the C# libraries out there that allow you to compile and interface with Lua, if you really like Lua but it won't be part of the official stuff.