Code blog: Taint v2

... sit down, kick back and relax, and talk about anything that doesn't belong on one of the other forums.
Iblis
Posts: 100
Joined: Mon Jun 19, 2017 11:56 am

Re: Code blog: Taint v2

Post by Iblis » Tue May 24, 2022 5:13 am

Unsure if we're allowed to ask questions with regards to how the taint will look before it is out, so feel free to ignore this question. But will the "splash" damage cost extra sps for the MC? Say you're spiking 1.light and the taint triggers 2 additional times to two different targets, will the overall sp cost be x2 spike or just the one you initially weaved?

Also am curious how the splash damage with regards to earthquake works, since it is already an AoE weave, when it triggers multiple times due to taint does this mean it will proc on everyone additional times? Or does it proc on the "tainted target" an additional time, but not on the rest?

Loving the blogs from both you and Itesh, really helpful as a new programmer to see the thought and work process - something I struggle with during my projects - and new taint looks pretty damn interesting.

Enoch
Posts: 425
Joined: Tue Aug 04, 2015 8:49 pm

Re: Code blog: Taint v2

Post by Enoch » Tue May 24, 2022 9:27 am

My question would be what's the sp cost when the weave you were expecting gets replaced? The attempted weave, or the replaced weave?

Same question for the timer too. Depending on the weave you'd know pretty quick if it was replaced if the timer of the replacement weave was longer than expected.

faith
Posts: 7
Joined: Thu Sep 23, 2021 5:03 pm

Re: Code blog: Taint v2

Post by faith » Tue May 24, 2022 10:01 am

So is it going to be a viable strategy to spam channel 'create food' in battle and hope it incinerates someone? Or does weave switching only work for battle weaves and healing type weaves?

Aureus
Posts: 968
Joined: Mon Dec 28, 2020 11:13 pm

Re: Code blog: Taint v2

Post by Aureus » Tue May 24, 2022 11:33 am

Iblis wrote:
Tue May 24, 2022 5:13 am
Unsure if we're allowed to ask questions with regards to how the taint will look before it is out, so feel free to ignore this question. But will the "splash" damage cost extra sps for the MC? Say you're spiking 1.light and the taint triggers 2 additional times to two different targets, will the overall sp cost be x2 spike or just the one you initially weaved?
With the caveat that it's all subject to change, sure! I spent some time thinking about this, but in the end I made the splash damage free. The fantasy of playing a tainted male channeler is that they're insane, dangerous and powerful. Partially, this is represented today by your max SP going up as you become more tainted, but I removed that effect when I removed the original taint. In this case, I think this is an interesting way to give that feeling of extra power (free damage!), while tying it directly to the potentially negative effects of the taint (wait! those might be my friends!).
Also am curious how the splash damage with regards to earthquake works, since it is already an AoE weave, when it triggers multiple times due to taint does this mean it will proc on everyone additional times? Or does it proc on the "tainted target" an additional time, but not on the rest?
Good question! I tied the trigger to the casting of the weave, and not to each target being hit. This means earthquake has the same % chance to proc the splash damage regardless of how many targets it hits, and the same as any other weave. I didn't want the male channeler to feel advantaged or disadvantaged when using any particular weave in combat (where they may actually want the splash damage to go off, especially if they are being hunted or pking solo).
Loving the blogs from both you and Itesh, really helpful as a new programmer to see the thought and work process - something I struggle with during my projects - and new taint looks pretty damn interesting.
Love to hear that!

Aureus
Posts: 968
Joined: Mon Dec 28, 2020 11:13 pm

Re: Code blog: Taint v2

Post by Aureus » Tue May 24, 2022 11:34 am

Enoch wrote:
Tue May 24, 2022 9:27 am
My question would be what's the sp cost when the weave you were expecting gets replaced? The attempted weave, or the replaced weave?

Same question for the timer too. Depending on the weave you'd know pretty quick if it was replaced if the timer of the replacement weave was longer than expected.
The replaced weave for both timer and cost. Yes, sometimes this will let you figure out something fishy is happening if you are observant.

Aureus
Posts: 968
Joined: Mon Dec 28, 2020 11:13 pm

Re: Code blog: Taint v2

Post by Aureus » Tue May 24, 2022 11:54 am

