[Script] PM-Research and Development v7.2-003 (Mar 08 2011)

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

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

[Script] PM-Research and Development v7.2-003 (Mar 08 2011)

Post by JoeTheDestroyer »

PM-Research and Development v7.2-003 (Mar 08 2011)
An add-on for Logain Industries Production Modules (PM) v7.2

Introduction:
Logain Industries Advanced Technologies Division is pleased to offer access to our research labs.

We are now providing two new services, Ware Research and Production Research. With some samples of a ware, you will be able to use Ware Research to create a ware blueprint directly (rather than from salvaging a station). Production Research will allow you to increase the efficiency of ware production (a blueprint from salvaging an S-sized factory can be doubled to M-size or even higher).

Requirements:
PM-RnD is an ADDON to Logain's PM script/mod, you must install it first!
The EXACT matching version of PM is required. (You can tell the matching version by the version number, in which the first part will always match the compatible PM version. So, for PM-RnD v7.2-001, the compatible version is PM v7.2)

Download Links:
http://www.barkergang.us/joe/x3tc/pm-rnd-7.2-003.zip

Technical Info:
No additional resources are used beyond what PM already uses.

Installation:
Copy the folders in the archive into your X3TC directory, overwritting where necessary.
This guide by Cycrow may be useful if you're having issues.

Thanks:
Thanks to Logain for creating such a great script/mod. It's really taken the hassle out of my production management.
Thanks to Whimsy for Exscripter. I would have given up on this project long ago without it.
Thanks to darkangel666 for his work on translating this mod to German.

Changelog:
v7.2-001 - Jan 13 2011
  • Initial release
v7.2-002 - Jan 29 2011
  • FIX: Added audio indicators for error conditions
  • FIX: Stopped research tasks from showing up in Storage Management
  • ADD: The maximum number of wares required for research is now capped (defaults to 5000)
  • ADD: The research time can now vary based on cost (but still defaults to flat 10 minutes)
  • ADD: The main research menu now also shows the number of wares desired for research (color-coded)
  • BONUS: While fixing the Storage Management, I added code to sort the list similar to other PM menus
  • BONUS: Setting caps in Storage Management also updates Lucike-script compatible limits (but only if they are either not set, or equal to the PM value)
v7.2-003 - Mar 08 2011
  • Added German translation from darkangel666
Last edited by JoeTheDestroyer on Tue, 8. Mar 11, 21:52, edited 6 times in total.
JoeTheDestroyer
Posts: 36
Joined: Wed, 14. May 08, 01:40
x3tc

User's Guide

Post by JoeTheDestroyer »

PM-RnD User guide

Introduction:
PM-RnD allows you to create blueprints for wares that either don't have stations that produce them, or the stations are bugged or impossible to get. Additionally, it allows you to increase the size of blueprints above what can be normally obtained.

Access:
To access the new RnD capabilities, select "Configure Research Modules" from the PM Host Menu (NOT the Main Menu).

[ external image ]

Research Menu:
The research menu has two sections, one for each type of research. The upper section is for Ware Research, and lists the wares on the host ship/station that can be researched. The lower section is for Production Research and lists the blueprints on the host ship/station that can be improved.

[ external image ]

Ware Research:
After selecting a ware in the Research Menu, a research proposal will be displayed. Here you can see various information about the research before accepting.

[ external image ]
  1. Research costs:
    Here you will see the cost of the research if approved. Research will always consume some number of units of the ware to be researched as well as credits. The total cost of the research is 3 times the (estimated) cost of a small factory that produces the ware. 10% of this cost must be payed in credits. The other 90% comes from the sample wares, which must be supplied in numbers equivalent to that value.

    However, sometimes the desired number of wares is not available (or too hard to get). You may, instead, supply a smaller number of wares, but you will pay a penalty in credits (up to 35 times the factory cost). For example, to research the Terran Point Singularity Projector normally requires 38 samples and 4,461,628 credits. However, if you only have 1 PSP, you may still do the research, but it would now cost 507,634,428 credits.

    This link provides a list of best- and worst-case costs for all supported wares in vanilla X3TC.
  2. Blueprint details:
    These are the details of the blueprint that will be created.

    Note that blueprints that require food will always be created to use the food of the Default Race as set in PM Options (in the above case, Boron).
  3. Begin Research:
    Select this to approve the research costs and begin research. The research process requires approximately 10 minutes.
Production Research:
After selecting a blueprint in the Research Menu, a research proposal will be displayed. Here you can see various information about the research before accepting.

[ external image ]
  1. Research costs:
    Here you will see the cost of the research if approved. Production research only requires credits, no wares. The cost of the research is equal to 1.5 times the difference between the (estimated) factory cost of the current blueprint and the new blueprint. Put another way, the total cost is the same if you research from S to M, then M to L, or if you go straight from S to L.
  2. Blueprint details:
    These are the details of the blueprint that will be created.
  3. Size selection:
    Here you may select which size you wish to increase the blueprint to. (By default the next larger size is selected.)
  4. Begin Research:
    Select this to approve the research costs and begin research. The research process requires approximately 10 minutes.

    When research has completed, the current blueprint will be replaced by the new blueprint. However, any current production modules using the old blueprint will not be affected, they will need to be manually deleted, and replaced with modules using the new blueprint.
