Jump to content
Livegood118

How to Modify %Spell Chance on Hit Effects in UAB Extractor?

Recommended Posts

Hi all,

 

I was fiddling around the Unity Asset Bundle Extractor today trying to figure out a way to change the % of a spell-proc effect on a weapon but I didn't have any luck.

 

The main reason I'm doing this is to tune the unlabored blade back up to 10% spell chance to cast firebug.

 

It seems that there are asset bundle files relating to the item itself and then asset bundle files relating to the spell effect.

 

I thought that doing it on Wodewys (which has a 10% chance to cast nature's mark on crit/hit) would be an easy thing to start with rather than going in to a Soulbound weapon which is probably more complicated.

 

So, for Wodewys there are three files:

 

– px1_battle_axe_wodewys.unity3d

– px1_spellchance_natures_mark.unity3d

– px1_spellchance_natures_mark_ability.unity3d

 

I did a bit of messing around with all of them  and fiddling in the monobehaviour files to see if I could edit something that would increase the chance on hit for natures mark to 90% rather than 10% (just for science). 

 

The closest thing that I could actually find for a reference to this effect was a reference to "AbilityTriggerChance" in several places, but changing this from 0.1 to 0.9 or 1 to 9 in various instances and then doing the usual import/export dumping didn't do anything in game and the chance remained at 10%.

 

halp pls? turning unlabored blade back to 10% firebug proc seems to be even more complicated than doing this.

Edited by Livegood118

Share this post


Link to post
Share on other sites

Subscribing thread.


"Time is not your enemy. Forever is."

— Fall-From-Grace, Planescape: Torment

"It's the questions we can't answer that teach us the most. They teach us how to think. If you give a man an answer, all he gains is a little fact. But give him a question, and he'll look for his own answers."

— Kvothe, The Wise Man's Fears

My Deadfire mods: Brilliant Mod | Faster Deadfire | Deadfire Unnerfed | Helwalker Rekke

Share this post


Link to post
Share on other sites

The closest thing that I could actually find for a reference to this effect was a reference to "AbilityTriggerChance" in several places, but changing this from 0.1 to 0.9 or 1 to 9 in various instances and then doing the usual import/export dumping didn't do anything in game and the chance remained at 10%.

 

Did your test modified Wodewys in game (hitting a companion 100 times and counting the number of procs or similar)? The reason I ask is it's possible that changing the values doesn't update the item description, instead only changing the performance in game, so your change might have worked.

 

Apologies if you've already thought of this, I just thought I'd check.

Share this post


Link to post
Share on other sites

[Lore check fails]

 

Just tried fiddling with all of the monobehaviour files I could find there and came up absolute trumps (including doing a bit more testing). I can identify qualities from each enchantment in the Wodewys asset bundle  – the top three largest monobehaviour files seem to relate to these, but other than that I can't figure out anything that represents a chance to apply effects e.g. 10% or otherwise. 

 

There is the AbilityTriggerChance function as I said in my initial post but unfortunately changing that seems to do absolutely nothing.

Share this post


Link to post
Share on other sites

It's ok.

 

I wasn't aware of that topic but I was familiar with the processes it goes through. I think the UABE has been expanded since that post so you don't have to mess around with hex values anymore - I've used the method I'm using to change the base attributes of NPCs which can't be changed by the in-game respeccing system and to fix ancient memory before it was fixed by an in game patch (see my post history for further details of this if you're interested).

 

Unfortunately I just can't find the variable in this instance that needs changing. I have a feeling that in the extracted files 10% may be represented as something different in the raw text monobehaviour files.

Share this post


Link to post
Share on other sites

Yeah, I figured you were probably already pretty knowledgeable about this stuff, but I thought better safe than sorry.

 

So I'm trying to catch up to where you are right now. You mentioned there being three relevant asset bundles: just so I understand did you start with

 

– px1_battle_axe_wodewys.unity3d

 

and see that in the monobehaviour files it references

 

– px1_spellchance_natures_mark.unity3d

 

and

 

– px1_spellchance_natures_mark_ability.unity3d

 

or is there some other way you knew it was these three bundles that were relevant?

 

Looking through those three bundles I've come up against the same problem you seem to have. The obvious parameter that needs changing is AbilityTriggerChance, I can't even spot any other variables that indicate that they might represent 10%.

 

