Burianek's Econ Fix v3 (The big one! Fixes every factory!)

The place to discuss scripting and game modifications for X²: The Threat.

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

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Burianek's Econ Fix v3 (The big one! Fixes every factory!)

Post by Burianek » Sat, 13. Mar 04, 09:45

This mod has not been tested to be compatible with X2 version 1.4
You should download and install this instead.

------------------------------------------------------------------
Edit 3/14 - Found an issue with implementation of the mod. I've updated the readme to include the following:

****You may not start a new game with this mod active! You must start a game without the mod, save it, and then enable the mod and
load your game. The reason why is given in the all important implementation section of the readme.***
End edit
------------------------------------------------------------------

The zip file includes a printable microsoft excel worksheet that lists factory performance for every factory in the game under the new parameters.

Please also get information about my version 0.25 fix, which does not require the workaround you will read about in the readme.
It makes fewer changes to the X2 economy but is much more transparent for the player to run correctly. Get info here: http://www.egosoft.com/x2/forum/viewtopic.php?t=38452

Excerpts from readme:
This is the one I always wanted to do. It's still kind of a pain to get it to run correctly, but if you are a true believer that the economy needs this fix, it should be worth it.
This is the last economy fix I'm going to turn out until X2 allows more flexibility in changing economic variables. (I've changed everything I could)

A few general thoughts / themes behind my changes:
I wanted to make it easier / quicker to get started in the game and get to what I consider the good parts (owning multiple ships and factories)
Thus, I wanted to make more factories accessible to the player at the beginning of the game. It takes a long time to get started in this game, I've tried to help.
I didn't want to make the game too easy. If anything, I wanted to make the later portions of the game more challenging for the die hards (like me) out there.
Therefore, high end goods are now more expensive.
There is much more variety among the factories.
The time it takes a factory to pay for itself should be reasonable across the spectrum. Higher tech factories should take longer, but turn a profit more quickly once they're paid off.
(There's a lot of feel involved in just how profitable a highly profitable factory should be. Here's where differing opinions and play testing are required. Let me know what you think)
So this solution has developed a curve fit which gives a reasonable amount of profit given a price of a factory. The formula I use is: Avg Profit / Min = 1.3643 * Factory Price ^ (0.8035)
I like using average profit / min because it represents the true "production benefit" of the factory that you are paying for. This is the profit you'll get if you chain the factory.
This gives me a nice curve that I consider "reasonable," feel free to disagree. Development of the curve is done on the Curve Fit Data Tab
I've thrown in a few racial differences in factory price just to keep things interesting. Ex. Paranid build slightly cheaper Warhead plants (10% cheaper). Specifics on Prices sheet at bottom.

Implementation and Changes:
Prices of goods not used as inputs to any player factory have been changed. These tend to be higher end factories, and the good prices have been raised to make the factory more profitable.
For the basic input factories, I've left the prices of goods, and hence profit / min unchanged. For this reason, the factory prices have been lowered to bring them down to fit on the curve. (except for SPP which needed to be raised, see note at bottom)
To recap: basic factories are cheaper to place them on the curve correctly, adv factories yield a higher profit per minute than previously to place them on the curve correctly.
For advanced factories, for the most part, I kept the general price of each factory pretty close if not identical to where it was originally. (exception: the ones that used to cost 650k have been raised.)
The curve fit then calculates what prof / min should be for that factory,
Then the curve fit calculates an avg price of the good to achieve this profit / min.
The end result is that if you want to make a factory more profitable, you have to make what it produces cost more. (The code does not support making the inputs cost less)
The bad news is, expect to pay more for that Gamma PPC. Expensive stuff is going to get more expensive. Hopefully the increased money you'll be making using these factories will cover it.
There's just no way around this since inputs cannot be played with. (at the moment, and with no change in sight)
Here's the thought though: basic factories are less expensive = game startup is quicker, you move from trader in a crummy ship to factory owner more quickly.
adv wares are more expensive = the late game is a bit more difficult, makes it harder to equip that shiny new M2, (or even M3) lengthens play time for advanced players.
I certainly don't want to make the game too easy (or mind numbingly difficult). It's hard to tell if this is the case w/o putting in a good month of play time. Let me know what you think while playing it.
I really like the idea of making the beginning of the game easier and the end of the game harder though.

