Ship Editing During Simulation

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.

Today's work centered around getting the functionality from ship edit into the more up-to-date crew sim mode, so both could share as much code as possible. And I'm happy to say it works! As far as I can tell, anyway. I'm sure there are edge cases I have yet to test (and fix), but I'm able to load ships, edit them, test them, and still play the game normally, all within the same Unity scene. Pretty cool!

With that done, I think my next step is to create a more representative station with some zones, and potentially NPC spawn points/rules, so I can then fly there with some cargo, and attempt to trade. This might necessitate some work to add spawn points as an item type or something, to indicate where NPCs can appear on a ship.

The NPC specifications themselves should already be done as part of the PersonSpec class, which allows me to specify rules for their name, gender, homeworld, career, and conditions they should have applied when spawned. So I think all I need is to create a sample PersonSpec for a trader, and figure out some way to indicate in a ship template that an NPC using that PersonSpec should be spawned. And possible where it should be spawned.

That doesn't seem too hard to do, so there's a small chance it'll be done in time for me to test trading tomorrow. And if so, we may be at the threshold of our first game loop!

Well, now that I say it, there might be one more piece missing: derelicts. Though, I think all the necessary features are already done to add some of those around the system. I might only need to create a few derelict templates, spawn them at random places, then rando-damage them.

Still, we're getting very very close...

Tags: Ostranauts