Guide/Patching NPCs Armor And Clothing

Last updated for version `1.8.0-BETA-7`

*Main article:* Horizon Wiki

This guide explains how 1.9 LL's work for armor on NPCs in Horizon. This is a new standard which will be followed for all NPCs in the game.

## Preface

In vanilla FO4, the npc outfits and armor are a complete mess. There are LL's named all sorts of names, and absolutely no standard for how NPCs are setup and geared. This makes external armor created by authors to have random and different ways to gear NPCs. All of this is a confusing mess, and makes patches difficult to make in some cases.

The goal of these changes below are to create a new "standardized" system for how NPCs are outfitted, so that you know exactly which LL's do what, and how they are ordered.

## Standardized armor form

Standardized armor form consit of 3 types;

* `LH_Armor_LIST`
* `LH_Armor_SET`
* `LLA_Outfit`

### LH\_Armor\_LIST

An `LH_Armor_LIST` is a group of pieces that will randomly select only 1 of those pieces. In the example, you can see raider hoods. The list will randomly select 1 hood from this LL. You can even use other `LISTS` inside the list (as long as you know it won't create an endless loop!)

You should always have "0" for "Chance None" in `LISTS`.

It's recommended to not edit the Horizon `LISTS`, unless you are sure you know what you're doing.

### LH\_Armor\_SET

An `LH_Armor_SET` is 1 fully completed outfit. It uses the "USE ALL" flag because the outfit is made of multiple pieces, which are all selected. rom here, you can manually choose specific armor pieces, or use `LISTS` to pull random pieces (random hats, etc.). You'll note you can also choose random "Chance None" values. In the example, there's a 50% chance that it won't have a left arm.

If you wish to add custom patched armor to an NPC, it is highly recommended to create your own `LH_Armor_SET` in your patch. This way, you can customize the entire set yourself, and then later on it can be injected to the `LLA_Outfit` list of choices (which you'll see next..)

It's recommend to not edit Horizon's default SETS.. you should instead make your own armor SETS.

### LLA\_Outfit

This LL is directly connected to the NPC's "Outfit" form (called an `OTFT`). You should never edit an `OTFT` form directly in Horizon. and you should definitely never edit NPCs directly to add armor. You do not need to make your own `LLA_Outfit` forms, unless you are adding brand new NPCs in a patch yourself.

The `LLA_Outfit` is created to make outfit injection easier. The `LLA_Outfit` is a random selection of `LH_Armor_SET` forms for that specific NPC type. This means the `LLA_Outfit` can choose one of any random outfit in it's list, by choosing a random `LH_Armor_SET`. The `LLA_Outfit` can have as many SETS injected as you want, as long as you feel they look appropriate for that specific type of NPC.

Ultimately, an armor patch that wants to add an outfit to, say, a specific raider, would inject an `LH_Armor_SET` into that specific `LLA_Outfit` form used for that specific type of raider. And that's it, you're done. Then, when that type of raider spawns, it will randomly select one of those full outfits from the `LLA_Outfit`. The green bar indicates how an injected `LH_Armor_SET` might work in the list (As with any list, the "Chance None" should always be 0).

On a side note, technically speaking the same injection method could be used for an `LH_Armor_LIST`, but I don't recommend it unless you are absolutely sure you just want to inject, for example, 1 hat into a hat list, or something very vague like that. Keep in mind some of Horizon's `LA_Armor_LIST` forms are very specific for certain types of NPCs.

## Keep combat balanced

Horizon v1.9 now uses a new armor standard, in order to keep combat balance more accurate for NPCs. This helps keep things like "headshots" feeling semi-realistic based on the NPC's outfit.

If you want your NPC outfit to follow a proper balanced guideline, NPC outfits should only be either:

* A) – Light clothing/armor, and (optional) simple hat (or glasses, etc.) - (These NPCs have 0 DR) or
* B) – Heavy armor and a heavy helmet (always both together!) - (These NPCs have variable DR)

Why? Because DR is based on your total value, NPCs balance much better if they are only one, or the other. Not a mixture. Unfortunately FO4 doesn't work well with weird random mixtures of armor. An NPC will balance best if it is considered "light or no armor", or "heavy armor and heavy helmet." It also gives a clear indication to the player if the NPC is going to be tough or not. In the end, this system works very well, so you'll just have to trust me on this. It also makes the gameplay more interesting, and realistic based on what you visually see from an NPC. If some NPC looks tanky, you'll know he's tanky. When he's wearing a coat and a hat, you'll know he probably has little to no armor at all.. but he might shoot more accurate.

