Home » MODDING HQ 1.13 » v1.13 Bug Reports » DifficultySettings.xml values (DifficultySettings.xml values)
DifficultySettings.xml values[message #343603]
|
Sun, 03 January 2016 21:51
|
|
OviK |
Messages:1
Registered:January 2016 |
|
|
GameDir rev no 2275.
Data-1.13/TableData/DifficultySettings.xml
AllowReinforcements and AllowReinforcementsOmerta are set to 1 for novice and insane, but to 0 for Experienced and expert. This looks fishy.
Report message to a moderator
|
Civilian
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: DifficultySettings.xml values[message #344574 is a reply to message #344572]
|
Thu, 17 March 2016 01:18
|
|
Flugente |
|
Messages:3509
Registered:April 2009 Location: Germany |
|
|
While it might not always seem so,this post is not intended to offend, but merely to point out any issues I have, in my usually friendly enthusiastic manner.
Nobody who starts the game for the first time is going to wade through the folders and look for a documentation that explains what scripts to alter in order to set up a xml that sets up difficulty levels that set up the game.
While the idea of having a dedicated file for difficulty settings is a good one (since one can easily spend a day wading through tons of configurations and options), the current state of DifficultySettings is seriously lacking. I'd even call it damaging.
A core issue - that I remember to have pointed out repeatedly - is that not everything that is tied up to the different difficulty levels is represented in the xmls. This was always the case, but in the old days, when there were just 4 difficulty levels, this wasn't as bad. If someone wanted to play as novice, he'd likely play 'Novice' and adjust his settings. Same for 'Insane'. He/she might not be aware of all the times difficulty level affected sth., but as the hardcoded values roughly represented what they chose anyway.
The 'feature' of creating a new difficulty level indicates that one can set up a new level, but that is not entirely true. Take this code part for example - this is the part where we evaluate how many troops are set up during the Drassen counter attack:
UINT8 val;
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
val = 1;
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_MEDIUM )
val = 2;
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_HARD )
val = 3;
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_INSANE )
val = 4;
else
{
val = Random (4);
if (val == 0) val = 1;
}
ubNumSoldiers = (UINT8)( gubMinEnemyGroupSize + val * 3);
This variable (ubNumSoldiers ) is then used as the base value to set up the size of the 4 groups that set up the DCA. For simplicity reasons, lets just assume that these are the troops sent. You see what happens here? If a player sets up a new difficulty level, we evaluate the else{...} part. This means that val is random. As in, random, chance-based, you-have-no-idea-what-you-get. So if a new player copies over novice settings (where gubMinEnemyGroupSize = 3), ubNumSoldiers can be 6, 9 or 12. It thus follows that the size of the DCA can vary by a 100%. That is bullshit. Pure bullshit. Especially as this total variance is lower on high difficulty levels, where gubMinEnemyGroupSize is higher. Sucks to be a new player here.
Other times, we have just this:
UINT8 DiffLevel;
if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
DiffLevel = 1;
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_MEDIUM )
DiffLevel = 2;
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_HARD )
DiffLevel = 3;
else if( gGameOptions.ubDifficultyLevel == DIF_LEVEL_INSANE )
DiffLevel = 4;
else
DiffLevel = 1;
This isn't exactly better. For new difficulty levels, some value is simply set - here its the value for Novice. The player can't affect this, and won't even know bout this. Thus this feature only sets up half the settings, the rest is just set to whatever the coder felt was okay at implementation time.
Other things are inexplicable:
// AI Modifiers
if ( !(pSoldier->flags.uiStatusFlags & SOLDIER_PC ) ) // if this is a computer AI controlled enemy
{
if ( gGameOptions.ubDifficultyLevel == DIF_LEVEL_EASY )
{
// On easy, penalize all enemies by 5%
iChance -= 5;
}
else
{
iChance += __min( 0, gbDiff[ DIFF_ENEMY_TO_HIT_MOD ][ SoldierDifficultyLevel( pSoldier ) ] );
}
}
A difficulty 'Novice', the xml setting simply gets ignored for no reason.
Another issue can be found in the JA2 UB sepcific code:
void InitNumberOfEnemiesInAboveGroundSectors( )
{
UINT8 ubNumAdmins=0;
UINT8 ubNumTroops=0;
UINT8 ubNumElites=0;
UINT8 ubNumTanks=0;
...
//SEC_H8:
{
switch( gGameOptions.ubDifficultyLevel )
{
case DIF_LEVEL_EASY:
ubNumAdmins = 0 + Random( 0 );
ubNumTroops = 6 + Random( 4 );
ubNumElites = 0 + Random( 0 );
break;
case DIF_LEVEL_MEDIUM:
ubNumAdmins = 0 + Random( 0 );
ubNumTroops = 13 + Random( 3 );
ubNumElites = 0 + Random( 0 );
break;
case DIF_LEVEL_HARD:
ubNumAdmins = 0 + Random( 0 );
ubNumTroops = 16 + Random( 6 );
ubNumElites = 2 + Random( 2 );
break;
case DIF_LEVEL_INSANE:
ubNumAdmins = 0 + Random( 0 );
ubNumTroops = 19 + Random( 9 );
ubNumElites = 2 + Random( 2 );
break;
}
SetNumberJa25EnemiesInSurfaceSector( SEC_H8, ubNumAdmins, ubNumTroops, ubNumElites, ubNumTanks );
}
I'm not testing UB, so perhaps this function is no longer in use anyway, but to me it seems that with a new difficulty setting, you won't find a lot of enemies in there...
If you implement the feature to add more difficulty levels, either do it full or not at all. Do not do it halfway.
Also, if you implement a feature, test it, for FUCK sake. A huge point of this feature seems to be the ability to set up new difficulty levels. If you then try that out, the game crashes, because the above-mentioned scripts won't work and need to be adapted. Granted, sometimes stuff I add doesn't work, because I forgot to add files, or missed something. Everybody does, errors, I do a lot. But I'm at least (reasonably ) ashamed by any errors on my side and try to fix them ASAP. This stuff has been broken for months, and these issues have been pointed out several times.
And yes, I am fully aware of these issues (seeing I just pointed them out). Yes, I could fix them. No, I am not going to fix them. If someone has a bug and needs help or advice, I am gladly helping to solve the issue. It is not my job to clean up the mess someone else came up with without doing anything to fix it.
I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.Report message to a moderator
|
|
|
|
|
Re: DifficultySettings.xml values[message #344588 is a reply to message #344578]
|
Thu, 17 March 2016 19:23
|
|
tais |
|
Messages:656
Registered:February 2008 Location: NL |
|
|
When new features are created there are simply two routes..
- they are directly put in the development trunk by a coder who is known to deliver good or at least sort of stable code and received SVN access because of that (Flugente, silversurfer, Bob, Rowa and the rest)
- they are pitched in a forum thread by the coder so the players can be used as guinea pigs, when deemed tested, sort of stable, complete and a good feature the code is put into SVN after review by someone with SVN access
Stop putting incomplete clunky features/externalizations/whatever into SVN through the backdoor without proper testing, it damages the 1.13 mod as a whole
[Updated on: Thu, 17 March 2016 19:24]
DiscordReport message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sat Apr 20 00:20:22 GMT+3 2024
Total time taken to generate the page: 0.01378 seconds
|