Page 2 of 3

Posted: Sat Aug 04, 2007 8:29 am
by Commander McLane
By the way: could you perhaps move this whole commodities.plist-discussion into its own thread? It hasn't really anything to do with yaw-thrusters.

And apologies to Parkingtigers for completely taking over his thread!

Posted: Sat Aug 04, 2007 2:13 pm
by Disembodied
Partly because I'll be sorry to see those cheap fur prices go, and partly because I'm fond of my earlier rationalisation with regard to the sale of stolen goods, I'm thinking about trying my hand at making a small OXP which will play around with commodities prices.

"Free Trade Zones": appearing in some of the higher-tech but poorly governed worlds (7+?, Anarchy, Feudal and Multi-Government), these are mined-out Rock Hermits converted into mini-trading stations. Operating outside the main system economy, they are mostly clearing-houses for stolen goods, enabling pirates to turn their spoils into credits, exploiting a mixture of legal loopholes and government kickbacks to keep GalCop at bay...

Commodities on offer, and their prices, would reflect the workings of the black market. Ideally, I'd like to -- in some respects -- invert the usual pricing structure of the system they occupy, so that e.g. Computers would be cheaper in agricultural systems, Furs would be cheaper in Industrial ones, and so on. The reason, of course, is that it's easier to steal from importers, who have to endure the long run-in from the WP beacon, than from exporters, who get the hell out a soon as they can. Large fluctuations in prices (within reason -- 0.8Cr/tonne for Furs is perhaps too much of a bargain!) should be possible, though, depending on what's just arrived in the hold of that big, evil-looking Python, sitting over there with its lasers still ticking and clicking as they cool down.

Maybe some commodities -- Slaves, for example -- would always be cheap: all those captured traders have to end up somewhere! Others, like gems and precious metals, would be generally more expensive, as these form the basis of the internal Pirate economy.

Are there any pitfalls in inverting the market prices, and quantities, like this?

Also, and just as important, is the concept worth pursuing? I don't want to make a constant jackpot for the players. There are limiting factors, e.g. the scarcity and levels of danger in the systems where the FTZs appear. There is also, of course, the moral issue: players can trade with the FTZs, but in doing so they are condoning piracy. It's tainted profit. No actual game effect, of course, but...

Posted: Sat Aug 04, 2007 3:19 pm
by TGHC
The idea of a jackpot on prices is ok providing it's a very rare occurence, and it would have to be randomised as far as planets are concerned, in other words, not at a particular planet, and not repeated, otherwise if a planet was known to have brilliant prices ad infinitum it would upset the gameplay a bit. IMHO, you have to earn your spurs both in trading and fighting. I would also suggest that it doesn't happen in galaxies 1 and 2, so that a new commander doesn't get an easy break :wink:

It's a great idea though, a bit like searching for the holy grail.

Posted: Sat Aug 04, 2007 3:50 pm
by LittleBear
Nice idea. Perhaps as a penalty for docking with these dens of inequity, increment the player's legal status, (just need one command and you could steal the method for doing so from CM's Anarchies.oxp) :wink: . Maybe also add some ships with the role pirate, near the base when the player launches from it or approaches it, so he'll have to fight a few extra pirates to get there. That'd make it a bit tough for the 100C Jameson to take advantage of the feature and you'd have to get a few basic upgrades and engage in more combat to exploit the higher prices. There's no honour amongst theives!

Posted: Sat Aug 04, 2007 3:55 pm
by Disembodied
TGHC wrote:
The idea of a jackpot on prices is ok providing it's a very rare occurence, and it would have to be randomised as far as planets are concerned, in other words, not at a particular planet, and not repeated, otherwise if a planet was known to have brilliant prices ad infinitum it would upset the gameplay a bit. IMHO, you have to earn your spurs both in trading and fighting. I would also suggest that it doesn't happen in galaxies 1 and 2, so that a new commander doesn't get an easy break :wink:

It's a great idea though, a bit like searching for the holy grail.
Oh, I know... these young commanders, they want Tionisla on a stick they do (having just popped my 1,000th kill the other day I feel I have a claim for some sort of seniority now :wink: ). Mind you, there'd be jackpots and jackpots: not every FTZ would necessarily be offering low-price Luxuries or Computers or Furs. You might find bargain-basement Radioactives, say, at 6Cr/tonne, or Liquor & Wines at the knock-down price of not 18, not 14, but 11.5Cr/tonne to you sir, yes you with the blue pincers and the three eyepatches! And if any young Jamesons want to make a run through some hairy zone in order to profit from the misery and misfortune of others, well, hell mend 'em, I say!

