Difficulty implementation

Stare in awe at the fascinating machinations of the TNM team during the last two years of production, this was our private forum.

Moderator: TNM Team

User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Difficulty implementation

Post by Jonas »

I was discussing difficulties with Shane about a week back, and we had a chat about the current idea about making difficulty levels affect the amounts of enemies and items in addition to how much damage you take. I suggested it might be difficult to playtest this mod for balance with so many variables, and Shane put forth the idea of using a system similar to Hotel Carone, where you had different options for adjusting combat difficulty and things like how many cameras would be active.

So here's how I thought we could split up the difficulties:

Player Damage
Pretty much the original difficulty levels from Deus Ex. Easy, Medium, Hard, Realistic.

NPC Health
I don't know if it would be possible to add this, but I think it would be great if we could input an additional difficulty setting for how much damage your enemies can take. That way, you can play a game where you and your enemies both can take plenty of hits, a game where a few shots can kill anybody, or anything in between. It would probably have to operate with multipliers like the original combat difficulty setting: Easy=.75 health, Medium=1.0, Hard=1.5, OMG=2.0. (Realistic wouldn't really fit here, heh).

Enemy/Item Difficulty
This would regulate the "Filter" options inherent in all Deus Ex actors. On Easy, there would be loads of equipment and few enemies. On Realistic, equipment would be sparse and enemies plentiful. If there's any way of making seperate filter functions for items (that is, actors expanding "Inventory") and enemies (actors expanding "Pawn" or "ScriptedPawn"), I think that would be amazing. Then you could set Items to Easy and Enemies to Realistic if you wanted loads of equipment AND fight loads of enemies. Or the other way around to get something more minimalistic and exploration-oriented.

That means we'd have a screen with two to four sliders, depending on what we can do. The problem is, we'd still need a button saying "Unrealistic" somewhere to let you open the platform game once you unlock that. I think maybe we should have four presets:
  • Easy (PC Dmg=Easy, NPC Health=Medium, Enemies=Easy, Items=Easy)
  • Normal (PC Dmg=Medium, NPC Health=Medium, Enemies=Medium, Items=Medium)
  • Hard (PC Dmg=Hard, NPC Health=Medium, Enemies=Hard, Items=Hard)
  • Realistic (PC Dmg=Realistic, NPC Health=Medium, Enemies=Realistic, Items=Realistic)
Below that would be "Unrealistic", and below that, an option to go to the Advanced difficulty options with the sliders. Notice how NPC Health is on Medium in every preset difficulty level, that's because I don't think NPC health should be changed per default, only if the player wants to (as it does somewhat ruin immersion when even unaugmented enemies need 4 shots in the face with a sniper rifle to die).

What say you? Can we do this? Are there better ways to do it? Feedback, people :)
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
User avatar
Trestkon
Off Topic Productions
Off Topic Productions
Posts: 2820
Joined: Sat Apr 24, 2004 9:03 pm
Location: Canada
Contact:

Post by Trestkon »

That sounds awesome, a very nice touch to increase replayability even more:D
-Life does not snap to the x-axis
that guy
The Nameless Mod
The Nameless Mod
Posts: 1312
Joined: Mon Apr 26, 2004 1:54 am
Location: Perth, Western Australia

Post by that guy »

yeah this is possible. There are 2 main difficulties

implementing it in the menu system
setting these values for every pawn and item we place. Also if any difficulty setting options had already been set for items or pawns they would have to be reset back.
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Post by Jonas »

Arghe, that would be horrible to do. I don't suppose you can just make it use the Filter properties to determine it? Like by, say, overriding the filter funtion with a split function that checks what the filter properties are and compares them to the new difficulty settings instead of the old?
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
User avatar
Moonbo
Off Topic Productions
Off Topic Productions
Posts: 556
Joined: Fri Oct 21, 2005 4:52 pm
Location: NY
Contact:

Post by Moonbo »

Sounds like it would add a lot to replayability...but beware of feature creep. As the accountant on the team, I feel I should mention that (as Jonas mentioned in your post) system might take a tad bit of time to implement/test :-({|= ...

On the other hand, that "slider" system is exactly how the original System Shock was set up (they had sliding variables for damage, enemy AI, items, puzzle difficulty, and "plot" (hardest version had an absolute time limit that you had to complete the game in)...seems to have worked well for Warren Spector :-).

-Gelo
But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.
-Sun Myung Moon
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Post by Jonas »

Yeah I'm extremely vigilant towards feature creep, but mostly as far as somebody else's features are concerned. That's why I posted this here, if most people think this will be too much work to implement at this time, we'll leave it out. I just see people complain about the DX difficulty all the time, it would be nice to give them more control over that in our mod.

That said, the only real difficulty aside from the code Shane will have to put into it, is to set up the menu. I can't tell you how difficult the code will be, but the menu can't possibly take more than a few days to implement... right?

There is no way we're going to go over all our pawns and check/reset their filter properties, so if we can't find a way to work around that, items/enemies will be one setting.
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
that guy
The Nameless Mod
The Nameless Mod
Posts: 1312
Joined: Mon Apr 26, 2004 1:54 am
Location: Perth, Western Australia

Post by that guy »

it would only take "a few days" do go over all the pawns and items as well.
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Post by Jonas »

Yeah, but we'd forget about 20% of them. Some of them are really well hidden :?

And that's not something that would be easy to spot in testing.
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Post by DDL »

Right folks, if I'm (apparently) supposed to be looking into this, I guess I'll need an overview of

a) exactly what kind of filtering you want, for example, with item filtering, do you want to limit enemy inventory as well? Or perhaps have enemy pawns check difficulty settings on spawncarcass() and delete powerful items some of the time, depending on severity of difficulty? Or just stick with placed items?

b) exactly how you've implemented the existing filtering system: in that, as far as I can tell, filtering currently uses level.game.difficulty, rather than player.combatdifficulty, and thus I assume you're setting the level.difficulty based on the player.combatdifficulty somehow (I checked my game, and level.difficulty was always 1, no matter what the difficulty settings, so I assume it's not automatic).

If you are using this, and it's a case of bDifficulty1=true etc etc for all the pawns/items (as opposed to some funky new stuff), these could be pretty easily reset to defaults using 'select all' in the editor, since it's an actor property. Of course, it's not too hard to check an actors settings and only apply custom difficulty restraints if they're all default...

c) Sliders? If so, how many subdivisions should each slider have? Systemshock may have LOOKED like it had sliders, but they were basically just four settings for each category, so four buttons, in other words. I'm guessing four here too, from Jonas's post, but it'd be good to know.



