[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
Goncyn
Posts: 96
Joined: Fri, 17. Jan 03, 02:51
x4

Post by Goncyn » Tue, 4. Jan 11, 18:32

Useful link, thanks again.

dpadula
Posts: 242
Joined: Tue, 15. Aug 06, 18:47
x4

Post by dpadula » Tue, 4. Jan 11, 19:04

You are quite welcome. It is one of the best tools for Complex Building.
-----
Dell Precision 3600
12 gb ram
Nvidia 1060
256 gd boot ssd and 1 tb data ssd
Windows 10

JoeTheDestroyer
Posts: 36
Joined: Wed, 14. May 08, 01:40
x3tc

Wares Research update

Post by JoeTheDestroyer » Wed, 5. Jan 11, 07:08

Just wanted to jump in and say I'm back to X after a hiatus. I'm pleased to report that I'm done coding my ware research addon for PM. I still want to spend a few weeks testing it, but if anyone wants to try it out before then, send me a PM.

So, just a quick summary of the addon for those interested:

PM addon: Ware Research v7.2.01
1) Ware research
This adds a new method to get ware blueprints by reverse engineering wares (as compared to the current method of Salvaging stations). This means that PM can now produce (almost) any type of ware, including those for which no factory exists (such as the Phased Array Laser Cannon).

The cost of the research is 3 times the estimated factory cost (for an S-size factory). 90% of this must be supplied in wares (at average price). If you don't have enough of the ware to meet this requirement, research is still possible, but it gets very expensive (up to 35 times the estimated factory cost).

All ware blueprints that require food are created to use the food for the Default Race as set in PM Options.

For example, the Phased Array Laser Cannon (PALC):
Average Ware Price: 654,432cr
Estimated Factory Cost: 11,548,232cr
Nominal Total Research Cost: 34,644,696cr (= 3 * 11,548,232)
Total Research Costs:
47 PALCs + 3,886,892cr (nominal)
or
30 PALCs + 15,953,217cr
or
10 PALCs + 128,156,172cr
or
2 PALCs + 357,222,747cr

2) Production research
This adds the ability to improve the productivity of pre-existing ware blueprints. A ware blueprint from an S-sized factory can be increased to an M-size or larger. The cost of this research is 1.5 times the difference between the estimated factory cost for the current blueprint and the estimated factory cost of the new blueprint.

The current supported blueprint sizes are:

Code: Select all

 Desc Size   Cost ratio vs S-size
    S    1     1      : 1
    M    2     1.8125 : 1
    L    5     4.25   : 1
   XL   10     7.5625 : 1
  XXL   20    12.125  : 1
  5XL   50    19.5    : 1
 10XL  100    25.25   : 1
For example, Energy Cell blueprint from Solar Power Plant XL (any race):
Estimated Factory Cost: 19,669,215cr
XXL Research Cost: 17,729,827cr
5XL Research Cost: 46,572,151cr
10XL Research Cost: 69,004,810cr

(Note that, unlike above, any food requirement is left exactly as in the source blueprint, except for increasing amounts.)

(Note 2: This DOES NOT give you a new station blueprint, just a ware blueprint. In other words you cannot build a Solar Power Plant 10XL using this. But you will be able to produce ECells at a rate equivalent to an SPP 10XL.)

-Joe
Last edited by JoeTheDestroyer on Wed, 5. Jan 11, 07:19, edited 1 time in total.

JoeTheDestroyer
Posts: 36
Joined: Wed, 14. May 08, 01:40
x3tc

Post by JoeTheDestroyer » Wed, 5. Jan 11, 07:17

Sorry for the double post, but I also wanted to say that I found a small bug in PM 7.2.

Description:
When an energy cell production module is present, it will not show up in the host's menu unless a salvage module is also present. However, it will show up in the main menu regardless of the presence of a salvage module.

Solution:
I compared the code in plugin.LI.PM.Main.Menu and plugin.LI.PM.PM.Menu and this appears to be the problem:

Code: Select all

   $natural.Array = sort array $natural.Array
   $natural.Array = reverse array $natural.Array
   append $natural.Array to array $split.ware.Array
 end
  
if size of array $salvage.Array
   append $energy.Array to array $split.ware.Array
 end
  
 if size of array $missile.Array
   $missile.Array = sort array $missile.Array