The next thing I did was widen out price variation for all high tech goods. There's no reason these should be so tight. (IMHO)
If you've played with one of my previous mods, I've tightened them a bit since version 0.2 though. It was a bit too easy in v 0.2 of my fix to make money trading weapons.
This also helps the early game, as weapons become a very viable option for early game trading. There aren't as many weapon factories scattered around the universe as SPPs, but running guns from factories to
equipment docks can get you on your feet a little more quickly.
This also opens up a great deal of later game trading opportunity. Once you get wealthy enough in the original game, you'd never consider manually trading anything like energy again.
This keeps it moderately profitable to trade high tech goods like adv weapons even into the later stages of the game.

Many more changes and specifics listed in the actual readme.
Last edited by Burianek on Sun, 18. Jul 04, 08:09, edited 4 times in total.
"Nature's first green is gold" . . . stay golden.

VVNZ
Posts: 42
Joined: Fri, 21. Mar 03, 05:47
x2

Post by VVNZ » Sat, 13. Mar 04, 10:04

Oh damn I just got version 02 working! Thanks for your hard work Burianek 8) it's gotta take a lot to make that many changes!

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Sat, 13. Mar 04, 10:13

Over 100+ hours. :wink:
Can you tell I like this game?
"Nature's first green is gold" . . . stay golden.

Miths123
Posts: 34
Joined: Wed, 11. Feb 04, 17:38
x2

Post by Miths123 » Sat, 13. Mar 04, 17:34

I really like the idea you have been working with here, but I just tried unpacking the cat/dat files with StoneD's Xpatch09b (in a temporary directory), and only an empty folder - XData-v3 - is created, as well as an idx file that lists the files that should be in the ...\types folder.

Did you forget to actually pack the files :), or is StoneD's handy little utility unable to unpack it properly for some reason? It has worked flawlessly for me on the gamefiles.

kryptyk
Posts: 483
Joined: Fri, 5. Dec 03, 20:19
x4

Post by kryptyk » Sat, 13. Mar 04, 23:30

@Burianek
So I take it you were successful in making some of the changes you wanted or did you find a workaround???

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Sat, 13. Mar 04, 23:46

Miths123 wrote:I really like the idea you have been working with here, but I just tried unpacking the cat/dat files with StoneD's Xpatch09b (in a temporary directory), and only an empty folder - XData-v3 - is created, as well as an idx file that lists the files that should be in the ...\types folder.

Did you forget to actually pack the files :), or is StoneD's handy little utility unable to unpack it properly for some reason? It has worked flawlessly for me on the gamefiles.
Thery're in there. I tried using Xpatch09b and couldn't get it to work either. Don't know why. X2tool works, you just have to make sure that the folder you're extracting it in contains a types folder already. X2tool won't create folders like Xpatch09b will, it just aborts the extraction if it can't find where to put it. If you have problems extracting the dat with X2tool, let me know and I'll walk you through it. You can use XPatch09b to decompress the pck files though. Still works for those. Funny it won't work for my dat and it works for the game dats. I wonder if they were created differently?

At any rate,
You don't need to extract the files to get them to work though, I actually wouldn't recommend it because it will make it harder to perform the workaround listed in the readme.
"Nature's first green is gold" . . . stay golden.

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Sat, 13. Mar 04, 23:48

kryptyk wrote:@Burianek
So I take it you were successful in making some of the changes you wanted or did you find a workaround???
Yes to both questions, take a look at the txt readme for installation and workaround instructions. Look at the excel readme for what I changed and why I changed what I did.
"Nature's first green is gold" . . . stay golden.

kryptyk
Posts: 483
Joined: Fri, 5. Dec 03, 20:19
x4

Post by kryptyk » Sun, 14. Mar 04, 00:14

Burianek wrote:
kryptyk wrote:@Burianek
So I take it you were successful in making some of the changes you wanted or did you find a workaround???
Yes to both questions, take a look at the txt readme for installation and workaround instructions. Look at the excel readme for what I changed and why I changed what I did.
cool...I'm glad I downloaded it then....sounds like a good mod for a custom galaxy :wink:

kryptyk
Posts: 483
Joined: Fri, 5. Dec 03, 20:19
x4

Post by kryptyk » Sun, 14. Mar 04, 06:50

