Suggestion for different handling of the games difficulty

Share your thoughts and ideas about Mordheim: City of the Damned
User avatar
MasterN
Posts: 82
Joined: 16 January 2016, 10:49

Suggestion for different handling of the games difficulty

Postby MasterN » 23 January 2016, 13:11

As claimed in my other thread (/* viewtopic.php?f=65&t=2037 */) I intend to propose a new difficulty setting based on warband rating instead of (sometimes) item to item and unit to unit equality plus flat wound and damage bonuses.

WARNING! As I also proposed several other improvements in that thread, I'd like to consider some of them as already implemented, since they work together even better than just by themselves. Included changes:
- All unit slots and units available at band creation
- AI being able to strategically deal with superior or inferior enemy numbers effectively

Attention! Some of the following values may be from older versions of the game and some mistakes on my part may have been made. Please notify me on anything you notice!

First up is a full introduction to the calculation of the warband rating.

Each unit has its own rating, just by being a unit:
Leader: 40
Hero: 30
Henchman: 15
Impressive: 80

A level gives a unit 10xlevel points. You gain levels at the following rates:

Leaders and Heroes:
Level 0 to 4 require 12 XP each.
Level 4 to 5 requires 15 XP.
Level 5 to 7 require 20 XP each.
Level 7 to 9 require 24 XP each.
Level 9 to 10 requires 30 XP (Heroes only 25 XP).

Henchman:
Level 0 to 5 require 12 XP each.
Level 5 to 6 requires 16 XP.
Level 6 to 8 require 20 XP esch.
Level 8 to 10 require 25 XP each.

Wasn't able to make a complete level list for impressive units!


Every Attribute point grants a unit 1 rating point, including the attributes it started with. You gain attribute points in the following way:

Leaders (base 50 points) and Heroes (base 40 points):
Level 0 to 4 give 4 attribute points each.
Level 4 to 7 give 5 attribute points each.
Level 7 to 10 give 6 attribute points each (9 to 10 only 5 for Heroes).
For a grand total of 49 points (Heroes 48).

Henchman (base 30 points):
Level 0 to 1 gives 3 attribute points.
Level 1 to 6 give 4 attribute points each.
Level 6 to 10 give 5 attribute points each.
For a grand total of 43 points.

Wasn't able to make a complete attribute list for impressive units (base 80 points)!


Skills and Spells grant 2 points each plus another 2 points if upgraded (each unit starts with an upgraded active/passive skill).
(I think I'm correct in thinking that you get 2 skill points each level, and 2 spell points every 2 levels (correct me on that if I'm wrong!)
while hechman get 2 points every 2 levels)

Injuries/Mutations give or take points depending on their negative/positive effect (as far as I have seen +/- a multiple of 5).

Equipment gives points depending on type and quality:
Blue quality doubles an items base value.
Purple quality triples an items base value.

The base values are:
Consumables: 2
Headgear: 5
Armor: 10
Single Hand Item: 5
Dual Hand Weapon: 10
Enchantments: 5 or 10 depending on item (enchantments only exist as blue or purple items... base value still applies though)


Here's a Skaven Leader fully equipped with good quality gear and 119XP as an example:

Leader: 40 Points
Level 7 and 3/6: 70 Points
Attribute upgrades 34: 34 Points (+50 base)
Skill Points 18: 18 Points
Headgear: Helmet + Enchantment: 15 Points
Armor: LArmor + Enchantment: 30 Points
Main Weapon slot: Sword & Shield + enchantment each: 30 Points
Second slot empty
No consumables (empty inventory)
No injuries
Rating: 287


