[MOD/Script] LI Production Modules (PM) - v7.2 29/08/2010

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

[MOD/Script] LI Production Modules (PM) - v7.2 29/08/2010

Post by Logain Abler » Sun, 2. Aug 09, 12:01

Logain Industries Production Modules (PM v7.2) 29/08/2010

[ external image ]

Introduction:
Logain Industries has developed Production Modules which enable Docks, TL & M1 class ships to produce wares. Using Nano Production Technologies modules are able to replicated traditional station production.

PM has three main functions, Production, Salvage and Repair.


PMv7.2 script is only compatible with X3:TC 2.5 or greater

PMv7 is not compatible with older versions, or existing game saves with PM stations deployed

LI_MODv7 - The.cat & .dat files contain the FDN, PM models and the references for SSDN (approx 8.5MB). X3:TC 2.7.1 compatible only

If you do not intend to use LI_Modv7 you will need to remove the following any script file starting “plugin.LI.Dock.xxxx”.
This is a precaution only if you are using other mods that contain FDN dock references



Required Utilities:
PMv7 requires Community Plugin Configuration by Cycrow.

PM Bug Fix: 05/01/2011
Fix for PM display of Energy producing Modules
Link


Download Links:
Hosted by StormMagi
Hosted by Apricotslice
via Google Code

Optional:
LI_MODv7

Recommended:
PM-Research and Development by JoeTheDestroyer
Forum Link


Technical Info:
Text Page: 9913
Page File: 09913
Page 17 IDs: 300020-300056 for LI_Mod v7
Changes to TDock .txt and HQ.xml are contained in the LI_Mod file


Install of script files:
Use Plugin Manager by Cycrow Link to install the script .spk file
Or:
Manually install files from the script.zip. This link contains a guide for installing script files manually.
Great guide by Cycrow: Link

Install of Mod files:
The LI_MOD.cat & .dat files can be placed in the mods folder or renamed to follow the game .cat and .dat files.
Great guide by Apritocslice link

Turn on AL Plugin:
PM uses the AL Plug-in.
Great guide by LV shows how to turn on an AL Plug-in: Link


IMPORTANT:
This is a mod to the existing game files. Please ensure that all save games are backed-up prior to use
The mod files contain changes to the TDock and HQ files and will not be compatible with other mods that change these files
If you experience issue whilst running SETA try reducing the SETA amount


Thanks
Many thanks to all who have tested and have contributed with comments & suggestions on this post, and the people who have answered my many questions.
Many thanks to Apricotslice for hosting the files on his site.
Big thanks to StormMagi for providing ftp access and hosting for my mods :)


User Guide

FAQ:
FAQ post started for v7.


Introduction:
Logain Industries has developed Production Modules which enable Docks and TL/M1class ships to produce wares. Using Nano Production Technologies modules are able to replicated traditional station production.


Modules:
Modules are the core element which allow the script to mimic the production of Wares, Ships, Stations & Equipment. There are some key concepts you need to understand:

Module Grouping:
Modules are automatically grouped to complete production task as follows:
Wares & Equipment production - Grouping increase the amount produced
Ships & Stations production - Grouping reduces the production time
Ship Repair -Grouping reduces the repair time

Salvaging is the only Module task which does not use grouping, one salvage task = 1 Module.

Grouping is achieved by creating a Parent & Child relationship between Modules completing the same task.

Parent Modules:
This is the first Module configured to run a production task, all additional Modules added to complete the same task will inherit the settings and status of the Parent Module. The Parent Module is checked each production cycle and if it fails all Child Modules will also fail. Any Child Module added will not contribute to the current production cycle.

Child Modules:
Are automatically added to a Parent Module if they are completing the same task and they will inherit their Parent Module status and settings. However the Child Module is individually checked each production cycle.

Module States:
Pending – Child Module added to an existing production cycle, it will not contribute to the current cycle
Paused – Parent or Child Module which has been paused by the player. The pause will take affect after the completion of the current production cycle
Stalled – Parent or Child Module which has failed a resource check
Cap Reached – Parent or Child Module which has been automatically paused due to a player set production cap
Storage – Parent or Child Module that cannot complete its production task due to storage space issue
Clearing – A Parent or Child Module which has been stopped by the player and which will be cleared on completion of its current production cycle

If the production cycle is running with no issues the Parent Module will display the remaining time of the cycle.


Production Modules:
Production Modules mimic the production of Wares, Ships, Stations and Ship Equipment based on the blueprint selected. The production will run continually until cleared by the user.


