Notifications
Clear all

To all SSC Station occupants

Thank you for the donations over the past year (2024), it is much appreciated. I am still trying to figure out how to migrate the forums to another community software (probably phpbb) but in the meantime I have updated the forum software to the latest version. SSC has been around a while so their is some very long time members here still using the site, thanks for making SSC home and sorry I haven't been as vocal as I should be in the forums I will try to improve my posting frequency.

Thank you again to all of the members that do take the time to donate a little, it helps keep this station functioning on the outer reaches of space.

-D1-

lua scripting changes-plans-enhancements-ideas

(@ollobrain)
Honorable Member

Anyone that is working on this system want to speak up, will it be able to be at some point picekd up by novices such as myself and missions and other content added into the gameworld in some way and what sort of modding abiliites are being built in to the lua system

Quote
Topic starter Posted : June 1, 2011 18:09
 robn
(@robn)
Noble Member

The script engine is already pretty solid. I've been trying to find time to complete a tutorial but things are busy right now. If you want to try start here:

Module API tutorial

The API reference docs are here for now:

Lua API reference

Help getting docs into shape would be greatly appreciated.

As for future plans, there's lots. The hope is that people will start writing scripts and finding places where the API is broken or things are missing so we can fix it. None of this is set in stone right now. There will also be major subsystems exposed to Lua as time goes on. So far we have plans to allow scripts to define new equipment and cargo, setup waypoints and animation sequences and modify the composition of starsystems (eg add a spaceport etc). None of these are very far along yet.

At this point the best thing you can do is start coding, post your work, and tell the devs what things you need. The API as it stands is fine for right now, so it won't change without some external pressure - that's you. I for one would love to see hundreds of interesting and original ideas implemented, so you'll get as much help as you need from me. Go to it!

ReplyQuote
Posted : June 1, 2011 18:31
(@m4r35n357)
Eminent Member
robn wrote:
The script engine is already pretty solid. I've been trying to find time to complete a tutorial but things are busy right now. If you want to try start here:

Module API tutorial

hmm, just read the tutorial, looks like a good place to start. One thing I didn't see mentioned is where we should put these scripts, can you enlighten me? TIA.

ReplyQuote
Posted : June 2, 2011 01:11
 robn
(@robn)
Noble Member
m4r35n357 wrote:
robn wrote:
The script engine is already pretty solid. I've been trying to find time to complete a tutorial but things are busy right now. If you want to try start here:

Module API tutorial

hmm, just read the tutorial, looks like a good place to start. One thing I didn't see mentioned is where we should put these scripts, can you enlighten me? TIA.

In data/modules. Yes, it should say that - as I said, its not finished 🙁

ReplyQuote
Posted : June 2, 2011 01:51
(@m4r35n357)
Eminent Member
robn wrote:
m4r35n357 wrote:
robn wrote:

In data/modules. Yes, it should say that - as I said, its not finished 🙁

No sweat, I can't even play the game 😉

So will there be a location outside the game installation (in a user dir) that we will be able to use?

ReplyQuote
Posted : June 2, 2011 03:03
 robn
(@robn)
Noble Member

Yes. Issue #124 once implemented will allow any files in the /data (ie "My Documents/Pioneer" or "$HOME/.pioneer") to add to or override the game data dir. I'd hope to see this implemented some time in the next couple of months.

ReplyQuote
Posted : June 2, 2011 03:11
(@coolhand)
Estimable Member

Rob, are there any example missions? I have an idea for an entire story arc and i think LUA is about high level enough that i can wrap my head around it... but some kind of template to begin with would be really helpful.

also, i'd been meaning to ask what happened with the pirates and assassination missions that are listed as modules... in my testing i've never been attacked by pirates or found an assassination mission, i'd assumed these were disabled for some reason.

ReplyQuote
Posted : June 2, 2011 08:41
 robn
(@robn)
Noble Member
Coolhand wrote:
Rob, are there any example missions? I have an idea for an entire story arc and i think LUA is about high level enough that i can wrap my head around it... but some kind of template to begin with would be really helpful.

Have a look in data/modules. DeliverPackage.lua shows how to interact with the bulletin board and how to spawn ships based on certain conditions. DonateToCranks.lua is a simple bulletin board-only module which will be useful. We should probably comment these heavily since everyone has them.

Quote:
also, i'd been meaning to ask what happened with the pirates and assassination missions that are listed as modules... in my testing i've never been attacked by pirates or found an assassination mission, i'd assumed these were disabled for some reason.

I never got around to rewriting Assassinations.lua for the new API, so its disabled for now. Pirates.lua does spawn ships but they can't catch you with the current AI functions available. John has started writing an "intercept" AI that will take care of this but he's on leave at the moment. For the moment you just have to pretend 😆

ReplyQuote
Posted : June 2, 2011 13:59
(@subzeroplainzero)
Estimable Member
robn wrote:
Pirates.lua does spawn ships but they can't catch you with the current AI functions available. John has started writing an "intercept" AI that will take care of this but he's on leave at the moment. For the moment you just have to pretend 😆

Ah I was wondering if anyone was working on pirates. It's good to know somebody is then 🙂

I was going to suggest a few things that might be cool, but I'll wait to see what John comes up with first.

ReplyQuote
Posted : June 2, 2011 14:17