[Mod-AP][In-Dev] X-Timelines: The Syndicate

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

User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

Wow lots of info there :)

Jack08 also wants to bring in planetary recognition/usage for economic reasons, but it's still in the 'if it can be done' stage. There are other aspects far more important than including planets in the economy.

As far as product sinks go, we are developing the mod in a way that has minimal need for them. Even with expansionistic Races it's not going to affect the economy of the races while expanding.

Relval's are Jack08's territory so I'll leave that explanation to him ;)
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
UberWaffe
Posts: 69
Joined: Wed, 25. Apr 12, 10:06
x3ap

Post by UberWaffe »

TrixX wrote:Jack08 also wants to bring in planetary recognition/usage for economic reasons, but it's still in the 'if it can be done' stage. There are other aspects far more important than including planets in the economy.
Awesome. :D
Me like civilian economy. Even better if it actually has an impact on the war efforts.
TrixX wrote:Even with expansionistic Races it's not going to affect the economy of the races while expanding.
How though? :?
If the entire economy is truly demand-by-shipyards driven, won't new territory simply go unused once that demand is met?

[EDIT]Just wanted to say, I'm unimportant. If I am distracting you, rather ignore me and finish the mod. :wink: [/EDIT]
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

No need to be like that, ideas are always welcome as are questions :D

Jack08 is in control of all economic coding and decisions, so I'll leave any explanation there to him.
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
Falcrack
Posts: 5577
Joined: Wed, 29. Jul 09, 00:46
x4

Post by Falcrack »

I don't reember if you said Xenon will be in this mod or not. Anyways, I had an idea about a simplified economy for them.

Even though Xenon do not deal in petty things such as credits, they still must be able to make their ships out of something. However, being the highly efficient machines that they are, they only need 2 factories to make everything they need. First, they have mining ships to get ore from asteroids. Then they take the ore to a Xenon station. Goods from the Xenon station are shuttled to the Xenon shipyards, and assembled into ships there. The Xenon station is essentially a ore refinery and factory complex capable of making all of their ship and weapon needs. Ore in converted directly into such items as shields, lasers, and generic "Xenon ship components". The station has multilple production slots (maybe 10-15) which can be used to produce any item. The items chosen to be filled by those slots are the items which are lowest as a percentage of storage space available for it in the station inventory. So, items that are lowest in the inventory due to high demand at the shipyards will have an increasing number of productions slots devoted to their manufacture at the Xenon station.

Such an econimic model would, I think, work well with how the Xenon would likely operate. Or the Zenith.
User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