Salvage Modules:
Salvage takes a physical Ship, Station or Ship Equipment and converts it to raw resources; this process will also build a local Blueprint of the item to enable Production. Unlike the Production task, Salvaging will only run once and release the Module when complete.

Salvage actions:
Ships – Will be salvaged, stripped of all wares and added as a Blueprint if one does not exist.
Stations – Will be salvaged, and added as Blueprint if one does not exist, the Station product will also be added as a Blueprint if ones does not exist.
Equipment – Equipment on docked ships or locally help will be displayed. The equipment can then be selected to convert to blueprint. Equipment Salvaging happens immediately

Salvage limitations:
As ships can only hold a item of ship equipment they cannot salvage equipment
Once configured the Salvage task cannot be modified


Repair Modules:
Damaged ships docked locally will have a repair option to, the amount
resources required depend on damage and the repair time is dependant on the damage and the number of Modules committed to the repair task.

Repair Module limitation:
Once configured the Repair task cannot be modified

Ship Requirements:
PM will only run on M1 or TL class ships
Supply Command Software is required


Blueprints:
Blueprints are created at stored locally when a Ship, Station or Ship Equipment is salvaged.
They hold the build details required to produce the item.

Known Limitations:
Ware Blueprints can only be created by salvaging the source factory; this means that PM will not currently handle custom wares
Shield Production Complex produce two types of shields for each level, Light, Medium & Heavy. PM will select the first product to create a Blueprint; the station will need to be salvage again to create the second product Blueprint. The second salvage task should not be started until the first is complete.


Buying LI_Modv7 Stations:
There is a potential issue adding custom stations to existing race Shipyards, by which tradable items become unavailable to the player and the Shipyard show no items for sale.

To overcome this issue if LI_Modv7 is installed two new Shipyards are created for each Major race and all LI Stations are added for purchase as normal by the player. This removes any requirement to modify and existing race Shipyards

LI Stations can be bought as normal via these outlets


Production Complexes:
Production Complexes are specifically designed to support a large number of concurrent Modules and increased storage capacity.

Module & Storage Capacity:
There are two Production Complexes in the LI_Modv7, giving a range of module support storage capacity:
Large – 200 Modules and 80,000,000 units of storage
Medium – 100 Modules and 40,000,000 units of storage
The player will require increasing standings with a race to buy each Complex.

Vanilla Docks:
Vanilla Docks can support 40 concurrent Modules but they are limited by their storage.

M1 & TL Class Ships:
Support 10 concurrent Modules.

By default M1, TL class ships and Docks other then the Production Complexes are not registered as PM enabled. They can be added via the Configuration Menu.
Docks are added by type, Ships are added individually.


Storage Management:
By default the storage usage can be governed by setting a production cap against the produced product. When the cap is reached the production will be automatically paused and restarted as required.

FDN Integration:
If FDN is installed additional Storage features will be available:

Local Storage:
This sets a local limit against the produced product which will maintained that level before passing surplus a selected FDN Node, or out into FDN INN (Inter Node Networking).

Available FDN Nodes:
This lists all FDN Node enabled docks in INN range, each Node can be selected at any time. If the Producing Station is itself an FDN enabled Node it will also be listed and selectable.

List of Wares for the selected linked Node:
This list all ware held at the linked FDN Node, the ware settings at the Node can also be accessed & updated via this list.

Cap & Storage Considerations with FDN Integration:
When used with FDN there are three Storage levels to consider when managing product levels:

The Production Cap
The Maintain Locally level
The FDN Ware level (at all Nodes in IIN) range

All three can be used to manage the production, access and distribution levels. If the producing station is its own default Node it is recommended that the Maintain Local levels & FDN Ware levels match to minimise any player confusion. However it is not required by PM or FDN as the supply logic will calculate and use the best option.


PM modified HQ:
PM has been designed and built to use a modified HQ as its Production Complexes; this was done purely to provide adequate storage units to support bulk production

Modified HQ & Blueprint issues:
The game will only recognise the last HQ type dock deployed when saving Blueprints to the player HQ. This is an issue for any Mod using modified HQ docks to provide usable storage to the player. To overcome this limitation FDN v7 and the accompanying LI Mod v7 employ the same solution as Enhanced Equipment Docks by Saetan.