Anyway, I just tried changing AbilityTriggerChance to 0.9 in the MonoBehaviour file of px1_battle_axe_wodewys.unity3d with ID 209 (it's the 116 bytes one) but every time I think I've saved the changes, if I reload the px1_battle_axe_wodewys.unity3d bundle it is at 0.1. Here's what I am doing

 

– I open px1_battle_axe_wodewys.unity3d

– I click the "Info" button

– I select MonoBehavior ID 209 and click the "Export Dump" button and save the file as "Dump.txt"

– I open Dump.txt and change "AbilityTriggerChance = 0.100000" to "AbilityTriggerChance = 0.900000" and save it

– I go back into UABE and, with MonoBehavior ID 209 still selected I click the "Import Dump" button and select "Dump.txt"

– I save then close the "Asset Bundle Info" window and close UABE

 

Am I doing something wrong?

 

Sorry if this is obvious, this is my first time messing around with this stuff.

Share this post


Link to post
Share on other sites

Once you've import dumped the changes in to the monobehaviour file, you save the entire dump and then have to re-import that back in to the original file asset file that you found in the object bundle folder (or a copy of that file that you made), making sure it has the same original name.

 

I do recall trying to change that one though and moving it from 0.1 to 0.9 didn't do anything for me. If you get different results - great.

Edited by Livegood118

Share this post


Link to post
Share on other sites

I do recall trying to change that one though and moving it from 0.1 to 0.9 didn't do anything for me. If you get different results - great.

 

I probably won't, I just wanted to reproduce your results as a means of getting used to using UABE. Thanks for the explanation of my missing step.

Share this post


Link to post
Share on other sites

Did a little bit of experimentation with Stormcaller because it's got different effects of varying probabilities.

 

Opened up the Prefab and found the biggest monobehaviour files – in one of the monobehaviour files there was a list of all of the different enchantments that Stormcaller gets.

 

Returning storm has a 10% chance of activating whereas the chance to cast The Thunder Rolled Like Waves on Black Seas is 5%.

 

In that monobehaviour the ability names listed file IDs which lead to separate monobehaviour files for each unlocked ability.

 

In both there was an "AbilityTriggerChance". This was 0.100000 for the ranger returning storm and 0.050000 for The Thunder Rolled. It therefore seems that we were right on the AbilityTriggerChance effect and this does reflect a % chance to hit from 0.010000 (1%) to 1 (100%).

 

However, whatever changes I made to abilitytriggerchance didn't lead to any changes in gameplay. I.e. I changed stormcaller to abilitytriggerchance = 0.9, which should equate to a 90% chance, but, alas, bolts were not flying everywhere in game.

 

Something seems to be overriding the edits from elsewhere. 

Share this post


Link to post
Share on other sites

Huh, how odd. I did exactly what you did but for some reason it worked with me.

 

To be more precise, I changed "AbilityTriggerChance = 0.100000" to "AbilityTriggerChance = 1.000000" in the MonoBehaviour ID 209 file of px1_battle_axe_wodewys.unity3d, then properly imported it back into the game. I loaded up Pillars, started a new game, used the console to give me Wodewys and beat up Calisca with it. It procced on six hits in a row (though not on grazes, which is correct), which is fairly unlikely if it was still operating at 10%, but perhaps more convincingly the item description had also changed. Instead of saying "10% chance to cast Nature's Mark on hit or crit" is said "casts Nature's Mark on hit or crit".

 

Now before I did this I had a theory as to why it wasn't working, which was that perhaps Steam was automatically checking some sort of checksum, noticing that it was wrong, and reverting the files to previous ones. I'll admit that this theory seemed unlikely as you would expect a rather long delay loading the game if this were happening, but it was the only possibility I could think of. However now that I've got the change to Wodewys I have no idea what's going on. Colour me very confused.

Share this post


Link to post
Share on other sites

Here is what I did step-by-step, just in case there's some minor difference that explains why it worked for me:

  • Open UABE.
  • Select File then Open Navigate to "\Pillars of Eternity\PillarsOfEternity_Data\assetbundles\prefabs\objectbundle" and double clicked px1_battle_axe_wodewys.unity3d.
  • Select File then Save, and save the file as "Export.assets" (I did this in a different folder to the PoE one).
  • Select File then Open and open Export.assets.
  • Click the Info button.
  • Scroll down to MonoBehaviour ID 209 and click the "Export Dump" button, and save it as Dump.txt.
  • Open Dump.txt, scroll to the bottom of the file and change "AbilityTriggerChance = 0.100000" to "AbilityTriggerChance = 1.000000" (or whatever other value you want). Save and close it.
  • Go back to the "Info" window for Export.assets and make sure MonoBehaviour ID 209 is still selected. Click the "Import Dump" button and double click Dump.txt.
  • Select File and Save. Close the Info window
  • Select File and Save in the main UABE window and save the file as "Import.assets".
  • Select File and Open and once again navigate to "\Pillars of Eternity\PillarsOfEternity_Data\assetbundles\prefabs\objectbundle" and double clicked px1_battle_axe_wodewys.unity3d.
  • Click the Import button and double click your Import.assets files.
  • Select File and Save and save the file as px1_battle_axe_wodewys2.unity3d
  • Backup the original px1_battle_axe_wodewys.unity3d file somewhere safe, then rename "px1_battle_axe_wodewys2.unity3d" to "px1_battle_axe_wodewys.unity3d" and move it to the "\Pillars of Eternity\PillarsOfEternity_Data\assetbundles\prefabs\objectbundle" folder.

That's all. Hopefully if it works the same as it did for me then the change should be in game.

  • Like 1

Share this post


Link to post
Share on other sites

Wow okay – so I just tried it again and it worked. 

 

I'm not sure what the issue was before. I had verified the integrity of the game cache via Steam before I started fiddling around with the items – maybe this was causing some kind of ongoing problem or maybe it was human error on my part i.e. not saving properly or something.

 

Either way now if I play the game offline or online on steam Wodewys works with 90%. 

Share this post


Link to post
Share on other sites

So now, it really should just be a simple case of going in to the main Unlabored Blade object bundle file - finding the related monobehaviour file for the firebug effect and changing the 0.03 variable back to 0.10 variable then doing the usual exporting, importing and dumping.

 

Problem solved!

Share this post


Link to post
Share on other sites

Excellent! It sounds like it shouldn't be too hard to modify Unlabored Blade in the same way.

 

I'll leave my far too detailed explanation of what I did up for anyone else who might want to know how to do this.

 

EDIT: also thanks for mentioning this in the other thread. I've enjoyed playing with the UABE and I suspect I'll do so a lot more.

Edited by JerekKruger

Share this post


Link to post
Share on other sites

Interestingly I tried basically the same process, but with sound files, at more or less the same time. The recipe I came up with looks very similar.

 

https://forums.obsidian.net/topic/86120-looking-for-soundtrack-files-with-tags-etc/?p=1862771

 

This probably isn't the easiest game to mod, but it would be fun to see a good modding community pop up, beyond just avatars. Maybe tools such as UABE can help in that endeavour.

Share this post


Link to post
Share on other sites

In most cases I think that fairly basic tweaks are all that'll really be necessary to fix things as 99% of the fundamental mechanics of this game are completely sound. It's not a game like Morrowind where to make it better they've literally had to reverse engineer the entire engine.

 

For example, going in to certain spells and making them do more damage, reducing others, reducing or increasing duration etc ... or giving items a buff. One thing on my todo list is to make Abydon's Hammer actually worth using. 

 

Some classes need a run through more than others – for example I think a lot of Chanters' phrases and invocations could do with buffing. Level 4 chants are an absolute disaster – the charmed, dominated and confused defence one should make you flat out immune to those effects in the same way a Priest can very easily.  The draining level 4 chant should at least be %30–%35 if it's ever going to compete with Mercy and Kindness.

 

There's lots of stuff I'd love to do – I just wish there was an easier way of doing it.

Share this post


Link to post
Share on other sites

For example, going in to certain spells and making them do more damage, reducing others, reducing or increasing duration etc ... or giving items a buff. One thing on my todo list is to make Abydon's Hammer actually worth using.

 

To be fair, it is worth using at the moment, just primarily for casters, and primarily for the +4 Might.

Share this post


Link to post
Share on other sites

 

For example, going in to certain spells and making them do more damage, reducing others, reducing or increasing duration etc ... or giving items a buff. One thing on my todo list is to make Abydon's Hammer actually worth using.

 

To be fair, it is worth using at the moment, just primarily for casters, and primarily for the +4 Might.

 

I mean to hit things with  :dancing:

Share this post


Link to post
Share on other sites

I mean to hit things with  :dancing:

 

What sort of crazy fool wants to hit things with the in game equivalent of Thor's Hammer?

 

EDIT: just in case it's not clear, I was joking.

 

Actually I've been thinking of making my own "redone Soulbound Weapons" mini mod for exactly this reason. 

Edited by JerekKruger

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...