In the middle, $salvage.Array should be $energy.Array. This also explains why it only shows up when a salvage module is present.

-Joe

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

Post by Logain Abler » Wed, 5. Jan 11, 13:33

Welcome back JoeTheDestroyer :)

Can’t say I’ve noticed the display discrepancy between the Main & Host menu and I produce all my Energy via PM. Then again it’s been a while since I’ve played X3:TC.

I’ll have a look this weekend as I’m away from home this week.

LA

Goncyn
Posts: 96
Joined: Fri, 17. Jan 03, 02:51
x4

Post by Goncyn » Wed, 5. Jan 11, 17:06

I was just on my way here to report the same bug that Joe did. Noticed it happening last night. So, consider that confirmed? :)

Feature Request: a production summary by ware that shows the quantity produced per hour and the quantity consumed per hour by all configured modules would be incredibly useful for verifying that I've added everything up properly. It would also make it easier to see the impact of shipbuilding on my resource chains.

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

Post by Logain Abler » Wed, 5. Jan 11, 18:52

Goncyn wrote:I was just on my way here to report the same bug that Joe did. Noticed it happening last night. So, consider that confirmed? :)

Feature Request: a production summary by ware that shows the quantity produced per hour and the quantity consumed per hour by all configured modules would be incredibly useful for verifying that I've added everything up properly. It would also make it easier to see the impact of shipbuilding on my resource chains.
thanks, I'll have a look this weekend. As for a new feature that will have to be down the line. Not getting much chance to spend on X3. If it wasn't for Galaxy Tab I wouldn't be able to follow the posts :-(

LA

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

Post by Logain Abler » Wed, 5. Jan 11, 19:12

Great spot JoeTheDestroyer,

I have my version on USB stick, and I've just downloaded the uploaded version.

Using XML my version shows:

Code: Select all

if size of array $energy.Array
  append $energy.Array to array $split.ware.Array
end
Uploaded shows

Code: Select all

if size of array $salvage.Array
  append $energy.Array to array $split.ware.Array
end
I must have missed an updated file from the last update :oops: I can't test or upload a new full update, but I'll upload the corrected file.

No wonder I wasn't seeing the issue, error between keyboard and chair!

Cheers fella :-)

I will give your addition a run this weekend (pending Girlfriend time) I think it's an addition most users of PM will love.

LA

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

Post by Logain Abler » Wed, 5. Jan 11, 19:18

PM Bug Fix: 05/01/2011

Fix for PM display of Energy producing Modules

Link

LA

Goncyn
Posts: 96
Joined: Fri, 17. Jan 03, 02:51
x4

Post by Goncyn » Wed, 5. Jan 11, 19:34

Thanks for the quick fix! As for having time to play X3, no worries, this game is a huge time suck for sure. Also interesting to hear that the Galaxy Tab has at least one fan.


JoeTheDestroyer
Posts: 36
Joined: Wed, 14. May 08, 01:40
x3tc

PM-RnD v7.2-001 released

Post by JoeTheDestroyer » Thu, 13. Jan 11, 17:19

Ok, the first version of my research addon for PM has been released:
PM-RnD v7.2-001

Please post any questions or bug reports in that thread, so we can avoid bugging Logain about stuff not related to his code. Thanks!

-Joe

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

Re: PM-RnD v7.2-001 released

Post by Logain Abler » Fri, 14. Jan 11, 09:47

JoeTheDestroyer wrote:Ok, the first version of my research addon for PM has been released:
PM-RnD v7.2-001

Please post any questions or bug reports in that thread, so we can avoid bugging Logain about stuff not related to his code. Thanks!

-Joe
Shiny :-)

Will give this a try, hopefully a welcomed addition.

LA

Link added to OP.

kotorone1
Posts: 546
Joined: Mon, 9. Aug 10, 20:14
x3tc

Post by kotorone1 » Sun, 23. Jan 11, 22:03

So... does this now work with v 3.0 of X3TC? I

JoeTheDestroyer
Posts: 36
Joined: Wed, 14. May 08, 01:40
x3tc

Post by JoeTheDestroyer » Mon, 24. Jan 11, 08:09

kotorone1 wrote:So... does this now work with v 3.0 of X3TC? I
Yes, I'm running it with 3.0 right now.