The Mod file now contains two references for each LI station, one designated as an Equipment Dock and one as a HQ. The Equipment Dock is a dummy ref which is installed at Shipyards for purchase and deployment by the player.
When the player opens the PM Main Menu or Configuration Menu all player docks are checked and if there is a dummy dock deployed it will be replaced by the appropriate HQ version.

Know issues:
After you built a LI Station you will be able to buy blueprints. But only the player headquarter can save blueprints, so if you don't have one, this blueprints will be lost.

Acknowledgments:
As already stated the Blueprint fix is used by Saetan’s Enhanced Equipment Docks and thanks go to him for pointing me at the solution. Thanks must also go to Lucike who came up with and developed the solution.


Configuration Menu:
The configuration menu allows you to enable PM features on vanilla/custom docks and M1/TL class ships.

You can turn on/off dynamic update menus for the Menus

Debug logging can also be turned on/off for the main PM processes.

PM can also be fully reset from this menu; this will terminate all PM tasks and clear all local & global variables.

Credit and resource requirements for Ship & Station Production and Salvaging can be modified in the configuration menu. Removing credit and resource requirements will be offset by increased Energy Cell requirements.

The default race can be set here, this affects the race specific wares required to build Ship Equipment.
Last edited by Logain Abler on Mon, 25. Apr 11, 14:27, edited 240 times in total.

mutantmessiah
Posts: 17
Joined: Thu, 18. Jun 09, 17:16

Post by mutantmessiah » Sun, 2. Aug 09, 17:29

Looking forward to this one.

Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler » Sun, 2. Aug 09, 17:41

mutantmessiah wrote:Looking forward to this one.
:D

Building with the following in mind:
TS will have one Module
TL will have three Module

(I may add two modules to Carriers, not sure yet)

The modules will integrate with my FDN mod (if in range) or will need to be supplied by more traditional routes..

LA

Chris0132
Posts: 1463
Joined: Sun, 22. Jun 08, 01:25
xr

Post by Chris0132 » Sun, 2. Aug 09, 18:26

Hmm, I can imagine using assistant drones and this to turn arans into mobile supply bases.

mutantmessiah
Posts: 17
Joined: Thu, 18. Jun 09, 17:16

Post by mutantmessiah » Mon, 3. Aug 09, 16:17

Logain Abler wrote:
mutantmessiah wrote:Looking forward to this one.
:D

Building with the following in mind:
TS will have one Module
TL will have three Module

(I may add two modules to Carriers, not sure yet)

The modules will integrate with my FDN mod (if in range) or will need to be supplied by more traditional routes..

LA
Awesome, so the big boys can pump out better stuff for us. Could you set it up based on maximum cargo space, available to any ship with a 5k plus cargo hold? One module for 5k, 2 for 10k, 3 for 20k, 4 for 40k etc... I have no idea how scripting works, so if that was completely ridiculous I apologize.

someone else
Posts: 2972
Joined: Sun, 18. Jun 06, 13:37
x3tc

Post by someone else » Mon, 3. Aug 09, 16:23

so the Xtm mobile fabs will return.... :D

mmmh... but creating a fleet of Microchip-building TS isn't a bit overpowered? :D
Trade, Fight, Build, Think, Modify.
Ship Rebalance Mod
OOS Rebalance
Resized Aldrin Big Rock
SIDE/TOP/FRONT Ship Size Comparison
Remember young Padawan: money stolen can be, time cannot.

Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler » Mon, 3. Aug 09, 16:39

mutantmessiah wrote:
Logain Abler wrote:
mutantmessiah wrote:Looking forward to this one.
:D

Building with the following in mind:
TS will have one Module
TL will have three Module

(I may add two modules to Carriers, not sure yet)

The modules will integrate with my FDN mod (if in range) or will need to be supplied by more traditional routes..

LA
Awesome, so the big boys can pump out better stuff for us. Could you set it up based on maximum cargo space, available to any ship with a 5k plus cargo hold? One module for 5k, 2 for 10k, 3 for 20k, 4 for 40k etc... I have no idea how scripting works, so if that was completely ridiculous I apologize.
Not ridiculous at all, it's just easier to script setting it via ship class rather than storage. Also I'm not comfortable with letting a single ship produce a large number of separate wares. The Terran Atmospheric Lifter has 60k storage!

