[MOD/Script] LI Freight Distribution Network (FDN) - v7.2 21/11/2010

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

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

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

Post by Logain Abler »

keo wrote:Bug report!!
i use this mod + PM SSDN and LIUM complex but when i enable from AI
1 of this make every shipyard sell Mamuth TL ....
and if i disable all shipyard (yes argon too) dont sell this ship .. o.o
Cheers :oops:

That could be SSDN, I have my own version with a custom Colossus as a drone carrier.

Thought I removed the tship file.

LA

Edit:
Quick fix is to remove 300035 & 300036 from the page 17 section of the 9911 t file.
This will stop the plug-in trying to install the ship
DudeRasta
Posts: 4
Joined: Mon, 19. Jul 04, 06:40
x3tc

Post by DudeRasta »

I am getting 404 errors on all your DL links...
Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler »

DudeRasta wrote:I am getting 404 errors on all your DL links...
Uploading, give me 5

LA

Should be working now. I still need to upload mod files :(

LA
keo
Posts: 443
Joined: Sat, 23. Jul 05, 14:28
xr

Post by keo »

Logain Abler wrote:
keo wrote:Bug report!!
i use this mod + PM SSDN and LIUM complex but when i enable from AI
1 of this make every shipyard sell Mamuth TL ....
and if i disable all shipyard (yes argon too) dont sell this ship .. o.o
Cheers :oops:

That could be SSDN, I have my own version with a custom Colossus as a drone carrier.

Thought I removed the tship file.

LA

Edit:
Quick fix is to remove 300035 & 300036 from the page 17 section of the 9911 t file.
This will stop the plug-in trying to install the ship
i edited this file deleting this lines but still the script add or remove all mamuth ...
Maverick024
Posts: 139
Joined: Tue, 21. Nov 06, 17:16
x3tc

Post by Maverick024 »

Logain Abler wrote:I'll make the factory wares level cap (try to) and I could PM you a link to the newer version :?:
Please do, I would be glad to provide help; especially as it is likely to enhance my game at the same time.
Okay, this is my fist draft of the local factory ware management options for FDN.

Option is show when player selects show full details
image

This is a shot of the cap levels for small test complex
image

This is the complex in action
image

How it affects FDN.
There are two parts to the FDN supply process for factories:
Supplying Products to FDN Nodes, I've updated the script to check for any caps against the ware. If there is a cap it won't touch the ware until above the set limit, same goes for Complexes Products & Intermediate Products.

Supply resources to factories, this has also been updated to check for a cap, if no cap is set to will supply the default cycle value. If there is a cap set it will supply up to the cap level. If it can't and any other node in range fails to supply, and if the Node's are set to but the resource, FDN will try and buy up-to the cap level. It will be down to the player to manage this.
Looks good. I assume "Open Ware Management options:" can be configured before FDN is enabled? If so, this seems to actions both points 2 and 3 from my previous post. Good job, LA.
Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler »

Maverick024 wrote:
Logain Abler wrote:I'll make the factory wares level cap (try to) and I could PM you a link to the newer version :?:
Please do, I would be glad to provide help; especially as it is likely to enhance my game at the same time.
Okay, this is my fist draft of the local factory ware management options for FDN.

Option is show when player selects show full details
image

This is a shot of the cap levels for small test complex
image

This is the complex in action
image

How it affects FDN.
There are two parts to the FDN supply process for factories:
Supplying Products to FDN Nodes, I've updated the script to check for any caps against the ware. If there is a cap it won't touch the ware until above the set limit, same goes for Complexes Products & Intermediate Products.

Supply resources to factories, this has also been updated to check for a cap, if no cap is set to will supply the default cycle value. If there is a cap set it will supply up to the cap level. If it can't and any other node in range fails to supply, and if the Node's are set to but the resource, FDN will try and buy up-to the cap level. It will be down to the player to manage this.
Looks good. I assume "Open Ware Management options:" can be configured before FDN is enabled? If so, this seems to actions both points 2 and 3 from my previous post. Good job, LA.
All FDN element options are now configurable before you turn them on, I’ll send you a PM with the link after work. :)

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

Post by Logain Abler »

