(WIP) Elite Trader
Moderators: winston, another_commander
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: (WIP) Elite Trader
Many thanks, dybal. BTW, most of the glitches in the script (apart from the fact that one must save with an empty hold) have gone away now IOW, it works.
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: (WIP) Elite Trader
Can we treat playerShip.Manifest like an array?
I mean, supposing we want to read just the non-zero items into another array without enumerating every property (food,textiles,radioactives,slaves,liquors_wines..) by, say, using a var in a loop.
Or is there another way to do it anonymously?
In Pascal, for example, that would be something like
because the commodities would be enumerated types.
I mean, supposing we want to read just the non-zero items into another array without enumerating every property (food,textiles,radioactives,slaves,liquors_wines..) by, say, using a var in a loop.
Or is there another way to do it anonymously?
In Pascal, for example, that would be something like
Code: Select all
for m := food to alien_items do
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
Re: (WIP) Elite Trader
Use playership.manifest.list, that's an array (read-only!) of objectsReval wrote: ↑Wed Nov 11, 2020 4:13 pmCan we treat playerShip.Manifest like an array?
I mean, supposing we want to read just the non-zero items into another array without enumerating every property (food,textiles,radioactives,slaves,liquors_wines..) by, say, using a var in a loop.
Or is there another way to do it anonymously?
In Pascal, for example, that would be something like
because the commodities would be enumerated types.Code: Select all
for m := food to alien_items do
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: (WIP) Elite Trader
Cheers.
Does Spara (or anyone) happen to know how I can check for the presence of Market Observer? I ask because, if MO is present, Elite Trader has to restrict the number of status messages so as not to overwrite the messages of that OXP. Were I to detect its absence, I would add an extra status or assessment line.
Does Spara (or anyone) happen to know how I can check for the presence of Market Observer? I ask because, if MO is present, Elite Trader has to restrict the number of status messages so as not to overwrite the messages of that OXP. Were I to detect its absence, I would add an extra status or assessment line.
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
Re: (WIP) Elite Trader
You need to check for the existencen of the assosiated world script. Check the name of the script from the oxp in question. You should find a simple example of such check from for example Wanted Posters oxp (or whatever it was called ).
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: (WIP) Elite Trader
OK. And if we could just confirm once and for all time that there is no way of retrieving the buy-prices of the items stored in this manifest, short of logging them in a saved game?dybal wrote: ↑Wed Nov 11, 2020 5:15 pmUse playership.manifest.list, that's an array (read-only!) of objects
Edit: You know - for simplicity's sake, if the above does pertain, I think I might just give the player a token point if he sells with a full hold after game-load. Comments?
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
Re: (WIP) Elite Trader
How could there be? Those are the items stored in the ship hold and for example food there could be bought for 5 different prices from 5 different places. Or did I not understand your question correctly?Reval wrote: ↑Thu Nov 12, 2020 8:18 amOK. And if we could just confirm once and for all time that there is no way of retrieving the buy-prices of the items stored in this manifest, short of logging them in a saved game?dybal wrote: ↑Wed Nov 11, 2020 5:15 pmUse playership.manifest.list, that's an array (read-only!) of objects
The only prices that can be read over saves are the prices in the current system.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: (WIP) Elite Trader
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?
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
Re: (WIP) Elite Trader
Javisst. You're slowly converging to Market Observer . If you need those values, you need to keep track and store them yourself. That data is basically of no value to the core game, so that most likely the reason they are not stored.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: (WIP) Elite Trader
En koskaan! Must, must keep it simple I'm going to call a halt pretty soon and release it. There's time to add bells and whistles in later versions. It's working to my satisfaction as it stands right now. Just a couple of finishing touches required...
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: (WIP) Elite Trader
Elite Trader, Version 0.1 Beta.
Anyone care to test it?
http://wiki.alioth.net/img_auth.php/e/e ... Trader.oxz
Bug reports welcomed.
Edit: From the summary:
Good Market trades count toward the Elite rating. Killings on the Market floor now earn equal cachet beside kills on the space-lanes. One killing is as valid as the other.
NB. This OXP takes no account of cargo contracts, special deals, scoops of drifting cargo in space, mined minerals, or of gems or precious metals. If it's not paid, the score's not made. If the game loads with full holds, the first score is missed.
TIP: If you do load the game with a full hold, just sell and re-buy before undocking.
Anyone care to test it?
http://wiki.alioth.net/img_auth.php/e/e ... Trader.oxz
Bug reports welcomed.
Edit: From the summary:
Good Market trades count toward the Elite rating. Killings on the Market floor now earn equal cachet beside kills on the space-lanes. One killing is as valid as the other.
NB. This OXP takes no account of cargo contracts, special deals, scoops of drifting cargo in space, mined minerals, or of gems or precious metals. If it's not paid, the score's not made. If the game loads with full holds, the first score is missed.
TIP: If you do load the game with a full hold, just sell and re-buy before undocking.
Last edited by Reval on Thu Nov 12, 2020 6:16 pm, edited 2 times in total.
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- montana05
- ---- E L I T E ----
- Posts: 1166
- Joined: Mon May 30, 2016 3:54 am
- Location: lurking in The Devils Triangle (G1)
Re: (WIP) Elite Trader
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.
Scars remind us where we've been. They don't have to dictate where we're going.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: (WIP) Elite Trader
All very, very true. Hence my decision not to take account of any of that.
Edit: I gladly leave the complexities to Spara and the excellent MO.
Edit: I gladly leave the complexities to Spara and the excellent MO.
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: (WIP) Elite Trader
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.
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: (WIP) Elite Trader
Darkside Moonshine Distillery adds in Witchfire Whisk(e)y
Fuel Tweaks adds in Quirium Fuel
Fuel Tweaks adds in Quirium Fuel
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?