---

On another note, I have two more bugs to report.

First, salvaging the Goner Ranger doesn't work. I could select it in the menu, and it ate the ship, but no salvage task showed up and no blueprint. I assume this is because this ship is GO-class (kind of silly, since it should be M3). I wouldn't spend much (if any) time fixing this, though, as the ship is pretty terrible. It's the only ship in that class so it might be better just to filter it out of the Salvage menu.

Second bug is a little more significant. When building stations using multiple modules, the cap check isn't calculated correctly. For example, I tried building an SPP XL using 4 modules. I had the cap set to 5. After the first (or maybe it was second, not sure) station finished, it reported "Cap Reached".

I believe the problem is in plugin.LI.PM.Supply.Module.xml:

Code: Select all

051   * Cap Check
052   skip if not $offset > 1
053     $amount = $amount * $offset 
There's no check in the above for if it's a station being built. Changing line 52 to "skip if not $offset > 1 and $type != 6" should fix it. (I see that ship building uses a different code path for the cap check so it doesn't suffer from this.)

Later!
-Joe

Brian5001
Posts: 14
Joined: Wed, 9. Dec 09, 03:37
x4

Post by Brian5001 » Sat, 16. Apr 11, 07:16

I'd just have to say, this mod completely blows me away by how much is available.

Personally, I'd love to see versions of this that would integrate with the XTC and DDTC mods.

The problem with integrating with DDTC would actually be the modified HQ, since DDTC uses the stock Egosoft HQ for the features and such. But then, if this is that much better than the stock HQ, I'd go for this, for sure.

DDTC uses Pelador's DAD mod and adds a ton of ships and a little over a dozen stations to the game, not to mention a lot of extra AI scripting, that enhances the gameplay and allows for varied difficulties. If this could be made to work with DDTC, I'd love to use it during my gametime.

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

Post by Logain Abler » Sat, 16. Apr 11, 12:47

Brian5001 wrote:I'd just have to say, this mod completely blows me away by how much is available.

Personally, I'd love to see versions of this that would integrate with the XTC and DDTC mods.

The problem with integrating with DDTC would actually be the modified HQ, since DDTC uses the stock Egosoft HQ for the features and such. But then, if this is that much better than the stock HQ, I'd go for this, for sure.

DDTC uses Pelador's DAD mod and adds a ton of ships and a little over a dozen stations to the game, not to mention a lot of extra AI scripting, that enhances the gameplay and allows for varied difficulties. If this could be made to work with DDTC, I'd love to use it during my gametime.
If you use the script on it's own it should work with any mod.

LA

Brian5001
Posts: 14
Joined: Wed, 9. Dec 09, 03:37
x4

Post by Brian5001 » Sat, 16. Apr 11, 17:04

Alright, I'll put this on my list of things to give a whirl.

I'm a Beta-Tester for the DDTC mod, and I'm trying to cut my teeth on modding the game, myself.
DDTC just went v1.3!

User avatar
only-one-jack@hotmail.com
Posts: 31
Joined: Mon, 16. Aug 10, 20:51

buggy menu

Post by only-one-jack@hotmail.com » Wed, 4. May 11, 00:53

has anyone else had problems with the pm/fdn menu getting gliched and not being possible to close this is realy anoying i can not progress in my game in any way like this

UPDATE: to be exact it is in the {FDN node menu} if i open it it will never close so i cant enable my node , and also in the blueprint manager did i install somthing wrong or i just missing somthing?

DISSREGUARD: it seems the problem is i used the bugfix without updateing to the newist verson i didnt see that it was a new one :?

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

Re: buggy menu

Post by Logain Abler » Wed, 4. May 11, 12:19

only-one-jack@hotmail.com wrote:has anyone else had problems with the pm/fdn menu getting gliched and not being possible to close this is realy anoying i can not progress in my game in any way like this

UPDATE: to be exact it is in the {FDN node menu} if i open it it will never close so i cant enable my node , and also in the blueprint manager did i install somthing wrong or i just missing somthing?

DISSREGUARD: it seems the problem is i used the bugfix without updateing to the newist verson i didnt see that it was a new one :?
Cool, all sorted then. My kind of issue!

LA

Post Reply

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