create mods? Where to start?

Discuss and get help with the creation of C# scripts here.

create mods? Where to start?

Postby ZorNiFieD » Tue Jan 14, 2014 3:17 am

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
ZorNiFieD
 
Posts: 24
Joined: Mon Jul 08, 2013 4:25 am

Re: create mods? Where to start?

Postby MrBenjammin » Tue Jan 14, 2014 5:58 pm

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.
Developer of Sky Nations
@MrBenjammmin
MrBenjammin
Site Admin
 
Posts: 904
Joined: Wed Jun 12, 2013 11:13 pm

Re: create mods? Where to start?

Postby Tritonio » Fri Oct 24, 2014 4:05 pm

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
Tritonio
 
Posts: 18
Joined: Tue Oct 21, 2014 4:50 pm

Re: create mods? Where to start?

Postby MrBenjammin » Fri Oct 24, 2014 5:22 pm

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.
Developer of Sky Nations
@MrBenjammmin
MrBenjammin
Site Admin
 
Posts: 904
Joined: Wed Jun 12, 2013 11:13 pm


Return to Script Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron