FANDOM


HAM 3.3, 3.4 and 3.5 all expanded a very crude and basic idea from JA2 1.13, where some sectors on the map can boost your performance on things like training or doctoring or repairing, etc. HAM 3.6 takes this to the next level, allowing a huge amount of freedom in redesigning the Strategic Map, and in turn creating new depth for the Strategic portions of the game. Some sectors become invaluable, while others provide opportunities at a significant risk. The choice to use (or not use) facilities is now an important decision, and can effect your campaign considerably.

This is achieved through a radical reworking of the FacilityTypes.XML file, located in the \Data-1.13\TableData\Map\ folder. Just like weapons, it is possible to add or remove facilities at will, creating mods for the campaign map with far-reaching implications and extra interest for players.


Basic Structure and Concepts Edit

As was established in HAM 3.5, the game now contains two important files for the facility system:


  1. FacilityTypes.XML defines various types of facilities, including their names and their effect on your mercs. Each "type" is denoted by a unique index number, just like items in Items.XML.
  2. Facilities.XML is then used to place down facilities on the strategic map, so you can pretty much put any facility wherever you want. This file refers to the unique index numbers in FacilityTypes.XML.

The player can change the properties of any facility by editing the first XML, and can move it around the map (or remove it completely, or add more of it) using the second XML.

Benefits Edit

A facility can have several different kinds of effects all at once. Primarily, facilities are used to "boost" performance of mercs who are "on assignment", I.E. performing a strategic action like "Doctor" or "Repair" or any sort of training, etcetera. HAM 3.6 actually adds two completely new assignments as well, called "Staffing" and "Resting" which can only be performed at facilities (and only in some facilities).

For instance, a character can normally "Doctor" other mercs back to full health. However, when the character is in the same sector as a Hospital facility, he can opt to use the Hospital to increase his performance, making the healing process go much faster than normal. This is not mandatory though - the character can opt NOT to use the Hospital at all even when in the same sector.

Risks Edit

Of course, as of HAM 3.6, the ability to boost your performance at any facility usually comes at a price (an hourly cash expenditure), and is often somewhat risky to the character. For instance, for each hour of Doctoring at a Hospital you will be required to pay several hundred dollars, and your doctor could get injured or even lose health permanently through infectious diseases. The balance between risk and reward helps prevent facilities from becoming uber-powerful exploits - you'll need to weigh the risks against the profit.


FacilityTypes.XML - Basic Structure Edit

This file allows us to create new kinds of facilities, and determine exactly what their functions will be, how helpful they are, and how risky or costly it is to use them.

The structure of this XML is more complicated than it was in HAM 3.5, but retains its basic simplicity. You only need to add information that is entirely relevant to the facility you're creating, so while there are a LOT of tags you could add, a simple facility entry will only require a small number of them. Naturally, you can also create very complex and very useful facilities, which employ most (if not all) the available tags, if you so desire.


Skeleton Structure Edit

A single facility entry is comprised of 5 distinct sections.


  1. General Information: This includes the facility's name, and the number of characters who can use the facility simultaneously. In theory, you can create facilities that only contain a "General Information" section, in which case the facility has no use but will still be listed when looking at the sector information box (I.E. flavour without function).
  2. Militia Training Section: Included if the facility allows training militia, and if so, how many trainers are allowed to work simultaneously, and how quickly the trained goes.
  3. Assignment Sections: This section contains information about a single "assignment" that can be performed at this facility - anything from "Doctor" duty to "Practice Agility" to "Resting". When a merc is in this sector, the player can send him to do this specific task at the facility, instead of outside in the open. The basic part of this section determines how much bonus (or penalty) your character gets for doing this assignment at the facility, how much money it costs per hour (if any), and how many characters can perform the same assignment at this facility simultaneously. If you choose to add NO assignments to your facility, then it becomes "just for flavour". Conversely, you can add as many as 33 different assignments, covering all possible assignments in the game if you want, so that characters literally can do EVERYTHING at this facility, instead of outside.
  4. Conditions Section: This is placed INSIDE an Assignment Section, and tells the game the minimum requirements for being able to perform this assignment. For instance, you can tell the game that "only characters with at least 80 Wisdom can perform this assignment", meaning that you'll need a smart merc if you want to get the bonuses. There are currently around 12 different "conditions" you can use for this purpose, and any combination is fine. You can also choose not to place ANY conditions, if you want to create a facility assignment that anyone can perform.
  5. Risk Sections: These are placed INSIDE an Assignment Section, and govern possible events that can occur while the character is performing the assignment. There are many kinds of risks you can use, like the risk of permanent stat loss, loyalty loss, or even occasional drunkness. These serve to offset the benefits you get when using the facility. You can also create "risk" events that are actually beneficial, so that the character has a certain chance of actually getting an extra unexpected bonus. Again, this is NOT mandatory - you can create facilities that have no risks at all, if you so desire.

Skeleton Structure in XML Edit

Here's a few examples of very basic facilities, in XML format. I'll be creating a Motel facility, step by step. Each step adds a certain functionality or extra effects. The final result will be a facility that allows better fatigue regain while resting and sleeping, albeit at a significant cost. It will also have a certain chance of bumping the character's morale up for a while.


Step 1:

