[Script] Dynamic Product Pricing

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

mtiffany71
Posts: 80
Joined: Sun, 23. Nov 08, 15:57
x3tc

[Script] Dynamic Product Pricing

Post by mtiffany71 » Sat, 24. Oct 09, 00:50

Dynamic Product Pricing is a station command script that sets the price of a station's product (or a complex hub's products) based on the amount of the product the station has on hand. If the stations has little to none of its product, the product price will be at or near the maximum price for that product. If the station is filled to capacity with its product, the product price will be set to the minimum price for that product.

Please note: I wrote this script specifically for my closed-loop complexes. Being closed-loops, there is no possibility of losing money. However, on single stations or complexes dependent upon outside resources, it IS possible to lose money (ie, the selling price per unit is lower than the cost of production per unit).

Latest version 1.0.3 as of 24 Oct 2009 (Recommended for closed-loop complexes only)

(SPK) Dynamic Product Pricing v1.0.3
(ZIP) Dynamic Product Pricing v1.0.3

Alternative download link (.spk) from xdownloads:
[ external image ]


Update 31 Oct 2009

Happy Halloween!

It is my great pleasure to announce the release of Dynamic Product Pricing for single factories and single-product complexes. This version of DPP allows the user to set the minimum selling price of their product (as requested/suggested). Enjoy! Feedback is, as always, welcome and appreciated.

(SPK) Download Dynamic Product Pricing for Single Factories v1.0

Alternative download link (.spk) from xdownloads:
[ external image ]


Edit [1st December 2015]: added alternative download links from xdownloads. X2-Illuminatus
Last edited by mtiffany71 on Sun, 1. Nov 09, 01:37, edited 3 times in total.

User avatar
Matterom
Posts: 423
Joined: Thu, 20. Aug 09, 08:17
x4

Post by Matterom » Sat, 24. Oct 09, 03:11

so its like automatically making your stations like an npc station nice 8)
My Mods:
Sector Administration: A Tax Mod

mtiffany71
Posts: 80
Joined: Sun, 23. Nov 08, 15:57
x3tc

Post by mtiffany71 » Sat, 24. Oct 09, 04:29

Yeah, I've got a framekiller of a complex in Antigone Memorial (who doesn't?) which produces HEPTs, PACs, Quantum Tubes, Microchips, and Teladianium. I manually set the selling prices on all goods to about 20% below their average selling price and I thought I was making a decent profit. But now that I've been running the DPP command on the complex, it turns out that microchips (and even quantum tubes) will still get snapped up by passing tech traders at as much as 10 to 20% above the supposed average selling price.

The nice thing about dynamic pricing is that your products will sell at as high a price as the market will bear so you make as much profit as possible, rather than setting your prices below market and not turning as much profit as you possibly could.

Egads, I sound like the bastard hybrid of a Teladi and a Ferengi.

Catra
Posts: 7754
Joined: Mon, 12. Oct 09, 21:54

Post by Catra » Sat, 24. Oct 09, 05:43

kinda like...a telengi?! or maybe a...feradi?! :lol: :lol: :lol:

anyway, does sound useful, will DL and try when i got stations going (dying in a DiD cause of clever pirate ambush FTL)

costi
Posts: 236
Joined: Sat, 12. Sep 09, 17:58
x3tc

Post by costi » Sat, 24. Oct 09, 08:38

Will the sell price ever drop below the production cost with this?
Friendly fire is not so friendly.

User avatar
enenra
Posts: 7150
Joined: Fri, 8. Apr 05, 19:09
x4

Post by enenra » Sat, 24. Oct 09, 10:34

costi wrote:Will the sell price ever drop below the production cost with this?
That's not even possible. ^^

costi
Posts: 236
Joined: Sat, 12. Sep 09, 17:58
x3tc

Post by costi » Sat, 24. Oct 09, 10:39

Oh, it is... I have an SPP that produces e-cells for 13 Cr apiece. If I set the price to 12, I'll sell below cost ;)
I'm asking since the station often is fully stocked for some time, Then it gets completely cleared and the cycle repeats.

BTW. how often are the prices updated?
Friendly fire is not so friendly.

Gripen
Posts: 88
Joined: Fri, 12. Jun 09, 12:10
x4

Post by Gripen » Sat, 24. Oct 09, 12:08

I guess the script is ment to be activated in each station through the command-slots-thingy.... however when i click the Dynamic Product Pricing for Slot1 nothing seem to happen.. Still gives "none", dunno if its active or not ^^

Edit: oh and other commands work fine.. like auto transfer

mtiffany71
Posts: 80
Joined: Sun, 23. Nov 08, 15:57
x3tc

Post by mtiffany71 » Sat, 24. Oct 09, 19:31

Gripen wrote:I guess the script is ment to be activated in each station through the command-slots-thingy.... however when i click the Dynamic Product Pricing for Slot1 nothing seem to happen.. Still gives "none", dunno if its active or not ^^

