"Beautiful. You're Hired."

Hey Folks! Hope everyone enjoyed their weekend. Nothing too crazy here. I ended up buying Ghost Recon Wildlands last week after trying the free weekend, so I ran around Bolivia a bunch, helping the rebels fend off drug cartels.

Back at the office, I was off to a late start due to a routine check-up at the doctor's. But as you can see in today's screenshot, it's now possible to hire NPCs!

There's not much more to it, of course. They just become tagged as your crew, so you can zone/roster them accordingly. And they can't say "no," which will eventually need fixing. For now, though, it gets another soul aboard the ship, which should help me with in-flight crew drama testing, and more general crew tools.

Before I could do that, though, there were some newly-exposed bugs that needed fixing.

The new homeworld data changes I made last week caused a few null pointers, since the game previously assumed all places had all social strata. Now that some places cannot allow citizens/illegals, I needed special handling.

NPCs were also interrupting certain interactions that required waiting for the initiator to walk over. This was due to the "wait" command inserting into the beginning of their queue and being exhausted as soon as the initiator arrived. I moved that to the end of the queue instead, so now NPCs continue with their current task until done, then start waiting.

There was an infinite loop bug in certain pathfinding situations. AI would have no better tile to walk to than the current one, but that one was out of range, so they ping-ponged within the tile endlessly. I short-circuited that with some code, and at least now they give up long enough to release their target. Still some slower looping to solve here, though.

I removed the ability to click-select items inside a container, since that interfered with choosing crew that carried lots of items like food packets.

And I noticed an error message bug when trying to trade with a station shopkeeper. If I have no zones in which to store purchased goods, it was telling me I had insufficient funds. I added code to specially report "no zone" errors to the user.

Finally, I fixed some NPC-spawning code to ensure they appear in their spawn zone, instead of 0,0 (which could be inside a wall).

I still have a bit of work to do with spawning tomorrow, however. Right now, I can spawn NPCs manually, like the shopkeeper. But it is unreliable. For one thing, I need to create a distinct spawn zone for each NPC I want on a station, and that can get tedious if I want 10-20 random NPCs to walk around.

Also, the game will check if any existing NPCs match the template for newly-spawned NPCs before spawning them. And if there's a match, it skips it. This is good for avoiding redundancy, but it works against situations where I want to spawn large numbers of NPCs (such as a dozen completely random NPCs). As soon as the first NPC spawns, he matches the "completely random" template, and no more spawn.

I'd like at least a few non-station personnel walking around so I don't have to hire the station's shopkeeper or security guard. And ideally, enough people walking around that the station seems populated.

So, more on that tomorrow!

Tags: Ostranauts