Jump to content

Where to put the probability?

Recommended Posts

I'm adding a mechanic to dialogues that apply a certain spell to the speaker on every GOTO or EXTERN line. This spell has a 177 effect, Use EFF File, pointing to the bard class, because bards doing the talking will get special bonuses. This effect in the first spell, which applies during the dialogue, is at the 100-0 probability, but what I actually want is a 50/50 chance, and for subsequent bonuses even smaller. The EFF casts a second spell, and this one starts with opcode 206, an 100-50 block, for the effects down the list. The result normally would be that they apply half the time. On the bottom there is another 206, at the 100-15 probability, that cuts off the low tip of the stack where the third spell, with more bonuses, is being cast. The problem is that in conversations probabilities aren't rolled correctly, if at all. I added a glow effect to the stack in the second spell to see how often it actually applies, and it's gram-positive every single time. I can't even estimate whether the rest of the adjustments apply correctly, because there are a few explanations: a) dialogues may always ignore probability numbers, b) the first effect, 177, may dictate probabilities all down the line (but if I cut the chances at this one and that even brings results, how will I decrease the odds farther down?), c) conversation or not, in the second spell the blocks may apply simultaneously rather than in sequence, being of the same type. It's a possibility. I would block the third spell with 318 instead of 206, but this mod is to be compatible with the "classic" Shadows of Amn engine. So, does anybody know how to manipulate probabilities in dialogue? I'm looking at a whole lot of elusive testing here, and I would just rather hear the answer from somebody else. I will pay him in choice porn. Ebony, grannies, his pick.

Link to comment

a) Unlikely, but possible
b) Definitely not
c) There may or may not be a case of dialogs ignoring effects' order

Before continuing with further testing, I'd suggest to drop 206 entirely and instead try to put everything into original SPL with different probability ranges for different bonuses, instead of overlapping them and having to 206 the subsequent ones.

Edited by Ardanis
Link to comment

Probabilities are checked, and in order. The problem turns out to be with targeting and durations in dialogue. Only effects that are targeted at Self apply during a conversation, and then they don't accept Instant/Limited duration 0, which in the case of 206 or 318 would normally close off effects farther down without stopping future applications of the spell. If the duration is limited, it must be real, but any length of it, even a few ticks, is "frozen" for the rest of the dialogue. The result is going to be an increasing difficulty of rolls: if the first timed block is passed, then the engine must roll again the next time. This is not how I envision the working of this bonus. I'm still thinking about this. Perhaps I can use subspells with the bonus instead of blocking the bonus effects down the list. One-pronged forks, in other words.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...