<FACILITYTYPE>
   <ubIndex>1</ubIndex>
   <szFacilityName>Small Motel</szFacilityName>
   <szFacilityShortName>Motel</szFacilityShortName>
</FACILITYTYPE>

This first step has only 5 lines, but is already a valid facility. However it is a very simple facility with no actual effect. As such, it will only appear in the Sector Information box (right click the sector on the strategy map), and do nothing else. There are no assignment sections, and so there's nothing to do at this facility. It really has no effect other than appearing in the information box.

Step 2:

<FACILITYTYPE>
   <ubIndex>1</ubIndex>
   <szFacilityName>Small Motel</szFacilityName>
   <szFacilityShortName>Motel</szFacilityShortName>
   <ubTotalStaffLimit>2</ubTotalStaffLimit>
   <ASSIGNMENT>
      <ubAssignmentType>REST</ubAssignmentType>
      <ubStaffLimit>2</ubStaffLimit>
      <ubPerformance>120</ubPerformance>
      <ubSleep>140</ubSleep>
   </ASSIGNMENT>
</FACILITYTYPE>

I've added a single Assignment Section to this facility. Now, mercs can choose the facility and "REST" here. In practical terms, this is the same as normal "Resting" - the character will regain his fatigue while performing this assignment, and nothing else.

The ubAssignmentType field tells us which action we're defining, in this case "REST". There are 33 options to use, from "DOCTOR" to "REPAIR_ITEMS" and so forth.

You'll notice that I've added the line "<ubTotalStaffLimit>2</ubTotalStaffLimit>" to the General Information section. This tells the game that only two mercs can use this facility at the same time.

Then there's a separate "<ubStaffLimit>" line tells us how many mercs can perform this SPECIFIC task simultaneously. In this case, since the facility is limited to a TOTAL of 2 people, and there's only one assignment, then the value of ubStaffLimit is also 2.

The "<ubPerformance>" tag is very important here. Set to 120, it means that the character will rest 20% better here than he would by normal resting.

Another tag, "<ubSleep>", is set to 140, so sleeping here will restore your fatigue 40% faster than sleeping anywhere else!

So now we've got a facility with one assignment and a great bonus associated with it. If you're ever in the same sector as a motel, you'll find it better to have two of your slowest sleepers (like Ivan) rest here rather than outside, because they'll regain fatigue much faster than normal.

Step 3:

<FACILITYTYPE>
   <ubIndex>1</ubIndex>
   <szFacilityName>Small Motel</szFacilityName>
   <szFacilityShortName>Motel</szFacilityShortName>
   <ubTotalStaffLimit>2</ubTotalStaffLimit>
   <ASSIGNMENT>
      <ubAssignmentType>REST</ubAssignmentType>
      <ubStaffLimit>2</ubStaffLimit>
      <sCostPerHour>100</sCostPerHour>
      <ubPerformance>120</ubPerformance>
      <ubSleep>140</ubSleep>
      <CONDITIONS>
         <ubMinimumLoyaltyHere>30</ubMinimumLoyaltyHere>
      </CONDITIONS>
   </ASSIGNMENT>
</FACILITYTYPE>

I've added two important tags to this facility, to make it more interesting.

The first tag is <sCostPerHour>. It is set to 100. For every hour your use this facility, you will be required to pay $100. The money you owe will be paid directly from your account at the end of each day. If you cannot afford to pay it, you will find that your loyalty will drop a little (all across the map), and you will not be able to use any other facility that requires payment until you manage to pay off this debt.

Additionally, I've added a Conditions Section. Note that it is INSIDE the assignment section, as it only refers to this specific assignment ("REST"). The condition stipulates that you must have at least 30% loyalty in the town where you've placed the Motel facility, otherwise the owner will simply not let you use the facility at all.

Step 4:

<FACILITYTYPE>
   <ubIndex>1</ubIndex>
   <szFacilityName>Small Motel</szFacilityName>
   <szFacilityShortName>Motel</szFacilityShortName>
   <ubTotalStaffLimit>2</ubTotalStaffLimit>
   <ASSIGNMENT>
      <ubAssignmentType>REST</ubAssignmentType>
      <ubStaffLimit>2</ubStaffLimit>
      <sCostPerHour>100</sCostPerHour>
      <ubPerformance>120</ubPerformance>
      <ubSleep>140</ubSleep>
      <CONDITIONS>
         <ubMinimumLoyaltyHere>30</ubMinimumLoyaltyHere>
      </CONDITIONS>
      <MORALE>
         <ubChance>200</ubChance>
         <bBaseEffect>15</bBaseEffect
         <ubRange>10</ubRange>
      </MORALE>
   </ASSIGNMENT>
</FACILITYTYPE>

Finally, I've added a risk. Actually, it's not much of a danger, it's actually an hourly chance to increase the character's morale, while he is RESTING at this Motel. I won't go into too much detail explaining how this works, but the numbers set here will give the character a 20% chance, every hour, to get a Morale boost of 5 to 25 points.

Note that this is placed INSIDE the Assignment section, so the character will actually need to REST at the Motel to get this chance.


So now we have a simple facility that can help our mercs rest faster, and also has a chance to boost their morale. Of course, we need to pay $100 an hour to use this facility, so the player needs to consider this as an effective-but-costly option.