Edit: oh and other commands work fine.. like auto transfer
Oops, my bad. Fixed as of 1.0.3. Command "Dynamic Product Pricing" now appears in station command slot when running.

mtiffany71
Posts: 80
Joined: Sun, 23. Nov 08, 15:57
x3tc

Post by mtiffany71 » Sat, 24. Oct 09, 19:40

costi wrote:Will the sell price ever drop below the production cost with this?
Yes, that's entirely possible. Sorry I forgot to mention that. I wrote this script specifically for my closed-loop complexes. Being closed loops, they can't lose money even if they always sell all their products at the minimum all the time (unless they're destroyed before they earn back what I spent on building them).

So again, yeah, the selling price can drop below the production cost when you run this script on single factories or complexes which are not closed loops.

And again, sorry I forgot to mention it.

FWIF, next version I'm working on will allow you to set your own minimum/maximum selling prices (within the range already set by the game, of course). For instance, if the production cost of Energy Cells at your SPP is 13 Cr/EC, you'll be able to set the minimum selling price at 14Cr, instead of the game default of 12. That's what's slated for 1.1.

mtiffany71
Posts: 80
Joined: Sun, 23. Nov 08, 15:57
x3tc

Post by mtiffany71 » Sat, 24. Oct 09, 19:47

costi wrote:BTW. how often are the prices updated?
Prices are updated every 15 to 30 real-time seconds.

costi
Posts: 236
Joined: Sat, 12. Sep 09, 17:58
x3tc

Post by costi » Sat, 24. Oct 09, 22:18

Thanks for all the info :)
Friendly fire is not so friendly.

mtiffany71
Posts: 80
Joined: Sun, 23. Nov 08, 15:57
x3tc

Post by mtiffany71 » Sun, 1. Nov 09, 01:42

costi wrote:Thanks for all the info :)
In case you're interested, this evening I released a version of DPP meant specifically to be used with single factories and single-product complexes. It allows the user to set the minimum selling price of their products.

DPP for single factories (SPK)

scaseman
Posts: 78
Joined: Sat, 13. Mar 04, 19:24
x3tc

Post by scaseman » Mon, 2. Nov 09, 18:38

Will both scripts wprk together? Or should I just use the one?

mtiffany71
Posts: 80
Joined: Sun, 23. Nov 08, 15:57
x3tc

Post by mtiffany71 » Mon, 2. Nov 09, 20:14

scaseman wrote:Will both scripts wprk together? Or should I just use the one?
The scripts shouldn't both be running on the same station, if that's what you're asking. One is meant to be run on closed-loop complexes (DPP) and the other is (SFDPP) meant to be run on single factories (or complexes which have only one product).

But if for example you have a closed-loop complex in Antigone Memorial which produces weapons and micro-chips and a Teladianium Foundry in CEO's Buckzoid, you would use DPP for the AM complex and SFDPP for the CB Teladianium Foundry.

HTH

User avatar
corhen
Posts: 338
Joined: Thu, 16. Oct 08, 08:45
x3tc

Post by corhen » Wed, 4. Nov 09, 03:53

The file link that you requested is not valid.
need i say more?
Jovianmoon wrote:
apricotslice wrote:...auto-pillok...
Are we ready to collide with that asteroid?
Yes sir! Engaging auto-pillock!

mtiffany71
Posts: 80
Joined: Sun, 23. Nov 08, 15:57
x3tc

Post by mtiffany71 » Fri, 6. Nov 09, 06:24

corhen wrote:
The file link that you requested is not valid.
need i say more?
Yeah, like which of the three files you were attempting to DL. That might help.

michi_oss
Posts: 600
Joined: Sat, 14. Oct 06, 15:02
x4

Post by michi_oss » Sun, 8. Nov 09, 14:35

(ZIP) Dynamic Product Pricing v1.0.3 is missing.

I Would say: It is a problem to click on three links to find out which file is missing? ...

the correct link: http://www.4shared.com/file/143312336/a ... -X3TC.html
Die Kraft einer Kerze ist die Flamme, aber sie brennt nur so lange wie der Docht.

Remenents
Posts: 25
Joined: Sun, 27. Jan 08, 22:49

Post by Remenents » Tue, 23. Feb 10, 16:16

The only problem I can see, is that this link wants me to install some program to be able to downloa the file, and honestly, I really dont want to. Is there another way to install this?

ITFUncleDave
Posts: 163
Joined: Fri, 27. Jun 08, 18:47
x3fl

Post by ITFUncleDave » Tue, 23. Feb 10, 17:27

Remenents wrote:The only problem I can see, is that this link wants me to install some program to be able to downloa the file, and honestly, I really dont want to. Is there another way to install this?
After following the link try clicking the "Download Now" in the blue box, rather than the "Download" with the green arrow.

Post Reply

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