For the first release, The Xenon are just making ships from nothingness, but with the same timer restrictions as the rest of the races, is not totally unfair. This is how they will stay for now, they may be changed in a future release.
UberWaffe wrote:If the entire economy is truly demand-by-shipyards driven, won't new territory simply go unused once that demand is met?
Due to the large amount of stations needed for a shipyard supply line, the corporations maintaining this supply line are always in need of new space, when new space becomes available they will move some of there stations out of overcrowded systems into new space; Giving the illusion that they are creating new stations, when when they are simply moving old ones. (well it would have given that illusion if i didn't just explain it :D)
What determines a station's production speed and quantities
Due to limitations on the amount of data we could co-opt from the TFiles, we have had to keep this relatively simple.
Each station can only handle 2 resources, and if a 3rd resource is added it has the resource cost of (Res1+Res2/2), we haven't needed to have 3 Resources yet.

In order to specify the specifics of the system we use 3 32bit intigers:
Price ( 32 Bits ) Direct Define, what you see in the TFiles is what you see in-game
CycleTime ( 15Bit ) 000000000000000 | 111111111111111 ( 15Bit ) ProductCount
ResourceACount ( 15Bit ) 000000000000000 | 111111111111111 ( 15Bit ) ResourceBCount

The station production and storage is capable of being set via script now, so a script can change the production modifier, or storage modifier, of a station at any time, providing the ability to create upgrade able stations.
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
Falcrack
Posts: 5577
Joined: Wed, 29. Jul 09, 00:46
x4

Post by Falcrack »

I don't wanna sound pushy, but is there any hope for a first release by the end of the month? My wife and baby are going on vacation for a couple weeks, leaving me at home with no one to ask me to get off the computer :)
TouchMyNipple
Posts: 181
Joined: Wed, 15. Sep 10, 13:09
x4

Post by TouchMyNipple »

Jack, i wonder if it is possible to script in a smaler shipyard spawn for every, say, 5 new sectors ofr each race/corp. That could realy make for those new production lines.
Haste-whip TrixX!
UberWaffe
Posts: 69
Joined: Wed, 25. Apr 12, 10:06
x3ap

Post by UberWaffe »

Jack08 wrote:Due to the large amount of stations needed for a shipyard supply line, the corporations maintaining this supply line are always in need of new space, when new space becomes available they will move some of there stations out of overcrowded systems into new space; Giving the illusion that they are creating new stations, when when they are simply moving old ones. (well it would have given that illusion if i didn't just explain it )
That's rather clever. Higher FPS in sectors as the game progresses, coupled with the fact that a dominating race is pressed to defend more territory to maintain their economy.
I like it. 8)

I think it might mean that a dominant empire (few station per sector) will feel the effect of a lost sector less, while a weak empire (many station per sector) would feel it much more (large chunk of economy lost when sector is lost.
But worrying about that now is pointless until its actual impact can be seen ingame. (Read "Me wanty mod!" here) :D

I still like the idea of an additional civilian economy. :P
(But then again, everybody always like their own ideas. :wink: )
Will probably spend most of my time on Timelines to mod it in. :lol:
Jack008 wrote:In order to specify the specifics of the system we use 3 32bit intigers:
Price ( 32 Bits ) Direct Define, what you see in the TFiles is what you see in-game
CycleTime ( 15Bit ) 000000000000000 | 111111111111111 ( 15Bit ) ProductCount
ResourceACount ( 15Bit ) 000000000000000 | 111111111111111 ( 15Bit ) ResourceBCount
Awesome!
I'm assuming 3 integers because of internal limits. Reminds me of all the bit-packing we do in control systems. Anyhow.

Question: Can I specify that resource A and resource B use nothing? I.e. ?0000000 00000000 ?0000000 00000000, or is bit 16 and 32 to indicate that the respective resource is in use at all? i.e. bit16 = 0 means no resource A, and bit 32 = 0 means no resource B?

So that I could specify a resource-less factory? (Similar to saturn complex hub, but without needing scripts that drop resource requirements after production is started, and re-add them before you stop/re-start production, etc.)
JackSparrow wrote:The station production and storage is capable of being set via script now, so a script can change the production modifier, or storage modifier, of a station at any time, providing the ability to create upgrade able stations.
That's is great news. Egosoft should have put this in long ago. Really hope they will have this (and other) feature(s) in the new engine.

Question: Does the storage work similarly? I.e. do you specify it per product/resource? Or is it like a PHQ, where they all take space from a single large cargohold?
Maeyanie
Posts: 12
Joined: Fri, 7. Nov 08, 00:14
x4

Post by Maeyanie »

Jack08 wrote: ...when new space becomes available they will move some of there stations out of overcrowded systems into new space; Giving the illusion that they are creating new stations, when when they are simply moving old ones. (well it would have given that illusion if i didn't just explain it :D)
Moving out of overcrowded systems is good, but that illusion would also fall apart when a race has expanded to the point where core systems are looking like ghost towns... it's not only moving stations, right? Some actual new ones are created?
UberWaffe
Posts: 69
Joined: Wed, 25. Apr 12, 10:06
x3ap

Post by UberWaffe »

Maeyanie wrote:Moving out of overcrowded systems is good, but that illusion would also fall apart when a race has expanded to the point where core systems are looking like ghost towns... it's not only moving stations, right? Some actual new ones are created?
[Unserious]Except if you shrink the galaxy size to one sector per race. :shock: [/Unserious]

Which is part of why I'm probably be going to mod a civilian economy into Timelines as soon as I can get my grubby little hands on it. Write a script to spawn trade-station equivalents, that eat products completely unrelated to the military production economy. Add in said products and their factories. Adjust their production rates to be very low profit for basic goods (E-cells, Basic food) to medium profit (but still lower than military economy) for consumer tech goods (Luxury food, Electronics, Medicine, XenonDigitalComedy, etc.). bake for half a week with rigorous spicings of testing, and enjoy.
(Refer to monologue earlier in the thread.) :P
User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

Awesome!
I'm assuming 3 integers because of internal limits. Reminds me of all the bit-packing we do in control systems. Anyhow.
Yeah, were not able to edit the structure of the Tfiles so we had to cop-opt existing data entry's to get the information into the game.
Question: Can I specify that resource A and resource B use nothing? I.e. ?0000000 00000000 ?0000000 00000000, or is bit 16 and 32 to indicate that the respective resource is in use at all? i.e. bit16 = 0 means no resource A, and bit 32 = 0 means no resource B?
if you remove resources from a factory using the script engine ( <RefObj> -> remove primary resource from factory: <Var/Ware> ), it should run without resources without needing to change the TFiles.
Question: Does the storage work similarly? I.e. do you specify it per product/resource? Or is it like a PHQ, where they all take space from a single large cargohold?

Code: Select all

Storage System 1 is:
ResAStorage = ResAUnitsReq * 4 * Storage Multiplier
ResBStorage = ResAUnitsReq * 4 * Storage Multiplier
ProductStorage = ProductUnitsCreated * 4 * StorageMultiplyer

Example: Uses 10 WareA units, Uses 10WareB units, Produces 10Product units
Storage for all 3 wares would be 40 * Multiplier, assuming a storage multiplier of 1

Storage System 2 is:
ResourceAStorage = StoragePerWareAllowance / ResourceAVolume
ResourceBStorage = StoragePerWareAllowance / ResourceBVolume
Product = StoragePerWareAllowance / ResourceBVolume

Example: ResAVolume is 10, ResBVolume is 20, ProductVolume is 40
StationPerWareAllownace is 500:
  ResAStorage is 50
  ResBStorage is 25
  ProductStorage is 12
Scripts can switch between storage systems depending on the type of station in use, and the storage type required for the job. a shipyard warehouse for example would use the Storage Per Ware Allowance system, and a production station would use the normal system.
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
UberWaffe
Posts: 69
Joined: Wed, 25. Apr 12, 10:06
x3ap

Post by UberWaffe »

if you remove resources from a factory using the script engine ( <RefObj> -> remove primary resource from factory: <Var/Ware> ), it should run without resources without needing to change the TFiles.
So I assume that since the production amount is now specified (as opposed to calculated based on value of products used), turning production on and off (Ex. Station Manager script) after the product requirement is removed via script (Ex. Crystal Free-SPP), it will not completely ruin the station production? (I.e. set it to producing 1 E-Cell every cycle)

Code: Select all

Storage System 1 is: 
ResAStorage = ResAUnitsReq * 4 * Storage Multiplier 
ResBStorage = ResBUnitsReq * 4 * Storage Multiplier      ;was ResAUnitsReq * 4 * Storage Multiplier
ProductStorage = ProductUnitsCreated * 4 * StorageMultiplyer 

Example: Uses 10 WareA units, Uses 15WareB units, Produces 20Product units, and Multiplier * 1
Storage for all 3 wares would be: 40 WareA, 60 WareB, 80 Product

Storage System 2 is: 
ResourceAStorage = StoragePerWareAllowance / ResourceAVolume 
ResourceBStorage = StoragePerWareAllowance / ResourceBVolume 
Product = StoragePerWareAllowance / ProductVolume       ;was StoragePerWareAllowance / ResourceBVolume
Example: ResAVolume is 10, ResBVolume is 20, ProductVolume is 40 
StationPerWareAllownace is 500: 
  ResAStorage is 50 
  ResBStorage is 25 
  ProductStorage is 12
Really nice. Simple and effective.


Question:
I understand you do not plan to add more than 2 resources. But that there is allowance made for more.
Each station can only handle 2 resources, and if a 3rd resource is added it has the resource cost of (Res1+Res2/2), we haven't needed to have 3 Resources yet.
The question is simply, if a script adds more than 3 resources, or secondary resources, will it crash the system? I'm assuming some sort of contingency. All resources beyond the first two using consumption per cycle of (Res1+Res2/2)?

Same question on storage. If I specify a trade station, using StationPerWareAllownace, the formulae will simply hold true for all resources?

Code: Select all

Res01.Storage = StoragePerWareAllowance / Res01.Volume
Res02.Storage = StoragePerWareAllowance / Res02.Volume
Res03.Storage = StoragePerWareAllowance / Res03.Volume
...
Res06.Storage = StoragePerWareAllowance / Res06.Volume

And last question:
Can you possibly tell me which integers in the TFiles for stations are the following (are they even all in the station's Tfile?):
Price ( 32 Bits ) [Station price?]
CycleTime & ProductCount ( ? + 15Bit + ? + 15Bit ) [Cycletime in seconds?]
ResourceACount & ResourceBCount ( ? + 15Bit + ? + 15Bit )
StorageMultiplyer & StoragePerWareAllowance ( Method 1bit + Value 31bit ?)
User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

The game wont crash if you add more the 3 resources, it will just revert to the formula of R1+R2 / 2, the game will also calculate storage correctly on resources above 2. Yes you can have resoruce-less factorys, but keep in mind that energy cells in XTL no longer exist ;)

I cant remember what values we used in the TFile to get the data into the game, all i remember is i had to go though weeks of reworking the values to get it to function, i have a python script that generates the TFile entry now so the information slipped from my mind.

What i do know of the top of my head is:
Station Multiplier is grabbed directly from the station "size" just like it used to for XL, etc stations. and the StoragePerWareAllowance doesn't have a value ( script set only )

the most significant bit is not a problem, we simply pull the last 16 bytes and shift them twards 0, in order to avoid the signed value issue.

My apologies i seem to have messed up, its not 15 bits its 16 bits :D ( i how did i make that mistake >.< )
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
User avatar
jack775544
Posts: 1277
Joined: Tue, 13. Dec 11, 08:27
x4

Post by jack775544 »

Jack08 wrote: My apologies i seem to have messed up, its not 15 bits its 16 bits :D ( i how did i make that mistake >.< )
I thought something seemed decidely wrong about 15 bits
1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

I stole one :lol:
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
UberWaffe
Posts: 69
Joined: Wed, 25. Apr 12, 10:06
x3ap

Post by UberWaffe »

Jack08 wrote:The game wont crash if you add more the 3 resources, it will just revert to the formula of R1+R2 / 2....blah blah
To clarify, is it R1 + (R2 / 2) or is it (R1 + R2) / 2?
Jack08 wrote:Yes you can have resoruce-less factorys, but keep in mind that energy cells in XTL no longer exist
Well, I'm currently looking at how one would go about modding in a 'civiilian' economy. :wink:
Busy drawing up an Excel sheet for calculating and balancing cost/income/profit per hour against resource values and station costs. :)

Once I can get my hands on the mod, I'll first take a look if it will make sense to add it in at all, but just planning for now.

Anyway, really looking forward to Timelines. :D
User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 »

Well currently its (R1+R2)/2, but that's because i haven't had a use for a 3rd resource in the military economy, and any factory that's using more then 3 (aka shipyard) has its consumption all script based.

If you have a specific equation in mind that you would like, ill see what i can do.
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
UberWaffe
Posts: 69
Joined: Wed, 25. Apr 12, 10:06
x3ap

Post by UberWaffe »

Jack08 wrote:If you have a specific equation in mind that you would like, ill see what i can do.
Thanks, but I just needed clarity to setup my spreadsheet in LibreOffice Calc. (Had used R1 +(R2/2), but fixed now).
[EDIT3]What do you do if the (R1+R2)/2 comes up with a fraction? I.E. 100.5 resource3 used per cycle. Do you ceiling or floor?[/EDIT3]


I am using the spreadsheet to define custom wares for the civilian trade (min price, max price, size, volume, tier level in economy, etc.) and stations (what ware they produce, how much they produce, what resources they use, how much they use, cycle time, and station cost).

(Assumption: you can sell all products made)
(Assumption: you can find enough resources to buy)

The spreadsheet then (or currently at least) spits out their estimated income per hour (min, max, average), cost per hour (min, max, average), profit per hour (min, max, average), how much product you have to haul away per hour (Volume), how much resources you have to haul in per hour (Volume), and how many hours of production (at average profit) you will need to pay off the station's capital cost.

In essence, I can see how profitable a station should be, how expensive I should make it, and have a good guess at how many freighters it will take to service the station. :D

Yeah, I'm one of those. :roll:


Anyway, probably extremely close to a complex calculator spreadsheet, but if anyone is interested in seeing it, just tell me where to upload it to. :)


Design decisions made so far (totally open for debate):

Code: Select all

Civilian economy is distinct from military economy (with exception of being able to use military ores to make mineral slurry).
Economy split into 4 tiers: 0 to 3.
Tier 0 is raw resources via mobile mining, Ecells (from nothing), or raw resources produced from insane amounts of Ecells (not profitable).
All other tiers use products of lower tiers as resources (and on very rare occasions, products of the same tier).
Profit per hour for all station of a similar tier are very close.
Profit margins (Cost as % of Income) become larger the higher the tier.
Turnover (Income in credits and Cost in credits) per hour also scales up per tier.
Illegal goods will exist.
Illegal goods have larger profit margins that similar tier stations of legal goods.
Stations should (if possible) be able to lose money at lowest profit (Buying resources at highest cost, selling product at lowest value).
Stations should take about 30 hours to repay themselves at average profit.
Energy cells will not be used for everything. Currently used for smelting (Arc furnaces), and growing crops (Time acceleration, I mean really, a cow in 1 minute?).
There is no race specific food. Just universal catch-alls.
Similarly, goods produced are more 'generic'. Ex: Alloys, Plastics, Consumer Goods, Luxury Goods, etc.
EDIT: Maybe for once I should post a one sentence post, just to see what it is like. :roll:


EDIT2: Design decisions still under consideration:

Code: Select all

Adding (via script) running costs (done per 5 minutes intervals) to all stations. So that player should think a bit before they build, and make sure they can provide a stable flow of resources in & products out.
TouchMyNipple
Posts: 181
Joined: Wed, 15. Sep 10, 13:09
x4

Post by TouchMyNipple »

i was thinking of civilian economy lately and came out with few ideas...
1) Making trade lines (TS's on route from A to B with a loop) the only automatic trade mechanism. Still it would have to come out with a special "manager" interface but i don't think that's the hard part. This could bring some "transport tycoon" feeling in the game.
2) Fixing TS VFM (value for money). Realy, as they are now they provide too much. They should realy cost far more then m3. Just to make worth the escort idea.
3) With trade lines and high TS cost trade will be unaffordable to most players. That could be fixed in 2 ways:
a) trade lease - pilot pays, say 30% of the cost initialy and then has to repay the lease every, say 30 mizuras ingame. If the player hasn't got enough to pay at the specified time he suffers SEVERE penalties. If he fails next repay+penalties he gets a bunch of angry collectors on his tail. In the end, it the wild wild space.
b) Military contract awards. Much like the mission system in vanilla. But with the difference that you get a mini-plot instead of a single objective. Don't know if that is actualy codable but it would be insanely cool. Say you get a government contract to build up civil infrastructure in a specified sector (that was recently taken and is empty). Stage 1 - build few stations, get few traders in reward. Stage 2 - secure the trade lines - deliver a specified significant amount of civilian goods from the new sector to a core sector. Stage 3 - setup military pressence in sector - patrol/defend station mix. And so on. Built stations are awarded to Race and in return you get less then full price, but you get a TS as a bonus. Then it will make the trading fleet worth something more then just automated money-maker.

cheers
Haste-whip TrixX!
UberWaffe
Posts: 69
Joined: Wed, 25. Apr 12, 10:06
x3ap

Post by UberWaffe »

For fear of derailing the X-Timelines thread entirely, I'm splitting this discussion of the THEORETICAL civilian economy to its own thread.

Theoretical Civilian Economy discussion

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