As you read the rest of this manual, you'll quickly understand how this simple system can create some VERY complex and interesting results, definitely more exciting than a Motel.

FacilityTypes.XML - Advanced StructureEdit

The example of the Motel above is a very simple facility, barely scraping the full potential of the system. It showcases the four "Sections" of the facility structure, but isn't nearly close to explaining the variety of options you can use.

When you make your own facilities, you will undoubtedly want to know what effects or restrictions you can put on them, so this part of the article is all about listing your options, and explaining how to properly organize them to make a working facility.


Main Opener/Closing Tag Edit

Each facility entry in FacilityTypes.XML begins with the Opener Tag "<FACILITYTYPE>", and ends with the closing tag "</FACILITYTYPE>". Everything else about the facility comes in between.

<FACILITYTYPE>
[... All the data goes between these tags ...]
</FACILITYTYPE>

General Info Tags Edit

These come directly after the Opener tag, and before any Assignment sections (see below). The most important General Info tag is "<ubIndex>", which MUST be present and unique for each and every facility.

<FACILITYTYPE>
   [... General Info Tags come first ...]
   [... Rest of the data goes here ...]
</FACILITYTYPE>
Tag Range Explanation
<ubIndex> 1 - 255 This is a unique number identifying the facility. We can use this number when placing facilities on the map in the file "Facilities.XML".

The <ubIndex> tag MUST BE THE FIRST TAG, which means it must come immediately after the <FACILITYTYPE> tag (see above).

This tag is absolutely mandatory. If you fail to place one, or to give it a unique number, you will have errors in the game.

<szFacilityName> Up to 30 letters

This is the full name of the facility. It is displayed on the Sector Information box, and will also appear in the assignments menu when selecting which facility to use.

<szFacilityShortName> Up to 10 letters

This is a short name for the facility. It is displayed in the Character Info panel (top left of the strategic screen) when the character is using this facility.

<ubTotalStaffLimit> 0 - 32 The total number of mercs who can use this facility simultaneously, regardless of which assignment they are performing.