When you create an `LH_Armor_SET` yourself, make sure you put it on an appropriate `LLA_Outfit`. An `LLA_Outfit` should be only light, or only heavy. In Horizon, NPCs are specifically either "light/no armor" or "heavy armor." Choose appropriately for that NPC type. Example: A Raider Pyro always has heavy armor and a helmet. A Raider Scum always has light clothes and possibly a cloth hat.

## Tips of Armor Patching

* All clothing, hats, and helmets should have a base value of "0" for ALL defenses!
* All equipment should use the proper Horizon keywords/AP slots.
* All clothing, hats, and helmets should use `dn_Clothes` for the `INNR` (and nothing else).
* Mods or patches should never change Horizon's `INNR` edits (if you need more keywords/tags, tell me).
* Double check the biped slots and "armor addon" to make sure they fit with Horizon gear.

In FO4EDIT, you should always "compare" your patched item with a similar Horizon item. This way you can just easily drag and drop the keywords, etc. For example, if you're adding a hat, compare it to a similar hat in Horizon, and set the stats the same, and have the same Horizon keywords, etc.

It should be noted, that in Horizon all clothing/hats/helmets have 0 DR and 0 ER, and no other defenses in the base item. Why? Because all armor values are now added strictly from upgraded attachments. The base item needs to be 0 for everything in order to balance the system properly (it also makes it easier for the patch author to just set everything to 0.) Items such as helmets will often come with an attachment which gives them DR... but the base item itself should always start at 0 DR.

Individual armor pieces (legs, arms, chest) work differently, and you should compare them to something like Combat Armor pieces.

## Settler body armor template

In 1.9, settler outfits are self-contained for balance purposes and less mess when assembling settler outfits. You can, however do this in 1.8 if you want to make custom settler outfits.

All settler outfits always have those exact defensive stats and (usually) no attachments at all. Just artwork + stats. That's it. Nothing to balance, or mess with. Material swaps and color-index swaps can be done in the template under properties.

Every body piece must have 1 body slot + 5 armor slots. Always. If the outfit doesn't use armor pieces, just use the "invis" slots for the pieces you don't use. This example shows an army outfit with just a combat chest slot, for a light-weight looking army outfit. If you want a heavy armor set, just change the model-addon slots.

The only difference you'll need to worry about, is if the piece of clothing requires a separate "gloves" slot. This is easy tho, as you just add that addon too, and then add the `LHAND` and `RHAND` slots in the biped data.

Friendly NPCs require this system for settler outfits, due to many reasons. The biggest reason is that friendly NPCs who can swap armor, do not benefit properly from multiple dynamic sources of DR. So in order for settlers to scale their defenses automatically (based on workshop skills), it requires their base armor be very simple. This has the added bonus of actually making it easier to visualize/compare all outfits in xedit. Everything for body pieces is in 1 item, except for stuff like helmets, goggles, etc. And all of those accessory items are always 0 DR, so those settler items are very simple to balance.

## Material swaps

This is the preferred method for material swaps, as it doesn't require any attachments at all. Settler armor is supposed to be balanced extremely simple, so its basically base item + color swaps. The less attachments the better, and the easier it is to deal with for settler-only items.

If you really need to use mod attachments on the armor for some reason, you can. Just make sure the item has the appropriate keywords and attachment slots so that the mod attachment actually locks in. Otherwise, it's far simpler to just have that particular settler-only outfit to be specifically 1 color. As the example above, is a BOS armor outfit, which always has BOS colors and decal. Keep in mind that light/medium/heavy armor pieces do not actually require mods, they can specifically be set with the model addon.

Because these items are not useable by players, they can never be modded in a workbench (which is exactly what we want.) Settler-only items should be simple and unmatched by player armor, so that the player never has to worry about manually equipping settlers with "better" stats. The upgrades automatically come from workshop skills.

Luckily for most patch authors, most of the body clothing that people patch in, doesn't usually want armor pieces visually on top of it, so you usually can just use the invis model slots and be done with it.

## See Also

* Guide/Patching Armor And Clothing
* Guide/Modding Horizon
* FO4EDIT

## References

1. ↑ https://discord.com/channels/436824471295361025/841408889794461737