If you ever start up a farm, be ready to deal with the raiders. ~Blake Abernathy. I guess he was right.
@starlightfromabyss4853
8 жыл бұрын
Wow, devs sure put a lot of thought into defence calculator. You can build FO3's Citadel replica, set up epic defences, get all your folks into power armors, yet loose because a dice rolled bad. What a load of bull.
@JackIV
8 жыл бұрын
Didn't see this post before I posted. opps
@starlightfromabyss4853
8 жыл бұрын
Jack Windle What, expressed same thought word for word?)
@VladProdigious
7 жыл бұрын
+StarlightFromAbyss, Yeah, people sometimes tend to under appreciate the work Developers do because it isn't obvious to you as a player how much effort, knowledge, schooling, initiative and plain old hard work (intellectually speaking) that goes into creating a video game that actually functions well and works - as well as looks and is interaction and immersion friendly - as intended.
@kaiserkhazuto
3 жыл бұрын
Sounds like every Gacha Rate up.
@charlesjones7599
Жыл бұрын
It’s ridiculous! I arm my settlers to the teeth and set up boocoodles of turrets and the idiots still need babysitting!
@McRookworst
8 жыл бұрын
You almost got it! I believe you missed one thing though. Let's assume your settlement has an excessive amount of resources (food + water >= 100); it doesn't guarantee the attack strength will always be 100. If you look at in the CalculcateAttackStrength function, you'll find that the *base* attack strength is indeed 100 in this situation. However, the minimum attack strength will be -50 (base attack /2 * -1) and the maximum attack strength will be 50 (base attack/2). From there the code will generate a random number between these values (line 2666) and add it to the base attack. Say the random value is -30, added to the base attack strength this leaves 70. Finally, the function will return either this value or the attack strength cap, whichever is lower. In this case, the final attack strength will be 70. This means that the chance for the attack roll (70 + 1d100) to be in the "maybe win"-zone is slightly greater. The dice roll must be between 30 and 100 in this case (instead of between 0 and 50), which equals to a 70% percent chance. However, for this all to occur, the random number in the attack strength calculation must be negative and not zero! This will happen about 51% of the time. In the end it won't matter much because this can be corrected by a lucky defence roll. But in reality I'm guessing the "attackers win" scenario is closer to 30% than 25%. Excuse my English :)
@oxhorn
8 жыл бұрын
THANK YOU, this is a great comment--everyone up-vote this so people see. The end result is not much (+/- ~5%) but it's good to have accurate info about this. Thanks again!
@ericdaigrepont1874
2 жыл бұрын
I know I'm a few years behind the curve, but I only started playing Fallout 4 a few months ago and started educating myself on Settlement Building a couple weeks ago. First of all, Oxhorn; absolutely love the content. Thank you. Though a whole lot of lore videos are in my to-do list due to spoilers. I have to assume it was mentioned by someone else by now, but just in case it shows up for newer watchers like myself, I would like to comment on your assumption about defense win/loss probability. It isn't as high as 75%. Leveraging your assumption that attack modifiers equals defense modifiers, so it all comes down to the luck of the roll, you are correct that the defender (player) wins anytime their roll is >= 50 on a d100. Additionally, you are correct that for all rolls that are
@ChrisSauce77
8 жыл бұрын
I agree. The cap on defense strength is silly. Defending settlements should be an early-on problem, but once the player has constructed anything over the attack cap of 150 for strength, that should be that as far as ever having to worry about the settlements handling their own.
@xxdomoxxkunxx
7 жыл бұрын
Well from my reasoning a 75% to win is alright I'd assume you could stack huge numbers of defense to lower the entire process(thus less chances to lose) making the extra defense useful
@jessicaquinn6261
8 жыл бұрын
Great video! Aside from armour, a good weapon and amo I also give my settlers a melee weapon and one Molotov cocktail. The Molotov work like amo, they just need one and they can keep throwing. I give them a melee weapon because if the attackers get too close the settler turn to melee attacks. Also, I don't put up walls around my settlement. The walls just get in the way during the battles.
@Rawrshuga
7 жыл бұрын
Robot settlements for the win! The math: 0 food + 0 water = Max possible attack strength of 0. Therefore attackroll = 1-100 Settlement defence of 100 (robots+turrets) = defence roll of 101-200 = Defenceroll > Attackroll always. Let the robot revolution begin! Now if you could only kill those other mooks at Sanctuary.
@truthseeker4291
6 жыл бұрын
Two corrections. 1. Max attack strength comes in when you have total food + water of 200. 2. The chance of you winning that attack with max defense (100 - settlers) is 63.5%. Attack strength Based on this and McRookworsts observation, and the code we see on the screen... Line 2661 and 2662 make attack strength range by a larger value as (food + water) increases. For example, total 1000 food and water will make the min and max be -500 to 500. Line 2666 gives the final attack strength as the minimum of either 100 or your water + food plus a roll between those two values mentioned earlier. For example, total 1000 food and water will give an attack strength of 1000 + roll between -500 and 500. That will always be more than 100. So, for attack strength to always be 100 you would need a minimum of 200 food and water. 200 plus a roll between -100 and 100 is the first level where it's always capped at max of 100. Attack Roll While your logic on win-loss is sound your math is not. Note: I account for ties going to the defense (per line 2726) at the bottom. Attack roll is attack plus d100... capped at 150 Defense roll is defense plus d100, no cap So, if both attack and defense are 100, yes, the values range between 101 and 200. At this point the chances break down into 3 scenarios, not 2. A. 50% of the time you will roll 51-100 on your defense roll and win. For the other 50% of the time you are rolling between 1 and 50. B. 50% of that remaining 50% (25% of the total) the attacker will roll between 1 and 50. He will win 50% of these and you will defend 50% of these (12.5% of the total). C. 50% of that remaining 50% (25% of the total) the attacker will roll between 51 and 100. Since this is not-A, where you have rolled less than 51, even though the attacker's roll is capped he will always win and you will always lose. So, your chance of defending is 50 + 12.5 +0 or 62.5% plus... Ties go to the defense, so that will happen 1% of the time. Even though half of the attack rolls are capped at 50 let's flip the order around and look at it. No matter what the attacker's number is, even it were ALWAYS 50, the chance of the defense's d100, which has no cap or adjustment, of hitting any given number is always 1%. That is the tie chance. Ties go to the defense... So, the final chance is 62.5 +1 or... 63.5%
@VladProdigious
7 жыл бұрын
Wow, this one really makes me feel I have a chance at managing things to a reasonable degree. Whenever someone has mentioned removing the food from the workbench I've always thought: Move it where? I can't walk around with all that weight in my inventory all the time, and it's absurd to just put it all on the ground because it'll disappear. -- You answered this question for me: Store it in a container. And now I already know exactly where I'm going to take it. All that's left for me to do at this point is to make a little more defense turrets and I'll no longer have to worry so much about loosing every battle at my settlements, small, miniature and almost non-existing - because I have no large settlements yet. lol *I think it's safe to say that we owe you another one, Oxhorn, for all the work that you do to provide these detailed videos. Thank you so much, buddy.* .
@noahsmith4382
5 жыл бұрын
Playing FO4 again with mods for the first time and decided to rewatch this video to refresh me on how attacks work since I love building my minutemen settlements. I still remember roughly calculating this myself when this video came out. Still a great vid after these years and very important for those getting into settlement building!
@TheDanc1nghawk
8 жыл бұрын
so that 999 defense I have on spectacle island doesn't matter? well that's lame.
@SouvenirSpices
8 жыл бұрын
it matters if your there but if your not its just a dice roll
@oxhorn
8 жыл бұрын
Yep, it's good if you are in the town personally.
@taksea1337
8 жыл бұрын
TheDanc1nghawk at least you got big juicy numbers
@Satsujinki1973
8 жыл бұрын
Having the High defense does count when determining the actual chance of the attack though so having 200 or 300 defense allows you to have a lot of resources in the settlement and will keep the chance of the settlement being attacked at 2%.
@richardreinertson1335
3 жыл бұрын
Just SMH. I finally understand why it is practically impossible to figure out attack/defense dynamics by pure trial and error. There are just too many variables. This video is a MAJOR help. Thanks so much for all the work you have put into this problem. Yeah, I am late to this game - I just installed it on my PC for the first time a few weeks ago. I have a love/hate relationship with this game, but I suppose that is a common ambivalence. Anyway your solution - putting all your resources in one small settlement - is now the solution I will use also. Millions of thanks for this.
@brendanhunt4621
8 жыл бұрын
The way I read it, the attack strength, being capped at 150 isn't an automatic win as the defence roll could be less than 50, and attack roll of 150+ is capped at 150 and has a 50% chance of settlement success, but if the roll is 101-149 the chance of settlement winning is more than 50% it works out that that at max strength and defence the chance of settlement success is 62.25% let me know if you want the maths!
@-libertyprimev1-902
7 жыл бұрын
Something I wish they would have done is if you complete the game with the minutemen (just as a little reward), that you would get a reduced chance of having your settlements being attacked. Because I feel like the would be attackers would probably say something like "Oh damn the minutemen are back with their big group, with their castle/artillery, and they just destroyed the freaking institute and the brotherhood... ok maybe we shouldn't attack any of their settlements unless we have more help." Like come on that would just make sense.
@makromizer
6 жыл бұрын
Here's an explanation why the chance of success is actually just ~63% rather than 75%. There are 4 constellations C (assuming that identical results lead to a reroll), each with a likelihood of 25%: C1: Def > 50 & Att > 50, Att cut to 50, Def wins; C2: Def > 50 & Att
@XSparkerIII
8 жыл бұрын
Thanks, Ox! This is actually extremely helpful, because now I know that it's just that little extra purified water at my settlements is what was causing me so much grief!
@dallasdandigitalproduction393
3 жыл бұрын
I just keep selling mine to trashcan Carla. Cha ching
@Smellsbad
8 жыл бұрын
What this means is basically 150 defense "should" work 75% of the time for most settlements. Not what actually happens in my experience, but will start capturing data.
@FourStepsToTheEnd
5 жыл бұрын
One important note, in terms of turning up- the chance of damage remaining in a settlement before a next attack is significantly lower than 25%. So, 25% of the time, you suffer damage to a settlement from a random attack. The damage suffered is equal to the difference between your roll and the enemy's roll. Presuming both settlements are maxed, this means the maximum value of 'damage' a settlement can suffer is 49, since you always roll a minimum of 101 and they always roll a maximum of 150. We also know that settlers repair 5 damage a day, and that a minimum of 7 days must pass between attacks. This means that at any point that you roll 15 or higher, the settlement will have fully repaired before the time that the next possible attack can occur. In order for damage to not be repaired before the next attack *might* happen, there must be a difference of at least 35 between the attack roll and the defence roll. This caps the chance of unrepaired damage occurring at 15%, because you will only roll 15 or lower 15% of the time. But because the enemy does not always roll 50 or above when they win a combat, the chance is lower still than that. Any time you roll 15 or above, you suffer no damage before the next attack. Not every time you roll 14 or lower do you suffer damage before the next attack, because 49% of the time, the enemy does not roll 50+.
@alektop
4 жыл бұрын
You're math is off. With the 'capping' effect you describe, the odds would come out to 62.5% total for maxed attack and maxed defence, as you forgot to factor in that if you roll below 150, there is quite a 50% chance that the attack roll will be 150 after 'capping' as you call it. You could say it's Bayes' Law: Sum of all ( odds of scenario * odds of winning ) Best to break it into clear win losses: scenario 1: def[150+] = (1/2) * 1 scenario 2: def[150-] && att[150+] = (1/4) * 0 scenario 3: def[150-] && att[150-] = (1/4) * 0.5
@JokeeGA5
8 жыл бұрын
So...never build settlements with excess of food or water in locations you don't care about, and that are far away from your usual stomping grounds. Places like Sommerville Place, and Sunshine Tidings... Then, when there, just build a defense using turrets and guard posts to make sure you have good killzones for those defenses you do show up for, and this alone will get you pretty much where you need to go. If your defense rating exceeds 100, you're good, and there is nothing more you can do, other than show up. Very cool. Thanks Oxhorn for putting all this time and effort into solving this attack situation. Much appreciated.
@TotallyNegatory
8 жыл бұрын
I've found that settlements with no settlers never get attacked. Knowing this I used Spectacle Island as my player home and installed dozens of water purifiers to generate massive amounts of purified water for trade. Would removing the water sources from other settlements and relying on Spectacle Island for water reduce my chances of attack/loss in those settlements?
@IAmAnEvilTaco
8 жыл бұрын
Yes. I rock the same setup, my water only comes from unoccupied settlements. Never see an attack.
@sirjmz5169
8 жыл бұрын
TotallyNegatory be careful with that. I emptied a settlement and later came back to get something and super mutants were there stealing stuff from the workbench. No notifications about the attack either.
@TotallyNegatory
8 жыл бұрын
Sir JmZ I've never had settlers at the island so maybe it works differently if you have. Once I cleared the mirelurks though it hasn't been attacked for over 150 levels of gameplay. I do know that having cages in an empty settlement will allow it to be attacked so don't do that.
@Scalpaxos
8 жыл бұрын
Really? This is crazy!
@gradclvz3501
7 жыл бұрын
I cleared Hangman Alley, emptied the Workshop, and left it with no settler, I have never have any attack. However later I decided to connect Hangman Alley with provisioner, but still leave it emptied, I also never get any attack warning. Later I decided to visit my Hangman Alley and I found a bunch of raiders sitting there in my supposed to be emptied Hangman Alley. I haven't try to test it again, but there is a possiblility that as long as you have resources in your settlement, you will still got attacked. However if your attacked settlement has no settlers, you will never get any attack warning.
@stevehealy5810
8 жыл бұрын
Cool! Neat update! :D Is #2 actually stored food and water, or the production of food + water? Been busy with other things and haven't been able to revisit FO4 since my last post. Also, do robots and/or synths need food & water? Might it be possible to make a unbeatable settlement using them if they don't require its production like in Graygarden?
@oxhorn
8 жыл бұрын
It's stored food and water. At the end of the day, settlers will consume what your settlement produced that day, and store the rest in the workshop.
@bguilbeau
8 жыл бұрын
I think you nailed it OxHorn, keep up the good work
@qaazxc
8 жыл бұрын
I've enjoyed your videos on the topic but you seem to have overlooked the third dice roll in resolving attacks, the variance roll. As you've said int attackStrength = math.min(foodRating + waterRating, maxAttackStrength) as int But before adding the 1d100, it randomizes attackStrength within a range of +- 50% int attackStrengthMin = attackStrength/2 * -1 int attackStrengthMax = attackStrength/2 attackStrength = math.min(attackStrength + utility.randomInt(attackStrengthMin, attackStrengthMax), maxAttackStrength) The varied roll is also capped at 100, so an initial attackStrenght of 100 can range from 50 to 100. In fact half the time it will be below 100. After adding the 1d100 roll attackStrength has a range of 51 to 150 after the final cap, though the distribution is skewed high. You're 75% win rate is close to what I've found. I put together a basic script which goes through each combination of rolls, and with an initial attack and defense of 100 the defender win rate is just under 70%. If one of the other commenters is right in that resolveAttack doesn't include stored food and water for attackStrength, then for a settlement with 20 foodprod and 20 waterprod, the win rate should be 90%. You might want to look into how long it takes a settlement to repair itself after a failed defense. Line 2755 in WorkshopParentScript makes it seem possible. ; current damage starts out at the max, then goes down as repairs are made during the daily update High defense caps the potential damage pretty low, and it doesn't seem like damage stacks from multiple attacks, it's only set to the highest of previous or current damage. If the repair time isn't too bad it might be fine to ignore all attacks, most will be successfully defended and the damage from any loses will be repaired soon after.
@Matt-md5yt
8 жыл бұрын
Glad you covered this topic some more.
@ParoxyDM
7 жыл бұрын
Make sense, the Sole Survivor is the catalyst for everything. The entire story in every Fallout game hinges on if you do something. Everyday would be a slow news day in the Wasteland if you never did anything.
@maguszeal5818
4 ай бұрын
I figure someone at bethesda really wanted FO4 to be a tower defence. On top of a rpg, 3 person shooter, and city builder. And was mad when you just auto bypass his code with high defense so he made your defence not have an auto win.
@EnderEngineGames
8 жыл бұрын
Hey man, very useful info in this video! Another thing you may be interested to look into is how traps containing raiders and such affect the attack strength and frequency. On my cannibal character I have a raider slaughterhouse, and despite the fact that the settlement is usually empty, I've seen some MASSIVE raider attacks! Probably trying to save their friends lol
@oxhorn
8 жыл бұрын
That's true, this base algorithm doesn't take into consideration changes from scripted events or Wasteland Workshop traps.
@Hoigwai
7 жыл бұрын
Yeah, I had the same thing you did on my first playthru. After a point my uncapped food and water had me getting attacked in huge waves 5-10 settlements all at once. So for my 2nd playthru I turned the caps back on for food and water and left my scrap cap off so that my guys will be able to help me out improving my settlements by producing scrap. Since the mod author pointed out that the settler count + 10 is the food cap, water caps at 5 + .25 settler count. So, this playthru I'm only going to have a few settlements with people in them. The ones that start that way. Any other settlement is going to be just a safehouse for me with defenses, a water pump and a bed. If I could send the people all to Sanctuary I would but as you know some you can't move. As time goes on and I get more scrap I'm going to push the defense up to 100 and since these empty safehouses will have almost no resources they will defend themselves well I think. My supply routes will be robot manned from the Mechanist lair. To get that "Get Smart" style on the lair back I'm going to put in a couple of the secret doors that look like stone since we can't get those multi layer doors to work again. My guy is going institute and I'm playing him as an operator, in the covert spy type of thinking. He's a good sniper a good in close killer and my primary base is going to be sanctuary and I'm building it like a hidden base. I'm using the seasons mod and picked summer so I've built hedges and lots of foliage to turn the base into what I'm calling "The Grove". From the bridge or any approach it looks like a stand of trees and overgrowth. I've left many of the houses and cars intact to sell this look of nothing to see here. My first set of hedge walls have an opening at the street just past the workshop house then inside this first outer wall there's a stone wall with overgrowth on it and turrets obscured with ferns so it just looks like nothing much. I have food and water production high (double the settler count) but since the caps are on and I only have 5 settlers the attack strength should be low and they will replenish my food supply (I'm in survival mode) quickly when I take food. I went this way because the roleplay on this character is the loss of his wife killed off a part of his humanity, he does want attachment again. He wants control, he helps people but he doesn't want community. Anyway that's what I'm doing at this point. 8)
@jkohlers
4 ай бұрын
I've watched hundreds of YT videos and your technical analyses are definitely the best! It's bad it's been a long time, and you no longer make Fallout 4 videos. I'd like to know which items, besides food and water, the game logic removes from your workbench when you fail to defend a settlement. Mainly if previously crafted items, such as walls, floors, turrets, etc., are removed from there or just junk items.
@Steel-101
2 жыл бұрын
Dude this video really helped me with my settlement defense. Thanks Ox. 😎👍🏼
@paulwei6596
3 жыл бұрын
I always build my settlement defense rating up to more than 200, because when there are high and concentrated fire power, enemies would have lower chance if any to hurt my defense/water supply/crops etc. I don't like searching for those and repairing them. In the late game, money and resources means almost nothing, I'm more than happy to use them, and get some extra exp in the same time.
@44WarmocK77
8 жыл бұрын
So you can basically boil it down to two important rules for maxing out your settlement defenses: 1) In order to max out your defenses for off-screen calculations, you need 100 - population as your minimum defense value. 2) Any additional defense value exceeding 100 - population does not provide a benefit for the off-screen calculations, but it improves your chances of winning the attack when you're at the settlement. In other words: when building a new settlement, add a plain 100 points of defense to your settlement right from the start (prefereably pointing their muzzles towards the attackers' spawn points ^^), put a toolbox next to your workbench, and you're good to go. The few settlers you're gonna start with add a little extra protection, the superfluous turrets become a bonus in case of an on-screen attack, and the toolbox allows you to store purified water and food from the workbench and therefore remove it from the equation for calculating attack probabilities.
@Teabone3
7 жыл бұрын
They really should have made the attacks based on the targeted resource. For instance would Super Mutants really be that interested in raiding a settlement just because it had an overabundance of purified water? Same with Feral Ghouls. I think settlements should be targeted based on what they have that benefit the attacker type. Guess i should make yet another mod lol
@scottbrewer1503
8 жыл бұрын
So now thats its officially solved that no matter what you can never get 100% win chance unless you show up. We need a Mod to allow you to place security Cameras in certain settlements then when you get attacked to use your pipboy to "look through them" allowing the settlement cell to load up like you went there to allow your settlers and turrets etc to fight as if you were there and so you can win and not actually travel there. Cone on Mod community.
@theabhominal8131
8 жыл бұрын
that would be great but maybe to much to do in a mod....
@Ed_man_talking9
8 жыл бұрын
there would have to be a way to reduce loading time from one settlement to the next, or maybe mod a pit boy game that if you win it your settlement survives depending on how well you did on it.
@bscountryboy85
8 жыл бұрын
Do you plan on making more builds? I enjoy your walk-troughs.
@oxhorn
8 жыл бұрын
Yep! More revisited settlements to come.
@xaosbob
8 жыл бұрын
So, I wonder how difficult it would be to write a more complex code for attacks--I mean, write it, compile it, and have it actually work. Making it come down, essentially, to opposed d100 rolls with modifiers is a weirdly swingy and disconnected way to determine something that is such an important part of the game for a lot of us. What do you think, Ox? Do you think this feels like a fair way to go about simulating offscreen battle, or at least good enough? If not, how would you design it? You give us the facts, but I am also interested in your opinions. ;)
@audiogarden21
8 жыл бұрын
It wouldn't be difficult at all really. It's just a matter of coming up with different values for the calculation that make more sense.
@jerethkhan
8 жыл бұрын
Really, if you just removed all the min.math calculations and the d100 random roll, then used only the pure math to define attack and defense rolls; you'd probably see more accurate results based on the "juiciness" of a settlements resources, the size of the attack it propagates, and how well the defense score could repel it. You'd probably also see a lot more attacks as workbenches were filled daily while you were out not looking for your son.
@factanonverba8082
2 жыл бұрын
I think the only way to get a 100% of winning is by using a camera from the creation club.
@Adoniss2yu
8 жыл бұрын
Let them come! My turrets and battle hungry settlers will give them a Commonwealth welcome.
@hybrid_grizzly
8 жыл бұрын
There should be a mod that loads any settlement that is attacked whether or not you are there, so the attack is accurately played out
@danguillou713
4 жыл бұрын
I think your math is slightly off. If your roll is >150 you win. 50% If your roll is 150 which is =150 but you still lose. 25% Or attack roll is also Defense: you lose. 12,5% Final risk of loss with infinite resource and defense should be 37,5% Thanks for awesome channel. This is only one among many subjects where you have helped a lot!
@sim.frischh9781
8 жыл бұрын
This makes it seem like keeping the numbers of settlements down is the best choice. Less settlements, less frequency of attack, plus, if you sell surplus food and water, you further lessen the attack trigger chance.
@sarowie
7 жыл бұрын
6:54: No, the attackers do not lose when their attack strength is capped. It is still a "may win"", as their attack is just capped to 150.
@danksalt5935
3 жыл бұрын
Even if you armed your settlers to become legit Terminators, you would seemingly always suffer around 12% chance of losing to regular raiders without your presence. It sucks.
@paulwei6596
3 жыл бұрын
even if you have zero defense and you just show up, and you don't even need to fire a single shot to win the defense, just run and dodge. eventually the settlers and companions will kill them all, they maybe weak but they can't die, the only one that can die are ourselves😂
@gek3674
8 жыл бұрын
Awesome work as always Oxhorn. We now only need to figure out how the damn Raider settlement's food need works.
@MADharvey95
8 жыл бұрын
a cool idea for a mod to rectify this would be that any additional defence above 100 minus number of settlers adds a 1% chance to win or a random additional percent between 1 and 10 or something, that way 100% chance is possible
@cheshire778
8 жыл бұрын
Oxhorn: "... if i missed something..." Nope, your good. What i was wondering, now that you had a taste of the code, how would you wish the system to work? Or better, how would you design it, if you had the chance?
@oxhorn
8 жыл бұрын
I would have made it more compatible for larger settlements. 100 seems like such a low cap for strength, and 150 so low for an attack roll. I wished the code scaled better for settlements with larger populations. I also wish new attack events happened in settlements that got larger and larger.
@cheshire778
8 жыл бұрын
I just went through all the settlement mods on nexus and i have to admit, that i am surprised, that there is no mod for this yet. The only mods in this direktion are either more or harder raids. Huh... New attack events? You mean more or bigger attacks? My first thought was to go the opposite route, the bigger it gets the less likely it is to get attacked, because fewer raider groups have the resources to deal with a settlement that big. Example: Diamond City
@blizztedo7577
8 жыл бұрын
Hopefully the mod community will see this and act!
@GetUpTheMountains
8 жыл бұрын
Hey, its Notepad++! Did you see my message in the last settlement video, or is the switch a coincidence?
@oxhorn
8 жыл бұрын
I saw your message, I did this just for you :P
@GetUpTheMountains
8 жыл бұрын
Oxhorn haha, thanks mang.
@jayc5373
8 жыл бұрын
I'm not a modder or a scripter but wouldn't it be easy to change the max defense strength from 100 to 151 so that if your total pop and defense is above 150 (with attack roll capped at 150) you would win 100% of the time?
@starlightfromabyss4853
8 жыл бұрын
I have a bunch of settlements that weren't attacked for my whole Survival Playthrough, and they have quite a few settlers. Perhaps your case is "yet" to happen. Or perhaps it is true. The longest non-attacked settlement I have is Graygarden and it only has a bunch of robot gardeners.
@glez13gt
8 жыл бұрын
Chance of getting attacked is different from what is explained in this video. The previous video explains how attack chance happens. Basically if you followed the old advice of having defense as high as food plus water, it will usually be 2% chance daily, unless you let food and water accumulate in your workshop like the previous video explains.
@starlightfromabyss4853
8 жыл бұрын
glez13gt I don't have fast travel to gather all resources on daily basis. I always have a ton of water everywhere. = - ="
@TheNecropolis20
8 жыл бұрын
ok great you have a ton of water, where are you getting your adhesive, aluminum and ceramic from?
@starlightfromabyss4853
8 жыл бұрын
Jonathan Black Well, to cover basic needs for all 23 settlers per settlement, each has mutfruit in it, to conserve build allocation. A dedicated farm in Far Harbor covers all my Tato needs. Some other farm has other plants needed. Rest is just the matter of getting into a cooking station and making a bunch of Vegetable Starches. Plus I pick like every Duct Tape and Wonderglue I find. Same for aluminum, I pick anything that has it. Easy with rank 3 Scrapper perk. Ceramic I just buy off traders. Batch of 50 per shipment.
@Daakist
7 жыл бұрын
This was a great explanation about when you CANT defend (survivor mode) but its really lame that successful defense comes down to "rolls". It should be more about wall placement, turret placement, and settler armor and weapons. It only has to do with defense rating, # of settlers, etc.
@daikhairai7194
7 жыл бұрын
as a result of this video i a now satisfied with my reasoning for why i use so much defence, yes i am now aware base off these calculations i don't need the overwhelming majority of my turrets i only need say 10% of what ive built at any one time. but there's a good reason to use so much so when i arrived to "defend my settlement" im only really there to just oversee the turrets doing there thing because there all built with such a open line of sight on all attackers not enemy is ever being attacked by less then 10 turrets at once.. save for if those turrets are already focused on other enemies. i know from overseeing absolutely hellscape attacks of ridiculous strength loose time and time again to my defences its simply a mathematical impossibility that i could ever loose "IF" the game actually extended its logic to include all that i have above and well beyond the basic needs for the calculation... so i merely arrive to assert the the actual numbers and let them play out like they should most of the time
@jerethkhan
8 жыл бұрын
I'm a PS4 player so I don't have the creation kit installed and can't find the WorkshopParentScript.psc file online. Can you verify in the code that "resolveAttackMaxAttackRoll" is being set to 150 prior to combat resolution? I have pretty much no doubt that it is, it's strictly a curiosity/ tripple checking thing. Keep up the stellar quality of videos and information, it's appreciated.
@Kos4Evr
8 жыл бұрын
The really sad part about this system is that even if the Attack Strength is only 50 the dice roll can still bring it up to 150. So anything between 50 and 100 attack strength can hit the 150 cap. Though I have to admit that just taking the resources out of the workbench and putting them either in 1 location or just in any other container is genius. at least if they are all in 1 place you will never have to defend more than 1 settlement much. Glad that you finally got it sorted out.
@nayroy18
8 жыл бұрын
Were you yelling into your mic?
@oxhorn
8 жыл бұрын
No, I had the gain set too high. There was lots of clipping. I tried to edit most of it out, but I couldn't get all of it. Tomorrow's vid will be fixed.
@nayroy18
8 жыл бұрын
I'm willing to overlook this incident. You are forgiven.
@Plasmagon99
3 жыл бұрын
I rewatched the Attack chance video with the info from this video, as something was bothering me. I found out that the calculations Ox did are correct but I found a deferent issue in the Attack chance video. Is the base attack chance really added to the resources multiplier or is it a flat 2% no mater what? I ask this as I am learning program and I likely would do the flat version not the added version. And I am also doing a new playthrough without fast traveling and the chance to be attacked at Red Rocket when in the Glowing Sea is a concern.
@robertekew
7 жыл бұрын
The infinite settlement size mod changes your max defense rating in game. However, does that factor into the math.min(safety + total population, maxdefenserating) function? Does this mod make settlements subject to a higher possible rating than 100?
@ryanedward7697
7 жыл бұрын
Just to be clear. When you say having more resources in your settlement increases chance of being attacked, do you mean units of food items and water in the work bench or do you mean the water and food numbers at the top of the screen when you enter workshop mode? I ask because I’m trying get attacked more often as well as getting attacked by harder enemies. Also how does having cages effect settlement attacks? Any help would be greatly appreciated!
@Smellsbad
8 жыл бұрын
Not sure if I missed it, but where is the function utility.randomInt()?
@sethwilliamson
8 жыл бұрын
Is that modable? Could we modify maxDefenseStrength to a higher constant?
@naomy1701
7 жыл бұрын
well the numbers is all nice and such, but if u set up the defense right, build bottleneck entrance, seure it with good turrets etc, then no matter how strong enemys are, if u show up there, the defense will make smallwood of any attackers (sure only works if u show up to actually see the attack)
@naomy1701
7 жыл бұрын
which is shit since still makes u need to babysit all settlements, imo it should be the same way if u are not around, enemys need to move trough tight spots (if u have set up defense tht way) and work tru turret fire etc, this would make it way more realistic
@Cainite
6 жыл бұрын
Don't know if you'll read this (1,5 years later) or solved it yourself but: If I keep the balance between settlers and resources (for example 22 settlers, 22 food and 22 water) then no food and water will be ever stored eg. when the script calculate the strenght, it should be always 0 + dice, right? So the max strenght is always 100 with the dice and you yourself only need 101 def!?
@typhoonic
8 жыл бұрын
Oxhorn, I noticed you have either very low shadow distance or the shadow bug that drives people crazy. If it's the second, go into fallout4pref.ini and correct this value: fBlendSplitDirShadow=300 under [display]. Enjoy your non-moving shadows.
@oxhorn
8 жыл бұрын
Done--thanks! What does this do? I had it set to 38 in one and 1000 in the other. Let me know if you notice a difference in future videos.
@typhoonic
8 жыл бұрын
***** I'm not entirely sure, but I found this as a fix that worked for me. There's a bug in the game where even if you set the shadow distance at max (20000 / ultra), the shadows will still render near you. Personally, this drives me insane as I don't like seeing things render in front of me, and anytime you use game launcher to edit your graphical settings your fBlendSplitDirShadow will be set at 38 by default. Setting this to other values seems to fix this bug. I use 300, and that fixed the bug for me, but I haven't experimented with other values. I'd also mention the settings for medium and high are drastically different for shadow distance. Medium is set to 3000, and high is 14000. I went into the .ini file and changed it to around 8000. That gives me a nice balance of performance and not having to see shadows render around me while I run around.
@bryanbuck2107
8 жыл бұрын
great work on all these vids oxhorn great work
@devilsmessanger
8 жыл бұрын
@Oxhorn what happens if you link your Workshops with supply line ,the provisioner ? does that spread out supplies or does it mean all settlements linked now have those same resources ?
@kooingcorgi8897
7 жыл бұрын
When you lose an attack on vault 88 and the vault doors closed
@ConfirmedCynic
5 жыл бұрын
Not sure that 75% is correct. If the defense roll is above 50, that's a guaranteed win, true. If it's below 50, then there's a 50% chance the attack roll is >= 50 (a win for the attacker), and even if the attack roll is less than 50, there is still a 50% chance that the attacker roll is greater than the defense roll. So that's 50% + .25 x 50% = 62.5% rather than 75%.
@Genv6
8 жыл бұрын
I'm running a mod that changes it to if your safety rating is above 150, you win every time. I've deleted both my old playthroughs to get a completely fresh start and also eliminate temptation to just go back to one of my old ones so I have yet to see if it works. it's a console mod (I'm on xbone) called BS Defense. here's hoping...
@Genv6
7 жыл бұрын
DankyStanky WankyHanky, I didn't create it, I'm just sharing that it exists.
@Cuiva
8 жыл бұрын
Hi Oxhorn! I'm not sure how this works still... won't the attack strength of 100 +d100 cap out 50% of the time? As a roll of 51 or higher will be reduced to 50, due to 150 cap, will that skew the math more in the raiders favor than your proposed 25%?
@PalleRasmussen
6 жыл бұрын
Oxhorn, you are probably the one most likely to answer this. Spectacle Island and Covenant both shows with 0 in ALL categories, and Covenant always get attacked. And because it shows as no def, it always looses. What do I do?
@Fists91
8 жыл бұрын
Bit of pedantry on the numbers here but at the 6:45 mark: The attackers aren't a guaranteed loss when they roll over 50, only when you do. When attack rolls over 50 defense may still roll under 50 so it doesn't come out as a clear three-quaters win to defense. I don't think you didn't mentioned how draws are settled but guessing it's another coin flip would give defense a 65% win rate. This isn't something I do often so I may well have made a mistake but think that's right.
@Fists91
8 жыл бұрын
Looking at the earlier bits with source code it looks like Attack only wins when greater than defense so tie counts as no loss for defense which would make defense a 70% success rate.
@Fists91
8 жыл бұрын
Actually, that was using a d10, using 1d100 I think it's 63.25%.
@oldman1973
7 жыл бұрын
Since it's been awhile since this was produced has anyone figured out a way to change the max defense strength value coded into the workshopparentscript file and make it possible that with a high enough defense rating that offscreen resolved attacks will never fail?
@bardawulf5827
8 жыл бұрын
Awesome follow up video! OK - so it is definitely about storing food in the workshop and not total amount of food in the settlement itself, correct? Example - Sanctuary Hills - just take all food/water out of the workshop and dump it into say...a floor safe (cause I have one there...lol) will do the trick? Question #2 - Does this change any of your previous advice in your "How to Arm Your Settlers" video? {Besides the 100 defense minus population rule) I'm just started to play F4 having waited patiently for a year now for all the DLC to be released and the bugs to be fixed. *I've learned from F3 and NV to be patient! lol
@oxhorn
8 жыл бұрын
Correct--settlers WILL consume food stored in the settlement, but only if it7 is in the workshop. At the end of the day, settlers consume the food they farmed that day. Any excess is stored in the workshop. If they didn't generate any food that day, they consume food in the workshop. If the food is stored outside the workshop, the game doesn't know where to find it, so it isn't consumed. So the only food and water that can be consumed and which is used in defense/attack rolls is that which is in the workshop. #2) No, armed settlers don't affect settlement defense chance when you are not in town. It only makes them more powerful when you are in town.
@bardawulf5827
8 жыл бұрын
Cool! Good stuff to know. Now I found out one of my settlers is a pedophile...so I'm thinking pillory then letting a supermutant beast have him as a sex toy...would that be bad karma? lol
@TestECull
7 жыл бұрын
I'd like to point out that there's also a heat map regarding attackers and that the difficulty setting fucks with the math involved. I've been playing since launch, but on easy, and I've had about ten settlement attacks in the 1,600 hours I've lost in the game. Certain settlements...Sanctuary Hills for example...I've *never* had attacked. And that farm down by the Glowing Sea, Somerville Place I think it's called? The one right next to VAult 95? Yeah, it's in the damn hood and I have had it hit a couple times. I love to spam missile turrets for defense, so it's not unusual for even some neglected backwater shithole to have >200 def and for my primary doom fortress to have nearly 500. If something does show up and I fast travel there it explodes almost immediately. But they never show up at all. I'm level 50 on my current save, just got done blowing the Prydwen up, and I've never had a single attack launched on any of the settlements under my control. There's a lot more going on under the hood than you went over in this series of videos. Perhaps a new video or two might be a good idea?
@Scalpaxos
8 жыл бұрын
What does foodRating and waterRating refer to? Is it food and water stored in the workshop or the values of the building interface?
@GoldingPurple
8 жыл бұрын
That was great visualization, good job!
@Baoran
7 жыл бұрын
Does the defence cap apply to how much defence decreases the chance of getting attacked? Like would you be able to always increase defence to keep the chance of being attacked at 2%?
@ttjjss649
8 жыл бұрын
Hello Oxhorn, I didn't see any factor indicating a difference as to how your settlers were armed, either with standard low end pipe guns or everyone having fun with all your extra and otherwise unused legendary, gatling or gauss rifles. Did you see anything in the code that gave a bump to the calculations or is the only part of that factor the total number of settlers themselves, regardless of their armor and the weapons they have?
@oxhorn
8 жыл бұрын
Sadly how your settlers are armed does not affect win or lose chance in any way when you are not present in town.
@oaksparoakspar3144
8 жыл бұрын
So, assuming max attack, you will get results 101-150, with half of the attacks resulting in 150 due to reduction. Assuming max defense, you will get results 101-200. So, we have 2 halves giving up high (150+) and low (101-149) results. 50% of the time, the defense roll is going to win and you win. 50% of the time, the defense roll is going to lose - those will not all be losses, however, because of the cap. Those rolls could be both low, low/high, or both high (high/low would be a normal defense win by default). Both low and low high are losses, but both high will be a win. A full break down win/loss: Both low - 50/50 Both high - 100/0 Low/high - 0/100 High/low - 100/0 Totals 250/150 (5:3 odds) So, out of 8 attacks, maxed, against defenses maxed, 5 will be wins and 3 will be losses. There is no scenario where you auto win unless defense strength is maxed and your food + water = 0 (as your max attack roll would be 100 and your lowest defense roll would be 101). That could be done with a robot settlement, but not humans. That said, the actual losses to losing are slight - damage is repaired swiftly and the thefts are not serious by late game. It really is only a pride thing.
@thewhat531
4 жыл бұрын
Oakspar Oakspar I believe I've lost settlers in attacks where I didn't make it to defend them in time. I suspect there might be a small risk of settlers getting killed in attacks but I'm not sure. If true you stand to lose more than your pride. You risk the loss of (not) human lives!
@axileas356
6 жыл бұрын
Great video. I know I’m late to the party. Bet you can’t wait to try all this in Fallout 76??!!??!! This was very helpful. Hope to get some great content from you on the coming game this fall.
@josephmatava2067
6 жыл бұрын
Awesome thanks for the info. So I don’t need those 60 gun turrets per settlement and should cut back on food and water to just barely feed them. at least I won’t have to use lots of materials in any new game
@blueckaym
5 жыл бұрын
Fallout 4 settlement defense is messed up! Not only it's bugged - for example having underground spawn-points like the one in Greentop House, which sometimes makes it impossible to defend even if present there, because one or two of the enemies stay out of reach underground but the moment you leave (after the time for defense has expired) you automatically lose (unless you have really high defense rating apparently). So in effect it makes no difference if the raiders full force is calculated in the attack auto-resolution, or if there's just one (bugged) enemy standing (deep under cover ;)) Great video though! Cheers!
@masterofthecontinuum
8 жыл бұрын
so what happens when they win? is it established that they will actually take your junk or other items inside the workshop?
@oxhorn
8 жыл бұрын
Yes, they will raid your settlement of food, water, scrap, and caps. Not all of it, just a small percentage.
@Jimboola
8 жыл бұрын
On my survival game I have just one settlement, Hangman's Alley. It produces a decent amount of food & water (for me) but has NEVER EVER been attacked. Not once. Although I am level 74 & have been playing for a good while! I believe that is because I have NO settlers. I have Sheffield, Vault-Tec Rep & Piper with 3 robots & 2 dogs. I think because I don't have an 'actual' settler the game does not attack. It's an odd dynamic!
@oxhorn
8 жыл бұрын
That's correct--you need at least 5 settlers to get attacked.
@hellraider2006
8 жыл бұрын
Great video. But THAT info is propably even more important than how to calculate an attack that will never happen. Is that part also proven by code? Because then I would finally be able to get a nice Minuteman artillery coverage. BTW, the Nuka Gang Members also count as settlers. So do named settlers. I can attest to both of that myself. Short question: What exactly constitutes as a "settler". Regular are obvious. Nuka-Raiders and named ones I can attest count as well. I can guess that dogs and companions don´t count. So do pure robot settlments not get attacked? Longer Question: What about a settlement with say 50 Robots, No defense, beds or equipment bare the standard protectron chassis. Let it produce 300(50*6) Food and water and connect all other settlements with it and you got more than enough resources that you don´t need to farm anywhere else. Also wouldn´t make that the other settlements invincible as well. Lowest between 0(0 Food+0 Water) and 100 + 1w100 equals 1w100 for attack. 100(Def from Turrets) + 1w100 equals 101-200 def. The attack should always fail then or did I miss anything? Final Question: Do robots complain to Preston? I usually put every named settler via "setpv bAllowMove 0" in one settlement (Vault 88) and make one big robot trade hub (for the robot provisoners, I usually I only need to loot the attackers corpses once they are done) and be done with it. Prestons "settlement needs help" quest don´t trigger below 3 populated settlements. Funny Idea: Settler: "Do you know that farm where everything is done by robots" Me: "Yeah, that´s Spectacle Island. Where do you think your food comes from?" While the 5 settler limit is something I didn´t know and hope it´s true (especially if robots don´t count) a small piece of info I am able to guarante: 0 Inhabtiants means 0% attack chance. I don´t need caps, I got bottled water for trade. ;) Spectacle Island is more or less my ATM-Machine. About 500 Bottled Water every 24 hours means about 8000 caps every time I come to collect.
@PCGamingGoodies
6 жыл бұрын
So assuming workbench is empty, to ensure 100% success in settlement self-defense in your absence, the defense roll must not be lower than 150 and the attack roll must not be higher than 150. That means your defense + population must be at least 150, and your food + water must be at most 50 (150 minus the 1 to 100 random number, which is at most 100). Example: 25 food, 25 water, 25 people, and 125 defense. Has anyone tried this out, and do you really get 100% successful self-defense?
@zacharystitt3992
3 жыл бұрын
Hey Ox. Can you make each settlement a Raider settlement? I mean rebuild the settlements like raiders would? To make money and be a slave trading post and so on?
@australisplays7615
8 жыл бұрын
Wouldnt another way to keep setlement attacks down be to Build 1 Place that Provides food and water and then link that settlement to your other settlements with local leader, the other settlements wouldnt produce any food (or not enough to cover their needs) and thus pull Food/water from your Food/water Producing settlement?
@oxhorn
8 жыл бұрын
Yes, but your settlers will still complain about not having food and water at connected settlements.
@glez13gt
8 жыл бұрын
But isn't that just a cosmetic problem? As in they just say the lines but their happiness isn't affected and the numbers in the display become green, or do they actually care and happiness goes down?
@oxhorn
8 жыл бұрын
Yes, it is just a cosmetic problem.
@SiriusMined
8 жыл бұрын
Nice. I just wish there was a way to automatically send your excess food and water to one place.
@davidandrex2
8 жыл бұрын
I understand the attack math but what about having so many attacks starting that you physically cant get to all attacks in time even though you have all the att/def caps met? Im on Xbox One and im having around 3-5 settlements hit per day(with all the defense req. met) and simply fast traveling to the first 3 takes so much game clock time that another day passes and it starts over. Its just a constant cycle of attacks. Is it that i just have too many settlements in the game or is my save broken or what? its frustrating having all the notifications and know half of them will fail lol
@nimb321
7 жыл бұрын
I tend to just fly by my attacked settlements via vertibird, so that the full strenght of my defenses mows down any attacker. Most of the time I don't even have to land unless I want to loot the fallen enemys or hear my people brag about their success ;)
@Fools_Requiem
6 жыл бұрын
I have a 100% chance of none of my settlements getting attacked unless I fast travel there and there's a random spawn nearby. Thanks to mods, I never have to worry about settlement attacks while I'm out liberating the Commonwealth of it's junk.
@fraserskomorowski2311
8 жыл бұрын
What resources are considered food or water? Is it just the stuff you can grow and does water mean only purified or does dirty come into it as well? The wiki indicates that "non-Chem healing items" are considered food making those radiated or booze items you collect a part of the food count. Confusing
@oxhorn
8 жыл бұрын
I think the wiki is wrong. Just food you can grow, and just purified water counts.
@dragnridr05
7 жыл бұрын
One of the best ways I haven't lost an attack is that I built up walls the attackers can't get through and have hellatious defenses that not even a behemoth could survive. I won't even have to show up and the settlers can rest easy at night.
@christopherthompson8609
8 жыл бұрын
So... would it be better, then, to set up a vacuum hopper on the workbench and either do a short hop to a conveyer storage or, like you have/had in your mechanist's lair, an ever-moving conveyer belt so that the resources in the workbench stays low?
@oxhorn
8 жыл бұрын
The vacuum hopper will not work unless you are in town. When you fast travel into a town with a vacuum hopper, it will always be working, because it was not working while you were away.
@shamen-
8 жыл бұрын
7:08 Just because the attackers roll above the 150 cap doesn't mean that they lose. An attack roll of 100 with max attack strength still beats out a roll of 29 from your settlers, even with max defense. Attackers have no guaranteed zone. Mathing it out, a roll of 49 or lower is required for your settlers tolose in a double maxed out situation. so 51% of the time you'll win. (50 roll from settlers up to 100 roll.) This also means that if your settlers do roll a 49, there's a 51% chance that the bandits win, they still get those 50-100 rolls, just alll of them are valued at 50, which beats out the 49. Subsequently 48 is beaten 52% of the time, by a roll of 49 on bandit side or higher. This continues until a lowly roll of 1 from your setlers, which is beaten 99% of the time( bandits can roll a 1 and lose to defender). Averaging out the percentages from 1 to 49, you get a 75% chance of 49% that you lose in a maxed out situation. Bringing us to a 1 in 3 chance (36.75%) that we lose.
@shamen-
8 жыл бұрын
You can random roll a 100+ 100 attack strength. It is valued at 150. Just because you don't get the full value out of the roll's power doesn't mean that it's not still statistically going to happen. the bandits basically get rolls of 1-49 and then 51 different rolls of 50.
@dufusdodge5732
6 жыл бұрын
Are there any mods for Xbox one that let your settlement be successfully defended even if I don't show up as I have a really high defense but if I'm not helping defend the settlement the settlement is damaged
@jon4069
7 жыл бұрын
So, what's the time frame to defend? Like on survival, where one cannot fast travel.
@Thebeautiful11
8 жыл бұрын
Well, showing up is half the battle! I think that it mimics life in that you can be prepared, but you might also still lose. Raiders are all over the place, and it's unrealistic that we get to kill them all day but never get defeated in an environment like fallout. Losing settlement attacks is the closest the game can get you to a vulnerable experience. I like it even though I dont like that the message to go to the attack isn't very notable. I got attacked while building another settlement. If they won't show me the attack alert in build mode, then I shouldn't be attacked. I came out of build mode and first note I got was that I failed to show up and lost an attack. That made me mad. If I'm at the attack and we lose, the game needs to let me know I lost by knocking me out and having me wake up in a bed or with someone tending my wounds so I know why I lost.
@FresoVODs
7 жыл бұрын
www.nexusmods.com/fallout4/mods/4106
@wiredwrong760
8 жыл бұрын
I wonder if Resources in Containers but not the Workshop effect the stats on the math of this as a means to know if you should just empty the Workshop of everything and keep things away from other stuff? I mean besides Food and Water if the other resources effect attack rate and win lose for defense and things of that nature.
@slightlyjaded8098
7 жыл бұрын
I think your math is wrong, by my figuring there's a 75% chance of the attackers winning in that 100-150 region. The attacker can still roll over 150 total, it just counts as the 150 max.
Пікірлер: 337