Please note that each assignment has its own Staff Limit (as you'll see below). If you want, you can set the ubTotalStaffLimit value lower than the total of the individual Staff Limits, but not higher.

Setting this value to 0 means that the facility does not allow any mercs. In such a case, "Assignment" sections are not relevant at all. The facility will not appear on the assignment menu. Please note that Militia training can still be allowed (see below) regardless of this limit (it has its own limits).

Militia Training Tags Edit

There are four tags governing militia training. As of HAM 3.5, only facilities can allow militia training in a sector. A sector that does not contain at least one such facility will NOT allow any sort of militia training at all.

These tags come just after the General Info tags. You can skip the Militia training tags completely if you don't want this facility to enable militia training.

<FACILITYTYPE>
   [... General Info Tags ...]
   [... Militia Training Tags ...]
   [... Rest of the data goes here ...]
</FACILITYTYPE>
Tag Range Explanation
<ubMilitiaTrainersAllowed> 0 - 32 The number of Militia trainers that can work here simultaneously. This completely ignores the "<ubTotalStaffLimit>" tag (see above).

Setting this value to 0 means that Militia training is not allowed by this facility. If there are no facilities in the sector which explicitly allow at least one militia training, then the sector does not allow militia training.

<usMilitiaTraining> 0 - 10000 A percentage value controlling the speed of any Militia training in this sector.

100 = Normal speed. 50 = Half Speed. 150 = 50% faster, and so on.

<ubMobileMilitiaTrainersAllowed> 0 - 32 The number of Militia trainers that can work here simultaneously. This completely ignores the "<ubTotalStaffLimit>" tag (see above).

As of HAM 3.6, Mobile Militia training is a separate assignment from normal training. This allows you to train Mobiles before the city is full of high-quality troops.

Setting this value to 0 means that Mobile Militia training is not allowed by this facility. If there are no facilities in the sector which explicitly allow at least one mobile militia training, then the sector does not allow mobile militia training.

<usMobileMilitiaTraining> 0 - 10000 A percentage value controlling the speed of any Mobile Militia training in this sector.

100 = Normal speed. 50 = Half Speed. 150 = 50% faster, and so on.

Assignment Opener/Colsing Tag Edit

Next up we define the various assignments that can be performed at this facility. These are largely the same as "normal" assignments like "Doctor", "Repair", "Practice", etcetera. The difference of course is that when a character is performing the assignment at the facility, he/she stands to gain a performance bonus, and may be subjected to any risks involved.

Each assignment section begins with the Opener Tag <ASSIGNMENT>, and ends with the the Closing Tag </ASSIGNMENT>. The rest of the assignment-specific data comes in between these two tags.

You can have SEVERAL assignment sections for every facility. For instance, if you want a facility to give bonuses to Strength Practice and Strength Training, you'll need two separate assignment sections detailing the bonuses and penalties for each activity.

<FACILITYTYPE>
   [... General Info Tags ...]
   [... Militia Training Tags ...]
   <ASSIGNMENT>
[... Tags regarding a specific assignment ...]
</ASSIGNMENT>
[... You can have up to 33 separate assignment sections ...]
</FACILITYTYPE>

General Assignment Effects Edit

In this section, which starts right after an <ASSIGNMENT> tag has been opened, we will place information about this assignment and the general bonuses we can get from it.

First and foremost, we'll need to tell the program which assignment we're talking about, using the <ubAssignmentType> tag, and then define the basic effects that will happen when the character receives this assignment.

<FACILITYTYPE>
   [... General Info Tags ...]
   [... Militia Training Tags ...]
   <ASSIGNMENT>
      [... General Assignment Effect Tags ...]
      [... Rest of Assignment Data goes here ...]
   </ASSIGNMENT>
   [... You can have up to 33 separate assignment sections ...]
</FACILITYTYPE>
Tag Range Explanation
<ubAssignmentType> See below for a complete list Tells the program which assignment we are defining.

When the player uses the assignment menu and selects facility duty, he will get a list of all possible assignments that we have defined. After choosing one of these, the character will begin performing the assignment.

If an assignment has not been defined for this facility, it will not appear as an option.

This tag MUST COME IMMEDIATELY AFTER the opener tag "<ASSIGNMENT>". If the tag is missing, the program will probably have an error...

Please note that most of the tags in this section behave differently depending on the assignment you've chosen! Some tags are completely useless for some assignments.

<szTooltipText> Up to 300 characters

In this optional field, you can write a short description of this assignment. Players will be able to see this description as a tooltip, when they hover their mouse over the assignment's name in the Assignments Menu.


If you do not add this tag, the assignment will have no tooltip.

<ubStaffLimit> 0 - 32 This determines how many characters can perform this specific assignment at the same time.

If the facility only has one possible assignment to perform, you'll want <ubStaffLimit> to equal <ubTotalStaffLimit> (see above).

However, if there are several assignment to perform here, can set this LOWER than the <ubTotalStaffLimit> value. This means that while X characters can work at the facility in total, only Y can perform this specific assignment, and only Z can perform some other assignment.

Also, the total of all <ubStaffLimit> tags does not need to equal <ubTotalStaffLimit>, but it shouldn't be LESS than the <ubTotalStaffLimit>.

<sCostPerHour> (-10000) - 10000 Sets the amount of money you must pay to perform this task, PER HOUR. This is only paid if the merc on assignment is not asleep.

These costs accumulate over the course of the entire day, and are paid off at midnight. If you do not have enough money by midnight, you'll have an outstanding debt. This causes a loyalty decrease until it is paid off! Also, any facility that has a running cost CANNOT BE USED while you have an unsettled debt!

Setting this to a NEGATIVE value means that the merc performing this assignment will actually GENERATE money every hour. This is a steady source of income that is not affected by anything. As long as the merc is awake and working, he will produce this much cash every hour.

<usPerformance> 0 - 10000 Probably the most important tag, this is a percentage value that influences the speed/efficiency of the assignment. The effect depends heavily on the assignment itself.

For instance, if the assignment is PRACTICE_STRENGTH, and the usPerformance value is set to 150, then any merc performing this task at this facility will gain strength 50% faster than normal.

Conversely, let's say that the assignment is DOCTOR, and the usPerformance value is set to 50. In this case, a merc performing this assignment here will only heal other mercs at HALF the normal speed.

For the "REST" assignment, this governs how quickly a merc regains his fatigue.

Also note that this value is completely irrelevant if the assignment is "STAFF" or "AMBIENT", because these two do not have a primary function to be boosted.

<usFatigue> 0 - 10000 A percentage value governing how quickly a merc becomes tired while performing this assignment.

100 = normal. 150 = Merc becomes tired 50% faster. 50 = Merc can work twice longer before requiring sleep.

Also, if you set this to 0, then the merc DOES NOT TIRE while performing the assignment.

<usSleep> 0 - 10000 A percentage value that determines how quickly a merc regains his fatigue while sleeping on the job.

100 = normal. 150 = 50% faster fatigue regain. 50 = Sleep takes twice as long!

Naturally, 0 = Sleep doesn't help at all.

Please remember that the player can remove the character from facility duty for purposes of sleeping, and so can easily avoid getting this penalty (if it is a penalty). You can still use this as a penalty, especially when this tag is part of an AMBIENT assignment section. When this is done, all characters in the sector will suffer the sleep penalty regardless of what they are doing. See more on this below.

<usKitDegrade> 0 - 10000 A percentage value that determines how quickly a merc depletes the kit he is using for this assignment.

Naturally, this tag only has effect if the <ubAssignmentType> is DOCTOR, REPAIR_ITEMS, REPAIR_ROBOT, or REPAIR_VEHICLE.

100 = Normal. 150 = Kit degrades 50% faster (bad). 50 = Kit degrades half as fast (good!).

You can also set it to 0 to prevent the kit from degrading at all. The character still needs a kit to start the assignment, but it won't really be used up. This is good if the facility is supposed to contain tools that the character can use instead of depleting their own equipment.

<ubMaximumMorale> 1 - 100 This is the absolute maximum morale a character can have while performing this assignment. If at any time the character has more than this, it will be reduced.

100 = No real limit. 50 = Merc can never have more than stable morale.

Watch out for very low values. Also, the limit usually has little importance if it is set higher than 50, because the game already slowly decreases morale towards 50 every hour...

Therefore, this limit should normally be used to force mercs to have a morale LOWER than 50.

<ubMaximumFatigue> 1 - 100 This is the absolute maximum fatigue (breath) a character can have while performing this assignment. If at any time the character has more than this, it will be reduced.

A resting or sleeping character CANNOT replenish his fatigue above this value! If sleeping, he'll be automatically woken up when this limit is reached.

Please note that normally, a character wakes up from sleep when he reaches 95 fatigue.

100 = No real limit. 80 = Merc can never have more than 80 fatigue. And so on.

Watch out though, if you set this too low, you can render a merc incapable of doing anything. Most mercs will become "too tired to move" at around 30 fatigue.

Possible Assignments for the <ubAssignmentType> Tag Edit

This is a list of values for the <ubAssignmentType> tag. Please note that each ASSIGNMENT sectiion must have a DIFFERENT value, otherwise you'll be messing up your data.

Value Explanation
DOCTOR When performing this task, the character heals other mercs who are set to "PATIENT".

The <usPerformance> tag affects the speed of healing.

A Medical Kit is required for this task. The <usKitDegrade> tag affects the speed at which the Medical Kit is depleted.

REPAIR_ITEMS When performing this task, the character repairs his own equipment, then proceeds to repair the equipment of every other merc in the sector.

The <usPerformance> tag affects the speed of repair.

A Tool Kit is required for this task. The <usKitDegrade> tag affects the speed at which the Tool Kit is depleted.

REPAIR_VEHICLE When performing this task, the character repairs a specific vehicle in the same sector.

The <usPerformance> tag affects the speed of repair.

A Tool Kit is required for this task. The <usKitDegrade> tag affects the speed at which the Tool Kit is depleted.

REPAIR_ROBOT When performing this task, the character repairs the robot. If the robot is not in the same sector, the option will not appear at all.

The <usPerformance> tag affects the speed of repair.

A Tool Kit is required for this task. The <usKitDegrade> tag affects the speed at which the Tool Kit is depleted.

PRACTICE_STRENGTH

PRACTICE_DEXTERITY

PRACTICE_AGILITY

PRACTICE_HEALTH

PRACTICE_MARKSMANSHIP

PRACTICE_LEADERSHIP

PRACTICE_EXPLOSIVES

PRACTICE_MECHANICAL

PRACTICE_MEDICAL

When performing this task, the character is working alone to increase a specific skill. There is also a chance to improve Wisdom, which cannot be practiced otherwise.

The <usPerformance> tag affects the chance of improving in the relevant skill (and in Wisdom, respectively).

STUDENT_STRENGTH

STUDENT_DEXTERITY

STUDENT_AGILITY

STUDENT_HEALTH

STUDENT_MARKSMANSHIP

STUDENT_LEADERSHIP

STUDENT_EXPLOSIVES

STUDENT_MECHANICAL

STUDENT_MEDICAL

When performing this task, the character is working together with a Trainer, to increase a specific skill. There is also a chance to improve Wisdom, which cannot be practiced otherwise. Only the Student's skill is improved (not the Trainer's).