FAQ
  1. Research costs too much, can you make it cheaper?
    I've examined the costs extensively and I believe I've hit the right balance between utility and cost. So no, unless there is a huge outcry, I won't be changing costs.

    However, all the cost ratios are set in the t-file ("t\9913-L044.xml"), so you can change them there if you want something different. The new values will be read the next time you load a savegame (no need to restart).
  2. Does this work with non-standard wares from other scripts and mods?
    Theoretically, yes. Any new laser, shield, missile, bio or food ware should work out of the box. However, bear in mind that this hasn't been tested.

    Tech wares are, unfortunately, a different matter. For technical reasons, I had to further classify tech wares into categories such as "ammunition" and "drones". This list is stored in the t-file, and any new tech wares will need to be added for them to be supported. If you know a little about xml this wouldn't be too hard to do yourself (I've commented all the relevant sections.)
  3. The research time is too short/long, can you change it?
    The default research time of 10min is set to be similar to the salvage times in PM.

    However, the research times are configurable in the t-file ("t\9913-L044.xml"). The times can even be configured to vary based on research cost.
Last edited by JoeTheDestroyer on Sun, 30. Jan 11, 06:32, edited 2 times in total.
JoeTheDestroyer
Posts: 36
Joined: Wed, 14. May 08, 01:40
x3tc

Post by JoeTheDestroyer »

<reserved>
User avatar
mostlikely
Posts: 157
Joined: Sat, 29. Nov 03, 23:20
x4

Post by mostlikely »

Thanks.. I'm going to try this tonight.
User avatar
mostlikely
Posts: 157
Joined: Sat, 29. Nov 03, 23:20
x4

Post by mostlikely »

Works as advertised. ;) Very nearly done and well-documented.
I'l keep using (and testing it) ofc.

The research cost seems fine after you find out how much it goes down when you get more of the required wares. Personally I think research time (always 10 min?) is rather short. My gut feeling is that 1 hour for the most basic wares would be fine and that it should scale (in a way) with research cost.

If the research time was longer you could do interesting things like offer the user the option to make the research a 'rush job' (x2 cost, x0.66 time) or a 'detailed examination' (x0.5 cost, x8 time). Also the option to spend more time/cost to research a ware without consuming the required amount (you get a percentage back after the research) might be an interesting trade-off.

Al in all a very nice addition to PM.
JoeTheDestroyer
Posts: 36
Joined: Wed, 14. May 08, 01:40
x3tc

Post by JoeTheDestroyer »

Thanks for the feedback!
mostlikely wrote:how much it goes down when you get more of the required wares
Yes, I didn't mention it above, but the penalty function is quadratic. So if you're only a few below the required number, the cost doesn't go up much at all. Conversely, if you only have 1, finding one more can reduce the cost significantly (for example, around 50mil credits when going from 1x to 2x Point Singularity Projectors).
mostlikely wrote:Personally I think research time (always 10 min?) is rather short. My gut feeling is that 1 hour for the most basic wares would be fine and that it should scale (in a way) with research cost.
It's currently set at 10min because that matches what PM uses for salvage tasks. However, the code is already mostly in place to make the time scale, I'd just need to find a good formula for the scaling.

While I agree that longer times would be more realistic, as a gamer I find time sinks annoying (especially for casual gamers with limited play time). For that reason, I probably would want the maximum time to be no longer than an hour.

(Incidentally, the research time is also configurable by changing the t-file.)
mostlikely wrote:If the research time was longer you could do interesting things like offer the user the option to make the research a 'rush job' (x2 cost, x0.66 time) or a 'detailed examination' (x0.5 cost, x8 time). Also the option to spend more time/cost to research a ware without consuming the required amount (you get a percentage back after the research) might be an interesting trade-off.
Interesting ideas...

---

One other thing I'm considering is putting an upper cap on the number of wares required. For things like lasers it's not a big deal, but for some of the cheaper wares the required numbers can get a little ridiculous.

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

New version 7.2-002

Post by JoeTheDestroyer »

New version released:
http://www.barkergang.us/joe/x3tc/pm-rnd-7.2-002.zip

Changelog:
v7.2-002 - Jan 29 2011
  • FIX: Added audio indicators for error conditions
  • FIX: Stopped research tasks from showing up in Storage Management
  • ADD: The maximum number of wares required for research is now capped (defaults to 5000)
  • ADD: The research time can now vary based on cost (but still defaults to flat 10 minutes)
  • ADD: The main research menu now also shows the number of wares desired for research (color-coded)
  • BONUS: While fixing the Storage Management, I added code to sort the list similar to other PM menus
  • BONUS: Setting caps in Storage Management also updates Lucike-script compatible limits (but only if they are either not set, or equal to the PM value)
