Page 4 of 11
Re: (WIP) Elite Trader
Posted: Thu Nov 12, 2020 6:59 pm
by Reval
Thanks for those two. But I'm sure I remember there being one that completely reorganized and revamped the Oolite Market. (And I suddenly have it in mind to try something similar: maybe another Frontier First Encounters facsimile...)
Re: (WIP) Elite Trader
Posted: Thu Nov 12, 2020 7:08 pm
by dybal
montana05 wrote: ↑Thu Nov 12, 2020 1:54 pm
Reval wrote: ↑Thu Nov 12, 2020 8:49 am
Um... Yes, I was referring to the player's (personal) buying history. It would be so neat if the buy-prices could be stored and aggregated by Oolite itself in the manifest.list objects. It would be just another property, after all. Eller hur?
I do agree with spara, there is no importance for the core-game to log all prices a player bought goods. Are you aware that several OXP's add a lot of stations to every system ? All of them will have slightly different prices so if you intend to log all buyer-prices how you will do ? Average price per system or a single entry for every transaction ? Btw however you plan to solve it, you need to save every call for that, I would suggest to build an array.
I would just keep an weighted average price for each commodity and use that to judge if a buy or sale where good.
Re: (WIP) Elite Trader
Posted: Thu Nov 12, 2020 7:10 pm
by Reval
That's a great idea. Perhaps for a future update. I'm satisfied with the way it works ATM - and it does work. No frills, hehe.
Re: (WIP) Elite Trader
Posted: Thu Nov 12, 2020 7:37 pm
by dybal
Things to keep in mind if trying to track buys/sells/profit:
- cargo can be destroyed in-flight;
- cargo can be scooped in flight;
- cargo can be dumped in flight;
- cargo can be dumped and then re-scooped in-flight (dumped to free space to scoop something else, re-scooped after discovering that the something else was worth less than the dumped cargo);
- cargo can be mined in-flight (from derelicts, from asteroids);
- cargo can be stored in Equipment Storage at the Main Station;
- cargo can be stored in-ship but not be part of the manifest: smuggler compartments, Hyper Cargo, Vortex/Maelstrom cargo bays...
Re: (WIP) Elite Trader
Posted: Thu Nov 12, 2020 7:50 pm
by Reval
Thanks a lot.
Well, then, all I need to do to avoid those contingencies is read the number of units currently in the hold on docking and if it doesn't tally with the $etBoughtUnits from the last station, ET drops the whole batch and doesn't attempt to process it. And it's still (almost) as simple as before.
Re: (WIP) Elite Trader
Posted: Thu Nov 12, 2020 11:37 pm
by Nite Owl
Reval wrote: ↑Thu Nov 12, 2020 6:10 pm Does anyone happen to know the name of the OXP that adds new/extra commodities to the market screen? I'd like to test Elite Trader with those if possible.
The most extensive commodity OXZ is
NEW CARGOES which adds over 100 additional commodities to Oolite.
Re: (WIP) Elite Trader
Posted: Fri Nov 13, 2020 5:06 am
by Reval
Nite Owl wrote: ↑Thu Nov 12, 2020 11:37 pm
The most extensive commodity OXZ is
NEW CARGOES which adds over 100 additional commodities to Oolite.
Thank you! That's the one I was thinking of.
The docs seem to indicate that NEW CARGOES doesn't actually modify the core Oolite commodities list, bit adds, and allows users to add, new cargoes via an API/script as what we might call 'aliases', so ET will probably function as before with that installed.
Re: (WIP) Elite Trader
Posted: Fri Nov 13, 2020 5:57 am
by another_commander
One more thing to ponder about is that some missions will empty your cargohold to fill it with special cargo, which may or may not be profitable depending on how you handle it.
Re: (WIP) Elite Trader
Posted: Fri Nov 13, 2020 6:45 am
by Reval
Yes indeed - there are so, so many contingencies to deal with here. Best, in ET's case I think, simply to concentrate on conventional trades (Milk Runs), invalidating all the others by a simple unit count tally. Those who indulge in the more recondite trade practices are probably experienced Ooliters anyway and will have lots of kills under their belt. This one is more for tyros and the keyboard/joystick-challenged
Re: (WIP) Elite Trader
Posted: Fri Nov 13, 2020 7:28 am
by Reval
Slightly off-topic: could someone remind me which key to press to export an OXZ from the Manager?
Re: (WIP) Elite Trader
Posted: Fri Nov 13, 2020 7:47 am
by another_commander
The 'x' key.
Re: (WIP) Elite Trader
Posted: Fri Nov 13, 2020 8:10 am
by spara
Reval wrote: ↑Fri Nov 13, 2020 6:45 am
Yes indeed - there are so, so many contingencies to deal with here
To remain sane and keep the project alive, I strongly suggest dealing with the core game first and then gradually start adding compatibility with the numerous OXPs out there.
Re: (WIP) Elite Trader
Posted: Fri Nov 13, 2020 8:15 am
by Reval
Sage advice. That's exactly what I've decided to do...
I will institute a manifest count on docking and then compare it with the # bought units from the last station, though.
Re: (WIP) Elite Trader
Posted: Fri Nov 13, 2020 10:40 am
by Reval
Attempting to implement the following:
Code: Select all
this.guiScreenChanged = function(to, from) {
if (to == GUI_SCREEN_MARKET) {
player.consoleMessage("In hold: "+this._etPodCount+" pods ( "+formatCredits(((this.$etBoughtPrice)/10),true,true)+" )");
}
}
Latest.log throws this exception:
05:33:07.718 [script.javaScript.exception.notDefined]: ***** JavaScript exception (Elite Trader 0.1 Beta): ReferenceError: GUI_SCREEN_MARKET is not defined
I simply pasted GUI_SCREEN_MARKET in from the Wiki.
Re: (WIP) Elite Trader
Posted: Fri Nov 13, 2020 10:43 am
by another_commander
I think it's meant to be a string: "GUI_SCREEN_MARKET".