Notifications
Clear all

lua scripting changes-plans-enhancements-ideas


ollobrain
(@ollobrain)
Lieutenant Registered
Joined: 13 years ago
Posts: 564
Topic starter  

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
robn
 robn
(@robn)
Captain Registered
Joined: 13 years ago
Posts: 1035
 

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
m4r35n357
(@m4r35n357)
Petty Officer Registered
Joined: 13 years ago
Posts: 36
 
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
robn
 robn
(@robn)
Captain Registered
Joined: 13 years ago
Posts: 1035
 
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
m4r35n357
(@m4r35n357)
Petty Officer Registered
Joined: 13 years ago
Posts: 36
 
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
robn
 robn
(@robn)
Captain Registered
Joined: 13 years ago
Posts: 1035
 

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
Coolhand
(@coolhand)
Master Chief Registered
Joined: 14 years ago
Posts: 112
 

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
robn
 robn
(@robn)
Captain Registered
Joined: 13 years ago
Posts: 1035
 
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
Subzeroplainzero
(@subzeroplainzero)
Master Chief Registered
Joined: 13 years ago
Posts: 171
 
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