by David Ferstat » Fri Apr 23, 2010 7:41 am
I confess I can't see why the first one would be difficult. GameSkill is an integer value available to ACS. It simply needs to be exposed to DECORATE, as so many other ACS variables are. ("Simply", says the person who doesn't, really, know what goes on inside the code.

)
Traditionally, the main technique available to change the difficulty of a level is to vary the number of monsters according to skill level. Exposing the GameSkill to DECORATE allows much more flexibility to mod-makers. For example, the level design may make it undesirable, or impossible, to add another monster at a particular place in a level. The ability to change the monster itself would still allow the mod-maker to adjust the difficulty.
As The_Funktasm points out, A_JumpIfDifficulty would allow the creation of actors that could adjust their behaviour and characteristics as the skill level changed. At lower skills monsters might throw a punch for a melee attack, while kicking at higher skills. At lower skills a monster might fire its gun once per attack sequence, with a lower accuracy; while at higher skills it might fire two or three times, with a higher accuracy. It might change its dropped item, or might run a script that checks a different loot table. It might have more or less health, or armour.
Ok, you could probably use dummy inventory items to pass the skill level to the actor, but this will require an ACS script to give the item to every monster you want to be able to vary. You'd probably have to add this to the spawn state of every monster's DECORATE. Having the GameSkill directly available to DECORATE would surely be neater.
I confess I can't see why the first one would be difficult. GameSkill is an integer value available to ACS. It simply needs to be exposed to DECORATE, as so many other ACS variables are. ("Simply", says the person who doesn't, really, know what goes on inside the code. :) )
Traditionally, the main technique available to change the difficulty of a level is to vary the number of monsters according to skill level. Exposing the GameSkill to DECORATE allows much more flexibility to mod-makers. For example, the level design may make it undesirable, or impossible, to add another monster at a particular place in a level. The ability to change the monster itself would still allow the mod-maker to adjust the difficulty.
As The_Funktasm points out, A_JumpIfDifficulty would allow the creation of actors that could adjust their behaviour and characteristics as the skill level changed. At lower skills monsters might throw a punch for a melee attack, while kicking at higher skills. At lower skills a monster might fire its gun once per attack sequence, with a lower accuracy; while at higher skills it might fire two or three times, with a higher accuracy. It might change its dropped item, or might run a script that checks a different loot table. It might have more or less health, or armour.
Ok, you could probably use dummy inventory items to pass the skill level to the actor, but this will require an ACS script to give the item to every monster you want to be able to vary. You'd probably have to add this to the spawn state of every monster's DECORATE. Having the GameSkill directly available to DECORATE would surely be neater.