Partly it would be nice to occasionally fill up the cargo hold with something other than Computers or Furs. I don't think I've ever actually *bought* Textiles, for example.

As for keeping the stations rare, there's the limiting factor of the tech levels of the systems... and in another thread, LittleBear suggested a way of using like-ship to key a station type into (e.g.) a Rock Hermit, so that a percentage of Rock Hermits would be, in this case, FTZs:
LittleBear wrote:
Clone a rock hermit using like-ship [...] If you give the [station] the roles "rockhermit(0.5) station oolite-rock-hermit(0.5)" then about 1 in 4 rockhermits will be [station type].
Admittedly I don't have a scooby how the probabilities work here (sums: not a strong point :( ) but 1 in 4 Rock Hermits, limited to 2 or 3 types of government, being FTZs sounds OK. Rare, and unreliable, but not impossible to find now and then.

Posted: Sat Aug 04, 2007 3:59 pm
by Disembodied
LittleBear wrote:
Nice idea. Perhaps as a penalty for docking with these dens of inequity, increment the player's legal status, (just need one command and you could steal the method for doing so from CM's Anarchies.oxp) :wink: . Maybe also add some ships with the role pirate, near the base when the player launches from it or approaches it, so he'll have to fight a few extra pirates to get there. That'd make it a bit tough for the 100C Jameson to take advantage of the feature and you'd have to get a few basic upgrades and engage in more combat to exploit the higher prices. There's no honour amongst theives!
Speak of the devil... :D

All good ideas! I realise, by the way, that this is really trying to sprint before I can crawl, but is there a way of testing OXPs without installing them and then hunting for them in order to find out if they work properly? Could get really annoying, especially if the damn thing is intentionally rare...

Posted: Sat Aug 04, 2007 4:46 pm
by LittleBear
Ah the joys's of testing!

Install the little testship.oxp (download link at the bottom of this post). All it is, is a script that just says this:-

Code: Select all

<key>testship</key> 
   <array> 
      <dict> 
         <key>conditions</key> 
         <array> 
            <string>status_string equal STATUS_EXITING_WITCHSPACE</string> 
         </array> 
         <key>do</key> 
         <array> 
	   <string>addShipsWithinRadius: test 1 wpm 0 0 4000 10000</string>
         </array> 
      </dict> 
   </array> 
All this does is add a ship with the role test everytime you make a hyperspace jump, about 4km from the witchspace beacon. Normally this does nothing at all, as there are no ships in Oolite with the role test.

Here's this cleaver bit! As you work on your OXP you'll want to check the ship your working on, actually works in the game. So you just give it the role test. Fire up Oolite make a jump and the test ship will be there by the beacon for you to look at. When you're happy the ship is working properly, you can then release it into the wild, by giving it a custom role (where you OXP script specifically calls it) or one of the native roles.

The same testship.oxp can be used to check a ship from somelses OXP (if your just curious) and want to see what the writer has done! If you open up the OXPs shipdata and add test to the roles, it'll pop up by the beacon on every jump. Remove test from the roles when you're done testing.
:wink

EDIT

Heres one I made earlier. If you unzip and install the testship.oxp then anyship you give the role test to will always appear near the w/s beacon:-

http://www.box.net/shared/5s71vp2d2e

Posted: Sun Aug 05, 2007 12:48 am
by TGHC
It's not a ship thing, it's commodity pricing, unless a rock hemit, or other non-planet, dockables, fit into that category.

If this doesn't make sense, blame it on the red wine, and German beer,........................hic.

Posted: Sun Aug 05, 2007 12:51 am
by Disembodied
Cheers, LittleBear! That's a hell of a lot simpler than I thought it would be... Now, of course, I'm running out of excuses not to actually *start* :oops:

Posted: Sun Aug 05, 2007 1:06 am
by Disembodied
TGHC wrote:
It's not a ship thing, it's commodity pricing, unless a rock hemit, or other non-planet, dockables, fit into that category.

If this doesn't make sense, blame it on the red wine, and German beer,........................hic.
From what I can see, poking around inside some other OXPs like a monkey with a with a twig, it looks like a station has (among other things) a commodities.plist to set commodities prices, and shipdata.plist that defines its physical nature, when and where it can appear, etc. ... most notably the Pirate Coves OXP, which I now realise is awfully similar to this idea! Oh well: we all have to start somewhere. I suppose didling around with a few variables on someone else's work is, technically, "somewhere". Maybe not somewhere good, but somewhere.

