PONG Notes
As the title suggests, here are a few notes about PONG, what I'm trying to achieve and how I hope to do so.
Basically, the problem is how best to implement the AI. I need to cover a number of distinct behaviours, and I need this to be easily extensible so I can modify the default behaviour with other quests and/or add-ons. I also need to cope with prisoners active in two or more holds at the same time.
The basic behaviours I need are:
- in cell at night
- in cell during day (new arrival)
- travel from cell to pillory
- travel from pillory to cell
- release from jail after time served - This is a tricky one since it can easily conflict with the trip to the pillory. I may end up keeping two jailors active at any given time -maybe more on that in a later post
We also need one to escort the PC to the cell - but that's covered nicely by XPO
There are two ways to make all that happen. One uses scenes for most of the work, the other uses packages attached to aliases. Scenes are more robust, and this is the approach XPO uses. The only drawback is that they're difficult to suspend and resume.
Packages, by contrast, are fiddly and tricky to get working right, but they have the advantage that you can run a scene (or start dialogue) in the middle of a package and then have the package resume afterward. It needs a little careful design of the package, but there are advantages.
As an example, let's say we catch "hello" events on the walk from jail to pillory, with a chance to spin off a scene between one of the girls an upstanding citizen. Citizen says something demeaning, girl responds with verbal abuse, citizen says "I don't have to take that from you" and a fight breaks out. At this point we can trigger a scene where the jailor walks back to break up the fight, apologise to upstanding citizen, gag offending girl and resume walk to pilliory, maybe with an extra day added to the girl's sentence. When the scene ends we re-evaluate the package for the actors and they resume their journey. We can also make that work for the PC as well which would be very difficult to do inside the context of a scene.
The other thing I want to do is use Mod Events to let other quests and/or add-ons provide their own scenes.
Let's look at another example for that:
Let's say that when we lock up the prisoners at night we send an event - call it "XPONG_Night_Lockup_Event". We have three potential consumers of this event.
The first consumer is the PONG quest itself which registers to receive its own event. Pong will try and start a scene that has some simple comments from the guard to the prisoner(s). For instance:
This gives us a default, so that if no one else is interested we still get something happening. (We could as easily do nothing and let the occasion pass unremarked, but this makes for a better example).
The second consumer would be the For the Love of Mara (FtLoM) quest. Let's say PONG runs at priority 60 and FtLoM runs at 65. PONG has to go latent in between raising the event and catching it, so hopefully FtLoM gets first crack at handling it. FtLoM launches a scene and we get Sister Magartha coming along to dispense an her own particular brand of compassion:
Obviously we need a way so that only one of these scenes runs. I'm hoping that we can make the first one lock the others out, but failing that we can set a global to flag when a scene is running.
The third consumer would be quests governing the behaviour of the individual girls. So Ingi Frost-Daughter's quest gets the event and plays its own scene
Ingi's quest runs at priority 70 so it gets the first crack at launching a scene. If there's more than one girl in the cell, which one gets to have her scene is indeterminate. Which is ok, since it adds a bit more variety. It does mean the quests need to be structured so that the narrative survives a missing incarceration scene, but that shouldn't cause any serious problems. Higher priority quests should probably have an option to do nothing as well, and let the lower priority cases sometimes get some airplay, again helping the keep the responses fresh and varied.
Of course, most of this is still at the planning stage. So some or all of the above may not work. Or may work, but not the way I think it works. Still it's a plan of sorts.
OK, I think I'll leave that there. There's more I wanted to talk about, but that looks like quite enough for one post. I'll maybe talk about the rest of it another time ![]()
3 Comments
Recommended Comments