The <usPerformance> tag affects the chance of improving in the relevant skill (and in Wisdom, respectively).

TRAINER_STRENGTH

TRAINER_DEXTERITY

TRAINER_AGILITY

TRAINER_HEALTH

TRAINER_MARKSMANSHIP

TRAINER_LEADERSHIP

TRAINER_EXPLOSIVES

TRAINER_MECHANICAL

TRAINER_MEDICAL

When performing this task, the character is working together with one or more Students, attempting to increase their skill. The Trainer stands some chance to improve Leadership and Wisdom as a by-product.

The <usPerformance> tag affects the chance of improving the student's skills, and/or for the Trainer to gain Leadership and Wisdom.

STAFF This assignment does not have a primary function, and can only be performed at a facility. It is sort of an "empty template" which can be customized by the player using Strategic Effects and Risks (see below) to create benefits or dangers.

While performing the STAFF assignment, the character will fatigue as normal and require sleep.

The <usPerformance> tag is completely irrelevant, and will be ignored.

REST This assignment is similar in effect to assigning a character to a squad - the character is considered "resting", and will regain fatigue over time instead of losing it.

This is sort of an "empty template" which can be customized by the player using Strategic Effects and Risks (see below) to create benefits or dangers.

The <usPerformance> tag affects the speed at which fatigue is regained.

Naturally, the <usFatigue> tag

AMBIENT This isn't really an assignment, but it is written the same way in the XML. Any data in an assignment section that's defined as AMBIENT will affect ALL MERCS IN THE SECTOR, regardless of what they are doing.

In addition, if several facilities in the same sector have an AMBIENT effect, then all ambient effects are applied simultaneously (again, regardless of what the mercs are doing or which facility they are using).

This is used to apply over-arching effects or risks that are caused by this facility or are properties of the sector itself.

Read more about Ambient effects later in this article.

Strategic Assignment Effects Edit

While "General" assignment effects normally apply to the character that's performing the assignment, "Strategic" effects will actually add some sort of bonus that influences the strategic map or strategic values in some way.

