space prototype

Using Crew to Move Items

dcfedor's picture

Hey Folks! Some pretty cool progress today, as I focused on some tools to allow crew to move larger items and uninstall/reinstall them.

The first thing I did was more of a warm-up. I finished the dragging/pulling code I started yesterday afternoon, and formalized it into a simple component I could add to any object. Once added, and told who to follow, that object drags around behind the target at a set distance. Not much more to it yet, but it should come in handy once I'm ready for AI to start using it.

Dropping Off or Picking Up?

dcfedor's picture

Hey Folks! Did a bit more work on pre-damaging derelicts today, and expanded inventory access a bit more on crew.

The pre-damaging so far has just been a matter of damaging tiles and punching holes. But I also wanted canisters and fuel tanks to be all or partially drained, so we wouldn't find ships with full tanks of everything.

Derelicts and Debug Info

dcfedor's picture

Hey Folks! More work today getting a rough salvage game loop established. I added random derelicts to the map, some new debug info to the HUD, and fixed some issues that were exposed by these changes.

Ding! Trading Operational

dcfedor's picture

<Drawing in long breath and exhaling.> Ok. I think we've got trade working now. It was a heck of a day, fraught with niggling, annoying details. But I believe the trade system now works as intended!

The first order of business was a bug in the ship zone tiles when ships rotated for docking. They needed special treatment since their tile indices became invalid when the ship's tiles rotated. Not too hard to fix, just hard to remember, hence why it wasn't already doing it :)

But that wasn't it. Not by a long shot.

Station Crew Spawning and Trade

dcfedor's picture

Hey Folks! Hope everyone had a good weekend. There was an apple picking trip among ours. Plus an extended bout of Rimworld Saturday evening, where half my colony died in a caravan beset by man-eating alphabeavers. RIP the de facto leaders of the colony.

Ship Editing Fixes, and OKLG

dcfedor's picture

Hey Folks! I decided to start working on a more representative station layout today. Mainly, this is to get ready to test the bartering and NPC spawning stuff, but it also gives me a chance to find and fix any remaining issues resulting from the migration of the ship editor into the simulation mode. And boy were there some of those.

Ship Editing During Simulation

dcfedor's picture

Hey Folks! Pretty big update today, as the ship editing code is merged into the crew simulation mode.

As mentioned yesterday, I was starting to run into situations where it'd be useful to edit ship layouts, but the old ship editor lacked certain tools. Zoning being a big one, but also seeing in real-time how components behave when hooked-up, watching air flow on the ship, etc.

Barter Zone Filtering, Trade Execution

dcfedor's picture

Hey Folks! Making more progress on the trading system today. The barter zones are now filtering appropriate items, and the first draft of the trade execution code is in.

Today's image is a recreation of yesterday's test, this time with new filtering and flags in place. Items like the floor and walls are ignored, while items that can be transported (like hull patches, gas canisters, and batteries) appear in the list. Furthermore, each line item correctly shows how many units each party has in their collective person and zones.

Wanna Buy a Food Packet? No? How About a Floor?

dcfedor's picture

Hey Folks! The zone/trade refactor continued today, and is mostly working now. I can add and remove zones from a ship, and use them in the trade UI.

There were still a handful of gotchas to solve in wrapping-up the zone UI. Adding a name to the zone was particularly tricky, as I had to deal with user-edited names as well as default "Zone 1" style names. Then, some logic to handle removing zones when all tiles in the zone were changed to other zones (or null zones). I added code to select an entire zone by clicking one of its tiles.

Zone Data Revision

dcfedor's picture

Hey Folks! Hope everyone had a good weekend. Some more heavy labor here, as we finished up a path in the front yard. Digging and hauling dirt and rock, grading sand, and laying patio bricks. Nothing like some good old dusty, back-breaking work to give one time to think. And it fortunately gave me an idea for solving my zoning issue.

I decided to slightly change the way zone info is stored on a ship, to better tie together NPCs with the zones that apply to them. Plus some other per-zone info, like zone name, etc.