I was considering having a difficulty setting in my WIP. What would be the best way to accomplish this?
Only thing I can think of is a permadeath system you could turn on. Or make enemies tankier and hit harder.
Depends on how you’re measuring difficulty.
Option to disable early death. Basically if your health drops below zero you don’t die. (A few games do this including adrao’s).
2nd chance. If you die, you can reload a save and try again (example- Oedipus’ interaction with the sphinx).
Have a bonus system. For example you might start with more health/strength/time to complete tasks etc if on “easy” mode (see Dragon Chronicles WIP), or if you get to pick your stats have more points available to use (recommend looking at adrao’s system in his hero series.)
Hint system. Either giving hints you can ask for or if you fail (for example Oedipus’ interaction with the sphinx (I know I keep using the same examples but that’s what I can think of off the top of my head.) Or have hints available in the stat’s menu (example Raishall (WIP)).
You can also vary the threshold for success in stat checks. For example, at the beginning, have:
Set difficulty level to: *choice #Easy. *set statcheck 60 #Normal. *set statcheck 68 #Hard. *set statcheck 75
and then for the rest of the game:
*if strength >= statcheck You succeed! *if diplomacy >= statcheck You succeed! *if breakdancing >= statcheck You succeed!
If on your playthroughs/beta testing you find that the player experience isn’t matching what you think the difficulty levels should be, you can always adjust the numbers in that initial choice to make it a little easier/harder to achieve each level.
And if you’ve got one stat where the opportunities to raise/lower it are fewer than the others, you don’t need to give it its own dedicated easy/normal/hard stat; you can just make adjustments to the conditions of the variable check to bring it into alignment with the overall difficulty level.
*if (breakdancing + 6) >= statcheck You succeed!
#"Hang on. Hospitals have service bots. I think I can reprogram them." *if (Engineering = 50) *set Medicine +5 *set Credits +1500 *set Twins +10 *goto FirstCityLooting *if (Engineering = 40) *set Medicine +5 *set Credits +1000 *set Ammunition -5 *goto FirstCityLooting *if (Engineering = 30) *set Medicine -5 *set Ammunition -10 *set Health -10 *set Twins -10 *goto FirstCityLooting
This is the sort of template I use at the moment for any potential skill checks. At least in the beginning. I tend to raise their difficulty as time progresses in the story. But this is the base template since it covers any possible skill check (since all skills in my game start at a base of 30%, and are raised according to character creation to a max of 50% in the early game).
What I’m looking for would be a way to raise all of these checks based on the difficulty selected.
As an example, (and I’m just using easy math for now since the focus is the code anyway), let’s say this is the normal difficulty. Easy would lower the price of these checks by 5%, hard would raise them by 5% so either 25%, 35% and 45% or 35%, 45%, 55% in this example.
I’m not entirely sure how I’d implement permadeath without having no checkpoints for anyone. From what I understand, checkpoints must be put into the game’s code by yours truly?
A bonus system makes sense but the only way I could think to write that code would be writing basically the same thing but with different checks? Ideally, I’d like the code to modify other, existing code so that I’m not having to double the amount of code necessary (elegance) and so that I don’t have to have repeat text (too many words for poor notepad).
I think the best way to integrate difficulty level into that kind of vision (and the code you’ve already got) is to have easy mode make the second-best outcome automatic, and only hard mode turning on actual penalties for trying something that’s against your best skill. So your difficulty level choice could look like:
Set difficulty level to: *choice #Easy. *set difficulty 1 #Normal. *set difficulty 2 #Hard. *set difficulty 3
*if (Engineering >= 50) Lots of high + outcomes! *goto FirstCityLooting *elseif (Engineering >= 40) or (difficulty = 1) A few + outcomes! *goto FirstCityLooting *elseif (Engineering <= 30) and (difficulty = 3) Lots of - outcomes! *goto FirstCityLooting *else No stat changes at all if you're between 30 and 40, or if you're on Normal mode below 30. *goto FirstCityLooting
As you can see, I’d also suggest using ranges (>= and <=, rather than just =) unless you’re sure that the Engineering stat will only ever be on exact increments of 10.
You could do other things with difficulty level to make Hard Mode tough on people who don’t play to their weak stat, too. Or you could deliver the negative outcome more easily to Hard Mode players, e.g.
*elseif ((Engineering < 40) and (difficulty = 3)) or ((Engineering <= 30) and (difficulty = 2)) Lots of - outcomes! *goto FirstCityLooting
That would be somewhat more elegant than having lots of granular variation in the increase/decrease levels for a bunch of different stats based on difficulty level.
It won’t. I just do that for the beginning of the game since I know it’ll be that exact stat.
This portion of code would force them to a lesser outcome if they choose it even if they have better skills, basically?
It would replace the “Engineering = 30” in your current code block as the condition for getting a negative outcome. Easy mode players would never get the negative outcome at all; normal mode players would get it at 30 or less; hard mode players would get it at less than 40.
(For your first choice as currently written, where 50, 40, and 30 are the only outcomes, there’d be no actual difference between hard mode and normal here – but you get the general idea.)
Edit: to go back to my original suggestion around having difficulty level adjust success thresholds, you could also make that consistent with the two levels of success and one of failure in your example:
Set difficulty level to: *choice #Easy. *set succeed 50 *set ok_outcome 40 #Normal. *set succeed 60 *set ok_outcome 45 #Hard. *set succeed 75 *set ok_outcome 60
*if (Engineering >= succeed) *set Medicine +5 *set Credits +1500 *set Twins +10 *goto FirstCityLooting *elseif (Engineering >= ok_outcome) *set Medicine +5 *set Credits +1000 *set Ammunition -5 *goto FirstCityLooting *else *set Medicine -5 *set Ammunition -10 *set Health -10 *set Twins -10 *goto FirstCityLooting
And for early-game choices where you haven’t been able to get a score above 50, you could adjust with
*if ((Engineering+20) >= succeed) as discussed above.
Gotcha. Thanks. Between you and @HannahPS , you guys keep popping up to save my code.
What else are Choice of Games Authors for?
This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.