Ok, I've carved out some more time to work on this. My hope is to wrap up primary development today, and there are only some related effects left. I've saved these for last because they mostly all function on a pulse. I will start with this group, which are designed to be atmospheric and sometimes confusing or alarming messages you receive at random.
Looking at the code, I decide to use the main heartbeat function of the game, because I don't want players to be able to use these messages as a fancy tic timer. This will also greatly increase the randomization, which is what we want if we are simulating actual behavior in the game. Carving out a space where taint effects trigger randomly is fairly straightforward.
I then get around to implementing the flavor messages. These are static, and therefore they are easiest to do. I also realize that these probably only make sense to players who are awake, so I add a check that the player isn't sleeping. I make a note to add in some disturbing dreams too.
Then I get into simulating some game input, such as random players walking in/out of the room, or people looking at you. Rarely, people trying to steal from you or backstabbing you. This is much more complex because it requires getting another player's name and treating it appropriately, but fortunately I've earlier written some functions that help get random players for the weave splash damage. I copy that function, and change it from checking players in the room to checking players globally.
I debate a bit whether I want to do all players or not, and I decide to only grab players the tainted MC can see on the wholist, so I don't reveal who is online on DS. I send Itesh a note about this asking his opinion, because on the one hand it would be very fun to have a trolloc or fade walk in, but on the other maybe we should not reveal players cross-race. He's no doubt asleep but can weigh in later. I decide no cross-race to start.
Then I realize that this is not very realistic if nobody is riding a horse, so I have to write special code to deal with horses. It is a little annoying and complicates the code. But we are done.
I also go back and add in the dreams.
This has all taken about 5 hours.
I compile, and it fails. I didn't declare several external functions that I used (meaning, they are located in different files, and I must explicitly "declare" them to use that code). I knew this was likely the case, and I let the compiler catch these errors so I would have a list of which functions still needed to be declared; this prevents having to go look for them myself, because they are scattered throughout the file (not a good code practice, mind you, but this is WoTMUD). The code now compiles.
I set the trigger threshold for these random messages ~10x higher than would occur normally, because I want to see them without a lot of waiting. I also set Atest to maximum taint again.
Let's start with his POV:
* HP:Hurt SP:Strong MV:Fresh >
Mad laughter rings in your ears. You realize the voice is your own.
* HP:Scratched SP:Strong MV:Fresh >
You feel the flows of saidin coursing through your body.
Sickening, rancid filth seeps into you.
You fight a wave of sickness, and saidin slips from your grasp.
* HP:Scratched SP:Strong MV:Fresh > rel
l
Connection closed by foreign host.
Hrm, we crashed.
I look at the crash logs, and see that my code to check for horses and handle them was misbehaving. Because no other (non-Imm) player was logged on, it could not find someone to hallucinate entering the room. However it still tried to check that non-existent person's horse, which of course did not exist, and so the game crashed because I was referencing data that didn't exist. I fix this up.
Now that the crash is solved, let's check in on how Atest is doing, from Aureus' perspective:
* R:1035 S:Inside HP:Healthy SP:Full MV:Fresh >
Atest mutters and stares warily into the distance.
* R:1035 S:Inside HP:Healthy SP:Bursting MV:Fresh >
Atest sways unsteadily and loses his balance.
You sense Atest connecting to the True Source.
* R:1035 S:Inside HP:Healthy SP:Bursting MV:Fresh >
Atest panics, and attempts to flee!
* R:1035 S:Inside HP:Healthy SP:Bursting MV:Fresh >
Atest mutters and stares warily into the distance.
* R:1035 S:Inside HP:Healthy SP:Bursting MV:Fresh >
Atest claws at his own skin.
* R:1035 S:Inside HP:Healthy SP:Bursting MV:Fresh >
Atest throws his head back in mad laughter.
Hrm, not doing so hot, it would seem! That's what we like to see. Let's try from his perspective.
* HP:Healthy SP:Good MV:Fresh >
You hear muffled voices coming from the north.
* HP:Healthy SP:Good MV:Fresh >
You see a black-cloaked rider on a dark horse, watching you. When you look again, he's gone.
* HP:Healthy SP:Good MV:Fresh >
A master blacksmith tried to steal something from you!
* HP:Healthy SP:Good MV:Fresh >
Spiders! Spiders are crawling under your skin.
* HP:Healthy SP:Good MV:Fresh >
*Afriend* leaves west.
* HP:Healthy SP:Good MV:Fresh >
*Afriend* has arrived from the west.
* HP:Healthy SP:Good MV:Fresh >
You have the unnerving sensation of being watched.
* HP:Healthy SP:Good MV:Fresh >
*Afriend* leaves west.
* HP:Healthy SP:Good MV:Fresh >
Mad laughter rings in your ears. You realize the voice is your own.
* HP:Healthy SP:Good MV:Fresh >
*Afriend* has arrived from above.
* HP:Healthy SP:Good MV:Fresh >
You see a black-cloaked rider on a dark horse, watching you. When you look again, he's gone.
* HP:Healthy SP:Good MV:Fresh >
*Afriend* has arrived from the south, riding a hairy aurochs.
* HP:Healthy SP:Good MV:Fresh >
You hear muffled voices coming from below.
* HP:Healthy SP:Good MV:Fresh >
You are already in touch with saidin, can't you feel it?
* HP:Healthy SP:Good MV:Fresh >
Suddenly *Afriend* places a blackened steel kris in your back!
Ouch! That Really did HURT!
* HP:Healthy SP:Good MV:Fresh >
You hear faint whispers tickling at the back of your mind.
* HP:Healthy SP:Good MV:Fresh >
Suddenly *Afriend* places a silver sai in your back!
Ouch! That Really did HURT!
* HP:Healthy SP:Good MV:Fresh >
You hear muffled voices coming from the south.
* HP:Healthy SP:Good MV:Fresh >
You have the unnerving sensation of being watched.
* HP:Healthy SP:Good MV:Fresh >
You hear faint whispers tickling at the back of your mind.
* HP:Healthy SP:Good MV:Fresh >
Bargle looks at you.
* HP:Healthy SP:Good MV:Fresh >
Aureus tried to steal something from you!
* HP:Healthy SP:Good MV:Fresh >
Spiders! Spiders are crawling under your skin.
* HP:Healthy SP:Good MV:Fresh >
*Afriend* has arrived from the south.
* HP:Healthy SP:Good MV:Fresh >
You hear muffled voices coming from below.
* HP:Healthy SP:Good MV:Fresh >
Suddenly *Afriend* places a dagger of green jade in your back!
Ouch! That Really did HURT!
* HP:Healthy SP:Good MV:Fresh >
You hear faint whispers tickling at the back of your mind.
* HP:Healthy SP:Good MV:Fresh >
Aureus looks at you.
* HP:Healthy SP:Good MV:Fresh >
You hear faint whispers tickling at the back of your mind.
* HP:Healthy SP:Good MV:Fresh >
You see a black-cloaked rider on a dark horse, watching you. When you look again, he's gone.
* HP:Healthy SP:Good MV:Fresh >
You have the unnerving sensation of being watched.
...and so on. It seems to be working well, though my first thought it will still be too spammy even slowed-down. These aren't as interesting or alarming when they happen all the time, and it also starts to make the game unplayable. So I tinker with how often it goes off (I settle on ~1 hallucination every ~10 minutes on average at max taint), and boot the test mud back up to let it run for a bit.
I also observe that the 3rd party messages, while cool, are unique and so they will immediately reveal a male channeler who is around other people. I think we want him to quietly go mad before he publicly goes insane. Preferably accusing everyone of stealing from him and/or demanding people stop looking at him. So I adjust the effects so that it doesn't give a message to witnesses at lower levels of taint (at high levels it's fine to look batty to everyone around you). I move that to the same taint threshold as the first special line on their description when a player is looking at them.
That done, I move onto some effects I want to add into "look". Hallucinations should also appear there. These are fairly straightforward to add since I already have the code for grabbing random players and simulating some game output. I just need to apply it in a different context, and the hardest part is figuring out where to add it and making sure I am formatting it properly. This takes about an hour. This code compiles the first time.
Now let's move on to testing some effects I added to "look":
* HP:Healthy SP:Trickling MV:Fresh > l
Execution Square
The streets open up into a large square meant for executions. Large steel
cages hang in corners, and very few of the stocks remain empty. Several
mean looking guards stand watch in the crowd. A large wooden platform has
been erected in the center of the square, and a bloodied block of wood
rests on top. Several strange sharp utensils can be seen on a table nearby,
and a large axe rests against the platform.
[ obvious exits: N E ]
The dismembered corpse of Afriend is lying here.
A master blacksmith is here, hard at work.
Aureus the Creator is standing here.
Bargle the Room Mobol is standing here, grinning.
...wait a minute...
* HP:Healthy SP:Trickling MV:Fresh > l
Execution Square
The streets open up into a large square meant for executions. Large steel
cages hang in corners, and very few of the stocks remain empty. Several
mean looking guards stand watch in the crowd. A large wooden platform has
been erected in the center of the square, and a bloodied block of wood
rests on top. Several strange sharp utensils can be seen on a table nearby,
and a large axe rests against the platform.
[ obvious exits: N E ]
A master blacksmith is here, hard at work.
Aureus the Creator is standing here.
Bargle the Room Mobol is standing here, grinning.
Aha, I'm going insane quite excellently.
Let's spam a bit more.
* HP:Healthy SP:Fading MV:Fresh > l
Execution Square
The streets open up into a large square meant for executions. Large steel
cages hang in corners, and very few of the stocks remain empty. Several
mean looking guards stand watch in the crowd. A large wooden platform has
been erected in the center of the square, and a bloodied block of wood
rests on top. Several strange sharp utensils can be seen on a table nearby,
and a large axe rests against the platform.
[ obvious exits: N E ]
*Afriend* is standing here.
A master blacksmith is here, hard at work.
Aureus the Creator is standing here.
Bargle the Room Mobol is standing here, grinning.
<cut out spam>
* HP:Healthy SP:Fading MV:Fresh > l
Execution Square
The streets open up into a large square meant for executions. Large steel
cages hang in corners, and very few of the stocks remain empty. Several
mean looking guards stand watch in the crowd. A large wooden platform has
been erected in the center of the square, and a bloodied block of wood
rests on top. Several strange sharp utensils can be seen on a table nearby,
and a large axe rests against the platform.
[ obvious exits: N E ]
The corpse of a well-dressed boy is lying here.
A fade emerges from the shadows as you pass by.
A master blacksmith is here, hard at work.
Aureus the Creator is standing here.
Bargle the Room Mobol is standing here, grinning.
Etc. You get the idea. I’ve added a few others as well that might make people look twice but won’t be show-stopping.
We are now done with primary development! Woohoo!
Now comes a lot of detailed testing. I did some testing along the way, but there are now some edge cases I need to review. I also made notes to take a second look at some of the earlier design choices with a fresh set of eyes. I will do all this another day, as I've spent a good 6 hours on this today.
I’ll continue to share more as I revisit and tweak.