Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 Time Capsule (How-to Library) » "How does it work?" Part 8: Skill Checks
Re: "How does it work?" Part 8: Skill Checks[message #198520]
|
Wed, 08 October 2008 15:42
|
|
Headrock |
|
Messages:1760
Registered:March 2006 Location: Jerusalem |
|
|
SKILL CHECKS NOT RELATED TO DOOR INTERACTION
Several skill checks have nothing to do with doors. The most common check is probably the Gun-Unjamming check, but there are many others that will be shown here. The skill check itself works exactly the same as before.
---------------------------
PLANTING A MINE
The skill check itself is the same as setting a shaped charge on a door to blow the lock. However, the action is different, and the result is very important. Also note that this only works with MINES, I.E. bombs that have an integral detonator and are pressure-activated.
Result = PLATING_BOMB_SKILL_CHECK with no External_Modifier
If Result >= 0, then
Bomb planted successfully
If Result is between -20 and -1, then
Bomb plating failed
If Result < -20, then
Bomb planting failed MISERABLY,
KABOOOOOOOOOOOOOOOOOOOM.
Simple enough. We obviously want a result above 0, but so long as we don't get less than -20 we'll survive.
For the skill check calculation, please read the section on BLOWING A LOCK WITH A SHAPED CHARGE, far earlier in this article.
-----------------------------------------
PLANTING A BOMB
This refers to all explosives which must have a detonator attached to them. The skill checks depend on the type of detonator.
If using a TIMED DETONATOR, then
Result = PLANTING_REMOVE_BOMB_SKILL_CHECK with no External_Modifier
If using a REMOTE DETONATOR, then
Result = PLANTING_BOMB_SKILL_CHECK with no External_Modifier
If Result >= 0, then
Bomb planted successfully
If Result is between -20 and 0, then
Bomb plating failed partially
Random_Number = Anywhere between -1 and 1
New setting (Timer setting, or Remote Detonation Frequency) = Original Setting + Random_Number
If Result < -20, then
Bomb planting failed MISERABLY,
KABOOOOOOOOOOOOOOOOOOOM.
We've already seen how the bomb-planting skill check works (see far above, "BLOWING A LOCK WITH A SHAPED CHARGE"). But before we get to the Remote Detonated Bomb Skill Check, let's explain what happens here at the bottom. If we've failed to set the bomb, but not by much (down to -20), we'll still set the bomb, but with the wrong settings. With a timed explosive, this will change the amount of turns before the bomb explodes by +1, 0, or -1 (could cause it to explode immediately...). If this was a remote bomb, then the frequency of the bomb is changed (less dangerous, but could be very inconvenient).
Right, here's the skill check for remote bombs. It's almost the same as for other bombs, but with a twist.
Explosives_Bonus = Merc's_Effective_Explosives_Skill * 7
Wisdom_Bonus = Merc's_Effective_Wisdom * 2
Experience_Bonus = Merc's_Experience_Level * 10
Base_Chance = ( Explosives_Bonus + Wisdom_Bonus + Experience_Bonus ) / 10
If Merc doesn't have the ELECTRONICS trait, then
Base_Chance is reduced by 25%
(... Rest is the same as the regular bomb planting formula)
So for remote bombs, we're really going to want to have the ELECTRONICS skill, but it's not a must (mainly due to the bomb planting's Skew towards better results... for more on this read "BLOWING A DOOR OPEN WITH A SHAPED CHARGE").
------------------------------------
DISARMING A PLANTED MINE, BOMB, or BOOBYTRAPPED OBJECT
Similar to the check for disarming a door-based trap, but with a difference - it matters WHO placed the bomb here!
If Bomb was placed by the same Merc trying to disarm it, then
Result = DISARM_TRAP Skill Check, with an external modifier of 40
If Bomb was placed by a teammate, then
Result = DISARM_TRAP Skill check, with an external modifier of 20
Else,
Result = DISARM_TRAP Skill check, with an external modifier of 0
If Result >= 0, then
Sucess!
Else,
Boom.
This is fairly simple, and again the skill check itself is explained near the top of this article in the section about disarming trapped doors. However you can see that the external modifier depends on whoever set that bomb. If it's us, then the bomb will be easier to disarm.
--------------------------------
LYING TO THE QUEEN
Honestly, I've never ever done this, so it's mainly based on guesses and what little I care to check in this code. I think this happens when the queen interrogates a captured merc? Kill me, I have no idea.
Result = LIE_TO_QUEEN Skill Check, with no external modifier
If Result >= 0, then
Success!
Else
Failure
And the skill check:
Base_Chance = 50 * ( Merc's_Effective_Wisom + Merc's_Effective_Leadership ) / ( Queen's_Wisdom + Queen's_Leadership )
Calculate Fatigue_Penalty
Base_Chance is reduced by Fatigue Penalty
Calculate Morale_Modifier
Base_Chance is modified by Morale_Modifier
Random_Number = anywhere between 0 and 99
Result = Base_Chance - Random_Number
Please note that this reads the queen's Wisdom and Leadership - I don't know what those values are, you can probably check them in PROEDIT.
Also, please note that Effective_Leadership is calculated differently from other "effective" stats. Quite simply, if your character is "Slightly drunk", he gains a 20% bonus to his leadership. Other drunkness level have no effect whatsoever.
--------------------------------------
UNJAMMING GUNS
One of the most common skill checks in the game. Guns tend to jam, and we've got to unjam them. Here's how the whole thing goes:
Result = UNJAM_GUN Skill Check, with an external_modifier of (Gun's_Reliability + Ammo's_Reliability) * 4
If Result >= 0, then
Success!
Else
Failure
Gun and ammo reliability values affect how likely the gun is to jam with each shot you take (also how likely the gun is to degrade with each shot). And apparently, they also control the difficulty of unjamming the gun. Of course, if either or both reliability values are negative, they can make the skill check harder. A reliable gun however will be much easier to unjam, if it even gets jammed in the first place.
Here's the skill check:
Base_Chance = 30 + (Merc's_Effective_Mechanical_Skill / 2)
Calculate Fatigue_Penalty
Base_Chance is reduced by Fatigue_Penalty
Base_Chance is increased by External_Modifier, which equals (Gun's_Reliability + Ammo's_Reliability) * 4
Calculate Morale_Modifier
Base_Chance is modified by Morale_Modifier
If Base_Chance > 99, then
Base_chance = 99
If Base_Chance < 0, then
Base_chance = 0
Random_Number = anywhere between 0 and 99
Result = Base_Chance - Random_Number
We get a free 30 points to our Base_Chance, even if we've got no mechanical skill. Weird - even with 100% mechanical skill, your base_chance is still unlikely to go up to 99 - you'll need a very reliable weapon and very good morale for that...
Please note that this same formula is used in manual unjamming (I.E. during tactical combat) as well as when repairing guns as a mechanic.
---------------------------------
NOTICING DART-GUN FIRE
Dart guns are the most silent weapons in the game. They don't produce a muzzle flash, they have 0 loudness, and above all that, the target needs to succeed a skill check to notice being shot at by darts. The formula surrounding this check is kind of complex. For instance, I'm not sure if it fires only if the dart MISSED the target, and I don't know if noticing the dart means that the target immediately sees where you are.
Result = NOTICE_DART Skill Check, with no external modifier
If Result >= 0, then
Noticed dart-fire
Else,
Not noticed. Due to the silenced nature of the dart gun, this probably means the target doesn't even realize that someone is shooting at it. I'm not 100% sure about this!!!
And the skill check:
Wisdom Bonus = Target's_Effective_Wisdom / 10
Experience Bonus = Target's_Effective_Experience_Level
Base_Chance = Wisdom_Bonus + Experience_Bonus
Calculate Fatigue_Penalty
Base_Chance is reduced by Fatigue_Penalty
Calculate Morale_Modifier
Base_Chance is modified by Morale_Modifier
If Base_Chance > 99, then
Base_chance = 99
If Base_Chance < 0, then
Base_chance = 0
Random_Number = anywhere between 0 and 99
Result = Base_Chance - Random_Number
Since we use 1/10th of our wisdom, and do not modify our effective experience level, the Base_Chance is amazingly low - it can only reach 20 before fatigue and morale modifiers, and that's only if the target has a whopping 100 wisdom and 10 experience level! That means (at best) a 1 in 5 chance to notice dart-fire!! Most targets will be even less likely to notice it.
--------------------------------
ITEM-ATTACHMENT AND ITEM-MERGE SKILL CHECKS
I've left this bit for last, for a good reason.
When we attach items to one another, or merge items together to create new items, we might have to run a skill check. Due to the great work of our 1.13 XML externalizers, it has become possible for modders to decide WHAT SKILL CHECK TO RUN for each such attachment/merge! The data is drawn directly from XML, and there are many possibilities to choose from. So it's important that we've already gone through most of the skill checks in the game already, previously in this article, because a modder could use any of them as checks for item attachments. Don't worry, I'll explain this promptly.
--------------------------------
ATTACHING ITEMS
The "Attach Item" action happens when we try to attach one item to another item, like we do with gun scopes, with bomb detonators, and many other such combinations. This does NOT refer to merges (I.E. attaching two objects to make a new object). We'll get to merges next.
If an item can be attached to another item, there must be an entry in Attachments.XML that tells the game that these two items can fit together. That entry tells the game that the attachment is possible, and also how many APs it will cost.
Most such attachments require no skill check at all. However, some items are inherently more difficult to attach than other items. If so, they will have an entry in "AttachmentInfo.XML". This entry will tell us what skill check to use, and what External_Modifier to apply.
Let's make this simpler by showing you a small bit from AttachmentInfo.XML:
All XML crap aside, only three lines are interesting to us:
usItem : 223
bAttachmentSkillCheck : 3
bAttachmentSkillCheckMod : 0
The first line tells us what item we're talking about. In this case, it's item #319, which is a regular bomb detonator. We can attach it to a wide variety of bombs, but we'll always run the same skill check for that.
The skill check is of type 3. In the program, type 3 means an "ATTACH_DETONATOR_SKILL_CHECK" (How surprising, hehehehe). Of course, we can edit this XML and change it, say, to type 8, or "SMASH_LOCK_SKILL_CHECK". In that case, the skill check we use to determine whether we managed to attach the detonator would be the same skill check as kicking down a door! We can use ANY of the game's available skill checks, if we wanted to.
Finally, the third line tells us that there's no special modifier. We could, if we wanted to, make some detonators harder to attach than others, by giving a negative modifier here (say, -20).
Here's the list of all possible skill check types. You'll notice that we've seen most of these skill checks earlier in this article. Some, however, are reserved for item attachments/merges, and we'll cover those types soon. But for now, here's a list of all possible skill checks:
0 = NO_CHECK,
1 = LOCKPICKING_CHECK,
2 = ELECTRONIC_LOCKPICKING_CHECK,
3 = ATTACHING_DETONATOR_CHECK,
4 = ATTACHING_REMOTE_DETONATOR_CHECK,
5 = PLANTING_BOMB_CHECK,
6 = PLANTING_REMOTE_BOMB_CHECK,
7 = OPEN_WITH_CROWBAR,
8 = SMASH_DOOR_CHECK,
9 = DISARM_TRAP_CHECK,
10 = UNJAM_GUN_CHECK,
11 = NOTICE_DART_CHECK,
12 = LIE_TO_QUEEN_CHECK,
13 = ATTACHING_SPECIAL_ITEM_CHECK,
14 = ATTACHING_SPECIAL_ELECTRONIC_ITEM_CHECK,
15 = DISARM_ELECTRONIC_TRAP_CHECK,
"NO_CHECK" is the default, and it's just what it is - No Check. If an attachment item doesn't have its own AttachmentInfo.XML entry, then it's assumed to require no check at all. Actually, some items DO have an attachmentInfo.XML entry, with the skill check type set to 0. I have no idea why they even have entries there at all, but I'm guessing they could simply be removed without causing any problems. The game will simply assume they don't require any check anyway, so it doesn't matter if they have an entry or not. Oh well.
In any case, failure to attach an item can cause damage to both the attachment and the item it was being attached to. Here's how it works:
Result = Whatever skill check we're required to perform for this attachment item, with the External_modifier if any
If Result < 0, then
Item_Damage = 0 - Result
Cause an amount of damage to the Attachment Item, equal to Item_Damage
Cause an amount of damage to the Item we're attaching to, equal to Item_Damage
So the lower we go below 0, the more damage we cause to both items!
What about the skill check itself? Well, we've already seen that it could be any of 15 different skill checks. Most of these checks have already been explained in this article, so I won't repeat them here. But since some are exclusive to item attachments, let's cover them now.
ATTACH_DETONATOR_CHECK and ATTACH_REMOTE_DETONATOR_CHECK
(At the moment, this is used only for the Detonator and Remote Detonator items)
Explosives_Bonus = Merc's_Effective_Explosives_Skill * 3
Dexterity_Bonus = Merc's_Effective_Dexterity
Base_Chance = ( Explosives_Bonus + Dexterity_Bonus ) / 4
If this is an ATTACH_REMOTE_DETONATOR_CHECK, then
If the merc doesn't have the ELECTRONICS trait, then
Base_Chance is reduced by 50%!
If Explosives_Bonus = 0, then
Forget it, you're inept. Automatic failure. Stop here.
Calculate Fatigue_Penalty
Base_Chance is reduced by Fatigue_Penalty
Base_Chance is increased by External_Modifier, if there is one.
Calculate Morale_Modifier
Base_Chance is modified by Morale_Modifier
If Base_Chance > 99, then
Base_chance = 99
If Base_Chance < 0, then
Base_chance = 0
Random_Number = anywhere between 0 and 99
Result = Base_Chance - Random_Number
We require at least SOME explosive skill for either type of detonator attachment. Dexterity helps too, but only accounts for 1/4th of the base_chance. For remote detonators, the base_Chance seriously depends on whether or not we've got the ELECTRONICS skill.
ATTACH_SPECIAL_ITEM_CHECK and ATTACH_SPECIAL_ELECTRONIC_ITEM_CHECK
(This is sort of a general skill check for items that are difficult to attach)
Mechanical_Bonus = Merc's_Effective_Mechanical_Skill
Wisdom_Bonus = (Merc's_Effective_Wisdom + 100) / 200
Dexterity_Bonus = (Merc's_Effective_Dexterity + 100) / 200
Experience_Bonus = Merc's_Effective_Experience_Level * 3
Base_Chance = ( Mechanical_Bonus * Wisdom_Bonus * Dexterity_Bonus ) + Experience_Bonus
If Mechanical_Bonus = 0, then
No way. Automatic Failure. Stop here.
If this is an ATTACH_SPECIAL_ELECTRONIC_ITEM_CHECK, then
If the merc doesn't have the ELECTRONICS trait, then
Base_Chance is reduced by 50%!
Calculate Fatigue_Penalty
Base_Chance is reduced by Fatigue_Penalty
Base_Chance is increased by External_Modifier, if there is one.
If Base_Chance < 30, then
Base_Chance = 0!!
Calculate Morale_Modifier
Base_Chance is modified by Morale_Modifier
If Base_Chance > 99, then
Base_Chance = 99
Random_Number = anywhere between 0 and 99
Result = Base_Chance - Random_Number
Lots of skills go into the calculation, although the Mechanical skill is the most important. If we're running an electronic skill check,
you'd better have the ELECTRONICS trait or you lose 50% of your base_chance!
Also note that if you fail to reach a Base_Chance of 30, after all modifiers have been accounted for, then you have no chance of success.
----------------------------------------------
Before we move on to merges, I decided to give yet another insight that may help shed some light on this.
Here is a list of attachment items that require a special check in the unmodded 1.13 campaign. Every time you try to attach one of these items to something else, you will have to go through the listed skill check! All other attachments that aren't listed here are exempt from skill checks.
- Detonator
- Skill Check: ATTACH_DETONATOR
- External Modifier: none
- Remote Detonator
- Skill Check: ATTACH_REMOTE_DETONATOR
- External Modifier: -10
- Rod & Spring
- Skill Check: ATTACH_SPECIAL_ITEM
- External Modifier: none
- Gun Barrel Extender
- Skill Check: ATTACH_SPECIAL_ITEM
- External Modifier: none
- X-Ray Tube
- Skill Check: ATTACH_SPECIAL_ELECTRONIC_ITEM
- External Modifier: -15
- Copper Wires
- Skill Check: ATTACH_SPECIAL_ELECTRONIC_ITEM
- External Modifier: +20 (easier!)
---------------------------------
ITEM MERGES
Similarly to attachments, some items can be combined together to give some sort of effect. Usually this means that one or both of the items is changed in some way.
Every possible merge between any two items will have an entry in the file "Merges.XML". This entry will tell the game that the merge is possible, but will also tell the game what sort of result we want to get. Do we want to create a new item? Do we want to create TWO new items? Maybe we just want to change one item but keep the other intact? Merging stuff like ammo magazines or Medikits is also an option here. Not all types of merges will require a skill check, though.
The structure of the entry is as such:
I don't care about the AP costs at the moment, nor do I care about resulting items. The interesting values right now are:
firstItemIndex : 54
secondItemIndex : 296
mergeType : 6
The "first item" is the one we're holding in our cursor (or, the "giver"). In this case, it's a Machete.
The "Second item" is the one we're acting upon (or, the "receiver"). In this case, it's a T-shirt.
A mergeType of 6 is also called a "USE_ITEM" merge, which doesn't require any skill check. It'll change the t-shirt into a rag, but will keep the machete untouched.
As I mentioned, some merge types require no skill check. These are:
- 0 = DESTRUCTION merge.
- Both items are destroyed automatically. I think this happens when you try to apply Compound 18 to a piece of armor that's already coated with Queen's Jelly, or vice versa.
- 1 = COMBINE merge.
- This is when we transfer the contents of one item to the other, like with ammo, medikits, canteens, toolkits, etcetera. The "Giver" item passes as much of its condition to the "receiver" item, until the receiver item is at 100% and/or the Giver item reached 0%. I don't need to tell you this sort of stuff, do I?
- 2 = TREAT_ARMOUR merge.
- Although our mercs make an encouraging sound when we do this, they don't actually have to succeed any skill check. It's always a success. The "receiver" will always change into a new item (in this case, the treated version of the armor...). The "giver" item may or may not disappear (usually does), or change into a new item.
- 4 = EASY merge.
- This type of merge is also an automatic success. Again, our mercs will say a "Cool!" but there's really no skill check involved. Some EASY merges are really silly, like wiping the blood off a Bloody Knife (do you REALLY have to say "COOL!" after you do that?? my god). Others are more complicated but still require absolutely no check, like attaching a rail kit to a G36. Is it that easy? With EASY merges, the "Receiver" item will always change to a new type. The "giver" item may also change, or disappear. Also, both items' statuses will also change, to the average of their original status.
- 6 = USE_ITEM merge.
- This is the same as an EASY merge, except it will never change or destroy the "Giver" item, only the "Receiver". There's also no alteration to the status of either of them.
That leaves us with three types of merges that do require a skill check. Since we've covered all of the different Skill Checks by now, I won't repeat the calculations here anymore. They are all similar to the ATTACHMENT skill checks, so just look at the previous section for those calculations.
EXPLOSIVE Merge (Type 3)
This type of merge is used for combining explosives with unstable matter, like RDX+TNT, to create even stronger explosives.
Result = ATTACH_DETONATOR Skill Check, with an External_Modifier of -30
If Result >= 0, then
Success!
Else
Damage_To_Items = 0 - Result
Damage the "Giver" item by Damage_To_Items
Damage the "Reciver" item by Damage_To_Items
Note that with EXPLOSIVE merges, one or both items could be changed, and just like EASY merges their condition will change to the average of their original conditions.
ELECTRONIC Merge (Type 5)
This merge type is currently used only for combining the Display Unit to the X-Ray Device to create an X-Ray Detector.
Result = ATTACH_SPECIAL_ELECTRONIC_ITEM Skill Check, with an External_Modifier of -30
If Result >= 0, then
Success!
Else
Damage_To_Items = 0 - Result
Damage the "Giver" item by Damage_To_Items
Damage the "Reciver" item by Damage_To_Items
Nice, same thing as an EXPLOSIVE merge, but with a different skill check. Again, both items can change (with the x-ray detector merge, obviously one disappears...), and their final condition will equal the average of their original conditions.
Finally, USE_ITEM_HARD Merge (Type 7)
This type of merge is NOT USED by any of the merges in the unmodded 1.13. But I figure, for any mods out there, there's always the chance of that happening, so here's the algorithm:
Result = ATTACH_ELECTRONIC_ITEM Skill Check, with an External_Modifier of -30
If Result >= 0, then
Success!
Else
Damage_To_Items = 0 - Result
Damage the "Giver" item by Damage_To_Items
Damage the "Reciver" item by Damage_To_Items
What a surprise, once again the same formula with a different Skill Check. However, USE_ITEM_HARD, much like USE_ITEM, can only change the "Receiver" item. The "Giver" item is untouched, as are both items' conditions.
-------------------------------------
Phew, well, I'd hate to leave without some pomp and circumstance, but this has really tired me out. So, I hope you enjoyed this one (no, correction, I hope you understood this one!), and I'll see you again in the next part of "How does it work"!
Report message to a moderator
|
|
|
|
|
|
"How does it work?" Part 8: Skill Checks
By: Headrock on Wed, 08 October 2008 15:40
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: Headrock on Wed, 08 October 2008 15:42
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: Panpiper on Wed, 08 October 2008 16:40
|
|
|
Re: "How does it work?" Part 8: Skill Checks
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: Headrock on Wed, 08 October 2008 16:56
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: cdunigan on Wed, 08 October 2008 17:31
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: Headrock on Wed, 08 October 2008 19:13
|
|
|
Re: "How does it work?" Part 8: Skill Checks
|
|
|
Re: "How does it work?" Part 8: Skill Checks
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: Headrock on Wed, 24 December 2008 07:32
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: Kaerar on Wed, 24 December 2008 08:09
|
|
|
Re: "How does it work?" Part 8: Skill Checks
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: Kaerar on Thu, 25 December 2008 12:33
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: Headrock on Thu, 25 December 2008 15:05
|
|
|
Re: "How does it work?" Part 8: Skill Checks
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: Headrock on Thu, 25 December 2008 16:59
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: BirdFlu on Thu, 25 December 2008 20:26
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: Headrock on Fri, 26 December 2008 01:53
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: BirdFlu on Fri, 26 December 2008 02:54
|
|
|
Re: "How does it work?" Part 8: Skill Checks
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: BirdFlu on Fri, 26 December 2008 12:12
|
|
|
Re: "How does it work?" Part 8: Skill Checks
By: BirdFlu on Fri, 26 December 2008 12:21
|
Goto Forum:
Current Time: Mon Dec 02 09:07:31 GMT+2 2024
Total time taken to generate the page: 0.01057 seconds
|