Microplot Handling

Hey Folks! Finished-up the first draft of the social contact list UI and returned to plots for more testing today.

The social contacts UI now has a more legible format, with each contact listing their current relationship, and past events that led to this. The event list used to be really wordy with lots of redundant info, but not it's more like "Met during: Hulk salvage." I also needed to add this data to save files for loading later.

There's a lot of room to improve this UI, and some folks have made good suggestions to make it more graphical. And I'm already finding the social contacts to be an intriguing thing to peruse, so it's likely to evolve into an end-user UI at some point.

But for now, it allows me to continue plot testing.

Returning to plots, there were a few more things to shore-up. The first thing to fix was interactions causing the same social contact to be chosen over and over for life events. If you're in prison and meet two contacts, they should be different people :) So I added some code to make interactions/events always use unrelated people when generating new contacts, but related people when changing contact relationships. The new contacts are still existing System-dwellers where possible, but new ones will be spawned if needed.

The next change was to add a new field to interactions for plot tokens. Sometimes, an interaction needs to refer to a plot person by name. So now, an interaction can list which plot it relies upon, and the game will use that to search current plots for a match. This allows me to insert character names into encounter and choice text, as we see in today's screenshot. Our captain, Ijeoma, is chatting with a bartender, Nicole. Nicole is offering a job to snitch on an ex-partner, Cristian.

Historically, Ijeoma and Nicole were easy to add to the encounter text. They are "us" and "them" tokens in the text. It's Cristian that was today's focus. Now, I can specify a token like "plotname=0' to get the 0th (first) plot person in the plot named elsewhere in the interaction's data. The game then searches for the relevant plot, finds person 0, then returns a reference so I can substitute the text.

There's one more piece to this, I think, and that's being able to affect the player's relationship to named plot people. In this case, for example, Ijeoma should gain a contact entry for Cristian. Right now, my plan is to allow the interaction to have "plotname=0" in the "new social contacts" field, so I can just take advantage of the plot already having a ref to that person.

There's some code wrangling to do this, though, since the new social contact section is expecting the name of a PersonSpec, which is a data type. I'll have to add some code to handle cases where instead of a PersonSpec's name, it gets info from the plot's people directly.

There is one alternative way to do it which requires little (none at all?) code changes: I can just make the game search for this plot person again based on some flag I set on him when the plot started. In theory, this grabs the same person since that flag is unique. However, the down side is that each time I do this, I have to create a bunch of data entries to complete the search, plus the game has to waste time searching for someone it could potentially already have found before.

I'm more concerned about the extra data, though. It's already impossible for me to keep track of all the data for this plot stuff. Adding more just seems masochistic :)

On the plus side, I am very nearly able to finish a microplot test! Theoretically, if I can get named plot people to be added to my captain's "little black book," I can then seek them out with my ship. And the final step is to make sure we can rat them out to the local authorities. (Which, I'm now realizing isn't the simplest outcome. I could just deliver a message to Cristian as the simplest case of this plot. But being able to involve people that aren't the employer or target seems like a really powerful, and maybe necessary, tool for keeping these plots interesting.)

Anyway, off to a pretty good start this week. Hopefully we can see this thing in action next week. Have a good weekend, all!