Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: AqueousShadow on August 31, 2005, 07:14:48 pm

Title: Fiddling with "difficulty"
Post by: AqueousShadow on August 31, 2005, 07:14:48 pm
So, how hard is it to add different mission goals based on the difficulty level that the player has chosen?

I mean, all the difficulty really does is increase the "ai" in Freespace, and the difficulty ultimately reflects the skill of the player.

I was just wondering if it is possible to add a feature that would check the player's chosen difficulty via SEXP and then add more, or subtract, goals via SEXP (which is already possible, no? It just needs to be controlled by a separate variable now)?

I'm sure others would find this useful, so implementing it wouldn't be something required until those people voice it. I'm just...curious. :)
Title: Fiddling with "difficulty"
Post by: Axem on August 31, 2005, 07:43:16 pm
Well, there's atleast-skill-level, which is sorta what you're talking about, but that doesn't allow you to tailor the mission for each difficulty level. It just checks to see if you are past a certain skill level.

Although through a few AND operators, you could deduce which difficulty level you are on, and then go from there.

eg: on Very Easy, atleast-skill-level is true only on Very Easy, for Normal, atleast-skill-level is true for Very Easy, Easy, and Normal, and Insane all atleast-skill-levels would be true.
Title: Fiddling with "difficulty"
Post by: mikhael on August 31, 2005, 07:45:29 pm
A difficulty based system like that is precisely what is use in the Thief games to very good effect.
Title: Fiddling with "difficulty"
Post by: phreak on August 31, 2005, 08:46:56 pm
Well i guess you could use the difficulty table to that effect just to even out the AI on equal footing across all difficulty levels.

http://www.hard-light.net/forums/index.php/topic,30699.0.html

Then by using sexps, you could have a cain warp in on VEz and Ez, a lillith on Med & Hard and perhaps 2 lilliths on Unsane

you'd want to use for the first case and you should be able to figure out the remaining cases.

Code: [Select]

-and
 -skill-level-at-least
   -very easy
 -not
   -skill-level-at-least
     -medium
Title: Fiddling with "difficulty"
Post by: WMCoolmon on August 31, 2005, 09:13:41 pm
There are some hardcoded AI stuffs in the code based on diff level too, I believe. Probabilities and such IIRC.
Title: Fiddling with "difficulty"
Post by: phreak on August 31, 2005, 10:18:26 pm
unless they used 5 instead of NUM_SKILL_LEVELS in arrays or loops, i caught all the probabilities and such.
Title: Fiddling with "difficulty"
Post by: AqueousShadow on September 01, 2005, 01:25:56 pm
Well, then I guess it's already somewhat possible through a process of complex SEXP handling. Then again, it would be complex enough to have to come up with new directives/objectives for each difficulty, but better if all the directives, say 5, are built up from VEz to I one by one.

Though, replacing existing ships, say from the Cain to Lilith example, isn't exactly what I'm talking about. The difficulty system I'm talking about is more objective-based rather than ai- or ship- based.
Title: Fiddling with "difficulty"
Post by: karajorma on September 01, 2005, 02:37:22 pm
I don't see how you could make it simpler with code though. Either way you're going to have to trigger SEXPs dependant on difficulty.

 The only thing I can see code actually being useful for is to allow you to make certain objectives appear on the final briefing screen dependant on diffcult cause at the moment you can't do that.
Title: Fiddling with "difficulty"
Post by: Roanoke on September 01, 2005, 03:40:34 pm
couldn't a quick Campaign editor fix do the trick ?:)
Title: Fiddling with "difficulty"
Post by: karajorma on September 01, 2005, 03:56:29 pm
Not unless you made completely seperate missions for each difficulty setting.
Title: Fiddling with "difficulty"
Post by: phreak on September 01, 2005, 05:37:37 pm
that may probably be more feasible, you may run out of sexp nodes for a mission if you have to take every difficulty level into account when planning directives and dialogue.
Title: Fiddling with "difficulty"
Post by: karajorma on September 01, 2005, 05:49:21 pm
Very true but it would still be a ***** to FRED. You'd have to make a set of generic missions and then add all the diffulty specific SEXPs and then test all 5 versions of the campaign at their respective difficulty levels.

And even then changing the difficulty level would completely screw up the mission balance.

Adding a bonus objective or two or some extra enemy fighters is generally enough for me. I tend to have other places I'd rather spend my SEXP nodes than on difficulty specific mission code. Especially as anything above medium is untestable for me.
Title: Fiddling with "difficulty"
Post by: AqueousShadow on September 02, 2005, 12:27:31 am
:lol: You bring up some very good points kara. But yea, I was only wondering *shrugs*
Title: Fiddling with "difficulty"
Post by: karajorma on September 02, 2005, 03:38:05 am
It's not a bad idea. Just a hard to put into practice on anything other than a small scale. I very much reccomend using it on a small scale though :)