Can new research be added via modding? I had an idea...

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

Can new research be added via modding? I had an idea...

Post by Scoob » Fri, 26. Aug 22, 14:30

Hey all,

I was wondering if it's possible to add new research options at the HQ via modding?

Specifically, is there a way to give additional module efficiency bonuses? I had an idea...

With a certain new faction having access to easy Energy Cell production due to the nature of their environment, other Factions were being left behind. As a result a certain fishy scientist was commissioned to improve the efficiency of Energy Cell production.

Note: rather than uniformly improving Solar Panel efficiency, this "new tech" could be implemented in other ways:

- New Module that increases Solar Panel Efficiency (call it a capacitor module, even though that's not what it is lol)
- New Module, a supplementary power generator that uses a resource to boost EC production. (Similar to above, functionally, but needs a resource to power it - Water perhaps?)
- New Module, an Enhance Solar Panel that takes more resources, but produces more power.

I've not tried modding X4 - I've forgotten 99% of what I knew of X3 modding - so just thought I'd throw the idea out there, if anyone was interested.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13289
Joined: Sun, 15. Feb 04, 20:12
x4

Re: Can new research be added via modding? I had an idea...

Post by euclid » Fri, 26. Aug 22, 15:41

Hey Scoob,

I think it is possible to add new research but I'm not sure energy cell production efficiency is either needed or necessary as there is always an overproduction. I'm running an economy script which provides data on all wares in the universe in regular timesteps; here selected results on energy cells:

Code: Select all

player age in hours = 21.5447, Energy Cells AmountS = 13530247 AmountB = 1069179, O-D ratio = 12.6548 
player age in hours = 171.379, Energy Cells AmountS = 19885148 AmountB = 800609, O-D ratio = 24.8375 
At 21.5 hours I have no traders or any stations myself and already there are plenty of ecells available. At 171.4 hours I got a few miners and traders and also some stations which operate (semi-) selfsufficient, i.e, they only need mineral, liquid, gas and produce their own ecells required. Hence no impact here.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Can new research be added via modding? I had an idea...

Post by Scoob » Fri, 26. Aug 22, 16:21

Thanks for the reply.

I think the AI - and player - will always build sufficient EC production for their needs, so the game does always provide in that regard. I was just thinking how it'd be cool to be able to build a more compact station outside of the super sunny areas. So, something like a scrap processing plant can more practically be built elsewhere. It'll cost time and resources to research, but will yield more building options for the player.

We have options currently to generally increase efficiency of all production, via work force - just a shame it's a fairly late unlock rep-wise. We have research that subtly increases the recruitment rate, which is useful. However, something able to target specific modules would be pretty useful. I mean, sure, I can build huge Hull Parts stations - I have in the past - but what if there were a way to boost production speed further / use less resources for a given amount of produce. Or, to revisit older X titles, how about secondary resources that enhance production rates?

I spoke about Energy Cells more as an easy example of something that could be applied to various modules. We have this genius scientist available to us, it'd be great if he were able to enhance more things. Just a thought, having build large complexes.

As an aside, being able to make stations that produce vast amounts of wares more compact is going to be a positive boost to performance. I've seen some of the mega stations people have built but visiting them in person is a bit of a no-go due to performance issues. I personally like hanging out on my larger stations and watching the traffic...

docwho83
Posts: 168
Joined: Mon, 15. Jun 09, 23:10
x4

Re: Can new research be added via modding? I had an idea...

Post by docwho83 » Sun, 4. Dec 22, 14:26

Research can be added. I have a mod that unlocked the build modules for scanning to get the blue print. Not a major change but also Jump Drive Research v4.01 (updated 2021-05-29) has research. There was another mod but I can not find a link for it anymore. I still have a copy. but it was called Crew Academies. Added research that required you to bring teachers to your PHQ to unlock the the module
My Mods
RepairLasers Player controlled drone Also on steam
[Minefield] fell affliction minefield removed Also on steam
[Buildmodule] add research for buildmodule leak steals

Endellur
Posts: 51
Joined: Sat, 8. May 21, 20:01
x4

Re: Can new research be added via modding? I had an idea...

Post by Endellur » Sun, 4. Dec 22, 14:59

euclid wrote:
Fri, 26. Aug 22, 15:41
Hey Scoob,

I think it is possible to add new research but I'm not sure energy cell production efficiency is either needed or necessary as there is always an overproduction. I'm running an economy script which provides data on all wares in the universe in regular timesteps; here selected results on energy cells:

Code: Select all

player age in hours = 21.5447, Energy Cells AmountS = 13530247 AmountB = 1069179, O-D ratio = 12.6548 
player age in hours = 171.379, Energy Cells AmountS = 19885148 AmountB = 800609, O-D ratio = 24.8375 
At 21.5 hours I have no traders or any stations myself and already there are plenty of ecells available. At 171.4 hours I got a few miners and traders and also some stations which operate (semi-) selfsufficient, i.e, they only need mineral, liquid, gas and produce their own ecells required. Hence no impact here.

Cheers Euclid
Hey Euclid, can you share your economy script?

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13289
Joined: Sun, 15. Feb 04, 20:12
x4

Re: Can new research be added via modding? I had an idea...

Post by euclid » Sun, 4. Dec 22, 20:57

It's not in the shape for public use and part of a bigger package to analyze the economy. But if you are familar with coding xml/md then I can provide an older core version that needs to be triggered manually. It does not contain all wares like unbundle and DLC wares (Terran, Split etc.). You would have to add them yourself. Also note that you need the command line parameter -scriptlogfiles as the script writes the result to a logfile.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

Endellur
Posts: 51
Joined: Sat, 8. May 21, 20:01
x4

Re: Can new research be added via modding? I had an idea...

Post by Endellur » Sun, 4. Dec 22, 21:05

Sure, that works for me. Any version you want to share works, it doesn’t have to be polished for end users.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13289
Joined: Sun, 15. Feb 04, 20:12
x4

Re: Can new research be added via modding? I had an idea...

Post by euclid » Sun, 4. Dec 22, 22:38

Ok, try this

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

Post Reply

Return to “X4: Foundations - Scripts and Modding”