keo wrote:
Logain Abler wrote:
keo wrote:Bug report!!
i use this mod + PM SSDN and LIUM complex but when i enable from AI
1 of this make every shipyard sell Mamuth TL ....
and if i disable all shipyard (yes argon too) dont sell this ship .. o.o
Cheers :oops:

That could be SSDN, I have my own version with a custom Colossus as a drone carrier.

Thought I removed the tship file.

LA

Edit:
Quick fix is to remove 300035 & 300036 from the page 17 section of the 9911 t file.
This will stop the plug-in trying to install the ship
i edited this file deleting this lines but still the script add or remove all mamuth ...

Strange, if the script can't find the t file ref it wouldn't/shouldn't install it. I'll have a look after work :(

LA
keo
Posts: 443
Joined: Sat, 23. Jul 05, 14:28
xr

Post by keo »

i forget .. now i have a save game where i can do all change i want so if u want another tester i glad help u...
btw: i have request =D

can FDN when enabled from station, put all warez this station sell linked with all node? or better, choose wich node must have wich warez from x station?
i try explain better:
i have a complex make weapon and shield, another complex produced missile, and annother ammunition + other stuff
now i want make a complex with quantum tube and all ware needed from shipyard and make node transfer from complex to shipyard ....
(if is possible i vote u for president!! :lol: )

2nd request: about phq i wish can choose wich 1 must have new blueprints (when u buy from quest) and if not enable or not choose all go to the normal phq

idk how hard can be all that but hope u can ...

btw again ty for reply ^^
Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler »

keo wrote:i forget .. now i have a save game where i can do all change i want so if u want another tester i glad help u...
btw: i have request =D

can FDN when enabled from station, put all warez this station sell linked with all node? or better, choose wich node must have wich warez from x station?
i try explain better:
i have a complex make weapon and shield, another complex produced missile, and annother ammunition + other stuff
now i want make a complex with quantum tube and all ware needed from shipyard and make node transfer from complex to shipyard ....
(if is possible i vote u for president!! :lol: )

2nd request: about phq i wish can choose wich 1 must have new blueprints (when u buy from quest) and if not enable or not choose all go to the normal phq

idk how hard can be all that but hope u can ...

btw again ty for reply ^^
There is a new version of FDN on the way which will allow you to set which Node wars go to, even down to individual factories within a Complex. Or let FDN decide based on closest Node.

As for the Blueprint assigned by missions issue, I’ve yet to solve this and I don’t know MD to change the target PHQ, or even if it can be done! :(

The new version can also work as a script, using the in-game PHQ or any Dock as a Node, so it can be used with other dock mods or in vanilla.


LA
User avatar
Midge
Posts: 683
Joined: Sat, 27. Sep 03, 17:05
x4

Post by Midge »

As for the Blueprint assigned by missions issue, I’ve yet to solve this and I don’t know MD to change the target PHQ, or even if it can be done!
MD only has 1 ID field for *the* PHQ. It is possible, however, to generate a list based on the PHQ type. The problem is that MD is event driven so that raises the question of what event to use to trigger the MD director. That could very well be a nightmare for testing/debugging. Also AFAIK MD doesn't have a means of easily creating a menu although you can pop up a message with multiple choices. Further trouble comes in that each choice is actually a trigger for cue and you don't receive an ID or anything like that so you can really only work with a predefined number of choices.

Bottom line: it is possible but it would be one hell of a kludge.
Custom X Galaxy - No plot means a more challenging start than X-Treme and no Mi Ton!
Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler »

Midge wrote:
As for the Blueprint assigned by missions issue, I’ve yet to solve this and I don’t know MD to change the target PHQ, or even if it can be done!
MD only has 1 ID field for *the* PHQ. It is possible, however, to generate a list based on the PHQ type. The problem is that MD is event driven so that raises the question of what event to use to trigger the MD director. That could very well be a nightmare for testing/debugging. Also AFAIK MD doesn't have a means of easily creating a menu although you can pop up a message with multiple choices. Further trouble comes in that each choice is actually a trigger for cue and you don't receive an ID or anything like that so you can really only work with a predefined number of choices.

Bottom line: it is possible but it would be one hell of a kludge.
Cheers Midge,

Food for thought! A couple of questions:
Can MD be fired by a script of time?
Can MD take a value from a global?

I've not looked at the MD before, I may have to do some research.

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

Post by apricotslice »

As I understand it, MD is completely separate from scripts, with no overlap.

A serious design flaw imo. If I'd been building the MD, I'd have added the ability for MD to run a script and a script to call an MD, with parameter passing. But like everything egosoft does, imo, its only half implemented, and limited severely by a lack of forward thinking as to future uses.
User avatar
Midge
Posts: 683
Joined: Sat, 27. Sep 03, 17:05
x4

Post by Midge »

An MD director cue can't be fired directly by a script. A script can, however, indirectly fire one by causing some event to happen that the director can recognize and is waiting on, e.g. destruction of some object or player ship changing sector. There are timer events in MD but those relate to the game time or interval after an event has occurred. MD can execute a script but the script can't communicate back to MD. I.e. there is no return code that MD can check.

As far as globals are concerned, it seems there may be some overlap as to what scripts and MD can access, but I'm not sure about this. I rather doubt it though. More likely there are variables that have the same function for scripts and MD but are set up separately at game load. I haven't looked into this much mostly due to incompleteness of documentation and lack of time for testing by trial and error.
Custom X Galaxy - No plot means a more challenging start than X-Treme and no Mi Ton!
Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler »

apricotslice & Midge, thanks for the details!

It's never easy!

As for events, I'm assuming that MD classes docking as an event and would also capture the docking station? I just wondering if a MD could be written to offer the player who has docked at a PHQ type dock the option of loading existing Blueprints to that PHQ?

I've tried this is script using set script command target: <Value> to try and force the game to use a specific PHQ but that dosen't work.

Just thinking about other options to address multipule PHQ within the game.


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

Post by apricotslice »

Is it possible to store the blueprints as variables, and then use a command script run from the PHQ its wanted on to add them ?

The general command to add a blueprint goes onto the last PHQ added into the game.

But if your run a script to add blueprints from the command interface of the specific PHQ, they get added to that PHQ.

So if the blueprints can be stored, then when a player wants to update blueprints on a PHQ, they just run the command to do so from that PHQ.

Its a second step after getting the blueprint, but at least they can then add them to where they want them.
Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler »

apricotslice wrote: But if your run a script to add blueprints from the command interface of the specific PHQ, they get added to that PHQ.
Bingo, thats the step I'm missing :)

There is always another way!

Cheers apricotslice.

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

Post by apricotslice »

:lol:

Is that it ? :D

I've been wondering for a while what all this talk of blueprints was about. I could have told you that ages ago, but I never understood the references or saw a question that needed answering until that last post when you ended it with something that made sense. :D

I dont know the array/variable handling side of it, but I've used hardcoded command scripts to load blueprints on multiple PHQ's for yonks.
Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler »

apricotslice wrote::lol:

Is that it ? :D

I've been wondering for a while what all this talk of blueprints was about. I could have told you that ages ago, but I never understood the references or saw a question that needed answering until that last post when you ended it with something that made sense. :D

I dont know the array/variable handling side of it, but I've used hardcoded command scripts to load blueprints on multiple PHQ's for yonks.
I’ve read lots of posts about custom PHQ’s and the Blueprint issues, even along the lines of cloning, destroying and rebuilding the PHQ so it’s the last one (made me cringe).

I’ve written the code that automatically scans all PHQ type docks for Blueprints and loads them on to player selected PHQ, I just need to run it from the actual target dock! Do’h..

Sometimes you can’t see the wood through the trees!


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

Post by apricotslice »

Just goes to show, the answer you want is usually the very simple one and you dont see it because your looking for complicated ! :D


Edit : On testing, it looks like the blueprints command has been nerfed by egosoft. Only the last created PHQ gets them, and any other station described as a PHQ, wont get them.
Last edited by apricotslice on Thu, 29. Jul 10, 06:51, edited 1 time in total.
Varek Raith
Posts: 331
Joined: Thu, 23. Aug 07, 21:33
x4

Post by Varek Raith »

Just so you know, I'm getting a 404 on the main mod download links.

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