Battle Brothers

File information

Last updated

Original upload

Created by

Iver

Uploaded by

Iver34

Virus scan

Safe to use

Tags for this mod

35 comments

  1. Iver34
    Iver34
    • member
    • 2 kudos
    Locked
    Sticky
    Version 3.0.2. is uploaded.
    INSTRUCTION:
    1. Download new version of file.
    2. Paste it in your Battle Brothers/data folder without unzipping.

    Tip 1: for now mod doesn't have any functionality, that requires BBparser, so you can use mod without it. After some testing i get this:
    MSU has 2 systems of mod's settings saving, it's thru BBparser and ingame flags. The second one is always in priority, so, even if you use BBparser, and even if it didn't parsed settings change from log.html file and didn't changed settings file of mod by some cause, mod will load saved settings from inner flags of your game savefile.

    Tip 2: after any change in mod's settings menu and click "Apply" or "Save" immediately save your game, it will change flags that are saved in your game savefile and settings will work for this exact savefile.

    Tip 3: after testing i founded, that ingame flags will be created in savefile if you run game without working BBparser and rewrite your save at least once. Since that moment flags will be created and all gonna work. If you didn't rewrite your savefile at least once with not working BBparser, numbers will load from working BBparser.

    Tip 4: WARNING - if you lose battle or flee from it all your brothers who died in battle will die!
  2. Kageuraufc
    Kageuraufc
    • member
    • 0 kudos
    Give me your discord contact so we can talk about a mod project
    1. Iver34
      Iver34
      • member
      • 2 kudos
      iver#3189, i am not very familiar with discord actually, if i gave you the wrong thing please let me know.
    2. Kageuraufc
      Kageuraufc
      • member
      • 0 kudos
      did not work. try to add me Kageura#2152
    3. Iver34
      Iver34
      • member
      • 2 kudos
      I wrote you a personal message in discord.
  3. Ephemereaal
    Ephemereaal
    • member
    • 0 kudos
    Is it possible to add a setting that allows a chance of getting a permanent injury even without any temporary injuries? Essentially keeping vanilla functionality but diluting the pool of permanent injuries with long-term injuries.

    Had a look at player_death_fix.nut, but unsure what I'd change to make that happen.

    Actually, would removing this section do the trick?


                {
                    if (this.m.Skills.hasSkill(injH.ID))
                    {
                        BroReady = true;
                    }
                }
    1. Iver34
      Iver34
      • member
      • 2 kudos
      So, you wanna make a, let say, a 50/50 chance of getting heavy injury or perma injury? Without any conditions?
    2. Ephemereaal
      Ephemereaal
      • member
      • 0 kudos
      Yeah, chance of both, but potentially increased by number of heavy injuries already suffered. Maybe starting at 33% for 0 injuries.
    3. Iver34
      Iver34
      • member
      • 2 kudos
      Request is done, use version 3.0.2.
      In fact, i made the simpliest thing i could, you have 2 settings "Base temporary injury chance" and "Additional temporary injury chance". Both works only if boolean setting "Enable permanent injuries" is ON, second setting is scaled by amount of heavy injuries that your brother already has. I made only basic testings, all works, but if you find any bugs please let me know, i'll try fix them ASAP. 
    4. Ephemereaal
      Ephemereaal
      • member
      • 0 kudos
      Works great so far, Thanks!
  4. gruberscomplete
    gruberscomplete
    • member
    • 0 kudos
    Hi, Can you add an option to increase the chance to survive like the original mod?

    edit:

    actually, I think I got it, its just to add these in the no_perm_inj.nut

            this.m.Actor.SurviveWithInjuryChanceMult = 3.34;
            this.m.Actor.FatalityChanceMult = 0.00;

    though they still die after battle is over, even with these changes

    edit 2:

    tried to overwrite the isReallyKilled function, but getting crashes. not sure how to fix these

    if a pawn belongs to the player, always return 'false' and add permanent injuries, otherwise return the original isReallyKilled function

    ::mods_hookClass("entity/tactical/player", function(o) {
     
      local isReallyKilledOrigFunc = o.isReallyKilled;
      o.isReallyKilled = function( _fatalityType )
        {
            if (this.isPlayerControlled()) {
                local potential = [];
                local injuries = this.Const.Injury.Heavy;
                local numPermInjuries = 0;

                foreach( inj in injuries )
                {
                    if (!this.m.Skills.hasSkill(inj.ID))
                    {
                        potential.push(inj);
                    }
                    else
                    {
                        numPermInjuries = ++numPermInjuries;
                    }
                }

                if (potential.len() != 0)
                {
                    local skill = this.new("scripts/skills/" + potential[this.Math.rand(0, potential.len() - 1)].Script);
                    this.m.Skills.add(skill);
                    this.Tactical.getSurvivorRoster().add(this);
                    this.m.IsDying = false;
                    this.worsenMood(this.Const.MoodChange.PermanentInjury, "Suffered a permanent injury");
                    this.updateAchievement("ScarsForLife", 1, 1);

                    if (numPermInjuries + 1 >= 3)
                    {
                        this.updateAchievement("HardToKill", 1, 1);
                    }
                }
                return false;
            }

            this.Const.Injury.Permanent = this.Const.Injury.Heavy;    
            return isReallyKilledOrigFunc( _fatalityType );
        }
    });
    1. Iver34
      Iver34
      • member
      • 2 kudos
      I'll try at big weekends, too busy now, year's end on work, sorry
    2. NaumanMarwat
      NaumanMarwat
      • member
      • 0 kudos
      Bro you got it working?
    3. Iver34
      Iver34
      • member
      • 2 kudos
      Sorry, was deadly bisy for a month, i will continue working with mod in april
    4. Iver34
      Iver34
      • member
      • 2 kudos
      Emm... It's not april now, but still, update is uploaded... Finally.
  5. DumpsterCommander
    DumpsterCommander
    • member
    • 0 kudos
    Cheater mod, but you do you.
  6. elfakexd
    elfakexd
    • member
    • 0 kudos
    legends compatible???
    1. Iver34
      Iver34
      • member
      • 2 kudos
      Unfortunately no, because Legends is veeeery big and complex mod. I will make it compatible, but very later.
  7. o0Julia0o
    o0Julia0o
    • member
    • 0 kudos
    Do you have to start a new game? Does it heal permanent, if permanent is already set?
    1. Iver34
      Iver34
      • member
      • 2 kudos
      No, you don't need to start a new campaign.
      No, it will not change already appeared permanent injuries on heavy injuries, also permanent injuries will not be healbe, because mod is adding new injuries, just base on simple temporary injuries, but with big prices, and not change any permanent vanilla injuries
  8. Alvikim
    Alvikim
    • member
    • 0 kudos
    Hi, is there a way to lower the price of injuty treatment at a temple ? I feel like its too damn high !

    I like the idea of getting heavy injuries when my brothers die specially on those epic late game fights that almost always get someone, but paying 10k for treatment rn makes the fights not worth it just like in vanilla,
    1. Iver34
      Iver34
      • member
      • 2 kudos
      I want to add this functionality by adding an MSU features in this mod, but for now, unfortunately, MSU has some serious bugs and i'm waiting of version 1.2.0 to release, sorry. Also, you can open .nut files of mod in program like Sublime Text and change them as you wish, not a panacea, but will work.
  9. LuminateChan
    LuminateChan
    • member
    • 0 kudos
    Hello again, if I retire a brother with Displaced Leg Fracture will I unlock the requirement for The Sergeant Retinue? I don't seem to unlock the Sergeant when I retire a brother with Heavy Injuries
    1. Iver34
      Iver34
      • member
      • 2 kudos
      Oh, yes, it will not work, i'll fix it ASAP
    2. Iver34
      Iver34
      • member
      • 2 kudos
      Done, fix is available in new version 2.2. Not best code, but working for now, if you find any another bugs please let me know. And thank you for your responsiveness.
  10. DarmutMH
    DarmutMH
    • BANNED
    • 1 kudos
    How to make a translation: how to open files "nut"?
    1. Iver34
      Iver34
      • member
      • 2 kudos
      I use Sublime text, also notepad++ and Atom can open them
    2. DarmutMH
      DarmutMH
      • BANNED
      • 1 kudos
      Thanks. I will try.
  11. LuminateChan
    LuminateChan
    • member
    • 0 kudos
    If I'm correct Brain damage is Hemispheric Dysfunction, can I still convert my brother with Hemispheric Dysfunction to cultist?
    1. Iver34
      Iver34
      • member
      • 2 kudos
      Unfortunately not, since this event checks for the presence of an Brain Damage injury by its internal identifier, in fact it can be considered as bug in the mod, thanks for the information, I will fix it as soon as possible
    2. Iver34
      Iver34
      • member
      • 2 kudos
      Added a new version 2.1, where fixed bug with conversion, but didn't tested it. I just edited event file and added a new condition, if you using some mods for cultists and they conflict with this Heavy Injuries mod please give me the link, i will adopt my mod ASAP.
    3. LuminateChan
      LuminateChan
      • member
      • 0 kudos
      Question, If I have a surgeon on my retinue and my brother with Bloodied eye get struck down/killed by not fatality, does he still guaranteed to live or not because surgeon can only guarantee to live If the brother still don't have any perm injury?
    4. Iver34
      Iver34
      • member
      • 2 kudos
      Yes, he is guaranteed to survive, since Heavy Injuries are realized through simple injuries and have an appropriate ID, and the surgeon checks the absence of an ID for permanent injury. I really don't like it so much, but it is working for now, have a lot of plans on future updates, don't have much time :D