When the character is performing this specific assignment, he is in fact "unlocking" all the listed strategic effects. If the character goes to sleep at any time, these effects disappear. That is, unless another character "replaces" him on duty. This creates the necessity to work in shifts.

Strategic effects are most closely associated with the STAFF assignment, which has no other effect without them, but you can use them to augment any other assignment as well.

"Strategic Effect" effect tags are written the same as "General Effect" tags, and normally follow them.

<FACILITYTYPE>
   [... General Info Tags ...]
   [... Militia Training Tags ...]
   <ASSIGNMENT>
      [... General Assignment Effect Tags ...]
      [... Strategic Assignment Effect Tags ...]
      [... Rest of Assignment Data goes here ...]
   </ASSIGNMENT>
   [... You can have up to 33 separate assignment sections ...]
</FACILITYTYPE>
Tag Range Explanation
<ubDetectEnemiesImmediate> 0-100

When this effect is unlocked, all enemies within X sectors away from the facility will be automatically detected, where X is the value you set here.

This will produce a circular area around the facility where enemy movement is always visible. Great for "lookout towers" with a range of 1, or possibly even a mountaintop with an even greater range.

When set to 1, all adjacent sectors (not including diagonals!) are visible. Set higher, and you'll see further.

<fDetectEnemiesDynamic> 0/1 When this effect is unlocked, the player gains "Detection" abilities in all sectors that are currently allowed for Mobile Militia Roaming. Any enemy unit travelling through these sectors will immediately be detected and shown on the map.

In general, this should allow awareness of enemy movement in the area near cities and along roads (assuming you're using the HAM Default Mobile Militia Restrictions).

Please note that if Dynamic Roaming Restrictions are turned off or otherwise nerfed, this effect can become completely irrelevant.

<fDetectEnemiesLongrange> 0/1 When this effect is unlocked, you will be able to "Detect" any enemy unit in any sector that has already been explored. This is similar to the default JA2 method where enemies in explored sectors are already visible.

Naturally, for this to matter at all, the player needs to have turned on the HAM feature No Enemy Detection Without Recon, otherwise he can already see those units by default, without needing any facility work.

<fDetectEnemiesAnywhere> 0/1 The best Detection effect possible. When unlocked, this will reveal the location of ALL ENEMY UNITS on the map. This is a very powerful effect, and should only be placed in facilities that either A) Cost a lot of money to operate, B) have very high requirements to operate, or C) are very difficult to capture.
<fCountEnemiesInWild> 0/1 When this effect is unlocked, all enemy groups in non-city sectors which are currently visible on the map will show their exact number instead of "?". Enemy groups that have not been detected will obviously not show up at all anyway.
<fCountEnemiesInCities> 0/1 When this effect is unlocked, all enemy groups in city sectors which are currently visible on the map will show their exact number instead of "?". Enemy groups that have not been detected will obviously not show up at all anyway.
<sSkyriderCostModifier> (-10000 - 10000) When this effect is unlocked, Skyrider's flight costs will be reduced or increased by X per sector, where X is the value you set here.

To make it clear, negative values reduce skyrider's cost (good!), while positive values increase his cost (bad).

<usMineIncomeModifier> 0 - 10000 This effect increases or decreases all mine output by percentage.

100 = Normal. 150 = All mines make 50% more money. 50 = All mines make HALF as much money.

Avoid extremely low values, as they can cause the game to crash!!!

<fOnlyLocalMineAffected> 0/1 This is an important tag that controls the one above (<usMineIncomeModifier>). When this tag is used and is set to 1, then the Mine Income Modifier only applies to the mine present in the same sector as the facility itself. Other mines are not affected at all.Naturally, if the facility is not in the same sector as a mine, then it will not modify income at all.If you want to facility to affect the income of all mines, simply delete this tag.

Conditions Opener/Closing Tags Edit

This part of the XML structure contains tags that determine some minimum requirements for performing the current assignment. Since it is specific to one assignment, it goes INSIDE the assignment section.

The Conditions section starts with the Opener Tag "<CONDITIONS>", and ends with the Closing tag "</CONDITIONS>".

If you do not want any conditions associated with this assignment, you can (in theory) remove the conditions section completely. However, good form would be to leave the opener and closer tags in, even if there are no tags inside. At least, this is how I do it. It would remind any future modder not to forget that these tags are required.

<FACILITYTYPE>
   [... General Info Tags ...]
   [... Militia Training Tags ...]
   <ASSIGNMENT>
      [... General Assignment Effect Tags ...]
      [... Strategic Assignment Effect Tags ...]
      <CONDITIONS> 
[... Conditions Data ...]
</CONDITIONS>
[... Rest of Assignment Data goes here ...] </ASSIGNMENT> [... You can have up to 33 separate assignment sections ...] </FACILITYTYPE>

Conditions Tags Edit

These are a set of specific tags that tell us what requirements we need to have to start an assignment. If the character does not meet the requirements, the player is notified on-screen what is lacking, although it doesn't tell the player the exact requirement value.

Feel free to omit any condition that you don't want. In fact, you don't actually need to place any conditions - just don't put in any of these tags.

