[MOD] Slightly More Useful Plot Station (27.02.2015; 3.60 and Linux-compatible)

The place to discuss scripting and game modifications for X Rebirth.

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

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Rubini wrote:Ok, then now i have 2 steel refinery and 2 reconfigurable material fabricator plus some turrets and shields (the URV wharf itself is just at 10% now - it´s not easy to find all necessary resources for all these buildings since the beggining - that old missing wares bug, remember?) :wink:
The required materials should be built by the station itself, if you get as far as building the Reconfigurable Fabricators. Will take a very long time, though.
Rubini wrote:But in my prodution, only RM is being produced. Seems that it eats all disposable ore and then no "enough"resources for bio-optic wirng. I also noted that the FR&RMP "prodution" queue yet even didn´t appeared on my "production modules". Is this to be this way?
Production on the Reconfigurable Fabricators should switch between Bio-optic Wiring, Fusion Reactors, and Reinforced Metal Plating. It has to finish a production cycle before it switches though, so it has to finish production of that bio-optic wiring first, after which it should switch to fusion reactors.

It is possible that there isn't enough storage space if the storage isn't upgraded yet. (Fully upgraded, there's plenty of storage.) Could you please check to see if there is still empty Bulk storage space to accommodate more ore? All of the production lines do need a lot of ore.

edit: Just checked. Refined Metals production needs 400 units of ore, while Bio-optic Wiring needs 1040 units of ore.
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

Thanks by the inputs mate!
Ok, now I already have bio-optic wiring in producion by one of the reconfigurable material fabricator! Good!

It was also the silicon that was just a few. Now i have two mining vessels and then things are beggining to be more stable.

A question: is posiible to halt a producion of one ware specificaly? I shoul like to halt (or stop for a while) the Refine metal producion. :?:
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

It's not possible at the moment, no. As soon as a production line is built, it will keep producing as long as it has resources and space allotted to the product. One thing you can do to stop a line's production is to transfer wares that are used by only that line to a freighter via the "Transfer wares" command. Which one do you want to stop?

edit: sorry, just read that you want to stop RM production. That's hard. Refined Metals production only uses energy cells, food rations, and ore. Those three are also used by all of the other production lines.
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

w.evans wrote:It's not possible at the moment, no. As soon as a production line is built, it will keep producing as long as it has resources and space allotted to the product. One thing you can do to stop a line's production is to transfer wares that are used by only that line to a freighter via the "Transfer wares" command. Which one do you want to stop?

edit: sorry, just read that you want to stop RM production. That's hard. Refined Metals production only uses energy cells, food rations, and ore. Those three are also used by all of the other production lines.
Ok, understood. And RM is used in RMF and FR prodution (also bio-op. in v11). Also noted that you increased the RM usage on v11. It was left so much in v10?
Also noted in my station that i have a limit storage for each ware/resource. Then when i reach this valour its prodution will stop ( 36378m3 for RM)?

Edited: 36378 units of RM. The game is a bit confuse because it haves sometimes limits in units , sometimes in m3.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Sparky's suggestion

Later found out that it probably won't be a problem because of the limits that are set on each resource, but decided to keep the increase to RM usage because it wasn't balanced the way I thought it was, and because it could still turn out to be a problem because the plot station wasn't designed to be used the way that we're using it, and there's still the possibility that at some stage (like with everything except storage fully upgraded), it might not have enough storage to handle all of the production lines.

I had thought that it was balanced such that one RM line will not produce enough RM for both SMUPS fabricators, while two will produce too much. It turned out that one RM production line produced enough RM to service both SMUPS fabricators AND both URV production lines. So I thought that that's way too much.

Also thought that metal would be useful to make drones.

Idea is that the plot station should be something that will help kick-start the industrial development of DeVries, as the plot dialogue states, do that in a way that uses only resources available in an under-industrialized DeVries, but it shouldn't be much of a money-maker.

(Gut balance point is that it should be useful at that point in the plot; but once you start building other stations, you shouldn't want to build any more of the plot station.)

edit: @Sparky, sorry, overlooked this:
Sparky Sparkycorp wrote:Hmm, not sure it's idea for this mod as they would be a bit powerful from a "fire and forget" perspective. Plus the uniqueness aspect would be lost, which would be a shame.

Still, if it is what you are interested in then that is reason enough. No point limiting your enjoyment and it could easily lead to other cool ideas later.
I agree. Was thinking more along the lines of your and Yorrick's "gigantic station mod" idea. Don't have much time to do anything big at the moment, though, so I'll shelf it for now. (Unless someone else wants to take it on?)
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

Now i have the 2 FR prodution working too! Very good. :wink:
So, seems that all is working at my end too. Don´t forget that i started the mod when already had built the first early stage and without any save game edit!

About the usage or later development of this station into the game, well, i'm yet a rookie at X:R, but I agree that we need to make it very slow and very low profitable (if any). Isn´t possible (and perhaps easy) to adjust it´s wares prodution in amount and time? Isn´t this enough to adjust this issue?

Also isn´t the storage issue a problem/concern for any station on the game?

PS: i tested also that mod ""Preallocated Resources for Station Building" and it works very well! The code runs background each 60s adding wares ONLY for the CV when it needs them (to build/repair things) it is flawless! This was the way that i built and tested SMUPS as above. I have tried before without it but didn´t found enough FR/RMP (or just in few amounts per long time), it will last forever to built each extension and so on. The mod is very good because don´t mess with the game´s balance neither deplet its resources. My only concern is that it should use some money to add these wares/resources. i guess that this could be a relatively easy thing to implement. Can you help me with code suggestions? We need to know the wares that were added, precify then and subtract from architect reserve. The code is this one (cooperzinc's original code):

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<mdscript name="BuildModuleCatcher" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
	<cues>
		<cue name="BuildModuleCatcher" instantiate="true" namespace="this" checkinterval="60s">
			<actions>
				<set_value name="$ships" exact="null" />
				<find_ship name="$ships" multiple="true" space="player.galaxy">
					<match owner="faction.player" negate="false" />
				</find_ship>
				<do_all exact="$ships.count" counter="$i">
					<set_value name="$CurShip" exact="$ships.{$i}"/>
					<do_if value="$CurShip.exists">
						<do_if value="$CurShip.buildmodule.exists">
							<set_value name="$BuildModule" exact="$CurShip.buildmodule" />
							<set_value name="$NeededWares" exact="$BuildModule.neededslotresources.list"/>
							<do_all counter="$Counter" exact="$NeededWares.count">
								<set_value name="$NeededCount" exact="$BuildModule.neededslotresources.{$NeededWares.{$Counter}}.count" />
								<set_value name="$NeededWare" exact="$NeededWares.{$Counter}" />
								<do_if value="$CurShip.cargo.{$NeededWare}.count lt $NeededCount">
									<add_cargo exact="$NeededCount - $CurShip.cargo.{$NeededWare}.count" object="$CurShip" ware="$NeededWare" />
								</do_if>
							</do_all>
						</do_if>
						
					</do_if>
				</do_all>
			</actions>
		</cue>
	</cues>
</mdscript>
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Code: Select all

<reward_player money="-[how much money you want to pay]" />
should remove the money from your account for paying. But it would be better if you could look up the price that the station set to buy the wares and reduce that.

Unless you get permission from copperzinc, you probably shouldn't release a mod of his mod, though.

edit: Ah! From the mod page at the Nexus:
http://www.nexusmods.com/xrebirth/mods/213/? Credits and Distribution Permission wrote:Modification permission
You are allowed to modify my files and release bug fixes or improve on the features so long as you credit me as the original creator
Asset use permission
You are allowed to use the assets in this file without permission as long as you credit me
So I guess it would be ok to release as long as you give credit. But would still be nice to ask.
Rubini wrote:About the usage or later development of this station into the game, well, i'm yet a rookie at X:R, but I agree that we need to make it very slow and very low profitable (if any). Isn´t possible (and perhaps easy) to adjust it´s wares prodution in amount and time? Isn´t this enough to adjust this issue?
I think it's ok now, but I'm not actively testing it at the moment. Do you think that production rates are still too high?

edit: I posted some profitability projections here a couple of days back:

http://forum.egosoft.com/viewtopic.php? ... 45#4495145
Rubini wrote:Also isn´t the storage issue a problem/concern for any station on the game?
Yes, but the ware limits should take care of that. It seems to be ok in smups too, but I'm keeping an eye on storage because we changed the station's ware usage without changing storage, and I'm worried that since the ware balance needed was changed, that the storage might not be enough anymore. Like I said, I think it's ok. The original plot station also requires few container and energy storage while needing lots of bulk, same as with smups. Just, if you find production stopping for some reason, it would be a good idea to check the storage.
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

Ok, understood about storage issue. I will leave my game running in background all day at that point without fights or any other game progress just to see what will happens with the station production/storage. More on this later. :thumb_up:

About old mods issues, the problem is that normally the author isn´t more interested in change the code. I bump the thread 3 days ago and nobody replied. Anyway i will never release anything in public without permission. The idea is for my own use for now. :wink:

I will take a carefully look at NPC_Architect.xml to try to figure out how to make the calc for created ware's and then subtract it from player or architect account. That mod is now a bit much for cheat side for my taste. If i achieve to precify it then it will be perfect.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

If I understood the description of copperzinc's mod correctly, I think that the prices for construction vessels were increased to compensate? I'm not running the mod myself, so I'm not sure if that's how it works, or if it was later changed.

Thanks for the feedback, Rubini!
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

No, copperzinc´s mod only have two files (one is the code tthat I posted above). The other one is wares.xml that modifies slight the wares for CVs. Didn´t touch money in any place.

The game is running and SMUPS is going well ... :wink:
User avatar
YorrickVander
Posts: 2767
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

If no response from copperzinc, feel free to use my version. It's likrly pretty similar anyway :) This one does not modify the CV build cost via the wares though it's pure cheat for testing stuff. Just tell the architect you'll supply the wares and off it goes.

https://drive.google.com/file/d/0BzGfez ... sp=sharing
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

YorrickVander wrote:If no response from copperzinc, feel free to use my version. It's likrly pretty similar anyway :) This one does not modify the CV build cost via the wares though it's pure cheat for testing stuff. Just tell the architect you'll supply the wares and off it goes.

https://drive.google.com/file/d/0BzGfez ... sp=sharing
Thanks YorrickVander!
Do your version subtract the correponding added wares price from architect account? If no, it´s possible to make it?
I guess that this way it changes from "cheating' to an "workaround" mod for some "bugs" on early plot. What you think?
User avatar
YorrickVander
Posts: 2767
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

No, as I said, pure cheat. Shouldn't be hard to do though :) I made it for testing specific game conditions without having to restart with pre-mades.

The mod operates using 2 very similar changes that operate on the base stage and then the second pair of patches covers all upgrades. At the lines reading like so :

Code: Select all

[
<add_cargo exact="$BuildModule.neededslotresources.{$NeededWares.{$Counter}}.count" object="$actor.ship" ware="$NeededWares.{$Counter}"/>
/code]

you can also add a base cost reference for the ware and (i'm not on my windows box to test but something like) <reward_player X /> with a negative amount to remove cash. Probably in common.xsd or md.xsd for the reward_player argument lookup :)
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

Thanks again YorrickVander!

I made it!!! My first serious code!:p

I spent my entire night (it is hollyday here in Brazil) and made it!
I opted by cooperzinc´s background code as a start point because its is very discreet and runs hide in background without messing with anything. No wares.xml, no NPC _architect.xml files, nothing more is needed. Just his background code.

I then figure out how to identify the correct Architec from each player CV, subtract each and correct ware price used for build/repair/upgrade, adjust the Archtitec account accordingly and some others goodies like on PDA info for any imporatnt operation, etc. All this in background and in real time, i mean, the account adjust happens at same time that the architec use each wares and so on. Works very good!

So, IMHO, now we have a fix for those missing (or very difficult to find) wares on the main plot. Also can be used just for get rid of some very slow parts of the game (sometimes to buid just one almost complete thing you spent all your week freetime). Not more a cheat but a mod.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

@Rubini, Congrats! Hopefully the first of many!

Where's the download link? Gimme gimme!
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

w.evans wrote:@Rubini, Congrats! Hopefully the first of many!

Where's the download link? Gimme gimme!
Thanks!
My wife give me a very cold congrats. I´m now worried by my computer future...a woman can be very dangerous!! :lol:

I can´t publish it until cooperzinc´s contact/allow me to do it. Or at least will wait a bit more time.


Here the already done readme:
Automated CV´s v0.10 15/02/2015 X:R 3.20 compatible
========================================

Mod by cooperzinc and Rubini.
===================

Yours CVs are now self sufficient ... but needs money!

This was made because until patch 3.20 some resources/wares are too rare (or even absent for long time) what doesn´t allow the player to finish/build some stations in our real life condition. This mod fix also the early plot Reinforced Metal Plate and Fusion Reactors main issues. It´s save game compatible, can be enabled and used at any point on your game.

The mod uses a very expert code from cooperzinc (just one file) that runs all the time in background looking for any player CV that needs wares/resources for building, upgrade or repair at any time. Note that stations routines aren´t touched, this mod is really only for CV build things.

Also you need money. This automated routine isn´t cheap and all wares/resources bought by it are always at the max price to pay trade expenses. If the Architec haven´t enough money, the negative balance (if any) is automatically debited from player account and the operation - the automated CV´s trade - is halted until new architec funds are provided (note that the build process will continues until already disposable resources vanishes, as it must be).

The mod also provide a lot of in game info about the automated CV's trades and also for CV's architects state, in your PDA and logbook. To the automatted routine works the architect needs at least 250.000cr. And to finish, the automated CV's trade routine isn´t really fast (isn´t a cheat, remember? :) ), eventually to acquire all resouces/wares may take a while. You can play with architects credits at any time, even during building phases. The automated routine will always respond accordingly.

This is a work in progress. AFAIK it don´t harm your game, but as any mod, futher tests are yet needed.

Many thanks to cooperzinc, the author of the main code. I just tweak and add things to his code. The most important added aspect, IMHO, is the trade side of this Automated CV´s routine; so, now you really need to pay correctly for the wares/resources used to build things as it must be, not more at the cheat side.
Obviously I´m yet on early plot (making the first URV Wharf), so this mod isn´t extensivelly tested ahead.
Do you think that i can release it even without the cooperzinc contact?
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Rubini wrote:Do you think that i can release it even without the cooperzinc contact?
Better with permission, as you know. But copperzinc did put this in his Permissions at the Nexus:


Although I'm not sure if that's one of the default options when uploading at the Nexus, in which case he might not have actually chose to give those permissions. (I usually skip through the permission stuff when I'm uploading, so I'm not entirely sure what the defaults are anymore.)

Can't you base it on the code that Yorrick gave you instead?
Rubini
Posts: 452
Joined: Mon, 7. May 07, 05:17
xr

Post by Rubini »

w.evans wrote: Can't you base it on the code that Yorrick gave you instead?
I´m not sure if using the architect file will work OOZ far way and for dozens of CV´s at same time. Also the cooperzinc unique file is just that clean for game mods matters. He already is in contact, i send the mod for him. Let´s wait for his comments then. :wink:
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

20.Feb.2015 - v0.20 is up!

Production methods are now completely customized to this mod. Improves compatibility, but requires save edit if Plot Station is already built.

With X:R v3.50, it is now possible to specify custom production methods. This greatly increases compatibility with other mods, as well as with future updates. For example, older versions of this mod used method="devries" which were, and still are, undefined for the products produced by the SMUPS. However, if a different mod were to use the same production method, or if an update were to make more Canteran factories, thus increasing the number of products made via method="devries," there would be conflicts between the new developments and this mod.

This update REQUIRES X:R v3.50

If you are using X:R v3.20, please download SMUPS v0.11

The downside to this is that this update requires you to edit your save if the Plot Station (URV Integrative Forge) has already been built in your game. Sorry, but there is no other way to do this since the production method is saved in the save file. It's fairly straightforward, however.

1st Step:

Find:

Code: Select all

<item ware="drp_surfaceminer_mk1" method="devries"/>
<item ware="drp_scoopcollector_mk1" method="devries"/>
<item ware="drp_interceptor_mk1" method="devries"/>
<item ware="drp_construction" method="devries"/>
<item ware="drp_cargolifter" method="devries"/>
2nd Step:

Replace that with:

Code: Select all

<item ware="drp_surfaceminer_mk1" method="smups"/>
<item ware="drp_scoopcollector_mk1" method="smups"/>
<item ware="drp_interceptor_mk1" method="smups"/>
<item ware="drp_construction" method="smups"/>
<item ware="drp_cargolifter" method="smups"/>
Note that there may be two instances of that block if you've already built both URV Wharves. If so, replace both instances.

3rd Step:

Find:

Code: Select all

<item ware="bioopticwiring" method="devries"/>
<item ware="fusionreactor" method="devries"/>
<item ware="reinforcedmetalplating" method="devries"/>
4th Step:

Replace that with:

Code: Select all

<item ware="bioopticwiring" method="smups"/>
<item ware="fusionreactor" method="smups"/>
<item ware="reinforcedmetalplating" method="smups"/>
There may again be two instances of that block if you've already built both Reconfigurable Material Fabricators. If so, replace both instances.

If there are any problems with the update, please do not hesitate to let me know.
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

Interesting.

Is this for Rebirth 3.20 or the 3.50 beta?

Return to “X Rebirth - Scripts and Modding”