Battle Brothers
0 of 0

File information

Last updated

Original upload

Created by

puuungi

Uploaded by

puuungi

Virus scan

Safe to use

Tags for this mod

20 comments

  1. fireefogo
    fireefogo
    • member
    • 0 kudos
    DOes Anyone know if this works with Legends? I'm not sure if Legends messes with talents
  2. alt0172
    alt0172
    • member
    • 1 kudos
    Isn't Gifted bugged in this mod? Looks like with it you will be getting max vanilla rolls for everything up to level 31

    my guess is that this mod adds 30 values for levelups, and this condition becomes true when you take gifted:else if (_maxOnly)
    {
    this.m.Attributes[i].insert(0, this.Const.AttributesLevelUp[i].Max);
    }
    so this mod just adds 30 max rolled values :D
  3. V0zhban
    V0zhban
    • member
    • 4 kudos
    May be too late, but it seems to me that when the mod tries to distribute 9+ talent levels from a pool(or even less when background restricts talents) it has a potential to roll low(say 1) for each attribute and then be unable to distribute remaining points from pool(as it tries to find an attribute with 0 talent) leading to infite loop.
    1. Davidosikkrut
      Davidosikkrut
      • supporter
      • 0 kudos
      Hey, have you found a solution to fix this? Im looking into mod's code now, but i dont even know, what language it is.
    2. alt0172
      alt0172
      • member
      • 1 kudos
      i replaced in "mod_talents_reworked.nut" this part                while( talentPool > 0 )
                      {
                          local i = this.Math.rand(0, this.Const.Attributes.COUNT - 1);

                          if (this.m.Talents[i] == 0 && (this.getBackground() == null || this.getBackground().getExcludedTalents().find(i) == null))
                          {
                              local r = this.Math.rand(1, 100);
                              local val = 0;

                              if (r <= 45){        //45%
                                  val = 1;
                              }else if (r <= 70){ //25%
                                  val = 2;
                              }else if (r <= 85){ //15%
                                  val = 3;
                              }else if (r <= 95){ //10%
                                  val = 4;                            
                              }else{
                                  val = 5;    //5%
                              }
                              //logInfo(r + " - " + val);                        
                              if(val > talentPool) {
                                  val = talentPool;
                              }
                              this.m.Talents[i] = val;
                              talentPool-= val;
                          }
                      }
      with this (added new logic so code became bigger):                local availableAttrsForTalents = [];
                      local attrId;        // id of availableAttrsForTalents
                      local talentId;        // id of talent, it's = availableAttrsForTalents[attrId];
                      local val;            //how many stars to put in the talent
                      local allAttributes = [0,1,2,3,4,5,6,7];
                      /*gt.Const.Attributes:
                          Hitpoints = 0,
                          Bravery = 1,
                          Fatigue = 2,
                          Initiative = 3,
                          MeleeSkill = 4,
                          RangedSkill = 5,
                          MeleeDefense = 6,
                          RangedDefense = 7,
                      */

                      if (this.getBackground() == null)
                      {
                          availableAttrsForTalents = allAttributes;
                      }
                      else
                      {
                          foreach (attrId in allAttributes)
                          {
                              if(this.getBackground().getExcludedTalents().find(attrId) == null)
                              {
                                  availableAttrsForTalents.push(attrId);
                              }
                          }
                      }
                      while( talentPool > 0 )
                      {
                          if (availableAttrsForTalents.len() == 1)
                          {
                              // only 1 possible attr left - put all stars there
                              attrId = 0;
                              talentId = availableAttrsForTalents[attrId];
                              val = talentPool;

                              this.m.Talents[talentId] = val;
                              talentPool -= val;
                              availableAttrsForTalents.remove(attrId);
                          }
                          else if (availableAttrsForTalents.len() > 0)
                          {
                              attrId =  this.Math.rand(0, availableAttrsForTalents.len() - 1);
                              talentId = availableAttrsForTalents[attrId];

                              if (this.m.Talents[talentId] == 0 && (this.getBackground() == null || this.getBackground().getExcludedTalents().find(talentId) == null))
                              {
                                  local r = this.Math.rand(1, 100);
                                  val = 0;
                                  
                                  // correction multiplier for cases when
                                  // talent pool is too high and there are very few available talents
                                  r = r * talentPool/availableAttrsForTalents.len();

                                  if (r <= 45){        //45%
                                      val = 1;
                                  }else if (r <= 70){ //25%
                                      val = 2;
                                  }else if (r <= 85){ //15%
                                      val = 3;
                                  }else if (r <= 95){ //10%
                                      val = 4;                            
                                  }else{
                                      val = 5;    //5%
                                  }
                                  //logInfo(r + " - " + val);                        
                                  if(val > talentPool) {
                                      val = talentPool;
                                  }
                                  
                                  this.m.Talents[talentId] = val;
                                  talentPool-= val;
                                  availableAttrsForTalents.remove(attrId);
                              }
                          }
                      }
      and it looks like freezes are over
  4. MrModJoy
    MrModJoy
    • member
    • 0 kudos
    It makes me crash when i click certain cities
    1. kuukuu
      kuukuu
      • member
      • 0 kudos
      Same
    2. SSSWWW999
      SSSWWW999
      • member
      • 0 kudos
      зайди во все поселения не выполняя задания
    3. Wen3001
      Wen3001
      • member
      • 0 kudos
      same please update :)
  5. MrDavydenko
    MrDavydenko
    • member
    • 0 kudos
    Please, make it compatible with LEGENDs mod, 4 or 5 star talents make brothers more different. This mod is awesome!
    1. aeiwange
      aeiwange
      • member
      • 0 kudos
      +1+1+1 :S
    2. MrDavydenko
      MrDavydenko
      • member
      • 0 kudos
      sorry, but i don't understand what do you mean? are you support this idea?
  6. bogdaninco
    bogdaninco
    • member
    • 0 kudos
    Can you make it for legends mod please?
  7. aezart
    aezart
    • member
    • 0 kudos
    would this conflict with weighted talents mod?
    1. slimpwarrior
      slimpwarrior
      • member
      • 2 kudos
      Obviously
  8. Colourlessamiba
    Colourlessamiba
    • supporter
    • 0 kudos
    Does this mod work with Legends?
    1. Technocrat98
      Technocrat98
      • member
      • 0 kudos
      I think not
  9. ColorMulticolor
    ColorMulticolor
    • member
    • 0 kudos
    Wow, sounds like a really useful and cool mod, but I already have a mod that touches on veteran levels. Would it be possible to make a version of this mod without changing veteran levels? If it's not difficult then it will only be a plus
    1. puuungi
      puuungi
      • member
      • 0 kudos
      I added an alternate version without the changes to veteran levels, didn't tested it but it should work. Don't know if the 2 mods will be compatible though, but it may!
    2. ColorMulticolor
      ColorMulticolor
      • member
      • 0 kudos
      It looks like everything works fine, but if I come across something strange I will let you know. Thank you very much for your efforts. You are amazing