The suggested enhancements for higher difficulty were (so far... there's no testing or anything behind these values...):
add 0%(normal), 10%(hard), 20%(brutal) or 30%(deadly) to the players warband rating for the AI.

AI warbands may have more or less units than the player (even if the player has 10 units, no less than 4 though).
Balancing by more units, higher level and better equipment.

And the Algorithm by which to assign these points as follows (in pseudo-code):

Code: Select all

/* couple of methods I'd like to use for simplicity * * void level_units(unit[] AI_warband, double Player_avrg, int target, int distributed); * levels the AIs warband. Adds skills, spells and mutations as well, while keeping synergies in mind (meaning that ranged units preferably * don't get melee skills, and mixed units get a focus on one or the other). Makes sure the level difference doesn't surpass +-2 levels. * Checks and modifies the warbandrating, so it doesn't level further, than points allow. * * int get_player_warband_rating(); returns the players warband rating * * double get_player_avrg_level(unit[] deployed_warband); returns the average unit level * * int get_player_warband_level(); returns the players warband level * * int add_basic_equip(unit AI_unit); adds basic equipment (armor, weapons) to unit and returns the spent rating points * * * int improve_equip(unit AI_unit, int warband_level); takes the chosen unit and upgrades the one equipment item in accordance to progress, * returns increase in rating points, 0 if no upgrades possible or if empty slot. * * int rand(); generates a random integer number between 0 and int max. * * unit(type); creates a new unit of the chosen type. "empty" is an empty unit slot. * leader, hero, henchman.... self explanatory * * int get_unit_amount(unit[] warband); returns the amount of actual units in the warband * * * */ int tmp, count; int player_race = get_player_race(); // for example: 0=Mercs, 1=Skaven, 2=sisters, 3=Possessed int AI_race = rand()%4; // for example: 0=Mercs, 1=Skaven, 2=sisters, 3=Possessed unit deployed_player_warband[11]; //player deployed units: [leader, impressive, hero1, hero2, hero3, hero4, henchman1, ...] unit AI_warband[16]; // Maximum amount of Heroes 6, Henchmen 8 int player_has_impressive = 1; // if(deployed_player_warband[1] == unit(empty)){ //checks if player has impressive unit player_has_impressive = 0; } int player_warband_rating = get_player_warband_rating(); int difficulty = get_difficulty(); //0 to 3 int AI_warband_rating = player_warband_rating + player_warband_rating*difficulty/10; //add 0%(normal), 10%(hard), 20%(brutal) or 30%(deadly) int AI_distributed = 0; //distributed rating points int overflow; // in case there are excess rating points to be spent or deduced int base_leader_rating; int base_hero_rating; int base_hero_rating_caster; int base_henchman_rating; int base_impressive_rating; int base_equipment_melee_rating = 20; //armor slot and primary weapons, also base equipment for casters int base_equipment_ranged_rating1 = 25; //armor slot, primary ranged weapon and single backup or vice versa int base_equipment_ranged_rating2 = 30; //armor slot, primary ranged weapon and double backup or vice versa switch(AI_race) { //checks which race the AI has case 0: ... case 1: // example for Skaven, all units are delivered with no equipment whatsoever base_leader_rating = 94 base_hero_rating = 74; base_hero_rating_caster = 78; base_henchman_rating1 = 59; // other henchmen may have a different value, dependent on whether they have secondary weapons or not base_impressive_rating = 174; // other impressive may have a different value, dependent on whether they have secondary weapons or not int rating_per_level_leader[10] = {16, 16, 16, 16, 17, 17, 17, 18, 18, 18};// total 169, different, if the hero is a caster... int rating_per_level_hero[10] = {16, 16, 16, 16, 17, 17, 17, 18, 18, 17};// total 168 int rating_per_level_hero_caster[10] = {16, 18, 16, 18, 17, 19, 17, 20, 18, 19};// total 178 int rating_per_level_henchman[10] = {13, 16, 14, 16, 14, 16, 15, 17, 15, 17}; // total 153 int rating_per_level_impressive[10] = {15, 16, 16, 16, 16, 16, 17, 17, 17, 17}; // I DON'T KNOW FOR CERTAIN!!!! taken from henchman for sake of completion switch(AI_race) { case 0: // chance for amount of units in comparison to player, amount = {-2, -1, 0, +1, +2, +3} int unit_amount_distribution[6] = {-1, -1, 10, 50, 85, 100};//10% chance equal amount, 40% 1 unit more, 35% 2 more units, 15% 3 more units break; case 1: int unit_amount_distribution[6] = {-1, 15, 75, 100, 100, 100};//15% 1 unit less, 60% equal amount, 25% 1 more unit break; case 2: ... case 3: ... break; case 2: ... case 3: ... default: ... } // first two days over....... int AI_warband_size; int hero_place = 2; int henchman_place = 8; //edit: was 2... should be 8 AI_warband_size = rand()%100; for(tmp = 0; tmp < 6; tmp++){ //generates a warband size in accordance to the distribution if(warband_size < unit_amount_distribution[tmp]){ warband_size = tmp; } } if(warband_size < 4) warband_size = 4;// size being smaller than 4 can happen, fixed to 4 AI_warband[0] = unit(leader); // adds the leader to the warband(level 0, no equipment) AI_distributed += base_leader_rating; // adds leader rating to the warbands rating AI_distributed += add_basic_equip(AI_warband[0]); // basic equips leader. decides weapons! and adds to the warbands rating warband_size--; // deducts from remaining units if(player_has_impressive){ AI_warband[1] = unit(impressive); // adds the unit to the warband(level 0, no equipment) AI_distributed += base_impressive_rating; // adds unit rating to the warbands rating AI_distributed += add_basic_equip(AI_warband[3]); // basic equips unit. decides weapons! and adds to the warbands rating warband_size--; // deducts from remaining units } if(warband_size%2){ // if remaining amount is odd, add either hero or henchman tmp = rand()%2; if(tmp){ AI_warband[hero_place] = unit(hero); // adds the unit to the warband(level 0, no equipment) AI_distributed += base_hero_rating; // adds unit rating to the warbands rating AI_distributed += add_basic_equip(AI_warband[hero_place++]); // basic equips unit. decides weapons! and adds to the warbands rating warband_size--; // deducts from remaining units } else { AI_warband[henchman_place] = unit(henchman); // adds the unit to the warband(level 0, no equipment) AI_distributed += base_henchman_rating; // adds unit rating to the warbands rating AI_distributed += add_basic_equip(AI_warband[henchman_place++]);// basic equips unit. decides weapons! and adds to the warbands rating warband_size--; // deducts from remaining units } } // at this time, there are at most 3 units in the warband! if(AI_warband_rating-AI_distributed < 196){ //the AI remaining warband rating should only be less than 196 at this point if the player has a //level average of 0, no mentionable XP on units, only 4 basic equipped units and a difficulty of normal. AI_warband[hero_place] = unit(hero); // adds the unit to the warband(level 0, no equipment) AI_distributed += base_hero_rating; // adds unit rating to the warbands rating AI_distributed += add_basic_equip(AI_warband[hero_place++]); // basic equips unit. decides weapons! and adds to the warbands rating warband_size--; // deducts from remaining units AI_warband[henchman_place] = unit(henchman); // adds the unit to the warband(level 0, no equipment) AI_distributed += base_henchman_rating; // adds unit rating to the warbands rating AI_distributed += add_basic_equip(AI_warband[henchman_place++]);// basic equips unit. decides weapons! and adds to the warbands rating warband_size--; // deducts from remaining units } while(warband_size > 0 && ((AI_warband_rating-AI_distributed)>80)){ // checks whether there are still empty slots and enough rating points left to fill at least one. // slots are always even when it's executed first. if((AI_warband_rating-AI_distributed)>=98){ AI_warband[hero_place] = unit(hero); // adds the unit to the warband(level 0, no equipment) AI_distributed += base_hero_rating; // adds unit rating to the warbands rating AI_distributed += add_basic_equip(AI_warband[hero_place++]); // basic equips unit. decides weapons! and adds to the warbands rating warband_size--; // deducts from remaining units } if((AI_warband_rating-AI_distributed)>=80){ AI_warband[henchman_place] = unit(henchman); // adds the unit to the warband(level 0, no equipment) AI_distributed += base_henchman_rating; // adds unit rating to the warbands rating AI_distributed += add_basic_equip(AI_warband[henchman_place++]);// basic equips unit. decides weapons! and adds to the warbands rating warband_size--; // deducts from remaining units } } // levelling of the AI warband level_units(AI_warband, get_player_avrg_level(deployed_player_warband), AI_warband_rating, AI_distributed); tmp = 0; int secondary_tmp; while((AI_warband_rating-AI_distributed) > 10){ // After levelling come equipment upgrades if there are any points left while(tmp < 16){ tmp = 0; for(count = 0, count<16, count++){ if((AI_warband_rating-AI_distributed) > 20){ //ensures that there's always a possible upgrade, whether blue or purple overflow = improve_equip(AI_warband[count], get_player_warband_level()); } else { overflow = 0; } if(!overflow){ //checks whether an upgrade was possible or not. if all units fail to upgrade, then upgrade phase ends. tmp++; } } } if((get_unit_amount(AI_warband)==16) && (tmp == 16)) break; /* If my thinking is correct, then this should only ever happen, if all slots in players warband are filled with fully equipped * Level 10 units, and even 16 fully equipped level 10 opponents can't use up all desired rating points... * This actually shouldn't happen... here just in case to break an infinite loop, in which case some undistributed points remain. */ if(((AI_warband_rating-AI_distributed)>80) && (get_unit_amount(AI_warband)<16)){ /* checks whether there are still empty slots and enough rating points left to fill at least one slot. * this is the point, where higher difficulty starts to get interesting, as the previously set amount of AI units * may be increased to meet difficulty targets */ if(((AI_warband_rating-AI_distributed)>=198) && (!player_has_impressive) && (equals(AI_warband[1],unit(empty)))){ // even if player hasn't got impressive, may still show up at high difficulty. actually first unit to be added if difficulty is high enough AI_warband[1] = unit(impressive); // adds the unit to the warband(level 0, no equipment) AI_distributed += base_impressive_rating; // adds unit rating to the warbands rating AI_distributed += add_basic_equip(AI_warband[1]); // basic equips unit. decides weapons! and adds to the warbands rating level_units(AI_warband, get_player_avrg_level(deployed_player_warband), AI_warband_rating, AI_distributed); // warband size no longer relevant } else { //adds another unit. either hero or henchman, chosen at random for as long as there are free slots secondary_tmp = rand()%2; if (secondary_tmp){ if(((AI_warband_rating-AI_distributed)>=98) && (hero_place<8)){ AI_warband[hero_place] = unit(hero); // adds the unit to the warband(level 0, no equipment) AI_distributed += base_hero_rating; // adds unit rating to the warbands rating AI_distributed += add_basic_equip(AI_warband[hero_place++]); // basic equips unit. decides weapons! and adds to the warbands rating level_units(AI_warband, get_player_avrg_level(deployed_player_warband), AI_warband_rating, AI_distributed); // warband size no longer relevant } else { if(((AI_warband_rating-AI_distributed)>=80) && (henchman_place<16)){ AI_warband[henchman_place] = unit(henchman); // adds the unit to the warband(level 0, no equipment) AI_distributed += base_henchman_rating; // adds unit rating to the warbands rating AI_distributed += add_basic_equip(AI_warband[henchman_place++]);// basic equips unit. decides weapons! and adds to the warbands rating level_units(AI_warband, get_player_avrg_level(deployed_player_warband), AI_warband_rating, AI_distributed); // warband size no longer relevant } } } else { if(((AI_warband_rating-AI_distributed)>=80) && (henchman_place<16)){ AI_warband[henchman_place] = unit(henchman); // adds the unit to the warband(level 0, no equipment) AI_distributed += base_henchman_rating; // adds unit rating to the warbands rating AI_distributed += add_basic_equip(AI_warband[henchman_place++]);// basic equips unit. decides weapons! and adds to the warbands rating level_units(AI_warband, get_player_avrg_level(deployed_player_warband), AI_warband_rating, AI_distributed); // warband size no longer relevant } else { if(((AI_warband_rating-AI_distributed)>=98) && (hero_place<8)){ AI_warband[hero_place] = unit(hero); // adds the unit to the warband(level 0, no equipment) AI_distributed += base_hero_rating; // adds unit rating to the warbands rating AI_distributed += add_basic_equip(AI_warband[hero_place++]); // basic equips unit. decides weapons! and adds to the warbands rating level_units(AI_warband, get_player_avrg_level(deployed_player_warband), AI_warband_rating, AI_distributed); // warband size no longer relevant } } } } } }
I'm sharing the pseudo-code, because it helped me getting around the concept of my idea. I had to take some shortcuts with the code (I'M SORRY), because it would've otherwise taken far too much time to sort of finish it (is mostly C I think, but may also contain some java...).
As mentioned above, the AI may have more units instead of higher wound and more damage buffs.
My suggestion would be a maximum of 16 units, 1 leader, 1 impressive, 6 heroes, 8 henchman (at total max... I don't think, that these numbers will be achieved with a 30% rating increase, but that may not be enough...).

What the code does (in my mind) in short hand:
- choses the size of AI warband dependend on it's race, the players race and a certain distribution (chances hard coded, but randomly chosen) (may lead to AI having more or less units than the player)
- adds units to fill AI warband
- levels units depending on remaining rating points and players warband average level (AIs average may, of course, be above the players)
- equips units depending on progress and remaining rating points
- if there are still quite some rating points left, add additional units + leveling + equipping until all points are spent or no more points able to spend.
Last edited by MasterN on 26 January 2016, 16:08, edited 1 time in total.

User avatar
Drildgen
Posts: 564
Joined: 07 November 2014, 15:32

Re: Suggestion for different handling of the games difficult

Postby Drildgen » 26 January 2016, 15:32

Give me a couple seconds to pick-up my jaw from the floor...
Good hunting in the streets of Mordheim!

-Drildgen

User avatar
Drildgen
Posts: 564
Joined: 07 November 2014, 15:32

Re: Suggestion for different handling of the games difficult

Postby Drildgen » 26 January 2016, 15:44

Ok, now that it is back in place, I will answer your post...

... Now where should I begin...

I can only stand in awe in front of such a post... You clearly went the extra mile by writing your own code for the suggestions you brought up and we at Rogue Factor are extremely thankful for the extra effort you put in. It shows us how much you care for the game and again, we're extremely thankful for that! All the feedback you provided with your post will be kept and analysed thoroughly. Unfortunately, it won't make it into Mordheim, but we will definitely keep an eye on it for our future projects.

Keep on rocking and enjoying the game,
Good hunting in the streets of Mordheim!

-Drildgen

User avatar
MasterN
Posts: 82
Joined: 16 January 2016, 10:49

Re: Suggestion for different handling of the games difficult

Postby MasterN » 26 January 2016, 17:03

I can only stand in awe in front of such a post... You clearly went the extra mile by writing your own code for the suggestions you brought up and we at Rogue Factor are extremely thankful for the extra effort you put in. It shows us how much you care for the game and again, we're extremely thankful for that! All the feedback you provided with your post will be kept and analysed thoroughly.
Well, this release was a real surprise to me. Bought it less than 24 hours after watching a let's play of it. That's how good of an impression just that left on me. If you (Rogue Factor) made such an effort, I don't mind spending some time myself. But don't spend too much time on the code... it was more a mind-bridge for myself, and most of it is probably rubbish...

Unfortunately, it won't make it into Mordheim, but we will definitely keep an eye on it for our future projects.

Keep on rocking and enjoying the game,
After playing the "Skaven Act I-IV" I get the feeling, that adding more enemy units will probably not increase difficulty in the desired fashion. It's most likely impossible to leave the buffs out, And if it's too much trouble to modify the maps then that was it for this idea...


Return to “Feedbacks”

Who is online

Users browsing this forum: No registered users and 3 guests

cron