Tag Range Explanation
<ubMinimumStrength> 0 - 100 The minimum amount of Strength required to perform this assignment.
<ubMinimumAgility> 0 - 100 The minimum amount of Agility required to perform this assignment.
<ubMinimumDexterity> 0 - 100 The minimum amount of Dexterity required to perform this assignment.
<ubMinimumWisdom> 0 - 100 The minimum amount of Wisdom required to perform this assignment.
<ubMinimumHealth> 0 - 100 The minimum amount of Health (CURRENT) required to perform this assignment.
<ubMinimumMarksmanship> 0 - 100 The minimum amount of Marksmanship required to perform this assignment.
<ubMinimumLeadership> 0 - 100 The minimum amount of Leadership required to perform this assignment.
<ubMinimumMechanical> 0 - 100 The minimum amount of Mechanical Skill required to perform this assignment.
<ubMinimumMedical> 0 - 100 The minimum amount of Medical Skill required to perform this assignment.
<ubMinimumExplosives> 0 - 100 The minimum amount of Explosives Skill required to perform this assignment.
<ubMinimumLevel> 0 - 10 The minimum Experience Level required to perform this assignment.
<ubMinimumMorale> 0 - 100 The minimum Morale (CURRENT) required to perform this assignment.
<ubMinimumBreath> 0 - 100 The minimum Breath (MAXIMUM) required to perform this assignment.
<ubMinimumLoyaltyHere> 0 - 100 The minimum required Loyalty in the same city. If the facility is placed in a non-city sector (or in a city that does not accumulate loyalty), this requirement is completely ignored.

Risk Tags Edit

The very last component in the facility structure is a set of tags called "Risk Tags". Each set tells the program that the facility has some chance to affect the character's attributes, either negatively or positively, every hour.

Risk tags all look alike:

[Opener Tag]
   <ubChance>#</ubChance>
   <bBaseEffect>#</bBaseEffect>
   <ubRange>#</ubRange>
[Closer Tag]

