adding a random greeting, need advice

Post » Tue Oct 05, 2010 5:10 pm

I've added a new greeting that I want to be available to all npcs, and I've got it based on whether or not the player character has a luck value over a certain level and I've placed it in a quest with a priority of zero, I've got it working well, it shows up along with NPC's other random greetings just fine, but it still shows up quite often. Since I intend to add a few more of these greetings, I want them to show up far less often, allowing the normal greetings of NPCs to be much more likely, while only having a maybe 5% chance of the luck based greetings to show up.

Are there any tricks that I can use to make these new greetings rare, but still have them available to all NPCs?
User avatar
Skivs
 
Posts: 3550
Joined: Sat Dec 01, 2007 10:06 pm

Post » Tue Oct 05, 2010 6:07 pm

Have you checked the "Random" box? (to the right of the result script-box in the dialog interface). I assume you have... If not, that's the first thing to do.

If it still shows up too often, you can remove the Random-check and instead use "GetRandomPercent" among the conditions. Use for instance GetRandomPercent < 5, then it should only show up if Random 100 is lower than 5.
User avatar
Raymond J. Ramirez
 
Posts: 3390
Joined: Sun Oct 14, 2007 8:28 am

Post » Tue Oct 05, 2010 10:34 am

Have you checked the "Random" box? (to the right of the result script-box in the dialog interface). I assume you have... If not, that's the first thing to do.

If it still shows up too often, you can remove the Random-check and instead use "GetRandomPercent" among the conditions. Use for instance GetRandomPercent < 5, then it should only show up if Random 100 is lower than 5.


Thanks Emma

I did have it set to random, but the GetRandomPercent condition is probably exactly what I needed. I didn't even realize that GetRandomPercent could be used in dialogue, I never noticed it was in there.
User avatar
laila hassan
 
Posts: 3476
Joined: Mon Oct 09, 2006 2:53 pm

Post » Tue Oct 05, 2010 4:56 pm

No, there are so many possible conditions that it makes the head spin ;)

Just make sure that you put the greetings with GetRandomPercent *above* those that are marked with Random, if you put them somewhere in the middle I think the Random ones below might never show up.
User avatar
Elle H
 
Posts: 3407
Joined: Sun Aug 06, 2006 3:15 am

Post » Tue Oct 05, 2010 5:52 pm

Hmm, if random is kept on and combined with the GetRandomPercent, would it still randomly select the greeting and run GetRandomPercent condition, then either use that greeting if it meets the condition, or move on to a different random greeting if it doesn't meet the condition?
User avatar
Chris Guerin
 
Posts: 3395
Joined: Thu May 10, 2007 2:44 pm


Return to IV - Oblivion