faith wrote:
Tue May 24, 2022 10:01 am
So is it going to be a viable strategy to spam channel 'create food' in battle and hope it incinerates someone? Or does weave switching only work for battle weaves and healing type weaves?
No, it won't be, for three reasons. The first is in my response to Enoch above: it uses the new weave's cost and cast timer.

The second is that it is not a 100% (or even really a very high) proc rate, so it would not be consistent enough to use as a strategy. I just set it to 100% for debugging so I could check that it is reliably working. We want tainted channelers to be playable, and if the proc rate on it is too high then they won't be very playable in fights where timing matters, such as channeler-vs-channeler. Currently I have it capped at ~10% of weaves, subject to change (I might increase that for the most-tainteded channelers, but probably not much beyond that, maybe up to 15% or so. I'm still a bit undecided.).

Lastly, I have a set list of weaves it picks from so that we're leaning into dangerous weaves, and incinerate isn't one of them. This isn't because I don't like incinerate, but because status weaves check the player's skill in multiple places, and my hack of bypassing the skill check only works on the weave completion itself. I would have to do a significant rewrite of parts of channeling to pass the variable (I named it "taint_made_me_do_it") all the way down into the willpower vs willpower checks for status weaves like blind, incinerate, contagion, etc., which roll against skill a second time. This means a Damer Flinn-type that didn't practice those harmful status weaves would successfully cast e.g., blind or incinerate, but would get the "You failed." message 100% of the time at the end of it unless I did that rewrite. Not very scary. So I consigned it to damage weaves only.

Enoch
Posts: 425
Joined: Tue Aug 04, 2015 8:49 pm

Re: Code blog: Taint v2

Post by Enoch » Tue May 24, 2022 2:11 pm

Got it. That explains a lot. Thanks!

Aureus
Posts: 968
Joined: Mon Dec 28, 2020 11:13 pm

Re: Code blog: Taint v2

Post by Aureus » Tue May 24, 2022 3:04 pm

Today I've decided to spend lunch tackling the effect of having max taint. I have plans this evening so won't have any time to work on this, and I've been making very good progress so I want to continue to chip away at it before I get distracted by other things.

I log into the game and go visible, and ask if anyone needs anything. I spend a few minutes answering questions and fixing a bug in a quest (~15 mins to patch up the mobol) that is related to the weapon changes I made to make medium blades heavier. The mob asks for several weapons at once, and now it is too heavy to carry them all. I replace one of the weapons with a lighter weapon that I think is about as difficult to acquire. I am not 100% sure, but good enough. Back to coding.

I debated leaving this for a surprise, but it took a fair amount of time to do so I thought it would be good to include. I want to really hone in on the feeling of paranoia taking over, so we are going to make everyone appear as shadowspawn and be hit by "dark" as a target. It's hard to get to that level of taint, so we wanted something to really make you feel like you've gone off the deep end.

This requires adding a new check to targeting, and a new check to the function that renders how a player appears in the room. The code for shadowspawn/dark already exists, so I piggy-back on that and add in a check that essentially says: "this person is shadowspawn OR you are completely insane."

It occurs to me that we do not want Imms to be hit by "k dark" or appears as enemies (one might be in your room, and we don't want you to accidentally hit someone that might be wielding an uber-weapon like the Wet Ramen Noodle of Punishment). I create a special carve-out so Imms aren't caught by this.

This compiles nicely.

We also need a third test character here, which we will call Afriend.
* HP:Healthy SP:Strong 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 ]
Aureus the Creator is standing here.
Afriend of Two Rivers is standing here.

* HP:Healthy SP:Strong MV:Fresh > k dark
They aren't here.
Everything is normal. Let's change that.
* R:1035 S:Inside HP:Healthy SP:Good MV:Fresh > <special imm command>
Atest's taint set to: 50000.
Now our poor fellow is set at maximum taint. Let's check in again:
* HP:Healthy SP:Bursting 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.
Aureus the Creator is standing here.

* HP:Healthy SP:Bursting MV:Fresh > k dark
Wimpy reset to: 140 hit points.
You try to hit Afriend, but he deflects the blow.

* HP:Healthy SP:Bursting MV:Fresh - Afriend: Healthy >
Afriend tries to hit you, but you deflect the blow.
You try to hit Afriend, but he deflects the blow.

