Stacks, Trading, and Other Fixes

Hey Folks! Shorter day today, as I had to run into town for a meeting. I did manage to square away the issues with trading and stacks, though. Plus a few other fixes.

First order of business today was to get the trading UI to actually do something when the player hits "Submit." I guess I wrote all the code for that at some point, but forgot to hook it up. So that didn't take long. It did, however, reveal some new bugs.

First, the trading UI was incorrectly checking zones that belong to each participant, and I had to fix that. Then, I found a bug that caused every trade to cancel after the first item sold in a batch. You could buy the entire store, but would only get the first item you chose. And fixing that revealed another similar bug that would only grab half of any selected stack, instead of the full amount. Both were pretty easy fixes once I found the offending code.

There were also some minor bugs uncovered along the way. One that caused items to appear floating under the crew when picked-up and carried. Another that caused a null pointer when installing an item (trying to access a missing collision box). And finally, a bug that caused appliance signal wiring to always fail (this due to my new layer masking changes for rendering bug fixes).

Fixing all of those means I can now sell off my sweet loot from derelicts, get the cash to pay off my docking fees, and use some of the surplus to buy kung pao chicken and nacho fiesta Trenchers food packs! Plus refill fuel tanks, I guess :)

Anyway, not a bad day. And the meeting went well, so that's a bonus. Now it's time to relax for the weekend, and hopefully start anew with a fresh brain Monday. Have a good one, all!

Tags: Ostranauts


Rovlad's picture

Please don't do trading the same way RimWorld did it: I get confused what's buying or selling every time. :)
Also bartering doesn't even make a whole lot of sense when you have allegedly established economy. Maybe you can barter with other ships, and have random multipliers assigned ("wow, we really need tools, so we'll pay a lot, but have a shitload of food, so you can have it cheap"), but definitely not with stations (imagine the bureaucracy there!). If basically no-one accepts goods instead of money even now, why would they do that in the year 2500 or whenever is this taking place?

dcfedor's picture

I know what you mean. I even found myself a bit confused trying to use my own version of that UI, and I wrote the damned thing! Fortunately, I think it can be improved upon.

And you're right about bartering. In most cases, we're going to be shopping or selling cargo, which will be one-way transactions. I think that should be pretty easy to setup once the basics are in place to support buying and selling.

And there's actually a lot of really complicated, but sometimes interesting, stuff that goes on in shipping and cargo. Things like finding buyers, contracts, dockworkers, security, taxes, etc. Little to none of that is here right now, but it could be an interesting thing to explore when there's time.

I mean, you don't just roll up to a dock and start throwing your cargo down. You gotta pay the tax man, the harbormaster, the dockworker's union, the security team, etc. Which is why most players won't be cargo haulers. They'll be gray and black market dealing, or doing other, less regulated stuff :)

Dan Fedor - Founder, Blue Bottle Games