Attack Frequency Solved - How to Reduce Settlement Attacks - Fallout 4

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024
  • See the code for yourself here: afkmods.iguanad...
    Yes I did my decimals wrong, but otherwise I can't explain the math on this page: Scroll down to "how settlement raids work": / psa_settler_recruitmen...
    My Twitch: / scotchandsmokerings
    Mods Used: oxhorn.it/mods-...
    Oxhorn's Free Fallout 4 Settlement Happiness Calculator: oxhorn.it/happi...
    My Fantasy Novel: www.cloranhasti...
    ALL of my settlements and their status: oxhorn.it/settl...

ความคิดเห็น • 910

  • @YesMan_Lucky38
    @YesMan_Lucky38 8 ปีที่แล้ว +906

    I hate the fact that you have to babysit every settlement. When a settlement is attacked where the hell are the rest of the minute-men and Preston?

    • @Flood520
      @Flood520 8 ปีที่แล้ว +297

      "That's a good question; here, let me mark myself on your map." -Preston Garvey

    • @Flood520
      @Flood520 8 ปีที่แล้ว +86

      ***** Does not change the fact if you do not show up personally to kill those 4 raiders, your settlement is going to take damage.

    • @sik3xploit
      @sik3xploit 8 ปีที่แล้ว +46

      And then when you get attacked by the institute you find out you gave all your combat armor and laser rifle to a synth...

    • @Trustworthy_McLegitimate
      @Trustworthy_McLegitimate 7 ปีที่แล้ว +45

      Jake Stanley LOL. Minutemen in a Nutshell right there. Failing at a moments notice....
      They're good people... just dont expect much from them though.

    • @mister4721
      @mister4721 7 ปีที่แล้ว +45

      Exactly my point, its fuckin stupid, Not only is yr char a General, a Fireman, repairman, builder, farmer, fucking everything rolled into one, its enough to fuckin drive you crazy. Babysitting a bunch of brainless idiots in each settlement. Nope i keep away from the Minutemen now and have done so for the last 3-or 4 chars i have played this through. But thats just one man's opinion isn't it. :)

  • @TheFancyCoffee
    @TheFancyCoffee 8 ปีที่แล้ว +518

    "Truth is, it was rigged from the start." -developers of the attack system, probably

    • @regardlessrampage
      @regardlessrampage 8 ปีที่แล้ว +32

      from where we're standing, It sure feels like a 10 karat run of bad luck.

    • @Amoeba47
      @Amoeba47 8 ปีที่แล้ว +6

      +regardlessrampage 18*

    • @regardlessrampage
      @regardlessrampage 8 ปีที่แล้ว +6

      cold 187um oops, it's been a few years.

    • @PinkLegue
      @PinkLegue 7 ปีที่แล้ว +12

      'howdy partner'

    • @obamayomama8291
      @obamayomama8291 7 ปีที่แล้ว +4

      PinkLegue "Highroller suite!"

  • @metamario9728
    @metamario9728 8 ปีที่แล้ว +46

    The tips about setting settlement defense to 150 and removing excess water and food is really helpful. Thank you.

  • @Nason599
    @Nason599 7 ปีที่แล้ว +93

    they should make a game mechanic when you are the general of the minute men, maybe only after the main quest line is done (or not whatever is claimed the best style) that when a settlement is under attack you have the option to send a detachment of minutemen to protect the settlement, the general has an army that in game he/she has once most of the settlements are acquired and constructed to be "happy" but has limited command over it in-game, they either stay at checkpoints, protect random strategic locations throughout the commonwealth, you also don't even know about that unless you walk past the location and they are in combat. i would have loved to see a more in depth command system for a local army like this. like i said at the beginning of this obnoxiously long comment (sorry :/ ) sending troops to one settlement while you personally go to another would be a fantastic thing to be able to do, it would add a huge immersion level to the game, at least for me who loves RTS gameplay, and it would make the player feel that much more in control of the minutemen as the general, helping the commonwealth with an army instead of mainly by yourself, but still having an army

    • @mdredheadguy1979
      @mdredheadguy1979 4 ปีที่แล้ว +9

      I agree with everything you said, but Bethesda cared more about making a MMO game to micro transaction the frak out of gamers, and didn’t care about fully fleshing out the settlements in Fallout 4.

    • @ObeyCamp
      @ObeyCamp 5 หลายเดือนก่อน +2

      Reading this comment six years later it makes me think how awesome being able to command a detachment ir two of Minutemen.
      If you've played Metal Gear Solid V: The Phantom Pain, you know how in your menus you can assign some of your soldiers from Motherbase to go do operations in other countries for you, and once the timer for that mission ticks down completely you're rewarded with, for example, removal of extra supplies e.g. helmets, shotguns, security cameras, etc., from in-game enemies and bases, or rewards like new skilled soldiers, resources, etc. I would've loved to have a kind of Minuteman minigame like that in FO4.

  • @thomasaitken7495
    @thomasaitken7495 4 ปีที่แล้ว +21

    Enjoyed the video. I think the thing that drives me crazy the most about settlement attacks is that you can bounce around the map, go a stretch of not a single attack, but suddenly as soon as you are working on a quest, it happens when you can't get away to stop it. And of course the settlement loses the attack. Like when you are deep in the Mechanist layer. Or when the game doesn't even tell you there is one, and you find out that they lost an attack when you visit on a whim.

  • @SnlDrako
    @SnlDrako 8 ปีที่แล้ว +36

    I just love the high quality and generally "good intentions" feeling from your videos. And thanks for the explanations.

    • @dangerous8333
      @dangerous8333 3 ปีที่แล้ว

      Do you have a link to a video with an example of bad intentions?
      Seems like odd praise. What bad intentions could a gaming channel possibly have.

    • @teardread1899
      @teardread1899 2 ปีที่แล้ว +1

      I second this

  • @xaero5150
    @xaero5150 8 ปีที่แล้ว +66

    I have settlements with 999 (the maximum it will ever display) defense, that if I am not there, will lose attacks. If I am there, I don't have to do a thing and an army of legendary deathclaws gets destroyed in a cloud of violence within seconds. There must be something missing.

    • @penelopeburris7016
      @penelopeburris7016 5 ปีที่แล้ว +6

      yeah that's weird, same here with my settlements, just being there during the attack, shouldn't have that much effect on whether a settlement defends or loses during an attack especially if they have plenty of defense.

    • @Warhamer116
      @Warhamer116 4 ปีที่แล้ว +16

      @@penelopeburris7016 defence caps at 100 for auto-resolve. Any further than that is not calculated. If you mod your game you can make the formula take into account your actual defence, but at vanilla it just caps at 100 and any further might as well be flapping dongs while attack happens

    • @mdredheadguy1979
      @mdredheadguy1979 4 ปีที่แล้ว +13

      This is one of the main reasons I have come to despise the settlement system.

    • @brosef4154
      @brosef4154 2 ปีที่แล้ว +6

      It just works.

  • @TheFinalattacker
    @TheFinalattacker 8 ปีที่แล้ว +94

    I would just love to know how I can have a settlement with 1000 defense, 18 people and a happiness of 85 armed with power armor and combat shotguns with plenty of ammo can loose a attack?

    • @TheFinalattacker
      @TheFinalattacker 8 ปีที่แล้ว +5

      and I use no mods

    • @jude6414
      @jude6414 4 ปีที่แล้ว +1

      yeah you can.

    • @intorsusvolo7834
      @intorsusvolo7834 4 ปีที่แล้ว +2

      Low luck? :9

    • @Chronamut
      @Chronamut 4 ปีที่แล้ว +6

      I think it depends on WHICH settlement - I did the red rocket truck stop with a defense of over 400 and it has never been attacked. I also make sure that the entire first floor is metal and that the entrance is on a timed off switch with the entrance corridor entirely filled with turrets and the second floor entirely surrounded by turrets that guard the entire perimeter. You basically make it so even if they could take out 1 turret 10 more are firing on them at once. Think in terms of literal defense.

    • @mdredheadguy1979
      @mdredheadguy1979 4 ปีที่แล้ว +8

      Because the system decides the out come randomly.
      Unless you show up and help fight.

  • @1tomsta1
    @1tomsta1 8 ปีที่แล้ว +14

    This vid was playing in the background and I thought I heard Tom Hanks talking about fallout

  • @austinfitzpatrick4646
    @austinfitzpatrick4646 8 ปีที่แล้ว +32

    I appreciate this, you're one of the only youtubers that do this.

  • @anarchond
    @anarchond 6 ปีที่แล้ว +7

    There has to be a way to edit the code and decrease the liklihood of attack majorly.
    Like add a rule that states no more then 2 attacks may occur simultaneously, and there be no more then 2 every hour (or whatever time).

  • @gwouru
    @gwouru 8 ปีที่แล้ว +61

    unless I missed something, it did not have a condition for always win as a defender, only an always win as an attacker. Unless it's specifically coded, one thing being an always win, does not mean the inverse is an always win.

    • @oxhorn
      @oxhorn  8 ปีที่แล้ว +11

      You missed the attack strength cap, which is set at 150. If no attack can be stronger than 150, then logically any defense above 150 will be successful.

    • @gwouru
      @gwouru 8 ปีที่แล้ว +16

      logic doesn't really matter, I saw that, but there's no auto win CODE for having defense higher than 150. The only CODE for auto victory is if attack is higher than defense.

    • @gwouru
      @gwouru 8 ปีที่แล้ว +16

      basically, you auto lose, if your defense isn't high enough, but because there's no line of code saying you auto win if your defense IS high enough, it becomes a coin toss, having good defense allows victory, doesn't guarantee it.

    • @oxhorn
      @oxhorn  8 ปีที่แล้ว +7

      Well ok. So if the cap is in place, and if a raider gang with 150 attack raids a settlement with 590 defense, what happens? The outcome is right here:
      ; called by attack quests if they need to be resolved "off stage"
      ; return value: TRUE = attackers won, FALSE = defenders won
      and directly below that
      endif
      bool attackersWin = false
      So, if the attack strength cap is 150, and to win, attack strength > defense strength (as I showed in the video), then attackers win = FALSE, leading to the above condition; defenders won.
      Check out the code for yourself: afkmods.iguanadons.net/index.php?/topic/4549-settlemet-raids-not-exactly-a-bug-but/

    • @AGiantPie
      @AGiantPie 8 ปีที่แล้ว +12

      This seems the most likely cause, yeah. According to that code there is absolutely no way to guarantee that you will win a settlement defense unless you show up, which confirms what we've all experienced. That's really shit tbh.

  • @thesnowedone
    @thesnowedone 8 ปีที่แล้ว +29

    That's actually not how I read that code. I read it as you can have a maximum of 200 defense and they have a maximum of 150 attack. But there is still a random chance of 0-100 for just one of those values (although it looks like two one will get cancelled out - read below). Let me explain - This is what I worked out:
    First assumption:
    CalculateDefenseStrength() apparently returns a max of 100.
    Second Assumption:
    We are assuming we are calculating for a settlement with a huge amount of resources (enough to put attackStrength over 150). This settlement also has enough defenses and settlers to max the defensive strength to 100.
    Constant:
    resolveMaxAtackRoll = 150
    Calculations:
    defenseRoll = 1d100 + CalculateDefenseStrength(max is 100)
    Therefore defenseRange is from 101-200.
    attackRoll = minimum of (1d100 + atttackStrength) OR resolveMaxAtackRoll = 150
    So assuming attackStrength is over 150 - this will enforce that attack roll will always be 150. There is no random range as it has been subsumed by the min calcuation when raider attack strength is high due to large amounts of resources.
    The 1d100 for the attackRoll in this context is useless.
    Therefore with a defensive roll range of 101-200 and a fixed attackRoll of 150 - your settlements will have a 50% chance to be defend against a raider attack.
    My suggested solution to this is the following:
    1.
    Decrease resolveAttackMaxAttackRoll to 50.
    int property resolveAttackMaxAttackRoll = 150 auto const
    2.
    Change attackRoll to take into account randomness no matter the size of the attack.
    So change:
    int attackRoll = utility.randomInt() + attackStrength
    wsTrace(" ResolveAttack on " + workshopRef + ": original attack roll=" + attackRoll)
    attackRoll = math.min(attackRoll, resolveAttackMaxAttackRoll) as int
    TO
    ; don't let attack strength exceed 50 - makes high defense more likely to win
    attackRoll = math.min(attackStrength, resolveAttackMaxAttackRoll) as int
    wsTrace(" ResolveAttack on " + workshopRef + ": original attack roll=" + attackRoll)
    ; add a randomness of 1-100
    attackRoll += utility.randomInt()
    This would give an attack range of 51 to 150 and a defense range of 101-200. So a well defended settlement would have much higher chance of winning but there would still be random chance it could fail in defense if there are a large amount of resources in the workshop (in this case 75% to defend - attackRoll(51-100) vs defenseRoll(101-200)). However if you are diligent and clear the workshop of food and water then you could reduce your chance of attack to zero (with no attack strength; attack roll becomes attackRoll(1-100) vs (defenseRoll(101-200)).
    NOTE: The above code might not work - I don't know the language they use for scripting so was just basing it on a cursory look at the code - however it should serve well enough as pseudo code to suffice for someone to use as a base.

    • @taevindenecro6638
      @taevindenecro6638 8 ปีที่แล้ว +3

      This is essentially how I read it as well.

    • @glez13gt
      @glez13gt 8 ปีที่แล้ว +1

      That's not necessarily accurate since the attack role's randomInt()(which, if I'm not mistaken, written like that defaults to 0-100 inclusive. Also note that this function only generates Pseudo random integers) still has a chance of being

    • @Truedog10
      @Truedog10 6 ปีที่แล้ว

      This is how i initially read it as well

  • @ianthemagus
    @ianthemagus 6 ปีที่แล้ว +2

    Stored my backup saves and stopped playing right before the DLC came out, coming back to play now, so I'm catching up on all the mechanics that have been tweaked. Good video. One thing I love about the Bethesda games is that the players provide so much content and feedback themselves and "fix" the games over time.

  • @ismaelgomez7774
    @ismaelgomez7774 8 ปีที่แล้ว +8

    nice to see I'm not the only one who likes role playing as the minute men's general. Subscribed

    • @lvl6humancleric216
      @lvl6humancleric216 3 ปีที่แล้ว

      I just started my minute man general character and I've put 100s of hours into this game xD. I am enjoying it so far, mostly I like to play on survival so it's hard to do MM W/O fast travel. Now that I've got all the achievements I don't mind mods.

  • @glez13gt
    @glez13gt 8 ปีที่แล้ว +3

    Another thing is that the base attack chance is static so regardless of the result you always have to add 2% to the minimum value being 0. So if your defense is so big that when you subtract from attack it ends up being a negative number, that defaults to 0 and then you add the base attack chance. So that is why every single settlement with at least one settler can always be attacked. The thing that should be investigated is that some people now claim that with nuka world empty settlements can be attacked.

  • @MACE_HINDU
    @MACE_HINDU 8 ปีที่แล้ว +45

    i have 800 deffence and sanctuary and they hit me with low level raiders and i still lose if i dont show up.

    • @shrike6243
      @shrike6243 8 ปีที่แล้ว +7

      That's because, past a total of 100 defense + population, defense has no effect on the success rolls when you aren't there.

  • @AdamBrowning
    @AdamBrowning 8 ปีที่แล้ว +3

    You may be running into an overflow. If the defense score gets stored in a byte, then your defense would be + mod 255 (i.e. take the value, divide by 255 and the remainder is the effective value).

    • @tzimmermann
      @tzimmermann ปีที่แล้ว +1

      I know it's old but... I'm pretty sure Papyrus (their scripting language) uses typical 4 bytes integers. It's the only Int type available, it wouldn't make sense to choose otherwise. I think the defense strength is simply capped, as would suggest this function in WorkshopParentScript.psc (found online, not by myself in the game files):
      int function CalculateDefenseStrength(int safety, int totalPopulation)
      int defenseStrength = math.min(safety + totalPopulation, maxDefenseStrength) as int
      return defenseStrength
      endFunction
      The comment above the call is simply misleading.

  • @mdheinze57
    @mdheinze57 8 ปีที่แล้ว +6

    6:17- yeah I never use the sirens for just that reason: they never go off until it's too late to matter.

  • @3p1c_Mustache
    @3p1c_Mustache 4 ปีที่แล้ว +1

    Thank you, oxhorn. I built Red Rocket to be a soylent canning operation, but couldn't figure out how to force an attack. This is what I needed.

  • @kabhes9040
    @kabhes9040 8 ปีที่แล้ว +5

    holy shit oxhorn did start making videos i used to watch his warcraft videos all the time

  • @grefsteel3989
    @grefsteel3989 8 ปีที่แล้ว +1

    Holy shit, 19:40 startled me when he said *WELLP THERE YOU HAVE IT*
    I thought something scary was about to happen, like a mass feral ghoul and gen-2 attack..
    The nuclear weather makes it eerie too.

  • @thelycanthrope1984
    @thelycanthrope1984 8 ปีที่แล้ว +125

    bourhood neighly friend oxhorn XD

    • @RamonPeelP50
      @RamonPeelP50 8 ปีที่แล้ว +1

      ox its getting out of hand XD

    • @nielsegense
      @nielsegense 8 ปีที่แล้ว +14

      Still waiting for the "... borderline, friendly Oxhorn..."

    • @TheDawgMiner
      @TheDawgMiner 8 ปีที่แล้ว +3

      could have sworn he said "bouhood neighly forehead" but I was eating at the time

  • @FireDragons42
    @FireDragons42 8 ปีที่แล้ว

    Well done on figuring it out. I'm so glad that a while back I started putting food, armour, weapons, etc all in their own separate containers (it was taking for ever to load my workshop inventory). Probably saved me a massive headache.

  • @AzatheCat
    @AzatheCat 8 ปีที่แล้ว +17

    Im sorry, but you said that the game auto wins if defense = over 150. In that code it said "makes it more likely to win"

    • @AzatheCat
      @AzatheCat 8 ปีที่แล้ว

      could it be just that you are getting absolutely terrible roles?

  • @gaydes1012
    @gaydes1012 6 ปีที่แล้ว +9

    so that's why my settlement always looks like Swiss cheese when I fast travel into them

  • @J_Madison
    @J_Madison 7 ปีที่แล้ว +13

    Is this food and water in storage in the workshop or the amount of plants (food) and water (pumps) that show up on the workshop build screen?

  • @Bear-Knight
    @Bear-Knight 5 ปีที่แล้ว

    I absolutely love "Uncapped Settlement Surplus [XB1]" but i am currently testing out defenses, and figuring out how attacks work. Being able to make attacks happen every couple of days or even every day is helpful during this process. I am also glad to have the ability to decrease attacks with this mod and still have uncapped settlement surplus.

  • @sieverts455
    @sieverts455 8 ปีที่แล้ว +23

    My one settlement just got raided 5 times in one Fallout day

    • @Monkeyshaman
      @Monkeyshaman 8 ปีที่แล้ว +17

      That's almost 7 dog years.

    • @turtlegamez4274
      @turtlegamez4274 3 ปีที่แล้ว

      @@Monkeyshaman what? I dog years is one human year. Not one human day. I don't know what you mean.

    • @Monkeyshaman
      @Monkeyshaman 3 ปีที่แล้ว

      @@turtlegamez4274 you don't know

    • @turtlegamez4274
      @turtlegamez4274 3 ปีที่แล้ว

      @@Monkeyshaman no, I don't know. That's why I'm asking you to explain ffs not rub it in my face.

    • @Monkeyshaman
      @Monkeyshaman 3 ปีที่แล้ว

      @@turtlegamez4274 you're not my dad?

  • @panpiper
    @panpiper ปีที่แล้ว +1

    I have a couple of settlements that produce 999+ water per day. I usually don't let them store more than ~3500 water. In that same time they might produce a surplus of less than 100 food. I keep no junk in the workshop. Other than those two, the other settlements are quite minor with little surpluses production, but still reasonably decent defenses. This should still produce a LOT of attacks. Those two settlements do get attacked more often than the rest, but it's still fairly manageable. That said, both of those settlements have well in excess of 400 defense. I've never let one fend for itself, but when I show up to defend them, the turrets are clearly able to pretty much handle things.
    I still get involved myself for the XP.

  • @stevehealy5810
    @stevehealy5810 8 ปีที่แล้ว +18

    Uhh... @ 10:15 --
    int Property maxDefenseStrength = 100 const auto Hidden
    int Function CalculateDefenseStrength(int safety, int totalPopulation)
    int defenseStrength = Math.min((safety + totalPopulation) as float, maxDefenseStrength as float) as int
    return defenseStrength
    EndFunction
    So, for a population of 36, anything more than 64 safety doesn't do anything for you when doing the Attack/Defend rolls. If you have anything over a total of 100 for pop and safety, its a 50/50 shot at winning because of the artificial caps in the game on defense and attack. So, there will *NEVER* be a situation where you will win 100% of the time with the code as it stands.

    • @oxhorn
      @oxhorn  8 ปีที่แล้ว

      Where do you see that code? That code is not in the code I shared with this video. Is that actually in the game? Can you share with me the name of the file you found it in?

    • @oxhorn
      @oxhorn  8 ปีที่แล้ว

      Also, Sclerocephalus directly contradicts you here: Safety is the defense rating you see in your settlement stats.. Defense strength is not capped at 100, but the sum of safety, total population and a random value ranging from 1-100, so it may exceed 100 (to bviously, the chance increases with your safety rating).

    • @stevehealy5810
      @stevehealy5810 8 ปีที่แล้ว +2

      @Oxhorn -- pastebin of full decompiled file:
      pastebin.com/j8kuzj4P (Set to expire at the end of October so I don't get flagged for something.)
      Line 2656 to 2777 is what you're looking for.

    • @stevehealy5810
      @stevehealy5810 8 ปีที่แล้ว +1

      I think they missed the snippets above line 2694. That's why I wanted a closer look at the CalculateDefenseStrength function after watching your video, as what you were showing didn't jive with what little code I was seeing. The failure could only occur if there were caps put in the two CalculateStrength functions, and the limiter in the main offscreen battle function.

    • @oxhorn
      @oxhorn  8 ปีที่แล้ว +1

      Thank you for this. I see where the confusion lies. We are mixing up attackStrength with attackRoll (easy to do). The attackRoll and defenseRoll determines the outcome of the battle. The attackStrength is capped at 150. The defenseRoll is capped at 200, as you see here:
      int defenseRoll = utility.randomInt() + defenseStrength
      So, settlement defenses and population combined make up defense strength. However, the game limits defense strength to 100. However, it does NOT limit the defense roll to 100. The snippet above shows that defense strength (max 100) is added to a 1d100 roll to determine the defense roll. Thus, the defenseRoll can be no higher than 200, but no lower than 101
      Knowing this, and knowing that attackRoll can be no higher than 150 and no lower than 25:
      Maxed out settlements have a 25% chance to always win.
      Is that right?

  • @NicoVandevenne
    @NicoVandevenne 7 ปีที่แล้ว +4

    Wauw Oxhorn, talk about deepdiving.
    Thank you, currently I am not getting attacks :) might need to move up some resources

  • @twitchytitchy5472
    @twitchytitchy5472 8 ปีที่แล้ว +10

    Lol I only use tatoes, corn and mutfruits so I never had this problem.
    Vegtable starch for the win :)

  • @mecca6801
    @mecca6801 8 ปีที่แล้ว

    great find, kinda figured out something like this prior to your video. my formula was to make sure defenses were double my resources to compensate for times I can't go defend

  • @Balder-gb4eq
    @Balder-gb4eq 7 ปีที่แล้ว +10

    if the player is present it completely changes the outcome

  • @Exozealots
    @Exozealots 8 ปีที่แล้ว +2

    Hey I love your videos man It helps me a newcomer in fallout franchise how to build settlements properly. I was always wondering how come i get attack a lot and now I know why. I been a hoarder on food, water, and scraper and placing them in my workshop. After I remove pretty much everything (sold a lot since the food and water overburdens me's and properly distribute the resources to other settlements) and setting up a good defense I can now don't have to go every settlement just to defend so far I only have 6 but they all get attack a lot, now with the videos you show me and a little bit of management on my workshop, the attack on my settlements are reduce and it can hold off on it's own with my help. So thanks man with your videos kinda help me in a tight spot when I was constant;y being attack by Gunners and Super Mutants and apparently The Atom children( weird). So anyways tks for this advice man!!

  • @holyshaman
    @holyshaman 8 ปีที่แล้ว +17

    Hey Oxhorn I've noticed in my game often the ingame list showing the settlement stats bugs out sometimes and will say for instance I have no water when I know I have tons. perhalps that bugg is part of why you can still lose attacks. Just speculation but I see it allot. It will even effect happiness of a settlement that should have that problem. This game is buggy!

    • @joelockhart6287
      @joelockhart6287 8 ปีที่แล้ว

      yes, almost like it "looses" the defense number, like it does with the water number. then it calculates the attack and plugs a 0 in for defense.

    • @brandynnutter
      @brandynnutter 8 ปีที่แล้ว

      That is an excellent point. I fear there will be no way to test the settlement attacks until we fix that bug. It seems likely that the attack calculations are being made from the bugged info.

    • @HermanBogaers
      @HermanBogaers 8 ปีที่แล้ว +1

      This must be it, this game is way to buggy. Gets even more buggy if you build bigger and bigger.
      doesnt matter if you have reall high defense.

    • @Ruinedworld
      @Ruinedworld 8 ปีที่แล้ว +5

      I have also noticed that the happiness of the settlement starts to go down according to the bugged stats as well. It says they have 0 food and 0 water, or no beds so the settlers are unhappy, but I know they have more then enough of those things, so there is no reason for the unhappiness... so this definitely point to that as being a plausible reason... It seems that the bug revolves around the cell being unloaded when you are not in it, as soon as you return the stats are updated correctly.... I have even tried walking away from the settlement before fast traveling, it stays fixed for a short time and then bugs out again, like its not recording the states or overwriting them correctly...

    • @xxdanxexx
      @xxdanxexx 8 ปีที่แล้ว

      Hey, holyshaman.
      I use to have that problem too, but it's kind of stopped over the year. I suggest for one getting into modding the game (if possible) solely for the Unofficial Fallout 4 Patch at the very least.
      If I remember correctly a major component to the bug was from Fast Travel either to and/or from settlements. I also believe that it's just a display bug.

  • @xProjectKaosTV
    @xProjectKaosTV 8 ปีที่แล้ว +77

    Reduced? Lol, I don't get attacked enough! Maybe like 1 a week game time which is a LONG TIME. I wish they'd attack every few days.

    • @AceDreamer
      @AceDreamer 8 ปีที่แล้ว +11

      Put raider/gunner/super mutant cages in your settlement, they will come banging at the doors to set their mates free.

    • @africanfather8476
      @africanfather8476 8 ปีที่แล้ว

      +AceDreamer how to do that

    • @AceDreamer
      @AceDreamer 8 ปีที่แล้ว +1

      African Father Workshop DLC i think.

    • @newenglandfb3995
      @newenglandfb3995 8 ปีที่แล้ว +5

      ProjectKaos you don't want that it gets to be a hassle

    • @ifyoucanflypancake312
      @ifyoucanflypancake312 8 ปีที่แล้ว +4

      CommandoXProductions I've had 500 hours on the game, and I've only been attacked 4 times. Outside of quests

  • @26magicman26
    @26magicman26 7 ปีที่แล้ว +7

    Would it make a difference if I put a bunch of resources into a container that I built at a settlement? And not the actual workshop?

    • @loganlabbe9767
      @loganlabbe9767 3 ปีที่แล้ว +2

      Im fairly confident container stores do not count. That would be a complicated thing to program and the whole system is pretty simple. Everytime I visit a settlement I take all the food and water out and into boxes.
      ...altho if you dont have supply lines it can actually cause your settlers to go hungry or thirsty since they only seem to autotake from the workshop. Ive had settlements where I farm water complain about the water

  • @Mitheledh
    @Mitheledh 8 ปีที่แล้ว

    The mod you're using, if it's the same one I have, comes with the ability to adjust how frequently you get attacked. That helps you compensate for the large number of resources in your settlements.

  • @maxterino4806
    @maxterino4806 8 ปีที่แล้ว +12

    You realy did your homework! Awsome vid ox!

  • @kinggath
    @kinggath 8 ปีที่แล้ว

    It's because defense strength is capped at 100. So the possible defense rolls are 101 - 201. Search for maxDefenseStrength and CalculateDefenseStrength in the WorkshopParent script to see how I know that.
    I believe the mod that uncaps your resources now has an option to reduce attack frequency to a more realistic number.

  • @blackout5560
    @blackout5560 ปีที่แล้ว +3

    God tier strat: not give a shit about the random settlements, have a settlement with 400 defense to protect your settlers, and have home plate for your important stuff.

  • @kingcotton659
    @kingcotton659 4 ปีที่แล้ว +1

    I can’t even imagine how much time Oxhorn has put into settlement building I spent most of my free time over 2 weeks just building a pretty nice Sanctuary

  • @DownWith1HUpWith76Os
    @DownWith1HUpWith76Os 7 ปีที่แล้ว +6

    This explains why my unassuming Red Rocket gas station player home with only a small garden tended by a robot is attacked every time I visit it...

  • @tobarstep
    @tobarstep 11 หลายเดือนก่อน +2

    Looking at this in 2023...
    Unfortunately the person quoting the script didn't include the most important parts: the functions that actually calculate attack strength and defense strength. Those are both capped at 100. For purposes of auto-resolving attacks your defense strength will never be higher than 100. So, it is pointless for your defense rating to exceed 100. In fact, since defense strength is actually the defense rating + population, you can likely reduce it even further. A settlement with a population of 10 could not make use of any defense rating beyond 90 (max of 100 - population of 10).

  • @ekulerudamuru
    @ekulerudamuru 8 ปีที่แล้ว +9

    thanks man, I need to be attack more so I'm gonna pile up food and water in my castle..

  • @StellaBorneWatches
    @StellaBorneWatches 7 ปีที่แล้ว +1

    At 3:30, I laughed. Because I realized why you have a problem and why they would have capped the resources like they did and I know you know the logic as well.

  • @mysigt_
    @mysigt_ 8 ปีที่แล้ว +3

    The thumbnail is driving me crazy oxhorn.

    • @Gannoh
      @Gannoh 8 ปีที่แล้ว

      Oh god I didn't notice it until now :(

    • @oxhorn
      @oxhorn  8 ปีที่แล้ว +2

      Fixed. It was late and I was tired

    • @warmaster2104
      @warmaster2104 8 ปีที่แล้ว +1

      you know that you have to use new saves to remove mods that change the game code so it can reset to vanilla

  • @VladProdigious
    @VladProdigious 7 ปีที่แล้ว

    Although you mention several times that these issue appear to be related to PS4 players, I (a PC player who use no controller) have the same issues, and for me this video has been very informative.
    I have also found that once you visit and begin a quest in respectively Nuka World and Vault 81 (or is it Vault 88?, the Autromatron related Vault installment) at least on PC you will begin to experience much more frequent attacks, and also from robots and synths.
    I placed a post on the Steam forum about the constant attacks that I've been experiencing, and several replies advised me to ignore the prompts to go and defend the settlements as they will repair themselves over time and I have decided to test this advice and see if it works out because the way it is now I'm just wasting a lot of material and even more time on repairs, and I've never got much produce to begin with so I won't be loosing much at this point.
    .........
    As always, *Oxhorn*, I appreciate your work, your thoroughness and overall intelligent, wonderful sense of logic and healthy, balanced views. :)

    • @VladProdigious
      @VladProdigious 7 ปีที่แล้ว

      I found out that removing the food and water from the workbench and storing them in a separate container helps the issue somewhat.

  • @bottemlessfries
    @bottemlessfries 8 ปีที่แล้ว +13

    corned beef hash is my favorite breakfast food

    • @mdredheadguy1979
      @mdredheadguy1979 4 ปีที่แล้ว

      The guts of a freshly killed raider is mine...
      😈😂😈😂😈😂😈😂😈😂

  • @HectorAgostoOne
    @HectorAgostoOne 5 หลายเดือนก่อน

    You know its serious when the man whips out a spreadsheet to track his settlements. Love it.

  • @megaton_a
    @megaton_a 8 ปีที่แล้ว +10

    Earned a sub from me. Great research and explanation. Hopefully you can figure out the defense issue.

  • @LBurhenn
    @LBurhenn 8 ปีที่แล้ว +1

    THAT EXPLAINS IT!!! Why does my RR keep getting hit. No one lives there (it's my player home so just Dogmeat hangs out there). It has 0 Population, 20 DEF (I added turrets due to the attacks), 0 food production, 3 water. BUT, I store all my looted food in the workbench! So just about every time I visit there to store stuff I get attacked! Now I know WHY! THANX!

  • @Kvile-zx4sk
    @Kvile-zx4sk 8 ปีที่แล้ว +5

    Question about the 150 attack roll max...is that including the random number or just the number that is rolled before adding "random number"? That may be why settlements a little over 150 is still losing. Just a thought

  • @johnharcher1051
    @johnharcher1051 8 ปีที่แล้ว

    Oxhorn man, love your vids, very informative with dat dope voice you got just makes it so much better. A random question if I may, do you customise your settler's appearances?. They seem all very unique.

  • @Kvile-zx4sk
    @Kvile-zx4sk 8 ปีที่แล้ว +9

    And have you ever had Sanctuary attacked without cages? I use it as my main drop off of resources and scrap and have never been hit in 4 play throughs unless I have cages

    • @regardlessrampage
      @regardlessrampage 8 ปีที่แล้ว

      I used to get rad scorpion attacks there early on but it's been quite a long time since anything interesting happened there. I should mention that it's my main resource base as well.

    • @Kvile-zx4sk
      @Kvile-zx4sk 8 ปีที่แล้ว

      +regardlessrampage I got an attack once...super mutants attacking red rocket and I had them chase me onto the bridge where turrets took them out

    • @regardlessrampage
      @regardlessrampage 8 ปีที่แล้ว

      ***** haha nice.

    • @taevindenecro6638
      @taevindenecro6638 8 ปีที่แล้ว

      Super mutants, gunners, robots, and ghouls have attacked my Sanctuary. However, it gets attacked much less often than Crossing, Taffington, and Tenpines. Edit2: I play on PC, don't use mods, and only play on survival.

    • @Kvile-zx4sk
      @Kvile-zx4sk 8 ปีที่แล้ว

      +Taevin Denecro I was PS4 on those play throughs..so no mods. On Xbox now. Still no attacks

  • @rocmage1366
    @rocmage1366 8 ปีที่แล้ว +1

    One note about the line in the code "don't let attack go above 150..." That is a comment, not code. It shows what the coder originally intended to do, but it may not reflect the reality of the programming.

  • @tristanjorritsma9709
    @tristanjorritsma9709 8 ปีที่แล้ว +5

    Oxhorn has completely forgotton how to speak in English but only when delivering that one line.

  • @DasReverend
    @DasReverend 8 ปีที่แล้ว +2

    The code works out so that the best you can do by adding defense is to get the odds up to 51%. That's why the attack roll cap at 150 is significant. If it wasn't there, high defense would win every time

    • @oxhorn
      @oxhorn  8 ปีที่แล้ว

      Please explain' I don't understand. There is an attack strength cap of 150, but there is no defense strength capo. The code says that if defense strength > attack strength, defenders win. So theoretically, any defense strength above 151 should ALWAYS win.
      How does that equate to 51%?

    • @DasReverend
      @DasReverend 8 ปีที่แล้ว

      I don't have a handle on the code personally but I found this while searching for an answer last month www.reddit.com/r/fo4/comments/4pgdco/a_modest_proposal_for_the_futility_of_settlement/d4ldt2q

    • @darkequation
      @darkequation 8 ปีที่แล้ว

      As original thread on AFK Mods mentions,
      "Food, water and other esources have no effect here (they play a role in calculation of chances for an attack though). They only appear in this function when the damage values are calculated."
      And 51% success rate can hardly match Oxhorn's result here.

    • @DasReverend
      @DasReverend 8 ปีที่แล้ว +1

      Seems like he's been having around 50/50 absentee success rate from what I've seen when he posted the original attack frequency video

  • @tristanab6578
    @tristanab6578 8 ปีที่แล้ว +7

    thank you so much ox this help me so much!

    • @oxhorn
      @oxhorn  8 ปีที่แล้ว +4

      You bet!

  • @frankbarajas
    @frankbarajas 8 ปีที่แล้ว

    I only have the vanilla game installed and most of my settlement are capped with 26 population, so for me with my armor I am at 16 charisma. However, Sanctuary is currently at 33 (was 35 but Synth attacks have killed 2 settlers). By the way, Sanctuary is higher because of your trick with chems and alcohol and moving settlers there which I got from one of your videos. Thanks for that!
    However, I also learned a while back from your videos about the limits (resource caps) in the workshop so about a month ago I took all resources from my all my settlements and put them in the Sanctuary's workshop. I do not get attacked very often and when I do it's generally one of my water producing settlements, such as Sanctuary. When I first started the game I recall seeing that to keep your defenses higher than your water and food combined. That is the case at everyone of my settlements, however most are greater than 250 in defense regardless, with the exception of the water producers, as I mentioned are very high in defense. Sanctuary is well over 600 defense and produces almost 600 in water daily.
    One key factor for me is that I try to purge water and food from Sanctuary's work shop each day (real day not game day) but I can't do that from some of other water producing settlements each day and these are the ones that are attacked most frequently, in order of most attacked, these are The Slog, Finch Farm. Taffington Boathouse, Nordhagen Beach, Warwick Homestead are attacked most of all, and Sanctuary is still attacked more frequently than, Mirkwater Construction site, Egret Tours Marina and Kingsport Light house. Oddly of all my settlements, only Spectacle Island and The Castle have yet to be attacked and they are the second and third biggest water producers for me and also have the second and third most defense, respectively.
    Keep in mind, that other than building resources I try to keep most water and food in containers whenever possible to reduce the chance for attack. I believe this helps. However, Sanctuary with the highest defense is still attacked on a weekly basis, but it usually when I have been following a quest line and far from it, so several game days would have passed. So even though it would cap out on water and food after one game day it would be the highest of all my settlements. Some how I think there is a lot more here than we may be able to uncover. I think that you are on the right track but you never know with Bethesda...just saying.
    Whenever, I am attacked I drop what I am doing and run for that settlement. I don't see the nightmare of 5 or 6 or more settlements attacked at once like you do but I have had 2 or 3 attacked at almost the same time. However, I have only lost one attack that I didn't respond to thinking my defenses would take care of it. unfortunately it didn't since I had less than 25 at the time, which you have proven a guaranteed loss. To me I felt like my settlement had been raped. Most of resources were taken or destroyed, as I recall, but then I didn't have that much there yet. Anyway, to me it was so bad that I reloaded from a hard save and made it there in time the second time. After that I learned my lesson first and foremost build defenses before anything else, until that time my settlements always won their attacks, this settlement was a new settlement barely a week old and still being built. I should point out that the workshop was very full of building supplies, many "shipments" of resources that I would be using, plus the food for starting the farm. Now, the first thing I do is set up a supply line.
    Great game and made even better by all your videos. I am sorely tempted with all the mods you us but want to finish my game play first with any mods. Right now, I am in a quandary, since I can't decide what faction to knock off first, as I really don't want to destroy any of them, but that's just me. Thanks again and my apologies for the terminally long comment.

  • @Caboladk
    @Caboladk 8 ปีที่แล้ว +4

    +Oxhorn the reason for you failing to defend the settlement is quite obvious and you'll hit your head once you read it;
    it's a Quest, and you didn't go help defend them, so you fail the quest. It has nothing to do with them winning or losing.. ;)

    • @AGiantPie
      @AGiantPie 8 ปีที่แล้ว +3

      Yes but at the same time a notification popped up saying he'd lost resources at Croup Manor, that was a failed defense whether or not the quest failed.

    • @Caboladk
      @Caboladk 8 ปีที่แล้ว +1

      Yes it said it "Suffered damage from an attack", but does that mean they didn't win? I mean any settlement would suffer damage from an attack..
      I haven't played the game enough to take note of that message and what the outcome was of it..

    • @AGiantPie
      @AGiantPie 8 ปีที่แล้ว +3

      Cabola Yes, you don't take any damage if you win the attack.

    • @Caboladk
      @Caboladk 8 ปีที่แล้ว +1

      Good to know, then I guess the mystery is still alive ;)

    • @AGiantPie
      @AGiantPie 8 ปีที่แล้ว +3

      Cabola I think what it boils down to is that there is no 'auto win' for defending. The code says that attackers win if attack strength > defense strength but it DOES NOT say that defenders in if defense strength > attack strength. There is no code that says defenders win if _____ happens anywhere, so we cannot assume that defenders are ever guaranteed to win. From what I can tell, having a greater defense value than the attack value only ever gives you a 50% chance of winning the attack and never more, which is honestly absurd as that means there's no way to leave settlements to their own devices.

  • @Movieman894
    @Movieman894 8 ปีที่แล้ว

    Technically, that comment mentioning the 1d100 only says that it's a 100-sided die, but it doesn't specify what the sides of that die are. Theoretically, it doesn't have to be between 1 and 100, it could be between 0 and 99, or even between -50 and 50. We don't see the guts of utility.randomInt(), so we can't know for sure. But I'll concede that, most likely, it is 1-100. And none of these values add up to anything that would go over the value threshold for an int (you're not generating over 2 billion on your defense roll), so that's not the problem. I have heard about a bug where, when you are not in your settlement, certain settlement objects may not register as being present. Maybe that's happening to your settlement defenses when these attacks take place, so it's calculating the defense roll based on a temporarily glitchy safety value.

  • @DS-si5cp
    @DS-si5cp 8 ปีที่แล้ว +4

    So... basically, the one time they fix something, it screws with us

  • @thomaskirkness-little5809
    @thomaskirkness-little5809 8 ปีที่แล้ว +1

    My cinema settlement was getting attacked by robots every few in-game hours because it contained traps for gunners, ghouls, raiders and radstags. After scrapping them, things returned to normal.

  • @colonelboston
    @colonelboston 8 ปีที่แล้ว +4

    This is why I just play games and don't fuck with shit.

  • @Grimroper
    @Grimroper 8 ปีที่แล้ว +2

    As an IT software tester I find this kind of video an interesting way of understanding how the game should actually function. I also think Oxhorn does a great job of explaining things and I really enjoy his videos.
    However the message displayed about the attack on Croup Manor does not say it lost the attack. It says you failed to help defend it. To me that's not same thing

    • @oxhorn
      @oxhorn  8 ปีที่แล้ว +1

      You need to understand the way the game displays information about winning or losing an attack. There is no scenario where you get a message saying that the settlement "won" or "lost. You only see messages that say it "defended itself" or "failed to defend itself". Due to the nature of the game, it appears as a misc quest to the player. But behind the scenes, this is the calculation that is being run.

    • @Grimroper
      @Grimroper 8 ปีที่แล้ว +1

      Ok, that seems like a fair explanation.
      In your investigations did you see that after the "failed to defend itself" message appears that the settlement did take some damage against food, water, scavenge or caps? That would be proof that the "failed" message does equal a loss.

  • @murdergnome7612
    @murdergnome7612 8 ปีที่แล้ว +19

    I remember a time when it was uncommon for Bethesda games to have a lot of bugs and glitches in them, good times

    • @theshadowcyberman3358
      @theshadowcyberman3358 8 ปีที่แล้ว +5

      Wasn't that back when they made NES games based on movies like Home Alone?

    • @murdergnome7612
      @murdergnome7612 8 ปีที่แล้ว

      TheShadowCyberman I remember both Morrowind and Oblivion to be very bug free

    • @denogowli
      @denogowli 8 ปีที่แล้ว +8

      Erik Marklundh they weren't you were probably just lucky. People say fallout 4 and skyrim are buggy but i rarely ever notice them. But in oblivion I constantly got the dubble face glitch and in morrowind the unarmored skill doesn't even work without an unofficial patch.

    • @soangry
      @soangry 8 ปีที่แล้ว +3

      I had a ton of bugs in oblivion. Just read the change log for the unofficial oblivion patch.

    • @stevewatts3502
      @stevewatts3502 8 ปีที่แล้ว +1

      Had to stop playing New Vegas as the crashes were threatening my sanity. If you consider I 100% FO3 (inc. DLC) that tells you something. (er... what, I dunno. lol)

  • @Iscamania
    @Iscamania 8 ปีที่แล้ว +2

    I'm so proud of you Oxhorn! This is how you do it, dig around the code yourself. I encourage everyone to do that. It may be a little intimidating at first but who cares. :)

  • @Edfitz
    @Edfitz 8 ปีที่แล้ว +8

    Hi Oxhorn, PS4 player here, love your vids, particularly ones like these. I have found them very helpful, I don't build a new settlement without checking you spawn points vid. Anyway here's a link to SarDeliac's vid on defence. I think you might be interested in the link he has to a Reddit. I think it explains some of the random results you are experiencing.
    th-cam.com/video/pB7ki5ufgUg/w-d-xo.html
    Keep up your great work.

    • @oxhorn
      @oxhorn  8 ปีที่แล้ว +3

      Very practical, however his info is wrong--as I showed in this video, the code says 150, not 100. Players following his advice may get frustrated reloading save after save trying to get a COMPLETED with only 100 defense.

    • @Varadiio
      @Varadiio 8 ปีที่แล้ว

      It seems to me that as the video mentions, a 50/50 chance is your best odds. Is there actually a cap on defense? There seems to be. I know there are mods that claim to solve this, and I imagine there are edits to that area to make it more realistic. Whether or not that's "cheating" is kind of irrelevant if the player is just going to exploit the randomness with save scumming anyway. (not that it's of any help to PS4 players)

    • @stevehealy5810
      @stevehealy5810 8 ปีที่แล้ว

      The code that says 150 limits the attack roll to 150. The 100 that's being referred to in the video is maxDefenseStrength which is a separate value from resolveAttackMaxAttackRoll and used separately.
      The code as written works out to: lower of foodRating plus waterRating, or 100, with a chance of one point being knocked off of it, then random number added to it, then limit checked to 150. That makes the attack roll.
      For defense roll, it's the lower of population plus safety or 100, then a random number is added.
      Assuming the code comments are correct, and its a 1d100 for the random number, for most large settlements, you're looking at an attackRoll between 100 and 150, mostly at 150. For a defense roll, its going to be between 101 and 200. This assumes your pop+defense is at/over 100 though.
      Its a very poorly written bit of code, and really needs someone to replace it with something that actually was designed to deal with huge settlements.

    • @Movieman894
      @Movieman894 8 ปีที่แล้ว

      Based on the code that I'm seeing, there doesn't seem to be a cap on the defense roll. In the code, after the comment that says "don't let attack roll exceed 150", there's a line of code saying "attackRoll = math.min(etc)...". That seems to me to be the code that caps the attack roll at 150. We can't see under the hood of that function, but based on the fact that it came right after the comment about capping the attack roll, that seems most logical to me. You'll notice that the defense roll has no code connecting it to math.min(), so the defense roll doesn't appear to be limited. However, now looking at math.min() in other places, it looks like the purpose of that function is to, as the name implies, set a MINIMUM value, rather than a maximum value. If that's the case, then it looks like calculating attackRoll using the math.min() function is a mistake in the code, causing attacks to always have AT LEAST an attack roll of 150. I'm not sure that quite makes sense, though, because that would mean that the rest of your settlements should be losing a lot more often, and anything with a total defense strength of less than 50 (in this case, just the Mechanist's Lair) should ALWAYS lose. That can still be accounted for, however, if the attackers just started with a very low base strength, and therefore the final attack roll was EXACTLY 150. Without knowing more about how the base strength of attackers is calculated, and without knowing the frequency and severity of other attacks on your other settlements, it's hard to say for sure, but based on what I was seeing in the code, it's not inconceivable that they are calculating the final attackRoll using the wrong function.

    • @oxhorn
      @oxhorn  8 ปีที่แล้ว +3

      Interesting, thanks for your thoughts. Here is a link to the code snipped if curious: afkmods.iguanadons.net/index.php?/topic/4549-settlemet-raids-not-exactly-a-bug-but/

  • @tomken8dy
    @tomken8dy 8 ปีที่แล้ว

    For missile turrets: setav 333 150, then setav health 99999999
    Learn where attackers spawn and have a couple of turrets waiting for them
    999+ defense
    Just being there and doing nothing seems to always make the defense successful.
    I love building with Vault-Tec pre fabs. The blue "domestic" pieces work best
    on a shack block foundation.
    Two stories, with planter crops on the roof.
    The Gray Garden elevated highway section has "dirt" on it that you can
    sink water pumps into!!!

  • @asherandai1000
    @asherandai1000 7 ปีที่แล้ว +9

    lol, so everyone screaming and crying about a new bug with the dlc, when it was actually a fix of an old bug xD
    and you failed to notice the code that limits defence.

  • @whiterabbit4945
    @whiterabbit4945 2 ปีที่แล้ว +2

    yeah im years late
    but max attack strenght 150 does not mean you should always win with 150 defense
    you forgot about the random diceroll you explained of 1-100
    so if you roll a 1 with 150 total defense
    and an attack of 150 strenght comes in and rolls a 100
    you need 250 to get to 251 def, diceroll included to win

  • @Probablyshouldnthave
    @Probablyshouldnthave 7 ปีที่แล้ว +3

    you have a flaw in your calculations the resource multiplier 0.001 = 1/1000 not 1/10

  • @bassbro1
    @bassbro1 ปีที่แล้ว +2

    My settlements have a .001% chance of defending itself. The reason you fail is because you didn't show up. You are the driving factor if your settlement fails or not. I have a total defense in Sanctuary of 257. The only time it fails is when I don't show up. 1 time out maybe 50, I got a message saying Sanctuary depended itself. What doesn't help with this whole settlement activity is size. A place like Jamaica Plain is so small you'd think 20 would be too much. What hurts that struggling place is the size. We aren't given much space and furthermore much building capacity. It is worthless to build there without a mod. Sadly, at least on ps4, trophies are turned off when a mod is used. I have been attempting to get that elusive 100% happiness for years. I still have yet to figure it out. Every settlement is different

    • @theepicduck6922
      @theepicduck6922 ปีที่แล้ว

      Max happiness involves just setting a supply line (you need all settlers focusing on happiness use a bar or medic shop if I recall). Bonus if you have contraptions you can get a cat or something similar to boost happiness further. Also just hang out at the settlement (its real time I believe and having the settlement fail to defend itself will hurt you). Oh yeah the lack of 100% happiness is pretty common you have to have your settlers only focus on their happiness.

  • @fr33kSh0w2012
    @fr33kSh0w2012 7 ปีที่แล้ว +3

    How Come my game just says that settlements are under attack but not WHO BY that's BS!

    • @pmsingel6018
      @pmsingel6018 6 ปีที่แล้ว

      there is a mod that improves attack alerts to include by who and it stops the game until you click so you notice.

  • @scubasteve3743
    @scubasteve3743 7 ปีที่แล้ว +1

    I would have guessed you're simply failing a quest by not doing it: which is to say that the settlement didn't lose the fight, just that you failed the quest to show up and defend it.

  • @glez13gt
    @glez13gt 8 ปีที่แล้ว

    The only thing that would explain all of this is an old reddit (or maybe steam forum?) post I remember reading, that claimed that defense is capped at 100 when it came to calculating "off-stage" settlement defense.
    @Oxhorn, you should use the CK yourself and try to see what lines are above these "sample ones". There might be one above that modifies something.

  • @SomeCanine
    @SomeCanine 7 ปีที่แล้ว

    It doesn't state that you'll always win and it doesn't specify what the attackstrength value is. It could be that the attackstrength value is designed to always give a decent chance for the attack to win, only reduced by higher defense rating. I know you think the attack is capped at 150, but that's just the extra random number that's added to attackstrength to give it a win/lose chance rather than always winning or always losing.
    I would guess that the attackstrength initial value is likely based on your defensestrength and thus giving you incentive to go help defend.

  • @johnmarks227
    @johnmarks227 9 หลายเดือนก่อน

    I can tell you something else that happens. When a random rad storm comes through it will sometimes trigger a settlement attack with no mobs but will strike something in your settlement like the water or electric. This will result in a failed settlement defense. I have seen this happen a number of times, mostly at Crup manor or sanctuary.

  • @thomaskirkness-little5809
    @thomaskirkness-little5809 7 ปีที่แล้ว +1

    I found that having cages in my drive-in cinema settlement led to attacks so often I couldn't go anywhere.

  • @modvind
    @modvind 8 ปีที่แล้ว +1

    Those intros is killing me lol. Keep up the great videos Oxhorn!

  • @Liam-B
    @Liam-B 6 ปีที่แล้ว

    With my latest char, Hangman's Alley is my main settlement. First char with Nuka World. Tons of defense as well as food and water. The food and water might explain why it's constantly under fire from every kind of baddie.

  • @RogueDarkAgent
    @RogueDarkAgent 8 ปีที่แล้ว +1

    Awesome clip I'm on ps4 and since installing Nukaworld ( which I've not visited yet cos im vault building jeez it can be painfull ) I've had 3 settlements attacked at once I could only defend one in person and the other two failed to defend thereselves but these were small in population so I wonder the attack on the castle was nothing like I've experienced before they were heavy in numbers super mutants and behemoths. I'm not sure whether it's nukaworld related or since this is me returning to the game since I finished the main story and the game has upped the anti however I'm really enjoying it and glad I came back to the wasteland that and the fact that there's robots around now since I downloaded the dlc for them the game feels totally different and fresh again I love it great channel your a clever chap that's for sure subscribed peace out

  • @zipporaid7
    @zipporaid7 8 ปีที่แล้ว +1

    if I understand correctly the attacks on settlements change as you level up, which to me indicates that the attack "strength" variable may being increased in some other part of the code.

    • @zipporaid7
      @zipporaid7 8 ปีที่แล้ว

      if I had to guess, anyway

  • @southpawdj
    @southpawdj 8 ปีที่แล้ว

    I wondered why my settlements were hardly attacked. This makes total sense! I collect everything and take it to Home base in Diamond City. I don't care about the settlers much. They are only farmers for me. Now I know why I have it so easy. Thanks!

  • @patrickholt2270
    @patrickholt2270 8 ปีที่แล้ว

    Well the other variable is the attack strength, and I believe that attackers come in levelled teams or monsters. You're assuming that the attack strength is the same as the defense population value, which is 1 per inhabitant. That isn't a safe assumption. Enemies level, and increase in armament even if not in number. I routinely see raider teams attacking settlements including two in power armour. I don't know how that would be calculated, but the attack strength of the attackers is surely larger than a count of the individuals present, to which the figure between 25 and 150 is added.

  • @willofbob
    @willofbob 8 ปีที่แล้ว

    I think how it works is that settlements roll a dice with the maximum number determined by defence, which means that a settlement with defence higher than 150 is more likely to survive an attack, but not guaranteed.

    • @glez13gt
      @glez13gt 8 ปีที่แล้ว

      Looking at the forum he linked in the description, he already figured it out. There are two lines that cap attack strength and defense strength to 100. So that means that defense roll caps at 200 and attack roll at the stated 150.
      So that means that at 100 defense or a combination of defense plus settlers of 100 you have a guaranteed 50% chance of winning because half of the values of the attack 1d100 aren't valid. I suppose that since the other half has a 50/50 chance you get and extra 25%, reaching 75% ,but I'm not good at statistics so probably that's not how you get a winning chance % from variable rolls. :P

  • @jimschneider799
    @jimschneider799 3 ปีที่แล้ว

    Only 4+ years late, but ... At 10:45 - "Be sure you debug only code. Comments can be terribly misleading." The defenseStrength variable is set by calling the function calculateDefenseStrength, which caps your defenseStrength at 100. Meanwhile, attackStrength is capped at 150. To both of these, a random value from 1 to 100 is added. That means that, at the caps, the value of defenseRoll is 101 to 200, but the value of attackRoll is 151 to 250. So, at the caps, with attackRoll > defenseRoll determining if the attack succeeds, your settlement only has a 12.75% chance of winning.
    Also, before the NukaWorld DLC, I believe the chance of being attacked used the same formula, but it counted your production rate, rather than the resources actually at your settlements.

  • @TheDevian
    @TheDevian 8 ปีที่แล้ว

    I think it should be the other way around, the only resources that should be counted for that are the ones actively being produced, not the ones stored in the workshops. To me, that means they were working before, and they broke that with Nuka World.
    They changed it, I think, not because they were 'fixing a bug', but because the outposts do (should) not produce food, so only the only way for them to count it, would be food in the workshop, so for this reason, I am guessing they chose to add it in now.
    A possibility, I am not sure if this makes sense, but perhaps, that 150 limit uses a modified number, not just your total defense, but rather your total defense minus some other factor, the attack, a resource, or something else.

  • @DGootz
    @DGootz 8 ปีที่แล้ว

    If you look at the formula you will notice that it will take the min of the the two defense roles if you def is lower that 150 it will take that ( 150, 110 ) => 110; If your def role is higher it will that the 150 ( 150, 250 ) => 150. This is done so that you will always have a change to lose an attack.

    • @oxhorn
      @oxhorn  8 ปีที่แล้ว

      Where does it say that?

    • @DGootz
      @DGootz 8 ปีที่แล้ว

      Oxhorn attackroll = math.min( ..... ) as int
      That is what that line is doing. No matter how high your defense is, the value of attackroll will never be higher that 150.

    • @cheshire778
      @cheshire778 8 ปีที่แล้ว

      attackroll, not defenseRoll... the attack is capped at 150, but not the defence.

  • @ostmen_draugr
    @ostmen_draugr 6 ปีที่แล้ว +1

    I must be blessed, i havent been attacked in at least 7 irl days, so thats what.... A month or so in game time. Granted i have 200 defense in every settlement & empty the workshops every few days & dump them in Mechanist Lair workshop. Never been attacked there even though it has hundreds of thousands of resources & barely any defense.
    Further proof the Mechanist Lair is the best local for provisioners

  • @stormcry8202
    @stormcry8202 2 ปีที่แล้ว +2

    And this is why I use NSA -No Settlement Attacks- and Junk has No Weight. I just carry my building mats on me, and grab all the newly generated stuff when I reach a settlement. I take the junk and move the food/water to a nearby cooler by a crafting station. I take this approach because I would rather build and explore, than get constant harassing messages. I kept getting attack when I was in the DLC locations, and the attack would end before I could return to defend it, bloody annoying :( If I really want a base attack I just trigger an attack from the CC endless assault traps. :)

    • @Therake2602
      @Therake2602 ปีที่แล้ว +1

      i use NSA but the version which let you get attacks in the settlemnt which you are when you are in that settlement.
      Raiders settlement get attacks by minutmens and brotherhoods frecuently and some attacks can be by another enemies depending of your cages and what animals, creatures,raiders,etc you have in your settlement by cages.
      So i keep that mecanic with that mod because it work like a farm of specific loot that i want in a settlement even if it is less frecuently that vanilla game attack settlement.

    • @stormcry8202
      @stormcry8202 ปีที่แล้ว +1

      @@Therake2602 I usually either farm from : gunner cages, overpasses, and the CC Settlement Ambush System. I love setting up a bunch of gunner cages in the empty parking lot at Jamaica, and ring it with turrets. Then I have a switch that simultaneously shuts a powered concrete door to the parking lot, and opens the cages. Then all hell rains down on the gunners.

    • @Therake2602
      @Therake2602 ปีที่แล้ว +1

      @@stormcry8202 super mutant farm is good too.
      Sometime they can bring a behemot for some reason in attacks so is like a deathclar farm and suicide supermutant so a mininuke farm but are rare in comparison with another supermutant attacks but is still good because you can be attacked by super mutants with miniguns and get more ammo for that weapon.
      Explosive minigun and wounding minigun are so op that in survival i have 1 minigun with that effect and 1 bigboy and using powerarmor with patriotic paint and calibrated shocks legs in the case of explosive minigun for the weight and damage .
      Pain train is so useful in that heavy build in close places sincerely so i use perk iron fist and modifications in power armor for do damage mele without weapons with tesla modification in torso when i have enemies so near and i dont want die by explosion of my minigun or fatman because they are so heavy like their ammo.

    • @stormcry8202
      @stormcry8202 ปีที่แล้ว +1

      @@Therake2602 I love power armor, but I have never gotten Pain Train, but I'm planning on it. I watched Oxhorn use it to great effect. He slammed the Overboss with it, then while he was prone, he pickpocketed an explosive on him. Big Bada Boom :) Aaaaaand "The Quarterback Is Toast!!!!"

  • @dpraptorP
    @dpraptorP 6 ปีที่แล้ว

    I very rarely get attacked at Sanctuary, maybe so far only once, in the 1st 10 hours of play. But I have a huge melon farm, to sell to Abernathy. Sometimes I have 200 - 500 melons in the workstation.. But grey garden gets attacked a lot , and I have 4 machine gun turrets (2 of them are high level). and only the 6 robots. I will work on building that up and see what happens. Thanks for a very interesting video!

  • @waters.of.oblivion
    @waters.of.oblivion 6 ปีที่แล้ว

    I just make a supply line to either the Castle or Sanctuary and move my settlers to whichever settlement is closer. The only other settlement spared of this is Spectacle Island, and it isn't far from the Castle anyway. Plus, it's my water farm.

  • @michaelproctor8100
    @michaelproctor8100 3 ปีที่แล้ว

    There were times that the game informed me that I had 2 settlements under attack at the same time, so if you are playing on survival mode there is no way you can defend both without fast travel, unless you are aligned with the Institute of BOS and have Vertbird signal grenades.

  • @glez13gt
    @glez13gt 8 ปีที่แล้ว

    Now that you are into the Creation Kit stuff you should check out other stuff like how much damage the different kinds of turrets actually do( I remember you did a video about the ballistic turret versions but the test kinda failed in the end). Or maybe how the weapon modifications that do stuff other than just raising pure damage actually work, for example how much damage the armor piercing automatic mods do, or in laser weapons the mod that says that boosts critical damage or the one that sets enemies on fire and stuff like that.

  • @Wordweaver166
    @Wordweaver166 2 ปีที่แล้ว

    If Defense is multiplied by a random number, it will always be possible, if increasingly unlikely with high Defense, that during any given attack Defense cannot beat the Attack. The way Attack is capped means there is a minimum Attack strength that requires a certain minimum Defense to at least get a chance to defend against, but with high rolls on Attack Defense will never be 100% certain.

  • @funwithtech8793
    @funwithtech8793 8 ปีที่แล้ว

    Oxhorn, two things.
    1. The resolveAttackAllowedDamageMin you point out at 10:10 is only the Damage min. It is not reflected in the Roll. So the roll can be less than 25 but if the attackers win, there will be a minimum of 25 damage.
    2. It really does not matter because the whole roll process is only called from within a Quest. The comment at line 2888 states
    ; called by attack quests if they need to be resolved "off stage"
    The actual attack process is found in
    WorkshopAttackScript.psc
    as stated in the next comment:
    ; return value: TRUE = attackers won, FALSE = defenders won (to match CheckResolveAttackk on WorkshopAttackScript)
    I did find the following on line 2851 and 2851
    int Property maxAttackStrength = 100 const auto Hidden
    int Property maxDefenseStrength = 100 const auto Hidden
    So each part of the comparison can only be between 1 and 100.
    You are on the right track though. Good luck in figuring it all out.

    • @funwithtech8793
      @funwithtech8793 8 ปีที่แล้ว

      Actually, I looked into WorkshopAttackScript.psc and it points back to ResolveAttack which you are quoting and starts at line 2694 or WorkshopParentScript.psc.
      So the roll is part of the equation. Sorry about part 2 of my comment.

    • @funwithtech8793
      @funwithtech8793 8 ปีที่แล้ว

      Further, The lines for
      int Property maxAttackStrength = 100 const auto Hidden
      int Property maxDefenseStrength = 100 const auto Hidden
      are at 2655 and 2656, not what I quoted.
      So according to
      CalculateDefenseStrength
      No matter how much Defense and Population you have, it will max at 100
      Also no matter how much Water and Food you have, AttackStrength will max out at 100.
      So it seems who wins and losses is still a toss up based on the random number generator.