Page 1 of 1

Project 'less is more' - a few questions

Posted: Sat Aug 20, 2022 3:23 pm
by CMDR Crux
Hello pilots

I found my way to Pioneer back in 2019. Relatively early on, I started customising the game more to my liking as best I could. Without programming skills, my options were and are of course limited to modifying existing structures - adding my own cities, handcrafted systems, music, factions and NPC images, that sort of thing.

In my 'universe', humanity has not yet spread out across the galaxy, but still inhabits a fairly manageable area around SOL. But the systems contain individual descriptions and contents. Outside this 'bubble' there are smaller outposts and colonies, these are randomly generated. The availability of individual technologies is very limited, for example the autopilot is not readily available, is expensive and takes up a relatively large amount of space. Jump ranges are greatly reduced, etc.

Until today there are a few things I was not able to change or I could not find out how and if this is possible at all. Now I hope that someone here can point me in the right direction:

  • How can I reduce the populated area when creating a new game?
  • How can I assign individual races to specific factions (so that each faction can
    have its own NPC images)?
  • Can (surface ports) be assigned faction related logos?
  • How can I determine which port / station model is used?

That's it for now. I really don't expect an explanation down to the last detail, a rough direction already helps.

Re: Project 'less is more' - a few questions

Posted: Sun Aug 21, 2022 12:25 pm
by CMDR ARGHouse
You can reduce the populated area by going into the lua scripts for the factions and changing the expansion rate and founding date values.

Re: Project 'less is more' - a few questions

Posted: Mon Aug 22, 2022 7:24 pm
by CMDR Crux
CMDR ARGHouse wrote: Sun Aug 21, 2022 12:25 pm You can reduce the populated area by going into the lua scripts for the factions and changing the expansion rate and founding date values.
That is exactly what I have done so far. But:

This only reduces the extent to which the corresponding faction spreads to already settled areas, but has no influence on the settled areas themselves. Example: If only one faction is created and reduced to a minimum, then only SOL belongs to this faction - the rest is then simply 'neutral'. Nevertheless, half the universe is populated. Unless I'm missing something?

Re: Project 'less is more' - a few questions

Posted: Wed Aug 24, 2022 7:50 pm
by impaktor
I think src/galaxy/SectorGenerator.cpp has some references to 700ly being the radius for explored systems, if that helps.

Re: Project 'less is more' - a few questions

Posted: Wed Aug 31, 2022 8:38 pm
by sturnclaw
In order of your questions:

- The size of the populated 'bubble' is a hard-coded constant value in the sector generator code. I do not remember the name, but you may be able to find it after a bit of digging.

- At this time, I don't think the face generator supports the concept of multiple races well if at all; this would require custom lua code to handle. Configuring this data on a per-faction basis is also not supported at this time, though I do intend to allow associating arbitrary values with a Faction object to support this kind of modding. No ETA yet unfortunately.

- Don't think so, not yet at least. CustomSystemBodies are also candidates to receive arbitrary data pass-through, but similarly no ETA yet.

- IIRC, this is random chance. There's an open PR that improves some of the logic used in building cities, but it needs a rewrite to bring it up to Pioneer's standards; that's most likely the best vector to get this feature in (though it's not a "first time contribution" level of task, unfortunately).

Re: Project 'less is more' - a few questions

Posted: Wed Jan 11, 2023 5:06 am
by CMDR Crux
impaktor wrote: Wed Aug 24, 2022 7:50 pm I think src/galaxy/SectorGenerator.cpp has some references to 700ly being the radius for explored systems, if that helps.
impaktor wrote: Wed Aug 24, 2022 7:50 pm - The size of the populated 'bubble' is a hard-coded constant value in the sector generator code. I do not remember the name, but you may be able to find it after a bit of digging.
After a few months break I sat down again and worked on the mod, it showed me the direction, thank you.

I also have the feeling that I have found two entries in the SectorGenerator.cpp that define the radius of the explored area. However, I am now stuck in so far as I don't know how to get the game to load the file on startup. As far as I have understood so far, it does not work to create a /src/galaxy folder in the mods folder, analogous to /data. Creating a /src folder directly in the game directory doesn't work either. Can I get the game to load the file at all without putting it in the *exe?

Another topic is the face generator

What is the need to rework the images? I ask because I figure that if I'm going to make the effort anyway (for myself primarily), then I might as well make it available if the desire is there. Of course, this changes the starting point, as I then have to resort to a tool that allows me to create licence-free work. But if something like this is already planned, I don't have to worry about it.

Ah, and happy new year :)

Re: Project 'less is more' - a few questions

Posted: Wed Jan 11, 2023 8:06 pm
by impaktor
You can not mod files in src/ folder, these must be re-compied, and give a new "exe" file.

The propper way to do it, is to expose the thing you want to change in src, to lua, then use the new lua capability to do what you want.

Meaning, if you want to change the 700ly thingy, in a mod, we need to expose that varialbe to lua. Then you change it in Lua.

Re: Project 'less is more' - a few questions

Posted: Thu Jan 19, 2023 8:42 pm
by CMDR Crux
impaktor wrote: Wed Jan 11, 2023 8:06 pm You can not mod files in src/ folder, these must be re-compied, and give a new "exe" file.

The propper way to do it, is to expose the thing you want to change in src, to lua, then use the new lua capability to do what you want.

Meaning, if you want to change the 700ly thingy, in a mod, we need to expose that varialbe to lua. Then you change it in Lua.
@impaktor
Thank you for your answer. Okay, I had already thought of something like that. Well, that's probably the end of the line for me for now, because I don't have the knowledge to expose anything in Lua.

But maybe someone can still answer this for me; files that are supposed to replace their counterparts in /data/icons are not read in when a mod is loaded. Data in one of the folders is loaded without any problems. Specifically, I am concerned with the file logo.svg, which I have replaced with one of my own and currently have to replace it manually?