(# = replace these with actual values, of course)

The unique thing about Risk sets is that the Opener and Closer tags tell the program which of the merc's attributes is at risk here. For instance, if you start the set with "<STRENGTH>" and end it with "</STRENGTH>", then the facility has a certain chance every hour to change the character's strength, permanently.

The other three tags, <ubChance>, <bBaseEffect> and <ubRange> are always present and you don't need to change them. Only the opener and closer tags are changed, depending on which attribute you want affected.

You can have as many as 16 different sets, one for each of the attributes that can currently be affected.

You don't need to add all 16 sets of course, only add sets for the attributes you want affected. You can remove all risks from a facility if you want - in this case, remove all the risk tags completely.

To understand how to set the <ubChance>, <bBaseEffect> and <ubRange> values, please read the appropriate section, below.

Here's a list of all possible Opener/Closer Tags for Risks:


  • <STRENGTH>
  • <AGILITY>
  • <DEXTERITY>
  • <WISDOM>
  • <HEALTH> (risk of losing health PERMANENTLY)
  • <MARKSMANSHIP>
  • <LEADERSHIP>
  • <MEDICAL>
  • <MECHANICAL>
  • <EXPLOSIVES>
  • <INJURY> (risk of damage)
  • <MORALE> (Temporary morale change)
  • <FATIGUE>
  • <DRUNK> (Drunkness is temporary, of course)
  • <LOYALTY_LOCAL> (Loyalty in the same city, if the facility is inside a city at all)
  • <LOYALTY_GLOBAL> (Loyalty in all cities, regardless of where the facility is located)

And here's where the risk tags are placed:

<FACILITYTYPE>
   [... General Info Tags ...]
   [... Militia Training Tags ...]
   <ASSIGNMENT>
      [... General Assignment Effect Tags ...]
      [... Strategic Assignment Effect Tags ...]
      <CONDITIONS>
         [... Conditions Data ...]
      </CONDITIONS>
      <RISK OPENER>
         <ubChance>#</ubChance>
         <bBaseEffect>#</bBaseEffect>
         <ubRange>#</ubRange>
      </RISK CLOSER>
      [... You can have up to 16 separate risk sets ...]
   </ASSIGNMENT>
   [... You can have up to 33 separate assignment sections ...]
</FACILITYTYPE>

Adding Ambient Assignments Edit

Some facilities have the power to affect everyone in the same sector, regardless of what they are doing. This sort of effect is called an "Ambient", and it is written in the XML in much the same way as a regular assignment.

To define ambient effects, create a new assignment section (see above) and set the <ubAssignmentType> value to "AMBIENT". Then add all the tags you want. In the game, these tags will affect everyone in the sector as though they were performing the "AMBIENT" assignment, except it really doesn't matter if they work at the facility AT ALL. Even characters who are assigned to a squad are affected, especially if the Ambient Assignment has risks associated with it...

There are several differences between the structure of a "regular" assignment and an "Ambient" assignment:


  1. No conditions. The ambient effect hits everybody, regardless of who they are or what they are doing. You can completely remove the <CONDITIONS> and </CONDITIONS> tags, and all data between them, as it is irrelevant.
  2. No Strategic Effects. Those are limited to active participation.
  3. No Cost Per Hour. Characters aren't voluntarily working at the facility, so they can't be forced to pay.
  4. No Staff Limit.
  5. The <ubPerformance> tag affects everyone who is actually performing ANY assignment in the sector, whether they do so at a facility or not. An ambient effect can therefore reduce the effectiveness of ALL mercs in the sector. This is in contrast to the normal behavior of this tag, which affects only characters performing a specific assignment.

All other tags, as well as risks, behave as normal, and will affect every merc in the sector.

Risk Management Edit

One of the more powerful tools at your disposal is the ability to place all sorts of risks on facilities. In this way, the facility may offer a bonus to performance, but might also cause all sorts of harmful effects, especially if the character is unskilled or works at the facility for a long period of time.

Risks are not always bad. Just as they can cause character stats to drop, they can also cause them to increase. You, the modder, get to decide which way it's going to go - is it a danger to be feared, or a bonus to be hoped for?

All in all, the point is to make facilities more exciting, and a bit more of a gamble, rather than just plain old performance boosters. The player has to weigh the risks against the benefits to decide whether he's willing to go ahead and let his characters work there.


Risk Calculation Edit

Each risk set has three tags that will always appear (you either need all three of them, or none at all).

<ubChance> 0 - 255 The chance, per hour, that the risk will trigger.
<bBaseEffect> (-100) - 100 The "normal" effect caused when the risk is triggered. Normally, negative values mean damage (like a loss of stat points, injury, and so forth) while positive values mean a beneficial event (like gaining a skill point, raising local loyalty, etcetera). This naturally depends on the stat that's going to be affected by this risk.

A value of 0 allows the result to be either positive or negative, randomly.

<ubRange> 0 - 100 The maximum random deviation from the "normal" point. The higher you set this, the more unpredictable the risk is, in terms of how powerful its effect.


Triggering the Risk

The chance of triggering a risk is equal to X of Y', every hour'. X is the value of <ubChance>. Y is set in the INI file using the setting "FACILITY_EVENT_RARITY", which is NORMALLY set to 1000.
So for instance, if you set a risk to have a chance of 10, that means that every hour there's a 10 in 1000 chance that the risk will trigger. That's a 1% chance every hour.
Please note that if the merc is sleeping at the time, he/she does not trigger any risks at all.
Also note that if the risk is associated with the "AMBIENT" assignment, then it can hit anyone in the sector! Otherwise it can only hit the character who triggered it.

Minimum/Maximum Effect

The minimum and maximum possible result from triggering a risk is based on <bBaseEffect> and <ubRange>.
Normally, the minimum would be "bBaseEffect - ubRange", while the maximum is "bBaseEffect + ubRange".
However, the value of bBaseEffect has a strong influence here:


  • If bBaseEffect is negative, then the result will ALWAYS be a negative number. The maximum result can't be more than -1.
  • If bBaseEffect is positive, then the result will ALWAYS be a positive number. The minimum result can't be less than 1.
  • If bBaseEffect is 0, then the maximum and minimum are normal. The result can be anywhere between bBaseEffect - ubRange and bBaseEffect + ubRange.


Using Skills to Reduce Risk and Maximize Gain Edit

If the character has high skills, he/she may be able to minimize damage or maximize gain whenever the risk is triggered. Conversely, a character with low skills is more likely to suffer severe damage, or gain less benefits.

The skills you need are based on the risk involved. For the most part, wisdom and experience level will help here, but other skills can also come in handy.

Risk Type Skills that affect the result, and the weight of each skill compared to others.
STRENGTH

Wisdom (2/10)

Agility (3/10)

Exp. Level (5/10)

DEXTERITY

Wisdom (4/10)

Exp. Level (6/10)

AGILITY

Wisdom (2/10)

Exp. Level (8/10)

HEALTH

Wisdom (5/10)

Exp. Level (5/10)

WISDOM

Wisdom (6/10)

Exp. Level (4/10)

MARKSMANSHIP

Wisdom (2/10)

Agility (4/10)

Exp. Level (4/10)

MEDICAL

Wisdom (3/10)

Dexterity (4/10)

Exp. Level (3/10)

MECHANICAL

Wisdom (3/10)

Dexterity (5/10)

Exp. Level (2/10)

LEADERSHIP

Wisdom (4/10)

Leadership (3/10)

Exp. Level (3/10)

EXPLOSIVES

Wisdom (2/10)

Dexterity (3/10)

Agility (3/10)

Exp. Level (2/10)

INJURY

Wisdom (2/10)

Dexterity (2/10)

Agility (4/10)

Exp. Level (4/10)

FATIGUE

Agility (1/10)

Health (3/10)

Strength (2/10)

Exp. Level (5/10)

MORALE

Wisdom (2/10)

Leadership (4/10)

Exp. Level (4/10)

DRUNK

Wisdom (5/10)

Health (3/10)

Exp. Level (2/10)

LOYALTY_LOCAL

Wisdom (2/10)

Leadership (3/10)

Strength (1/10)

Exp. Level (2/10)

Local Loyalty (2/10)

LOYALTY_GLOBAL

Wisdom (3/10)

Leadership (3/10)

Exp. Level (2/10)

Local Loyalty (2/10)

In addition, an INI setting controls how much combined skill you need to "break even" - I.E. to get a result that isn't biased up or down from the Base Effect. The higher you go above this point, the easier it gets to avoid serious harm or get better results more consistently. The lower you go, the more danger you're in from these risks.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.