Anyway, more detail, basically. My personal approach to this would be to just hide all the relevant code in the playerclass and affect everything exogenously, rather than add anything anywhere else. I'm getting quite accustomed to that (Chronos does this a lot).

So start up level as normal, playerclass gets possessed, checks settings, iterates through the level destroying/adjusting as appropriate, BAM. Probably with a flagcheck in there, too, so it doesn't bother to do the same level more than once (unless you guys have any bits where enemies subsequently spawn in de novo, rather than Enterworld())..
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Post by Jonas »

a) Just placed items will do.

b) This is more than a little odd, Shane may be able to shed more light on this, but so far as I know, we haven't touched the original filtering code in any other way than a failed attempt to make the shadows of filtered-out pawns disappear. Yet it seems to work fine.

c) Yes, sliders. 4 subdivisions will be fine.
DDL wrote:So start up level as normal, playerclass gets possessed, checks settings, iterates through the level destroying/adjusting as appropriate, BAM. Probably with a flagcheck in there, too, so it doesn't bother to do the same level more than once (unless you guys have any bits where enemies subsequently spawn in de novo, rather than Enterworld())..
Hmm... I think that sounds fine enough, but I'll wait for Shane's feedback.
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Post by DDL »

yeah, I can't work out b) at all. Thing is, I've also heard other people report that this works..but I can't see it.
Maybe I have a duff copy of DX..

I guess I'll wait for Shane to explain where/how it all gets set, or something. :(

Oh, and while I remember, did you see the lipsynch code on DXE? It's up there if you want it. Doesn't appear to be attracting much/any interest though. Ah well.
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Post by Jonas »

DDL wrote:yeah, I can't work out b) at all. Thing is, I've also heard other people report that this works..but I can't see it.
Maybe I have a duff copy of DX..
Maybe it's set in native code, it seems like something that could be left over from UT.
Oh, and while I remember, did you see the lipsynch code on DXE? It's up there if you want it. Doesn't appear to be attracting much/any interest though. Ah well.
Ah, awesomeness, I'll check it out when I get home.
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
that guy
The Nameless Mod
The Nameless Mod
Posts: 1312
Joined: Mon Apr 26, 2004 1:54 am
Location: Perth, Western Australia

Post by that guy »

This may seem like a stupid question but are you going through the new game menu to select your difficulty?

As for filtering using the player class, I am strongly opposed to this idea. I think it would make a lot more sense to implement it in the things that will actually be removed. TNM has its own subclasses so you shouldn't have much trouble doing that. However I'm not sure how that would work for placed ammo and such that doesn't extend tnm classes. I think it would probably be best if you left items using the current system (i.e. set the bdifficulty1 poperties according to your item filter) and implement your own filters for the other stuff in the corresponding classes. e.g. for the pawn filter you'd just implement it in tnmpawn.

If this for some reason isn't possible my next preference would be to make it a feature of the mission script.
User avatar
Jonas
Off Topic Productions
Off Topic Productions
Posts: 14224
Joined: Sat Apr 24, 2004 9:21 pm
Location: Hafnia

Post by Jonas »

that guy wrote:I think it would probably be best if you left items using the current system (i.e. set the bdifficulty1 poperties according to your item filter) and implement your own filters for the other stuff in the corresponding classes. e.g. for the pawn filter you'd just implement it in tnmpawn.
That would be fine by me, at least. I don't want to go over the filter properties of every item we've placed, but I can do it with the pawns, as they're a lot easier to find, so I'm not likely to miss a fifth of them :)
Jonas Wæver
Chief Poking Manager of TNM

I've made some videogames:
Expeditions: Rome
Expeditions: Viking
Expeditions: Conquistador
Clandestine
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Post by DDL »

Yep. New game >> select difficulty >> start.

Thing is, looking at the code for all the menus, I can't see it setting level difficulty anywhere, either (just combat difficulty) so I assume that something somewere is grabbing it from the playerclass, or something.
Post Reply