Re: AI Trading Assistant OXP
Posted: Sat Sep 15, 2012 7:29 am
Yes it is a real usable property.
For information and discussion about Oolite.
https://bb.oolite.space/
Well, of course the spell-checker insisted. I doubt, however, that it does have the capacity to put you to sleep before getting a surgery.Wildeblood wrote:I think it messy, inelegant and anaesthetic*, …
* Spell-checker insisted.
I have to ask why?Wildeblood wrote:... prevent buying of illegal goods at GalCop main stations, by instantly reversing such trades.
Indeed, I did. Opera suggests anaesthetic, synaesthetic, kinaesthetic, anaesthetist or aesthetic in place of unaesthetic, which it gives the dreaded squiggly, red underline. It also doesn't know the plural of you is youse, but I have to draw the line and stand up to these computers at that.Commander McLane wrote:Well, of course the spell-checker insisted. I doubt, however, that it does have the capacity to put you to sleep before getting a surgery.Wildeblood wrote:I think it messy, inelegant and anaesthetic*, …
* Spell-checker insisted.
You probably wanted to use "unaesthetic".
Why not?El Viejo wrote:I have to ask why?Wildeblood wrote:... prevent buying of illegal goods at GalCop main stations, by instantly reversing such trades.
The usual terms and conditions apply: You don't need to install the OXP if you don't like/want what it does.Wildeblood wrote:Why not?El Viejo wrote:I have to ask why?Wildeblood wrote:... prevent buying of illegal goods at GalCop main stations, by instantly reversing such trades.
Or tax them 10% GST.El Viejo wrote:I have to ask why?Wildeblood wrote:... prevent buying of illegal goods at GalCop main stations, by instantly reversing such trades.
Quite so. The script in this isn't written to be a model of brevity. It's written with two big switch statements listing each commodity separately, so it's easy for anyone to start hacking into to add exceptional handling for any particular commodity that interests them. Hence it was easy to change the reaction to buying illegal goods, back in version 1.1, and is just as easy to revert it if you have no qualms: open script.js and scroll down to $playerBoughtCargo, it starts like this then 16 more cases for the other commodities follow...Commander McLane wrote:The usual terms and conditions apply: You don't need to install the OXP if you don't like/want what it does.
Or, in a lesser case, you can modify it for your own use.
Code: Select all
this.$playerBoughtCargo = function(cargo,quantity,totalprice)
{
if(this.logging) log(this.name, "Player bought " + quantity + " units of " + cargo + " for " + totalprice + " credits, total price.");
player.ship.hud = "trading-assistant-hud.plist";
var price = totalprice / quantity;
switch(cargo)
{
case "food":
if(price > 5.0) this.$paidTooMuch(cargo); // Paying above the average price.
if(price < 3.5) this.$paidLowPrice(); // Minimum GalCop price: 2.0
break;
Code: Select all
case "slaves":
// if(price > 15.2) this.$paidTooMuch(cargo);
if(price < 8.6) this.$paidLowPrice(); // Minimum GalCop price: 2.0
else this.$illegalGoods(displayNameForCommodity(cargo));
break;
Code: Select all
case "slaves":
if(price > 15.2) this.$paidTooMuch(cargo);
if(price < 8.6) this.$paidLowPrice(); // Minimum GalCop price: 2.0
// else this.$illegalGoods(displayNameForCommodity(cargo));
break;
this.playerBoughtCargo
is coming as a built-in function in 1.77 (although I do recall some discussion over it in the past elsewhere). So your $playerBoughtCargo self-defined function, whilst separate due to the $, may end up causing a little bit of confusion?What I like about that picture, is that you have somehow modified the settings so that it detects the commodities in cim's New Cargos oxp.Wildeblood wrote:Righto, how does this arrangement of reminders look?
I think it messy, inelegant and anaesthetic*, and remind you that you apparently got by without such reminders before. But if it meets with your approval, it will become the new 1.7 some time later this week. You might be surprised how much fiddling about is involved in a small change like this.
So, an idea I had for 1.7, which I suppose will now be 1.8, was to prevent buying of illegal goods at GalCop main stations, by instantly reversing such trades. What do youse think? (Isplayer.ship.dockedStation.isMainStation
a real property - it looks familiar?)
* Spell-checker insisted.
"Modifying the settings" means "installing New Cargoes OXP". Different OXPs play along with each other. There's no need to modify one OXP in order to install another OXP.DeathKnyte wrote:What I like about that picture, is that you have somehow modified the settings so that it detects the commodities in cim's New Cargos oxp.
This is my own biggest bugbear, and what DeathKnyte was complaining about above. To buy more when you already have some aboard, press [shift] [>], not [enter] twice.Cpt wrote:As requested feedback: I have an issue that when I press enter twice, the fastest way - to sell all and then buy all which accomplishes my usual goal with most alacrity. The AI treats this as two different transactions...
That's why it remembers what you actually paid, and reminds you when you sell. If you sell a commodity one unit at a time, and see those average price reminders trending higher, it means you're losing money with every unit you sell. If they trend downwards, then you're making a profit, regardless of average prices.Cpt wrote:It also perpetually warns me that I buy Gems and precious metals over their average price, I know I do but I sell even higher. Perhaps I could interact with the AI to set my buy/sell fixed price boundary of 41 credits for gold, 75c for Platinum and 22c for Gems so it knows my strategy?
No, that's just what my market screen always looks like. It's nothing to do with cim's New Cargoes:-DeathKnyte wrote:What I like about that picture, is that you have somehow modified the settings so that it detects the commodities in cim's New Cargos oxp.
I don't know anything about New Cargoes, but I'm sure it has no effect on the normal market screen, so these two OXPs shouldn't have any incompatibility. Cim?READ ME wrote:If you wish to change the names of the commodities shown on the market screen, find the file named "descriptions.plist OFF" inside the "Config" folder, rename it to "descriptions.plist" and edit it using a text-editor. The example file supplied over-rides only the section of descriptions.plist (a quite large file elsewhere within Oolite) pertaining to commodity names.
P.S. I left a backup copy in there, too, in case you break it. Whoever you are.-----------
Change Log:
-----------
1.6.2 (September 17th, 2012) Moved script from Config to Scripts folder, and re-arranged its contents for easier editing. Don't be shy to get in there and hack it.
No, no effect on normal markets at all.Wildeblood wrote:I don't know anything about New Cargoes, but I'm sure it has no effect on the normal market screen, so these two OXPs shouldn't have any incompatibility. Cim?
The only "price" I ever "buy" precious commodities at is 0.Wildeblood wrote:That's why it remembers what you actually paid, and reminds you when you sell. If you sell a commodity one unit at a time, and see those average price reminders trending higher, it means you're losing money with every unit you sell. If they trend downwards, then you're making a profit, regardless of average prices.Cpt wrote:It also perpetually warns me that I buy Gems and precious metals over their average price, I know I do but I sell even higher. Perhaps I could interact with the AI to set my buy/sell fixed price boundary of 41 credits for gold, 75c for Platinum and 22c for Gems so it knows my strategy?