* HP:Healthy SP:Bursting MV:Fresh - Afriend: Healthy >
Afriend says 'I thought we were friends!'
Working better! Two things I notice are wrong here though: the first is that Afriend is showing in cyan (as an enemy human), but I want it to be red (as shadowspawn). The second is that this isn't carrying through to the combat messages, say, etc. So I have missed somewhere else this occurs.

The first one is relatively easy to fix -- I just re-order the way the checks occur, and add in some better branching logic that will actually speed up the function (minorly). It's unlikely to be noticeable to players, but when I notice small issues like this as I'm going through the code, I will clean them up if I am modifying that code already. If I notice something like that in code I am not already modifying, I will make a note of it in Trello but leave it be -- combining unrelated changes into a single "pull request" (essentially, a request for changes to be made to the primary/"real" code, as opposed to the siloed side copy I am working in) together is a bad practice, because it: 1.) makes the code harder for Flash and others to review and work out what is happening, and 2.) makes it harder to figure out what has happened if there are bugs or something goes wrong.

I do a quick search and locate the other part of the code where the cross-race colors and stars are handled. This all takes about 30 minutes to fix, as this is a tricky part of the code and I have to spend a bit of time understanding what is happening. I compile and it has an error: I forgot a parentheses. I fix it and recompile, then boot up the test mud again and log in my test characters.
* HP:Scratched SP:Bursting 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.
Aureus the Creator is standing here.

* HP:Scratched SP:Bursting MV:Fresh > k dark
You try to hit *Afriend*, but he deflects the blow.

* HP:Scratched SP:Bursting MV:Fresh - Afriend: Scratched >
*Afriend* tickles your left leg with his hit.
You try to hit *Afriend*, but he dodges the attack.

* HP:Scratched SP:Bursting MV:Fresh - Afriend: Scratched >
*Afriend* hits your right leg.
You try to hit *Afriend*, but he deflects the blow.

* HP:Scratched SP:Bursting MV:Fresh - Afriend: Scratched >
*Afriend* says 'I thought we were friends!'
Now this is working. Though I've spent about 2 hours instead of the 1 I'd hoped. And now back to actual work.

I also realize I am still logged into the game, and have been visible. I check my list of tells to make sure I haven't been ignoring someone. Fortunately not really, just a sarcastic joke from someone. I tease them and log off.

Adael
Posts: 1081
Joined: Sun Mar 22, 2015 12:34 am

Re: Code blog: Taint v2

Post by Adael » Tue May 24, 2022 6:17 pm

Aureus wrote:
Tue May 24, 2022 3:04 pm
...we are going to make everyone appear as shadowspawn and be hit by "dark" as a target.
Just curious (as I obviously don't know the nuances of how targeting is coded), but does this mean ONLY "k dark" will make you hit anyone in the room? If so, then presumably if someone were to take an MC into crossrace pk up north, they could get around this annoyance by targeting with "k trolloc" "k fade" "k dreadlord"? That obviously means mobs and stuff will interfere with their targeting occasionally instead, but by doing so they wouldn't have to worry about hitting their fellow human/seanchan allies (outside of the splash damage of course).

Aureus
Posts: 968
Joined: Mon Dec 28, 2020 11:13 pm

Re: Code blog: Taint v2

Post by Aureus » Tue May 24, 2022 7:06 pm

Adael wrote:
Tue May 24, 2022 6:17 pm
Aureus wrote:
Tue May 24, 2022 3:04 pm
...we are going to make everyone appear as shadowspawn and be hit by "dark" as a target.
Just curious (as I obviously don't know the nuances of how targeting is coded), but does this mean ONLY "k dark" will make you hit anyone in the room? If so, then presumably if someone were to take an MC into crossrace pk up north, they could get around this annoyance by targeting with "k trolloc" "k fade" "k dreadlord"? That obviously means mobs and stuff will interfere with their targeting occasionally instead, but by doing so they wouldn't have to worry about hitting their fellow human/seanchan allies (outside of the splash damage of course).
Good question! Yes, it's only "dark" right now. I had the same thoughts you did as I was coding it. My initial feeling is to leave the other targeting as-is since it is more difficult and has some draw-backs, like those you mentioned. I think "dark" does a good job reflecting the paranoia/insanity and a concentrated person could play around it.

Post Reply