Notifications
Clear all

Moddability


lionheart
(@lionheart)
Petty Officer Registered
Joined: 11 years ago
Posts: 22
Topic starter  

Having been looking at the game in detail for a week or so, I'm interested to hear from the devs how much of a focus is being placed on making the engine content agnostic and moddable, i.e. viable for total conversions and so on.

 

I've seen reference to the fact that certain stock ships must be in the game and other such quirks. Could someone   summarise, or point me to a summary, of what is and isn't possible right now. For example, without going into code, can I remove every planet and start again.

 

I assume that moving in the direction of making the content properly separate and replaceable from the engine itself is a goal, but is it very low priority? Not being a proficient coder I've been thinking I might start a little project on the wiki to catalogue all the elements of the engine that are currently hardcoded and not replaceable if that might be of value.


Quote
Chronothan
(@chronothan)
Petty Officer Registered
Joined: 11 years ago
Posts: 18
 

As far as I have been able to gather, one of the main goals of the devs is to get the majority of the core gameplay working through the Lua side of things down the road.  Doing so would make the game relatively easy to mod as long as you have a decent knowledge of Lua.  Right now, you can create and edit missions(data/modules folder), mess with the ui (data/ui folder), mess with the factions (data/factions folder; though they don't have much effect in game yet), and change ship stats (data/ships).  Pirate spawns and trade ship spawns are handled through the modules currently, so that is usually a good place to start messing around with stuff. If you write something and it is screwing things up (crashing, errors, etc) just delete it.

 

As of now, as far as systems go; I think all the custom ones are defined in the data/systems folder. The rest are procedurally generated.  I think you could remove all the custom systems and define any new ones you wanted with no problems.  Just take a look how the ones such as Sol and Epsilion Eridani are written and it will give you a good idea of how to write your own. Just make sure if you delete Earth or New Hope to change your starting position through data/ui/MainMenu.lua.

 

Really, the only way to do any modding as of now is through Lua and seems as if that will be the case for a while.  Best thing to do if you are really interested, try to study up on Lua a bit; it is relatively simple to learn and looking through what is already written will give you a good idea of where to go.  Take a look around here: http://eatenbyagrue.org/f/pioneer/codedoc/files/LuaBody-cpp.html This is the current codedoc (I think it is kept up to date with the latest alpha).  And here is a link for a crash course introduction to Lua http://luatut.com/crash_course.html which will give you the basics of the language. Then just write, write, write. If something screws up, write some more, read some more or ask the devs for help. You'll usually find somebody willing to answer you on the IRC channel.

 

Hope this helps! Good luck and happy coding!


ReplyQuote
robn
 robn
(@robn)
Captain Registered
Joined: 13 years ago
Posts: 1035
 

Having been looking at the game in detail for a week or so, I'm interested to hear from the devs how much of a focus is being placed on making the engine content agnostic and moddable, i.e. viable for total conversions and so on.

Very committed. Everything we build always has the question "how do we expose this sanely to mods?" at the back of it. Obviously we're not there yet, but most of the parts of the engine isn't easily replaceable right now has a plan for it that is just waiting for code.

We do this for two reasons. One is that we want to encourage a strong modding community (something I think we're making good progress on given the number of mods that appear on this forum). The other is that we simply don't have the resources to fill the Pioneer universe with content, but an empty universe is a bit depressing. So if we can make it easy for everyone to carve out their own corner of the galaxy and make it their own, we're doing well!
 

I've seen reference to the fact that certain stock ships must be in the game and other such quirks. Could someone   summarise, or point me to a summary, of what is and isn't possible right now. For example, without going into code, can I remove every planet and start again.

The game core depends on the ships "ip_shuttle" (the default start ship), "lanner_ub" (for the main menu), and "ladybird_starfighter" (the police and combat test ship), as well as the four missile "ships" ("missile_guided", "missile_naval", "missile_smart" and "missile_unguided"). These can't be changed right now without modifying the game code and recompiling. Eventually there will be a single ship tagged "default", and that will be all that's required.

The start ships "eagle_lrf" and "cobra3" are required, but are modifiable by editing data/ui/MainMenu.lua. Currently you can only replace the entire file via a mod. My intent at some point is to add API to allow a mod to add/remove/modify main menu items (and thus start points).

As for removing planets, you can remove the explicitly-defined systems by editing the files in data/systems (or removing them entirely). You'll still get generated systems in this case.

I assume that moving in the direction of making the content properly separate and replaceable from the engine itself is a goal, but is it very low priority? Not being a proficient coder I've been thinking I might start a little project on the wiki to catalogue all the elements of the engine that are currently hardcoded and not replaceable if that might be of value.

As above - that's the goal. Its not a single task, and thus doesn't have a set priority. Its more a long term goal that we chip away as we go. If you have a specific need right now though, raise an issue - I can't speak for others, but I'm personally far more likely to work on something if there's immediate demand for it.

I think a list would be useful if you'd like to start one.


ReplyQuote
robn
 robn
(@robn)
Captain Registered
Joined: 13 years ago
Posts: 1035
 

Really, the only way to do any modding as of now is through Lua and seems as if that will be the case for a while.

The intent is that all game mechanics/logic will be done in Lua, while the engine handles the physics, drawing, and low-level AI (ie combat and flight systems). So for doing any kind of gameplay mod, Lua is where you want to be.

That said, any file under data/ is replaceable via mods (and if you find one that isn't, its a bug and you should report it). So you could (and some have) write a mod that replaces textures, shaders, facegen parts, music, whatever you like.

This is the current codedoc (I think it is kept up to date with the latest alpha).

Its often a bit ahead of the alpha, but each API has an "availability" tag that says what release it appeared in. So you can avoid things that aren't released yet 🙂

There's also some docs on the wiki. Please add more!

You'll usually find somebody willing to answer you on the IRC channel.

Indeed. We try 🙂


ReplyQuote