Jump to content

[Tutorial] Editing abilities, talents and items


Recommended Posts

In my other tutorial (https://forums.obsidian.net/topic/86034-tutorial-making-potions-usable-outside-of-combat/) I explained how to edit the game files by using UABE and a hex editor. But, a hex editor will only get us so far. It will work fine for just changing values and setting properties, but if we want to do more advanced stuff we need a better way to edit these files.

 

Let's say we want to edit the Rogue's Dirty Fighting ability to give it a bonus to Interrupt as well as hit-to-crit conversion. How do we do that? Read on.

 

 

Step 1: The file

Read my other tutorial to figure out how to find Dirty Fighting's .unity3d file and open it with UABE (Disunity will not work). Again, find the biggest MonoBehaviour and look at it. This is a GeneralAbility, and it has a StatusEffects array which is interesting. Open it, and you'll see a StatusEffect that modifies one stat by 1.1. This is the 10% extra hit-to-crit chance. Ideally, we would have a second StatusEffect in this array, for the extra Interrupt. But since this is too tedious to do with a hex editor, let's do it the proper way!

 

 

Step 2: Exporting

Close down all the UABE windows except the first one, where it says CAB-xxxxetc. Click the Export button. It will prompt you for a location and a file name, let's call it Export.assets (the file type doesn't matter). Use UABE to open the file you just exported. It will take you straight to the assets info screen, with one important difference that we'll come back to later. For now, just highlight the largest MonoBehaviour and click Export Dump. Save it as Dump.txt.

 

 

Step 3: Editing

Now, open the Dump.txt you just saved. Here is our ability, in a nice readable format. And, what's more, we can now edit this text file, import it back into the asset and our changes will be applied! So, scroll down and find the StatusEffects array. Inside it is an item, starting with a [0] line.

 

Now, we could just copy that whole item (from [0] down to and including m_deserializeInitiated), then go in and change the extra stat, but then we would need to figure out what value represents Interrupt in the ModifiedStat property, which requires opening up the game code in ILSpy. A much easier way is to find the Interrupting Blows' .unity3d file, export it to a dump in the same way we did earlier, and copy that item's StatusEffect into this file, changing the Value for the interrupt bonus from 15 to whatever you like. Whichever way you do it, remember to change the second [0] to [1], and set the array's Size to 2. 

 

Now you're done editing, so let's reimport the file.

 

 

Step 4: Importing

