Jump to content

A mod to solve the "random" loot problem


Recommended Posts

The game has a bunch of containers with magical items in them. Exactly which item depends on the day of month you loot them... and who the party leader is?

Rather than resigning ourselves to what Countess Circumstance (I don't want to say Lady Luck here) has decided we'll get, some of us endeavor to wait until specific days to loot these containers, or just ignore them and console in the item we want.

I would like to solve this with a mod. My idea is that these containers will instead hold a Capricious Cache. There will be many such CCs, each with a loot table corresponding to the container in which it was found. You can put the CC in a quick item slot, and activating it will cause you to launch into a dialogue with yourself. You will get a list of items matching what could have been in the container, as well as options to pick the "item of the day" and the most valuable item. The Capricious Cache will then be destroyed.

I have some plans to make this all feel immersive, but my main concern is, are these mechanics achievable through modding? I need to:

  • Create a bunch of custom items
  • Make the containers hold these custom items instead of the random loot
  • Make it so that the custom item can trigger a dialogue (like the Deck of Many Things from Watcher's Keep)
  • Make it so that the dialogue destroys the item and gives you a reward based on what you chose in the dialogue
  • (Bonus: Make the dialogue use some form of global variable so you don't get the full introduction to the Capricious Cache every time you use one)

The Garodh's Chorus items trigger dialogue when looted, so I can probably steal mechanics from those (although it'd be a bonus if you could take the CC with you and postpone the decision).

Edited by omgFIREBALLS
  • Like 1

My Deadfire mods
Out With The Good: The mod for tidying up your Deadfire combat tooltip.
Waukeen's Berth: Make all your basic purchases at Queen's Berth.
Carrying Voice: Wider chanter invocations.
Nemnok's Congregation: Lets all priests express their true faith.

Deadfire skill check catalogue right here!

Link to comment
Share on other sites

I've started by trying to alter the loot of a container. In PillarsOfEternity_Data there are a bunch of level and sharedassets files. level116 (no extension) seems to be the Encampment map; the very first area of the game. Viewing this with Unity Asset Bundle Extractor, there is a GameObject called Container_2D_Cloth_Dissapointer_H, which sounds like it should contain a certain pistol.

Now, which variable says so? The GameObject contains an array of 12 ComponentPairs. Position 0 seems to be dealing with the visual representation of the container, and position 9 with the sound effect of looting it. The remaining 10 are all mysteries to me, all of them having this structure:

image.png.ec21de2d9c30fa5fb8649972449e0572.png

The View asset of the m_GameObject simply selects the GameObject Base at the top of the hierarchy; it seems to reference the container I'm already viewing. If I click the View asset at the bottom, I get an error message saying Unable to resolve the target asset.

Since I had no guesses here, I started thinking that perhaps the pairing between containers and contents happens elsewhere. After all, the GameObject has a name, so it would be simple to map it. But, looking at the dependencies of this level, we see sharedassets88.assets. This generally refers to Endless Paths level 15 loot, which probably not coincidentally is where The Disappointer ends up if you don't find it while doing the starting area. Since the level depends on this asset, it's probably because it references The Disappointer in some way. And indeed, opening this sharedasset, we find a GameObject called Pistol_BACKER_The_Disappointer.

Mind you, the item itself (stats etc) seems to be defined in PillarsOfEternity_Data\assetbundles\prefabs\objectbundle\pistol_backer_the_disappointer.

So as my last idea, I thought that perhaps these m_FileID and m_PathID would refer to the GameObject in another file. For starters, the sharedassets88 dependency is 18th on the dependency list in UABE. The list also doesn't use zero-index. All these mysterious array positions refer to FileID 0 or 1. So, clearly they are not referencing the same list. What about the PathID then? Pistol_BACKER_The_Disappointer has PathID 89 in sharedassets88.assets, but none of the array positions reference this value.

There is also a shareadassets88.assets.resS file large enough to be significant, but UABE cannot read it.

I'm out of guesses. @Kvellen and @Noqn, my trusty Deadfire Modding Mentors, any chance you know anything about this too?

Edited by omgFIREBALLS
  • Like 1

My Deadfire mods
Out With The Good: The mod for tidying up your Deadfire combat tooltip.
Waukeen's Berth: Make all your basic purchases at Queen's Berth.
Carrying Voice: Wider chanter invocations.
Nemnok's Congregation: Lets all priests express their true faith.

Deadfire skill check catalogue right here!

Link to comment
Share on other sites

I don't know that I'll be able to offer much in the way of assistance here I'm afraid. assetbundle files are something I have tried tinkering with in both games to the result of either corrupting the file or with nothing at all changing. This and other factors mean that PoE1 modding isn't something I have really done much looking into as a result.

One tool that might possibly be useful for looking through data in game is the Runtime Unity Editor: https://github.com/ManlyMarco/RuntimeUnityEditor
 will say, from my limited use of it, it's not the most intuitive interface to use. For one it doesn't seem to filter out duplicate information so searching through scripts and gamedata ends up being pretty labyrinthine. But it at least allow for poking around objects in the scenes and examining their contents. And supposedly it has functionality that allows editing Unity games in realtime.
Though I haven't really had the time to really delve into figuring out how that works, or this feature extends to PoE1/Deadfire.

Edited by Kvellen
  • Like 2
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...