Posted: Mon Aug 06, 2007 9:10 am
by Commander McLane
Maybe I should mention that there is something like this in Anarchies.oxp. It was not yet included in the 0.1-release on Oosat2, but it will be there in the 1.0-release.

The story is like this: In some of the most dangerous, pirate-infested anarchies GalCop has set up a military station, called a Sentinel Station, close to the witchpoint. This station does not only monitor the inbound traffic, but also gives a helping hand to traders who are attacked by pirates. This has become necessary, as in these systems the overwhelming piracy brought trade almost to a halt.

In some of these systems, however, the pirates were so strong, that they were able to take over the Sentinel Station and convert it into a Renegade Station (you won't recognize the difference from the distance, but it will show up in your scanner as such). Don't dare to get close to it or even dock, unless you're a criminal with a fair record yourself! If you are one, however, there will be some nice trading opportunities on that station.

I'm not yet done with the fiddling with the prices, but it will be more or less along the lines Disembodied has in mind as well.

******

@ Disembodied:
Disembodied wrote:
Oh well: we all have to start somewhere. I suppose didling around with a few variables on someone else's work is, technically, "somewhere". Maybe not somewhere good, but somewhere.
No, that's somewhere very good, because it's exactly where all of us (more or less) have started. :wink: So, welcome to the club!

And just to take another excuse away, here's some additional how-to: Yes, you're right with commodities.plist (well, that's what this topic is about, isn't it?). All you have to do is to copy and paste the default list from Oolite itself into a file named commodities.plist in the Config-folder of your OXP.

The original file contains three arrays, the first entry is their respective name. The first one is called "default", the second one "rockhermit" and the third one "none". You only need one of them, in your own commodities.plist you can simply erase the other two. Delete "rockhermit" and "none".

Now you have to rename the remaining "default"-array. If you don't do that, your plist will set the new default for all stations in the Ooniverse, overriding the normal price-definition. You don't want to do that. An array of commodities is applied via the role of a ship.

That means you now have to create a new shipdata.entry, which means another file in your Config-folder, named shipdata.plist. Copy and paste the original rockhermit-entry into it (don't forget the plist-header!). You then have to give your custom rockhermit a new unique entity-name. That's the very first entry in the shipdata.plist, the one that's reading <key>rock-hermit</key>. Change it to something unique like <key>free-trading-zone</key> or whatever you like. If two entities bear the same name, things get messed up.

Then you have to find the lines <key>roles</key> <string>rockhermit station oolite-rock-hermit</string> and attach a new custom role to your new hermit. Exchange the second line with something like <string>free_trading_zone station(0.00001)</string> (there is something like a convention to use hyphens in entity-names and underscores in roles, but that's not a must at all). The role station has to be there as well, in order to make it dockable. But with the value in brackets you give it a very low probability to be spawned when the engine calls for a main station.

Now finally you have to put this exact unique role-string (not the station) in the beginning of your commodities.plist. So exchange <key>default</key> <key>free_trading_zone</key>. This means that the price- and quantity-definitions of your custom commodities.plist will be applied to all entities in the Ooniverse that have the role free_trading_zone, and to these only.

And then you calculate the prices and quantities along the lines I have explained in my long post above.

As far as testing is concerned, you have two ways: (1) do your maths! That means calculate your prices and quantities through with all possible values of the variables you have set, and look if the results match your vision. (2) fire up the game, find some of your custom hermits, dock with them and look if the prices and quantities offered there match your expectation. If not, it's back to step (1).

In order to make step (2) work, there's one thing more you need: Another plist, called script.plist in the same place, containing the code LittleBear posted. You have of course to exchange the line <string>addShipsWithinRadius: test 1 wpm 0 0 4000 10000</string> with <string>addShipsWithinRadius: free_trading_zone 1 wpm 0 0 4000 10000</string>. I don't know, however, why he uses the addShipsWithinRadius-method. A <string>addShipsAt: free_trading_zone 1 wpm 0 0 4000</string> would do the same trick.

And one last thing: Have fun with OXPing! :wink:

*******

EDIT: when I wrote this post I hadn't realized that you already had a name for your modified rock hermits (oh, this reading lazyness :oops: ). Anyway, to make things clearer I have changed all my trade_occasions_hermits to free_trading_zones.

Posted: Mon Aug 06, 2007 12:10 pm
by Disembodied
Commander McLane wrote:
Maybe I should mention that there is something like this in Anarchies.oxp. It was not yet included in the 0.1-release on Oosat2, but it will be there in the 1.0-release.

The story is like this: In some of the most dangerous, pirate-infested anarchies GalCop has set up a military station, called a Sentinel Station, close to the witchpoint. This station does not only monitor the inbound traffic, but also gives a helping hand to traders who are attacked by pirates. This has become necessary, as in these systems the overwhelming piracy brought trade almost to a halt.

In some of these systems, however, the pirates were so strong, that they were able to take over the Sentinel Station and convert it into a Renegade Station (you won't recognize the difference from the distance, but it will show up in your scanner as such). Don't dare to get close to it or even dock, unless you're a criminal with a fair record yourself! If you are one, however, there will be some nice trading opportunities on that station.

I'm not yet done with the fiddling with the prices, but it will be more or less along the lines Disembodied has in mind as well.

******

@ Disembodied:
Disembodied wrote:
Oh well: we all have to start somewhere. I suppose didling around with a few variables on someone else's work is, technically, "somewhere". Maybe not somewhere good, but somewhere.
No, that's somewhere very good, because it's exactly where all of us (more or less) have started. :wink: So, welcome to the club!
Thanks, Commander! Bearing in mind the developments in the pipeline for the Anarchies OXP, I might slide the Free Trade Zones over into a small flavour mod for Multi-Government systems. The rationale would be that the FTZs set themselves up as sovereign states: GalCop finds it difficult to interfere, because all the fractious squabbling petty little nations on the various Multi-Government worlds jealously guard their legal independence. This makes it easy for the FTZs to cloak themselves in the legal fiction of statehood and avoid the trouble of GalCop oversight. I'll hang them off the beaten track a bit but seed a few pirates around them, and try to limit the jackpot payouts on products: make them potentially cheap, but not spectacularly so.
Commander McLane wrote:
And one last thing: Have fun with OXPing! :wink:
Thanks, too, for all the advice -- greatly appreciated! Poking around last night I (OK, we -- I had help) managed to make a Rock Hermit-style base appear reliably where I wanted it, show up on the targeting computer as a Free Trade Zone and on the Compass as a "Z" for Zone, dock with it etc. (after smearing myself all over the front of it several times, before I realised that I'd need more than the "test" role to be able to dock: fortunately my new save file "Chuck Jaeger" can take it). A defending pirate popped out when I shot the place up, but -- apart from trying to headbutt me -- seemed strangely inert. More fiddling needed, I feel. Then: on to the commodities.plist!

Mind you, it is definitely good fun. Weirdly compulsive and enormously satisfying! I'm still very much doing things based on faith, with practically no underlying empirical understanding, but I've not yet been reduced to sacrificing chickens to make something work...

Posted: Mon Aug 06, 2007 12:27 pm
by Commander McLane
Well, that's definitely a good start. Understanding usually grows with more practise, after all it's no occult knowledge we are practising here.

So keep up with it! Right On, Commander! :)

*****

P.S.: In a later stage of development you can even think of making a model of its own for the Free Trading Zone instead of using the Rock Hermit. If you are no modeler yourself, just kindly ask on the forum, I guess you will find people willing to lend a hand (or a 3d-program). That's how I got models for Hacker Outposts and Salvage Gangs in Anarchies.oxp (not yet in 0.1, which was a mere pre-release, but they look great!).

Posted: Mon Aug 06, 2007 1:17 pm
by Disembodied
Commander McLane wrote:
Well, that's definitely a good start. Understanding usually grows with more practise, after all it's no occult knowledge we are practising here.

So keep up with it! Right On, Commander! :)

*****

P.S.: In a later stage of development you can even think of making a model of its own for the Free Trading Zone instead of using the Rock Hermit. If you are no modeler yourself, just kindly ask on the forum, I guess you will find people willing to lend a hand (or a 3d-program). That's how I got models for Hacker Outposts and Salvage Gangs in Anarchies.oxp (not yet in 0.1, which was a mere pre-release, but they look great!).
I've been thinking about models... I even dowloaded Dry Dock, but apart from opening up some pre-existing models and going "ooh!" I haven't done much with it yet. Although part of me (probably the lazy part) quite likes the idea of using a mined-out Rock Hermit for an FTZ: they'd be cheap, quick and dirty places, after all. Although fiddling with the texture is a possibility: adding a big crude spraybombed "FTZ" to the back of the rock should be cheap, quick and dirty too. Another idea would be to spell out "FTZ" in flashing lights... maybe play with the flash periods so the letters light up one after another, if that's possible...

Posted: Mon Aug 06, 2007 3:34 pm
by JensAyton
Just to avoid a buildup of expectations, note that Dry Dock is not a modelling tool. :-)