Mad_CatMk2
Posts: 518
Joined: Sun, 22. Feb 09, 20:13
x4

Post by Mad_CatMk2 »

Amazing, MOD integration...

Good work!
I fly an OWP. What about you?
JoeTheDestroyer
Posts: 36
Joined: Wed, 14. May 08, 01:40
x3tc

Post by JoeTheDestroyer »

Thanks! :D

-Joe
darkangel666
Posts: 526
Joined: Mon, 16. Feb 09, 13:57
xr

Post by darkangel666 »

Is there or will come any german translation? It would be great :)
Eventually i could translate it if you want but i think this would take a while.
JoeTheDestroyer
Posts: 36
Joined: Wed, 14. May 08, 01:40
x3tc

Post by JoeTheDestroyer »

darkangel666 wrote:Is there or will come any german translation? It would be great :)
Unfortunately, english is my only language, so I can't supply this myself. However, if someone were to supply me the translated t-file, I'd be happy to include it.

-JoeTD
darkangel666
Posts: 526
Joined: Mon, 16. Feb 09, 13:57
xr

Post by darkangel666 »

Well, okay. :)
The iv'e got a new project for next week ;)
Maybe i got it in 2 days. But i can not promise it. It is the 9913-L044.xml right?
JoeTheDestroyer
Posts: 36
Joined: Wed, 14. May 08, 01:40
x3tc

Post by JoeTheDestroyer »

darkangel666 wrote:Well, okay. :)
The iv'e got a new project for next week ;)
Maybe i got it in 2 days. But i can not promise it. It is the 9913-L044.xml right?
Yep, that's the one.

-JoeTD
darkangel666
Posts: 526
Joined: Mon, 16. Feb 09, 13:57
xr

Post by darkangel666 »

Okay. I'm writing you an PM when i translated it.
JoeTheDestroyer
Posts: 36
Joined: Wed, 14. May 08, 01:40
x3tc

New version 7.2-003

Post by JoeTheDestroyer »

New version released:
http://www.barkergang.us/joe/x3tc/pm-rnd-7.2-003.zip

Changelog:
v7.2-003 - Mar 08 2011
  • Added German translation from darkangel666
darkangel666
Posts: 526
Joined: Mon, 16. Feb 09, 13:57
xr

Post by darkangel666 »

Waaah i mentioned in the credits ^^

---------------------------------------------------------------------------------------

English/Englisch:
The translation will be fixed as soon as possible because i translated salvage wrong. If somebody see any errors or something please contact me.

German/Deutsch:
Ich habe den Begriff "salvage" falsch übersetzt. Fix erfolgt so schnell wie möglich. Wenn jemand irgendeinen Fehler findet, dann einfach kontaktieren.

---------------------------------------------------------------------------------------
Varek Raith
Posts: 331
Joined: Thu, 23. Aug 07, 21:33
x4

Post by Varek Raith »

Very nice.
One minor thing I noticed. While using this script the Factories section of the encyclopedia gets filled, even if I've never found them.
Halconnen
Posts: 831
Joined: Sun, 22. Feb 04, 12:55
x3tc

Post by Halconnen »

I'm aware Joe hasn't posted here since March, but I figured I'd give it a shot and report this anyway.

I assume the wares you can research are hardcoded into the scripts somewhere? New weapons added by mods do not seem to be researchable. Makes me a sad monkey. >:
JoeTheDestroyer
Posts: 36
Joined: Wed, 14. May 08, 01:40
x3tc

Post by JoeTheDestroyer »

Halconnen wrote:I assume the wares you can research are hardcoded into the scripts somewhere? New weapons added by mods do not seem to be researchable. Makes me a sad monkey. >:
Some wares (specifically, tech wares) are hard coded. Nothing else is. So, in theory, any new lasers/shields/missiles should work, but it's not something I actually tested.

Unfortunately, I'm pretty busy IRL right now, so it's hard to say when I could look at it.

However, if I do get a chance, I'll need to know what mod you're using that adds the weapons. Also, how is the addon acting, does the weapon fail to show up in the research list at all or is blueprint creation failing? Is research on stock weapons working?
Halconnen
Posts: 831
Joined: Sun, 22. Feb 04, 12:55
x3tc

Post by Halconnen »

I'm using the XRM.

Also whoa, thank you a lot for taking the time to respond here, I wasn't expecting that so quickly. :D

And actually, nevermind. The laser I was missing is now showing up. They don't show up on the list while mounted as weapons on the ship. Blame MARS for shifting the guns around. XD

This is pretty embarassing, I'm sorry.

However, a bug that seems part of the base PM continues to be a problem. The most recently acquired TL doesn't show up on the list to enable PMs on. Once one acquires a new one, the second newest one pops up on the list. Weird, this one.

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