(I'll also include instructions on how to increase the cap limit via SE for those who must)
someone else wrote:so the Xtm mobile fabs will return.... :D

mmmh... but creating a fleet of Microchip-building TS isn't a bit overpowered? :D
True. Initially I was going to limit it to fleet support (ammo & missile) however I thought why not just let the player choose. The minerals that require mines I have removed as that's just wrong. I know this flexible stance on wares contradicts the bit above where I've placed a limit on the number Modules, but I see that as a different issue.

LA

Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler » Mon, 3. Aug 09, 17:44

I've removed the prototype weapons as a selectable option. When you search these it returns a production time of 2 min from the Aldrin stations.

Not good :(

LA

someone else
Posts: 2972
Joined: Sun, 18. Jun 06, 13:37
x3tc

Post by someone else » Mon, 3. Aug 09, 17:50

why not making each module use up some cargo bay? for heavy machinery, fluff and stuff, it seems reasonable.
:wink:
Trade, Fight, Build, Think, Modify.
Ship Rebalance Mod
OOS Rebalance
Resized Aldrin Big Rock
SIDE/TOP/FRONT Ship Size Comparison
Remember young Padawan: money stolen can be, time cannot.

Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler » Mon, 3. Aug 09, 19:31

someone else wrote:why not making each module use up some cargo bay? for heavy machinery, fluff and stuff, it seems reasonable.
:wink:
That would mean adding Module as a ware or a Station.....

Adding as a Station is not such a bad idea unless you try and deploy it!

Ware would also be good & cleaner than the station route. I would have to read-up on how to add a ware.

I'll get the Beta out (tonight or tomorrow) for testing and have a think about it....

But still a good idea :)

LA

someone else
Posts: 2972
Joined: Sun, 18. Jun 06, 13:37
x3tc

Post by someone else » Mon, 3. Aug 09, 19:40

mmh... maybe I found a way for TLs....
the player goes and loads the TL buying a station from a shipyard (normal deployable vanilla station) and then your script recognizes it and automagically makes the station "work" inside the TL.
He can deploy it when he wants... and it will work too.

no new wares... so max compatibility with other mods at the less possible fuss, costs a honest price (it is the vanilla factory after all), and it occupies some cargo bay too! :D

For TS there are some specific dummy wares that serve nothing... you could easily script on the TS a fixed amount of the Vanilla useless ware ("engine components" or "crates" for example) and make them inamovible (no idea on how to do that).

less elegant than the TL solution but well... :roll:
Trade, Fight, Build, Think, Modify.
Ship Rebalance Mod
OOS Rebalance
Resized Aldrin Big Rock
SIDE/TOP/FRONT Ship Size Comparison
Remember young Padawan: money stolen can be, time cannot.

Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler » Mon, 3. Aug 09, 20:18

someone else wrote:mmh... maybe I found a way for TLs....
the player goes and loads the TL buying a station from a shipyard (normal deployable vanilla station) and then your script recognizes it and automagically makes the station "work" inside the TL.
He can deploy it when he wants... and it will work too.

no new wares... so max compatibility with other mods at the less possible fuss, costs a honest price (it is the vanilla factory after all), and it occupies some cargo bay too! :D

For TS there are some specific dummy wares that serve nothing... you could easily script on the TS a fixed amount of the Vanilla useless ware ("engine components" or "crates" for example) and make them inamovible (no idea on how to do that).

less elegant than the TL solution but well... :roll:
From testing I think that won't work, the station won't work deployed and I'm not sure it returns any production values until it's deployed. I'll have another look into that once I've built this version.

This is for beta to test it all works, it should do as the production script works on my LSDC and on the build version I have SSDN which now builds its own Drones (not yet released).

LA

Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler » Tue, 4. Aug 09, 00:09

Scripting all done, its up and running and testing at the moment. Hope to have it out later tomorrow :D

LA

Edit: Quick guide added.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Tue, 4. Aug 09, 02:18

Does this require normal loops to work ?

For example, will making ecells require food1, food2, crystals and silicon to make ?

I like the idea of all cap ships being able to make their own ecells. Say m7 and up. All the non-dockable ones at SPP's. Solves the supply problem once and for all. And given their size, they have enough surface area to obsorb sunlight from, same as an spp. You would need to have a cap on how many to have made at any time, or else your cargo by would fill up in your personal ship and not leave any room for booty.

You could make a generic station that just occupies space and does nothing if deployed accidently. But this limits this to TL's only.

Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler » Tue, 4. Aug 09, 08:17

apricotslice wrote:Does this require normal loops to work ?

For example, will making ecells require food1, food2, crystals and silicon to make ?

I like the idea of all cap ships being able to make their own ecells. Say m7 and up. All the non-dockable ones at SPP's. Solves the supply problem once and for all. And given their size, they have enough surface area to obsorb sunlight from, same as an spp. You would need to have a cap on how many to have made at any time, or else your cargo by would fill up in your personal ship and not leave any room for booty.

You could make a generic station that just occupies space and does nothing if deployed accidently. But this limits this to TL's only.
No it doesn’t require a loop; the one in the guide was an example. MPM will build anything (minus minerals & prototype weapons) as long as it has the resources locally, can get them via FDN or traditional supply routes.

Yes you’re right, a dummy station would limit this to TL's, a ware would allow you to install to any ship and it could be limited by its ware size (XL). I have a version running on my FDN Node (20 Modules) which is sweet: D

I was thinking of building a military version for my SSDN mod, the version I’m testing at the moment already builds Drone, I was going to add say 5 to 10 Modules for military hardware.

I can setup MPM to work on both ships & stations; I’ll reserve a station command slot today.

LA

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Tue, 4. Aug 09, 09:51

i assume from the way you talk about it, that it will somehow contact other nearby ships and request materials?

Will a docked TL ask, say, the HQ for materials?


Also, how does it work if you tell it to clone a complex? like a heavy weapons complex, for example.

Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler » Tue, 4. Aug 09, 10:01

Lancefighter wrote:i assume from the way you talk about it, that it will somehow contact other nearby ships and request materials?
No, not other ships. It will, if in range of an FDN node request wares like other stations using FDN. If not you will need to use more traditional supply methods (other ships).
Lancefighter wrote: Will a docked TL ask, say, the HQ for materials?
Great idea! I never thought to put a check for wares if docked...
Thanks, I'll have a look into that.
Lancefighter wrote: Also, how does it work if you tell it to clone a complex? like a heavy weapons complex, for example.
Currently it will ignore complexes, this I plan to change today. Nothing major it will just need to only return the appropriate station within the complex not the whole. FDN does this and it works well.

LA

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Tue, 4. Aug 09, 10:17

oh! so thats what you meant by node. No wonder i was completely lost.

somehow ive completely overlooked FDN in my browsings of this forum, ill look into it.

Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler » Tue, 4. Aug 09, 11:48

Hi All,

I’ve been reading up on how to add a custom ware via Cycrows excellent plug-in manager and it should be easy to add MPM as a XL ware. I was not going to bother on the beta release but I think it’s worth the extra time & effort.

I’m just wondering the following:
Size of the ware, Dock & TL (Capital sized ships) I’m thinking should be the same size, maybe around 10k and will be able to clone a stations 1 for 1.
TS are another matter, so the options as I see them are either:
Have a second smaller version, maybe around 2.5k which can clone the station but reduces the production amount by half (if single double the production time) and reduce the required resources by half.
Or just drop TS.

I’m thinking drop TS as it’s more believable to limit MPM to ships which can more realistically support it (I’m not using believable or realistic literally, it is after all just a game).

Cost:
How much do you think it should cost?

LA

someone else
Posts: 2972
Joined: Sun, 18. Jun 06, 13:37
x3tc

Post by someone else » Tue, 4. Aug 09, 12:19

what about having the option "choose the station for MDM" show up only when docked to a Shipyard and then letting the player choose between the buyable stations there (watching reputation) and then scripting in the chosen station type in their TL?
That way all the fluff-stuff-machinery looks like it is "loaded" from the shipyard and this makes sense.
(magically adding tons and tons of construction facilities to a ship is... strange)
The station will occupy a different space depending on its type so that will be Ok, and if you make the player pay the station's price (or a little less because he bought only the fluff-stuff-machinery, not a full blown station) it will be fair.
Just make sure that when he tries to deploy the station it returns into the cargo bay/disappears/refuses to deploy. (the only difficult thing imho, but this prevents the player from "exploiting" this script)

that will make this remain a script... compatible with everything :D

Or just drop TS.
Imho squeezing all the station's machinery into a TS is... weird. :roll:
"believable" is the most important thing in a game like this... if you see too may things that don't match with their surroundings the immersion is lost.

p.s. yeah, I'm a bit stubborn. :D
Trade, Fight, Build, Think, Modify.
Ship Rebalance Mod
OOS Rebalance
Resized Aldrin Big Rock
SIDE/TOP/FRONT Ship Size Comparison
Remember young Padawan: money stolen can be, time cannot.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”