Open up Export.assets again, and select the largest MonoBehaviour. Now, click the Import Dump button (this one only appears when you open assets files, hence why I mentioned that it's an important difference) and select your dump.txt. Nothing much will happen, but it has now imported your changes. In the current window, press File->Save. It won't let you save as the file you have opened, so call it Import.assets. All right, now open the Dirty Fighting .unity3d, and choose Import. Select Import.assets. Again, no confirmation, but it has imported the asset file back into the bundle. Save this file (from the window where it says CAB-xxxxx), as DirtyFighting2.unity3d. If you want, you can open the file you just saved, go in and look at the info, and the StatusEffects array should now have a second item which modifies Interrupt.

 

You're done! Rename the edited .unity3d file to the same name as the one in the game's directory, and put it there (back up the old one first). Then enjoy your new ability in-game.

Edited by Staehrminator
  • Like 2
Link to comment
Share on other sites

  • 3 months later...

mother****er! My UABE says "The assets file index is out of range" when I try to import. Are you talking about the Import button UNDER the CAB-xyz thingy?

 

...why do I've a nose I'll have to do my modding via the hex-editing method...

Link to comment
Share on other sites

  • 2 weeks later...

mother****er! My UABE says "The assets file index is out of range" when I try to import. Are you talking about the Import button UNDER the CAB-xyz thingy?

 

...why do I've a nose I'll have to do my modding via the hex-editing method...

You need to follow the recipe very carefully. I haven't done this myself in a long while, but as long as you do it exactly the way I've outlined it should work fine. Remember to have the correct index on your added effect, and to increase the array's size to 2.

  • Like 1
Link to comment
Share on other sites

 

mother****er! My UABE says "The assets file index is out of range" when I try to import. Are you talking about the Import button UNDER the CAB-xyz thingy?

 

...why do I've a nose I'll have to do my modding via the hex-editing method...

You need to follow the recipe very carefully. I haven't done this myself in a long while, but as long as you do it exactly the way I've outlined it should work fine. Remember to have the correct index on your added effect, and to increase the array's size to 2.

 

 

Sorry, sometimes I fail at tiny details. Hence my problems with maths(I understand it a-ok, but when solving problems...the mistakes like these happen). I most likely forgot about the array size thingy.

Link to comment
Share on other sites

Seems the newest version of UABE now (2.0) allows directly editing raw exports. So no more need for a hex editor. Use Export Dump and Import Dump to update the files.

 

Oh lol. I've got v1,0 lol

Edited by hrwd
Link to comment
Share on other sites

 

Seems the newest version of UABE now (2.0) allows directly editing raw exports. So no more need for a hex editor. Use Export Dump and Import Dump to update the files.

 

Oh lol. I've got v1,0 lol

 

 

Now the real question, for me, is how to edit files *but* use some kind of override directory instead of copying my editing resources back over the original.

 

I much prefer to do this 'mod like' and not have to directly change the installation files.

Link to comment
Share on other sites

My real question is...I don't understand the Array part. Do I need to edit the Array size no matter what I change or only if I add functionality? What if I remove a functionality? What if I just change the value of dmg(for the lack of better term)?

 

Also, what zero lol(there's LOTS of them)? Care to do it via screenshots or elaborate further? If I just edit a value do I still need to change 0 to 1?

 

Thanks!

Link to comment
Share on other sites

  • 5 months later...
  • 4 months later...

My real question is...I don't understand the Array part. Do I need to edit the Array size no matter what I change or only if I add functionality? What if I remove a functionality? What if I just change the value of dmg(for the lack of better term)?

 

Also, what zero lol(there's LOTS of them)? Care to do it via screenshots or elaborate further? If I just edit a value do I still need to change 0 to 1?

 

Thanks!

 

From my understanding, your array contains X abilities and is therefore of size X.

 

This, is an array with 2 entries :

[ array ] [ entry 0 ]

[ array ] [ entry 1 ]

 

If you edit values inside these entries, you need not expand your array.

If you want to add a new entry :

[ array ] [ entry 2 ]

 

Then you need to expand your array so the 3rd entry fits.

  • Like 1
Link to comment
Share on other sites

  • 6 months later...

Hi, I've stumbled here looking for a way to change either the stats of the item or swap appearance of two helmets. And this toutorial here is by far the best i've found. Still as I'm a bit green I can't seem to get my thing done with it. Any chcance someone can explain how to do any of the two above? Thanks in advance ^^

Per aspera ad astra

Bez tytułu.png

Link to comment
Share on other sites

  • 4 months later...
  • 2 months later...

I know the topic is old, but this fits best here.

 

Some explanation what the numbers behind the types mean.

 

Damage types

        0 = Slash,
        1 = Crush,
        2 = Pierce,
        3 = Burn,
        4 = Freeze,
        5 = Shock,
        6 = Corrode,
        7 = Count,
        8 = None,
        9 = All,
        A = Raw
        
----------------------------------------

Effect type

    0 = Beneficial,
    1 = Hostile,
    2 = All

-------------------------------------------

Ability types ( If you see "EffectType" in an ability, talent, spell etc, it actually means this "Ability types" and not the "Effect types" from above.)

    0  = Undefined,
    1  = Equipment,
    2  = Ring,
    3  = Spell,
    4  = Attribute,
    5  = Ability,
    6  = Talent,
    7  = Consumable,
    8  = Racial,
    9  = WeaponOrShield,
    10 = Trap,
    11 = Count
    
----------------------------------------

Stat types

    0   MaxHealth,
    1   MaxStamina,
    2   Health,
    3   Stamina,
    4   MeleeAccuracy,
    5   RangedAccuracy,
    6   Deflection,
    7   Fortitude,
    8   Reflex,
    9   Will,
    10  StaminaRechargeRate,
    11  AttackSpeed,
    12  Stealth,
    13  BonusDamage,
    14  DamageThreshhold,
    15  DamageMinimum,
    16  MovementRate,
    17  NonTargetable,
    18  NonMobile,
    19  KnockedDown,
    20  EngagedEnemyCount,
    21  EngagementRadius,
    22  DisengagementAccuracy,
    23  DisengagementDamage,
    24  NonEngageable,
    25  Damage,
    26  Stunned,
    27  BonusUnarmedDamage,
    28  MeleeAttackDistanceMult,
    29  RangedAttackDistanceMult,
    30  MeleeAttackAllOnPath,
    31  BonusMeleeDamageFromWounds,
    32  BonusDTFromArmor,
    33  MeleeMissThresholdDelta_DO_NOT_USE,
    34  MeleeDamageRangePctIncreaseToMin,
    35  CanStun,
    36  SneakAttackOnNearDead,
    37  MeleeCritThresholdDelta_DO_NOT_USE,
    38  RangedCritThresholdDelta_DO_NOT_USE,
    39  CanCripple,
    40  MarkedPrey,
    41  SuspendHostileEffects,
    42  BonusMeleeDamage,
    43  ImmuneToEngageStop,
    44  HealthLossPctMult_DO_NOT_USE,
    45  BonusDamageMult,
    46  FocusWhenHits,
    47  BeamDamageMult,
    48  DrainResolveForDeflection,
    49  ReapplyDamage,
    50  ReapplyDamageToNearbyEnemies,
    51  ReloadSpeed,
    52  DropTrap,
    53  StasisShield,
    54  SuspendBeneficialEffects,
    55  DamageBasedOnInverseStamina,
    56  Resolve,
    57  Might,
    58  Dexterity,
    59  Intellect,
    60  SummonWeapon,
    61  TransferStamina,
    62  StaminaRechargeRateMult,
    63  VesselAccuracy,
    64  BeastAccuracy,
    65  WilderAccuracy,
    66  StunDefense,
    67  KnockdownDefense,
    68  PoisonDefense,
    69  DiseaseDefense,
    70  DistantEnemyBonus,
    71  BonusDamageMultOnLowStaminaTarget,
    72  BonusCritChanceOnSameEnemy,
    73  BonusAccuracyForNearestAllyOnSameEnemy,
    74  EnemyCritToHitPercent,
    75  HostileEffectDurationMult,
    76  EnemyDeflectReflexHitToGrazePercent,
    77  EnemyFortitudeWillHitToGrazePercent,
    78  ExtraStraightBounces,
    79  DamageToDOT,
    80  BonusDamageMultIfTargetHasDOT,
    81  RedirectMeleeAttacks,
    82  HostileAOEDamageMultiplier,
    83  ImprovedFlanking,
    84  DTBypass,
    85  StealSpell,
    86  SwapFaction,
    87  AttackOnMeleeHit,
    88  MinorSpellReflection,
    89  Athletics,
    90  Lore,
    91  Mechanics,
    92  Survival,
    93  Crafting,
    94  PushDefense,
    95  WhileStunnedDefense,
    96  WhileKnockeddownDefense,
    97  BonusAccuracyOnSameEnemy,
    98  BonusDamageMultOnSameEnemy,
    99  Constitution,
    100 Perception,
    101 CritHitMultiplierBonus,
    102 BonusGrazeToHitPercent,
    103 CanStunOnCrit,
    104 BonusGrazeToMissPercent,
    105 BonusCritToHitPercent,
    106 BonusMissToGrazePercent,
    107 Bonu****ToCritPercent,
    108 Bonu****ToGrazePercent,
    109 BonusDamageProc,
    110 Confused,
    111 BonusMeleeWeaponDamageMult,
    112 BonusRangedWeaponDamageMult,
    113 RateOfFireMult,
    114 ApplyAttackEffects,
    115 EnemyReflexGrazeToMissPercent,
    116 StaminaPercent,
    117 EnemiesNeededToFlankAdj,
    118 ConcentrationBonus,
    119 DOTOnHit,
    120 SpellReflection,
    121 DisableSpellcasting,
    122 ResistAffliction,
    123 PreventDeath,
    124 AdjustDurationBeneficialEffects,
    125 DOTTickMult,
    126 AdjustDurationHostileEffects,
    127 ResistKeyword,
    128 TransferDT,
    129 TransferRandomAttribute,
    130 Disintegrate,
    131 BonusAccuracyOnSameEnemyAsExtraObject,
    132 Duplicate_DEPRECATED,
    133 GainStaminaWhenHits,
    134 CanKnockDownOnCrit,
    135 BonusAccuracyAtLowStamina,
    136 BonusDamageMultAtLowStamina,
    137 BonusDamageMultOnKDSFTarget,
    138 DamagePlusDot,
    139 RangedGrazeReflection,
    140 EnemyHitToGrazePercent,
    141 StunDurationMult,
    142 KnockDownDurationMult,
    143 BonusArmorDtMultAtLowHealth,
    144 AccuracyByRace,
    145 DamageMultByRace,
    146 Fatigue,
    147 DUMMY_EFFECT_IncreasedWeaponReach,
    148 PrimordialAccuracy,
    149 StopAnimation,
    150 AddAfflictionImmunity,
    151 Invisible,
    152 WoundDelay,
    153 SpellDamageMult,
    154 FinishingBlowDamageMult,
    155 ZealousAuraAoEMult,
    156 DelayUnconsciousness,
    157 NegMoveTickMult,
    158 BonusDamageMultOnFlankedTarget,
    159 FocusGainMult,
    160 DisengagementDefense,
    161 SpellDefense,
    162 RangedDeflection,
    163 BonusUsesPerRestPastThree,
    164 PoisonTickMult,
    165 DiseaseTickMult,
    166 StalkersLinkDamageMult,
    167 DamageToStamina,
    168 ChanterPhraseAoEMult,
    169 BonusHealMult,
    170 IncomingCritDamageMult,
    171 SpellCastBonus,
    172 AoEMult,
    173 FrenzyDurationMult,
    174 ProneDurationMult,
    175 WildstrikeDamageMult,
    176 ReviveAndAddStamina,
    177 DamageToStaminaRegen,
    178 LaunchAttack,
    179 HidesHealthStamina,
    180 AllDefense,
    181 MaxStaminaMult,
    182 CallbackOnDamaged,
    183 ApplyFinishingBlowDamage,
    184 NoEffect,
    185 Accuracy,
    186 TransferDamageToStamina,
    187 CallbackAfterAttack,
    188 IncomingDamageMult,
    189 GivePlayerBonusMoneyViaStrongholdTurn,
    190 ArmorSpeedFactorAdj,
    191 DistantEnemyWeaponAccuracyBonus,
    192 BonusRangedWeaponCloseEnemyDamageMult,
    193 DualWieldAttackSpeedPercent,
    194 BonusShieldDeflection,
    195 ShieldDeflectionExtendToReflex,
    196 ApplyWounds,
    197 BonusDamageMultWithImplements,
    198 DamageAttackerOnImplementLaunch,
    199 RangedMovingRecoveryReductionPct,
    200 BonusGrazeToHitRatioMeleeOneHand,
    201 TwoHandedDeflectionBonus,
    202 BonusDamageByRacePercent,
    203 InterruptBonus,
    204 BonusPotionEffectOrDurationPercent,
    205 ExtraSimultaneou****DefenseBonus,
    206 BonusWeaponSets,
    207 BonusQuickSlots,
    208 MeleeAttackSpeedPercent,
    209 RangedAttackSpeedPercent,
    210 TrapAccuracy,
    211 BonusDamageByTypePercent,
    212 MeleeDTBypass,
    213 RangedDTBYpass,
    214 GrimoireCooldownBonus,
    215 WeaponSwitchCooldownBonus,
    216 ShortenAfflictionDuration,
    217 MaxFocus,
    218 TrapBonusDamageOrDurationPercent,
    219 Bonu****ToCritPercentEnemyBelow10Percent,
    220 AllDefensesExceptDeflection,
    221 ApplyPulsedAOE,
    222 WeapMinDamageMult,
    223 BreakAllEngagement,
    224 VeilDeflection,
    225 BonusTwoHandedMeleeWeaponDamageMult,
    226 BonusMeleeDamageMult,
    227 BonusCritHitMultiplierEnemyBelow10Percent,
    228 UnarmedAccuracy,
    229 BonusDTFromWounds,
    230 TransferBeneficialTime,
    231 AccuracyByWeaponType,
    232 ExtraProjectilesByWeaponType,
    233 SummonConsumable,
    234 TransferDamageToCaster,
    235 TransferAttackSpeed,
    236 DamageToSummon,
    237 Destroy,
    238 LaunchAttackWithRollingBonus,
    239 ProhibitEnemyEngagementByLevel,
    240 DamageShield,
    241 HealthPercent,
    242 PostDtDamagePlusDot,
    243 RangedReflection,
    244 SingleWeaponSpeedFactorAdj,
    245 KeywordImmunity,
    246 CantUseFoodDrinkDrugs,
    247 AddDamageTypeImmunity,
    248 NegateNextRecovery,
    249 GenericMarker,
    250 DamageByKeywordCount,
    251 RemoveAllEffectsByKeyword,
    252 SummonSecondaryWeapon,
    253 GrantFocusToExtraObject,
    254 VerticalLaunch,
    255 EnemyGrazeToMissPercent,
    256 BonusHealingGivenMult,
    257 StaminaByAthletics,
    258 AttackOnHitWithMelee,
    259 AccuracyBonusForAttackersWithAffliction,
    260 RemoveAffliction,
    261 BonusArmorDtMult,
    262 GrantAbility,
    263 SetBaseAttribute,
    264 SetBaseDefense,
    265 MindwebEffect,
    266 PhraseRecitationLengthMult,
    267 DamageAlwaysMinimumAgainstCCD,
    268 DrugDurationMult,
    269 TransferStaminaReversed,
    270 TransferAttribute,
    271 RestoreSpiritshiftUses,
    272 ApplyAffliction,
    273 AccuracyByClass,
    274 DamageMultByClass,
    275 AfflictionShield,
    276 ConsumableDurationMult,
    277 DisableAbilityUse,
    278 ShortenAfflictionDurationOngoing,
    279 MeleeWeaponAccuracy,
    280 EnemyReflexHitToGrazePercent,
    281 Bonu****ToCritPercentAll,
    282 Bonu****ToCritRatioMeleeOneHand,
    283 RawStamina,
    284 Push = 10000
-------------------------------------------

 

Edited by Fhav6X
  • Like 1
Link to comment
Share on other sites

OK :blink: ....... The strong language filter is a little bit stupid!

 

Everywhere you see Bonu****To parts, it actually means Bonus Hit To. The strong language filter just imagines the word in between :banghead:

Edited by Fhav6X
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...