Burianek wrote:
Miths123 wrote:I really like the idea you have been working with here, but I just tried unpacking the cat/dat files with StoneD's Xpatch09b (in a temporary directory), and only an empty folder - XData-v3 - is created, as well as an idx file that lists the files that should be in the ...\types folder.

Did you forget to actually pack the files :), or is StoneD's handy little utility unable to unpack it properly for some reason? It has worked flawlessly for me on the gamefiles.
Thery're in there. I tried using Xpatch09b and couldn't get it to work either. Don't know why. X2tool works, you just have to make sure that the folder you're extracting it in contains a types folder already. X2tool won't create folders like Xpatch09b will, it just aborts the extraction if it can't find where to put it. If you have problems extracting the dat with X2tool, let me know and I'll walk you through it. You can use XPatch09b to decompress the pck files though. Still works for those. Funny it won't work for my dat and it works for the game dats. I wonder if they were created differently?

At any rate,
You don't need to extract the files to get them to work though, I actually wouldn't recommend it because it will make it harder to perform the workaround listed in the readme.
I didn't have this problem with the x2tool...I ran "x2tool -unpack-dat 01 and it extracted everything perfectly into the folders.....I wonder why you're having problems...????

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Sun, 14. Mar 04, 08:24

Ok, I found the first issue. I've updated the first post to explain, and I've updated the readme file in the zip so that new users aren't affected. Hope it doesn't affect anyone who's downloaded this mod already, but if it does, at least you aren't very far into your new game.
"Nature's first green is gold" . . . stay golden.

kryptyk
Posts: 483
Joined: Fri, 5. Dec 03, 20:19
x4

Post by kryptyk » Sun, 14. Mar 04, 08:55

good news is I using this in my test game so no problems...

Miths123
Posts: 34
Joined: Wed, 11. Feb 04, 17:38
x2

Post by Miths123 » Sun, 14. Mar 04, 16:25

kryptyk wrote:
Burianek wrote:
Miths123 wrote:I really like the idea you have been working with here, but I just tried unpacking the cat/dat files with StoneD's Xpatch09b (in a temporary directory), and only an empty folder - XData-v3 - is created, as well as an idx file that lists the files that should be in the ...\types folder.

Did you forget to actually pack the files :), or is StoneD's handy little utility unable to unpack it properly for some reason? It has worked flawlessly for me on the gamefiles.
Thery're in there. I tried using Xpatch09b and couldn't get it to work either. Don't know why. X2tool works, you just have to make sure that the folder you're extracting it in contains a types folder already. X2tool won't create folders like Xpatch09b will, it just aborts the extraction if it can't find where to put it. If you have problems extracting the dat with X2tool, let me know and I'll walk you through it. You can use XPatch09b to decompress the pck files though. Still works for those. Funny it won't work for my dat and it works for the game dats. I wonder if they were created differently?

At any rate,
You don't need to extract the files to get them to work though, I actually wouldn't recommend it because it will make it harder to perform the workaround listed in the readme.
I didn't have this problem with the x2tool...I ran "x2tool -unpack-dat 01 and it extracted everything perfectly into the folders.....I wonder why you're having problems...????
Worked fine with the x2tool when I tried that - it was StoneD's unpacking utility that could not handle the files properly for some reason.
I wonder if this will be the case for other future mods packed with the official commandline tools?

Anyway, to Burianek, I have a few changes to make to the TRockets file so that is why I wanted to unpack your mod.
In general I think I will want to keep all mods unpacked anyway - I do not consider myself a "modder", but I like playing around a little with ship speeds, laser damage/speed etc. :)

I have not had time to play X2 for the last few days, but I will probably try out your mod some time next week. It looks very promising, considering the hardcoded engine limitations I have seen a lot of complaints about.

kippling
Posts: 38
Joined: Sat, 7. Feb 04, 21:04
x4

Post by kippling » Sun, 14. Mar 04, 22:41

Nice one, excellent mod mate. The whole economy thing has really wound me up, this is the mod i've been waiting for :D

Nick

easternblocrobotcowboy
Posts: 120
Joined: Sun, 15. Feb 04, 23:21
x2

Post by easternblocrobotcowboy » Mon, 15. Mar 04, 19:40

