random choice in convos

Ask any questions that come up while using the PC or Android IceBlink 2 Engine

random choice in convos

Postby Pongo » Wed May 23, 2018 9:30 am

I'm currently adding wandering monsters to the module I'm developing. They are basically "invisible" icons that roam the map and trigger a convo if they happen to collide with the PC. There are also visible monsters wandering around the map which I'm handling slightly differently (they chase etc), so the wandering monsters are there just to add an unpredictable element of danger.
I was wondering if it is possible/how to add a chance factor to a convo option? Ie, when the PC triggers a wandering monster convo I'd like to offer a "flee" option, but for it to have a random chance of success (say 60% or something) with failure triggering the combat. I have a feeling this should be possible but I can't quite see how. If this can't be done I might link it to a character trait/skill instead, so its no massive problem (ideally I'd want to do that anyway, to adjust the % chance - eg, it decreases if the PC has the "evade" skill or something similar).
thanks!
User avatar
Pongo
Backer
Backer
 
Posts: 620
Joined: Tue Nov 27, 2012 4:58 pm

Re: random choice in convos

Postby youngneil1 » Wed May 23, 2018 9:58 am

Very interesting mechanic there (invisible lurkers, might later on have isShown depend on detection skill check in party -> uncover sneaking monsters)!

I think that a global int can be set to be something like "rand(1,100)" and then a gc check for that global int being eg > 60 might do the trick. Must have a closer look later. Or indeed a gcPassSkillCheck using some real (or blanko) trait and then a roll against the dc defined to get the right probability.
User avatar
youngneil1
Backer
Backer
 
Posts: 4570
Joined: Sat Dec 08, 2012 7:51 am

Re: random choice in convos

Postby Pongo » Wed May 23, 2018 10:03 am

Good point on detection skills - I hadn't considered that!

Thanks for the advice, Karl, I'll have a go at the GC check later.
User avatar
Pongo
Backer
Backer
 
Posts: 620
Joined: Tue Nov 27, 2012 4:58 pm

Re: random choice in convos

Postby youngneil1 » Wed May 23, 2018 11:37 am

In the long run it would be great if:

- party sneak skill lowers detection chances for chasing creatures, so they dont go chasing even is party is within chase range (maybe even for triggering encounters on collision); props might have a detection skill of their own acting as dc; chances might be influenced by the party standing in darkness/on night square (without party light source on or other light shining on that party square, ie unlit square)

- party detection skill uncovers sneaking props (invisible, isShown false movers), props might have a sneak skill of their own acting as dc (props on unlit squares might get higher chances to hide); good detection might also unveil some kind of threat indicator on top of props (ie a little red skull indicating props with encounters very high aboce party average level)

- party speed skill would influence the chances for props getting double moves/skipping moves, so the relative speed of the party is increased with a higher speed skill; either props have a speed property of their own (and from this - minus party speed - chances for double move/skip move are deducted) or we continue to work directly with both values; chances might be influenced by the party using a means of transportation, eg on horse or in boat; party speed migth also have a (minor) effect on time passing with each move
User avatar
youngneil1
Backer
Backer
 
Posts: 4570
Joined: Sat Dec 08, 2012 7:51 am

Re: random choice in convos

Postby slowdive » Thu May 24, 2018 3:41 am

I have used this script in dialogs to have random responses on nodes like for a guard:

//gcRand1of.cs - Rolls a random number between 1 and the input parameter. If roll = 1, return true.
//parm1 = (int) max number of roll
//parm2 = none
//parm3 = none
//parm4 = none
//Example: if parm1 = 5, then a number between 1 and 5 will be rolled. If the result is 1, return true, else return false.

Capture22.PNG
Capture22.PNG (34.79 KiB) Viewed 323 times


This C_guard is found in the Lanterna module and probably similar in Lanterna2

Maybe this could be used in some fashion.
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 2907
Joined: Wed Nov 21, 2012 11:58 pm

Re: random choice in convos

Postby youngneil1 » Thu May 24, 2018 5:30 am

Nice one! Had not thought about this script, it's cool that it works as a very easy to set up one line solution. For about a 60% success chance one could use a begative check, like !gcRand1Of(3), so it will use about 67%.
User avatar
youngneil1
Backer
Backer
 
Posts: 4570
Joined: Sat Dec 08, 2012 7:51 am


Return to Questions and Answers

Who is online

Users browsing this forum: No registered users and 1 guest

cron