Closed jpcsupplies closed 8 years ago
Could also make value work so that it values targetted item if no parameters given, or values specified item if parameter is given, or use something like /value ship
Eg.
/value Ice (shows value of 1 ice (current behavior)
/value (no parameter) (calculate composition of ship under crosshair parts, and calculate ship value)
or
/value ship (same as above, calculates value of targeted ship)
Wiki also lists this: It allows players to value the worth of a cargo in a ship etc (eg /worth) ... (or /cargo, or /value cargo etc)
It could also accept a parameter, for example a material name. So if you have a ship with three full cargo containers, one has iron ingots, one has ice, and one has stone
point at ship and go /worth ice for the script to retrieve the number of ice in the targeted ship, and then respond with the total value to buy or sell that amount.
(say we detect 10000 ice, we could call our existing /value 10000 ice sub routine to handle the reply to player)
Possible keywords - /value (for valuing ships?) /worth (for worth of items in ships?) /price (for looking up items price?)
or
/value ship (as targeted) /value goods # (contents of cargo of targeted ship) /value # item (hypothetical price look up as current behaviour works)
Ok, biggest issue i see here, is there is simply too many items to account for. I can manually add them all up in the spread sheet; but it will take quite a lot of time to key in all the build components.
What we need is a way to query via the API system the construction requirements of a given block/object blueprint.
Anything useful exposed in API whitelist?
I haven't noted this anywhere, but /worth currently ignores all owner checks. You can use it on any ship. As i have set it up to display the list of components, we should either limit usage to ships people mostly own, or remove the compontent list if you don't own it.
Also, i have used the market Sell price for all components. Thought I should double check this.
ah ok so it gives you a recommended retail price on the value of your cargo.. perfect for roving traders :)
I think valuing another players ship (minus cargo value) is fine. Allows people to see what a ship is worth and make an offer, or decide if an existing offer from the current owner is fair. Should work well.
The old value command displayed what the NPC would buy it for, and what it sells it for..
I suppose some players might want to know what the NPC would pay for a cargo..
But i think your current logic is just breaking down the component build cost on the entire ship not any cargo correct?
Currently cargo is calculated. Should I separate it? ie., subtotal. Total?
Gases are hard to separate as a cargo, unless they are only in bottles.
subtotal? sounds good cargos should only show to the main owner tho.. not to someone scouting a ship just to see if it is worth stealing etc
this feature is looking good so far,. im looking at pushing out a progress update to the public version of the mod.. i think the only thing making me pause is to check if we have a set command for altering the npc default trade zone(s) ill log an issue for it.
I think this item is all done now.. wanna confirm and close when you get a sec.
To help dronefab inc to value his ships i am thinking a quick hack would be to change the current value command to be called "price" and make the value command add up all the block types and calculate the combined value of the ship based on the sell price of all the components.
Unless we can access the production queue costs tho, ill probably need to extend the xl spread sheet to generate a block cost table to work off - doing it this way may prevent custom blocks being valued however.