Can you supply your mod in the uncataloged form? I have quite a bit of mods altering ship speed, laser speed, bullet damage, missile damage, etc. and the prices you change are included in some of those files. (the weapons are just as screwed up in x2 as the economy is - a gamma IRE actually does LESS damage than a beta IRE due to energy drain, and I wont even get started on PPCs PSGs and missiles) I would like to add your mod to my game but I need to meld the two datafiles together.

Thanks for all your hard work!!!!

TW

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Mon, 15. Mar 04, 20:17

Sure, wait'll I get home tonight (6-7+ hrs from time of this post, haven't quite figured out GMT yet :oops: ) and I'll update the zip to include the unpacked files. Just redownload it later.
In the meantime, you can extract it yourself you know,
rename it temp.cat temp.dat or something then:
x2tool -extract-dat temp
make sure the folder you're extracting in contains a /types folder, x2tool will not create directories while extracting. (it assumes you have them)
should work
(or if you're lazy like me, just wait 'till tonight.) :wink:
"Nature's first green is gold" . . . stay golden.

easternblocrobotcowboy
Posts: 120
Joined: Sun, 15. Feb 04, 23:21
x2

Post by easternblocrobotcowboy » Tue, 16. Mar 04, 00:12

sweet. BTW I finished a script that completely overhauls a single factory's productivity. If you want I could email it to you in case you wanted to mod any individual factories within your humongous mod :>

My particular script mods computer plants to use nividium and microchips as secondary resources. The nividium doubles the efficiency of the factory (resource wise), and the computer ships can be converted straight to computer components with a litle silicon and energy further doubling the stations productivity.

Im about to add nividium to to chip plants to double their efficiency. My goal is to overhaul the computer/ship/quantum tube fabs to make them truly 'keystone' factories that can turn out huge profits as long as you build the necessary supporting fabs to constantly feed them.

TW

kryptyk
Posts: 483
Joined: Fri, 5. Dec 03, 20:19
x4

Post by kryptyk » Tue, 16. Mar 04, 00:29

easternblocrobotcowboy wrote:sweet. BTW I finished a script that completely overhauls a single factory's productivity. If you want I could email it to you in case you wanted to mod any individual factories within your humongous mod :>

My particular script mods computer plants to use nividium and microchips as secondary resources. The nividium doubles the efficiency of the factory (resource wise), and the computer ships can be converted straight to computer components with a litle silicon and energy further doubling the stations productivity.

Im about to add nividium to to chip plants to double their efficiency. My goal is to overhaul the computer/ship/quantum tube fabs to make them truly 'keystone' factories that can turn out huge profits as long as you build the necessary supporting fabs to constantly feed them.

TW
Wouldn't this also negate the economy's forced equalization? Take a relatively cheap good, make it a secondary resource and use a multiplier that balances the production rate and consumption changes. Would that work?

easternblocrobotcowboy
Posts: 120
Joined: Sun, 15. Feb 04, 23:21
x2

Post by easternblocrobotcowboy » Tue, 16. Mar 04, 01:20

thats what I did. It works great. It hard codes the production directly to secondary resources as well as primary resources. Now all I need to do is to be able to add computer components to the trading stations around the universe and my script will be perfect (to me) :>

Can anyone tell me the scripting command that adds a resource to an existing race's trading stations?

TW

kryptyk
Posts: 483
Joined: Fri, 5. Dec 03, 20:19
x4

Post by kryptyk » Tue, 16. Mar 04, 05:13

easternblocrobotcowboy wrote:thats what I did. It works great. It hard codes the production directly to secondary resources as well as primary resources. Now all I need to do is to be able to add computer components to the trading stations around the universe and my script will be perfect (to me) :>

Can anyone tell me the scripting command that adds a resource to an existing race's trading stations?

TW
Should just be the add product to factory of dock command. That works for everything else.

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Tue, 16. Mar 04, 06:00

easternblocrobotcowboy: sent you a pm. I'm quasi-hopeful you may have discovered something I'd like to play with. To date, I haven't messed with scripting at all because I don't understand it very well. If you've discovered something else that can be used to defeat the 'enforced equality', I'm anxious to check it out. More variety - more fun in my book. Maybe we'll see an econ fix v4 before too long.
"Nature's first green is gold" . . . stay golden.

Post Reply

Return to “X²: The Threat - Scripts and Modding”