Welcome to the Builder Academy

Question skill success question

More
17 Oct 2016 12:08 - 17 Oct 2016 12:34 #6199 by JTP
skill success question was created by JTP
Hi

Im using this:

if(rand_number(1,105) > GET_SKILL(ch, SKILL_*****)) {

to determine if a skill fails or success.

But i have skill_improve in my code, so a players skill will eventually end up at 100.


Anyone who has ideas to incorperate victims DEX or other stuff to make it fail...i know i could use something higher then 105. But maybe there is another interesting way to do it ?



And define max skills is 200 im now on 183, can i just increase to 250 without problems in the code ?
Last edit: 17 Oct 2016 12:34 by JTP.

Please Log in or Create an account to join the conversation.

More
18 Oct 2016 20:05 #6200 by thomas
Replied by thomas on topic skill success question
Laast thing first: yes. The skill number is used in the affected struct in a sh_int var, so it can be up to 32767.

About incoorporating dex - this is done in a variety of skills already. See here for the actual modifiers: github.com/tbamud/tbamud/blob/master/src/constants.c#L642

Have a look at do_backstab for an example.

Please Log in or Create an account to join the conversation.

More
18 Oct 2016 20:29 #6201 by JTP
Replied by JTP on topic skill success question
Hmm do _backstab looks excatly the same as mine, just written differently

percent = rand_number(1, 101); /* 101% is a complete failure */
prob = GET_SKILL(ch, SKILL_BACKSTAB);


No dex in that

Please Log in or Create an account to join the conversation.

More
18 Oct 2016 20:40 #6202 by thomas
Replied by thomas on topic skill success question
ack, typical that I choose the one where it's not applied.

do_hide, do_sneak, do_steal all use it.

Please Log in or Create an account to join the conversation.

More
11 Nov 2016 03:04 #6259 by WhiskyTest
Replied by WhiskyTest on topic skill success question
Here are some ideas you could use as modifiers:

time of day - easier to backstab in the dark? or harder?
is the room lit or dark?
racial modifiers - maybe some races are better/worse at this skill
resisted checks - opponent rolls for dex modifier and compares to attackers dex modifier
is the weapon being used heavy/light, causing difficulty in backstabbing?
is your target also a good backstabber? they may be able to spot you coming

Please Log in or Create an account to join the conversation.

More
11 Nov 2016 14:56 #6261 by JTP
Replied by JTP on topic skill success question
Those are very good ideas...thanks alot.

Please Log in or Create an account to join the conversation.

Time to create page: 0.276 seconds