Jump to content

Important info for all modders adding unique items to the game via vendors


Recommended Posts

This is something I was just mentioning in peardox's The Red Hand thread, but I realized it's probably something all modders should be aware of, if they aren't already.

 

First off, a tiny amount of background. While all the lootlists that vendors have in their shops look identical on our end (near as I can tell), something inside the code that we can't see (yet) makes some stores (or more technically the lootlist of a store) restock and some not restock.  And this makes a lot of sense, since one shouldn't be able to buy (or steal if it's in a container) the Infinity Plus One Sword more than once.

 

Okay Zap, got it.  Make sure I add my uniques to a store which doesn't restock if I don't want folks to buy it more than once. 

 

Well, unfortunately, there's a catch.

 

The catch is, when I say a store/lootlist never restocks, I mean it NEVER restocks once it's been first accessed.  Including if you've added something to it mid-game via a mod.

 

I go into a pretty good amount of detail over here in peardox's thread, but the upshot is:

 

If someone starts a new game with your mod, an item added to a 'never restock' store will always be there to be bought when they get to the seller.

If someone has never opened X's shop and it doesn't restock,  items added mid-game via a mod will also be there to be bought.

However, if someone has already opened X's shop and it doesn't restock, an item added mid-game via a mod will never appear, near as I can tell.  And I've done a fair amount of testing on this, though it is possible I haven't found a trigger yet.

 

This means for a fair amount of folks, items won't be available mid-game if they've already talked to a seller if the mod adds it to a store which never restocks.

 

The flip side is, if an item IS added to a store which does restock mid-game and they've already talked to the seller in question, then it can be bought.  And bought again and again and again. ;)

 

I'm posting this partially as a Public Service Announcement so folks can add a note to their mods if they are using a never restock vendor that it might not always be available mid-game.  But I'm also adding this as a FYI for any frustrated modders out there wondering why their items aren't appearing in a vendor when they are doing testing.

 

...

 

This wouldn't be an issue if we could create our own stores completely brand new, of course. Not that I'm hinting to Obsidian or anything. ;)

Link to comment
Share on other sites

Note, if anyone knows a way around this and it works, please let me know.  :thumbsup:

 

(And, yes, I've tried sailing from one end of the map to another, waiting days and days and days in-game, entering dozens of different zones AND restarting/reloading a game with nothing to show for it)

 

Secondly, if this was already common information.... Well, maybe it'll be of some help out there to folks who weren't aware of it. :lol:

 

At the very least, if this is old info, repeating it for folks just entering the modding scene should be helpful, I think . :)

Link to comment
Share on other sites

Actually I don't believe this to be anything to be doing with ReStock (the text don't appear anywhere)

 

If you've got TT1's Uniques installed REMOVE IT (put it back later, of course)

 

Take a save game from anywhere that ain't Neketaka, if you've not got one of those sail ANYWHERE [this is important ONLY if you have TT1's Uniques]

 

Save game, Quit to Desktop (!IMPORTANT)

 

Install TT1 Uniques and load you load your <Somewhere else / no TT1> save and go Back to Neketeka -> Wild Mare or load your TT1-less version

 

Go to Wild Mare

 

Look - Dead Parrot - gotbuy one, it vanishes from the list as it's a 1 sale unique

 

Save game, Quit to Desktop (!IMPORTANT)

 

[This step is only important if checking your own mods and you've not using a somewhere else save]

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

Sail to Port Maje (travelling time is long - this is good)

 

Get off the ship @ PM Harbour

 

Rest for 26 hours

 

Get back on ship and go Back to Neketeka -> Wild Mare

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

Go buy another Dead Parrot

 

Rest for 26 hours 

 

Go buy another Dead Parrot

 
This is a known issue I've PMed Devs on
 
@TT1 noted the 26 hour for stock to refill on Uniques, the biggest problem is, however...
 
If you install a mod that affects a vendor that vendor's list appears to be cached
 
The ONLY solution I've found is to sail to a completely diffo Island and sailing back again.
 
With my "The Red Hand and friends" I pointed this out to the guy who couldn't get it working (Fair Trade actually removes the price barrier - oops)
 
I've only seen this happen a few times so far, specifically when I was doing item mods
 
I did another mod that altered a character's options but as override don't work there yet had to modify exported/design - this is something I believe OK as long as you don't publish for experimentation
 
Basically the trick is to sail somewhere else then save and 
 

Save game, Quit to Desktop (!IMPORTANT)

 
Reload and go back then wait for 26 hours if you want another
 
I've not done this fully to find out what works and don't
 
I can tell you, for a fact, that say you're in Neketeka with no Dead Parrots with the MOD installed and take a trip to other areas when you go back to Wild Mare there are STILL no Dead Parrots owing to what I believe to be Cacheing
 

Rest for 26 hours 

 

Go buy another Dead Parrot

 
For you're own MODs you'll wanna do the sail away stuff or use a save from somewhere else
Edited by peardox

OK Fair warning has been applied

 

I'm gonna move the domain to https://perspak.com early Feb but will keep all content

 

There are reasons behind this move which basically boil down to unifying my release schedule

 

My friends are welcome to play (I'll set you up your own areas if you desire them)

 

Please note that this process is messy so may take a few weeks 

Link to comment
Share on other sites

Okay, let me break this down a tad, especially as I discovered a couple of things today.

 

The vast majority of stores will restock every in-game 26 hours, but a small number will never ever restock.  The Berath's Blessing vendor in Port Maje, for instance (called Well-traveled Supplier).  If you buy all his items out and then return months later, his store is still empty.  You can visit 20 different zones and save and quit to desktop to your heart's content, he'll never add anything else.  Even if it's modded in mid-game. 

 

I know this for a fact because I tried to add a Spyglass to him mid-game and it never showed up, no matter what I did UNLESS I had never opened his shop before.  If I hadn't, then the Spyglass shows up.

 

The vendor in the Wild Mare who sells the Dead Parrot, via that mod, restocks every 26 hours.  This is why one is able to buy another Dead Parrot just by waiting a day.  It's not really a bug, because the LootListID and store doesn't know that it's something that can be bought only once.

 

But the person you picked to be your Red Hand (and friends) merchant will never restock the part of her store that sells the Shorewalker Sandals if it's been opened once before installing the mod.  I am VERY certain of this. 

 

To make triply sure, I installed your mod, started the game, opened up  a save where I was in Nekataka, ran around Nekataka some more, saved the game again and quit to desktop.  Restarted the game, loaded up that save and sailed to Port Maje, and was unable to buy the items because I had already opened her shop long ago.

 

I can sail to one end of the map to the other.  I can quit to Desktop and restart many times.  The items there will never appear IF I had already seen her store in a game before installing this particular mod.

 

====

 

The wrinkle I discovered today is that many of the Unique Items for sale in the game are not on any LootListID list in items.gamedatabundle.  

 

Take Queen's Rule, for instance.  It's sold in Marihi's Metalwork store.  Yet the UUID for Queen's Rule ("6fa1e8b1-59da-490d-9b58-0889c7d0371a") is not in anywhere in a  LootListID that forms a store's inventory in items.gamedatabundle.  It's almost certainly in the level data or somewhere else in the compiled gamefiles.

 

But it is NOT in any of the lootlists in (or pointed at in):

 

"Store_05_AD_Marihi"

"Store_05_AD_Marihi_CarocBreastplate"

"Store_05_AD_Marihi_Exceptional_Weapons"

"Store_05_AD_Marihi_Fine_Armor"

"Store_05_AD_Marihi_Fine_Weapons"

 

Yet it can be bought, and exactly once.

 

I did a quick check and most of the unique items in the game are not in LootListsIDs in any of the public gamedatabundles.  I suspect that this is how the game is making it so most unique (and other items) can be bought only once. There's some sort of code/flag that says whether or not something can be bought more than once, and we just don't have access to this yet.  

 

If you want to check my work, try to find Queen's Rule or Spearcaster in any of the Lootlists in the game.  You'll find the entires for the items themselves.  You'll find the recipes that modify those weapons.  But you won't find where they are sold in the public gamedatabundles.  You'd probably find them in the level data somewhere, but that's not easily useable by us yet.  

 

I do have a few work arounds I'm playing with, but they're very kludgy and probably not worth mentioning right now.

 

(More in my next post)

Link to comment
Share on other sites

peardox, to show what I mean by all of this, I'm going to attach a save file in this post, with The Red Hand mod installed, but only installed AFTER I had already talked to Eofania and seen her shop.

 

Go ahead and use it in your game where The Red Hand (and friends) mod (and only that one) has been installed.

 

It is currently set in at the entrance to Periki's Outlook in Nekataka.  Exit the city by boat and sail to Port Maje, and then go to Satahuzi and talk with Eofania.

 

If you can get that party to ever see the items in The Red Hand (and friends) mod, I'll be surprised.  Coz no matter what I do, including quitting to desktop after visiting other areas, they'll never show up.

 

(If it matters, it's a 1.2.0 saved game)

((it is also fairly early on in the game, as I wanted to get the file size under the 1MB limit))

Porthos (PerikisOverlook) (d41075f5-0d41-4911-b032-988505a73007) (756538631).savegame.zip

Edited by Zap Gun For Hire
Link to comment
Share on other sites

I only test on release data - long time doing iOS + Droid proves checking on unreleased causes more issues than solved

 

I'm a Beta Backer anyway - tried it this week, go the Beta (no tests)

 

No 1.2 I can see

 

If this is privilaged info PM me

OK Fair warning has been applied

 

I'm gonna move the domain to https://perspak.com early Feb but will keep all content

 

There are reasons behind this move which basically boil down to unifying my release schedule

 

My friends are welcome to play (I'll set you up your own areas if you desire them)

 

Please note that this process is messy so may take a few weeks 

Link to comment
Share on other sites

I only test on release data - long time doing iOS + Droid proves checking on unreleased causes more issues than solved

 

I'm a Beta Backer anyway - tried it this week, go the Beta (no tests)

 

No 1.2 I can see

 

If this is privilaged info PM me

 

I'm also on Steam, if it matters.

 

Still, I can revert to 1.1.1 and provide a different save file.  It'll just take a bit.

 

*uninstalls beta*

*waits waits waits*

*goes back to public fork*

 

Here is a 1.1.1 saved game attached in this post with your mod installed with the exact same situation as before.  The party (a very low level one) is in Periki's Overlook in Nekataka.  They have already talked to Eofanaia before I had installed your mod.

 

If you sail to Port Maje and then go to talk with her, I am fairly certain you won't be able to get the items listed in The Red Hand mod to appear in her store, even after Quiting To Desktop and visiting other areas of the map. 

Porthos (PerikisOverlook) (d41075f5-0d41-4911-b032-988505a73007) (756538733).savegame.zip

Edited by Zap Gun For Hire
Link to comment
Share on other sites

Save game, Quit to Desktop (!IMPORTANT)

 

 

That's one quite annoying part of the current game engine. There is no ingame way to reload gamebundle files. The stringtables for translations are reloaded when changing the language and leaving the settings menu. But not the gamebundle files.

And to restart the entire game to check any change in one file is quite tendious.

 

@obsidian Can you put a „reload mods“ console command in there? And announce it.

Link to comment
Share on other sites

 

Save game, Quit to Desktop (!IMPORTANT)

 

 

That's one quite annoying part of the current game engine. There is no ingame way to reload gamebundle files. The stringtables for translations are reloaded when changing the language and leaving the settings menu. But not the gamebundle files.

And to restart the entire game to check any change in one file is quite tendious.

 

@obsidian Can you put a „reload mods“ console command in there? And announce it.

 

 

I've got somewhat good news for you then.  I'm fairly sure that when mods are selected/deselected via the Mod Manager in 1.2.0 it'll load up the new gamedatabundles when you reload the game.

 

I say that because I used to have to Quit to Desktop to load up my mod changes, but they seem to now take affect when I'm in the mod manager and I select/deselect/reselect them. 

 

Still have to quit to the main window so it's not as good as in-game, but it's better than quitting to desktop each and every time I want to check something.

Edited by Zap Gun For Hire
Link to comment
Share on other sites

I'll go download the Beta again

 

I have explanations for your missing UUIDs as well but wanna double check first

Edited by peardox

OK Fair warning has been applied

 

I'm gonna move the domain to https://perspak.com early Feb but will keep all content

 

There are reasons behind this move which basically boil down to unifying my release schedule

 

My friends are welcome to play (I'll set you up your own areas if you desire them)

 

Please note that this process is messy so may take a few weeks 

Link to comment
Share on other sites

@ZapGunForHire

 

That was a weird experience (Tuk Tuk Peaks - where's Dorland?, where did all these clouds come from <G>)

 

Yep - it's not picking up TRH + Friends...

 

Gonna experiment.

  • Like 1

OK Fair warning has been applied

 

I'm gonna move the domain to https://perspak.com early Feb but will keep all content

 

There are reasons behind this move which basically boil down to unifying my release schedule

 

My friends are welcome to play (I'll set you up your own areas if you desire them)

 

Please note that this process is messy so may take a few weeks 

Link to comment
Share on other sites

Hehehe

 

OK - it's a hack...

 

*.savegame are just Zips

 

Extract

Delete ar_0907_pm_huana_settlement_ext.fog + .lvl

Zip and rename to <something>.savegame and stick it in your SavedGames folder

 

There are now two versions of the same save - in my case the first one was the modded version

 

 

fixedsave.png

 

 

 

  • Like 1

OK Fair warning has been applied

 

I'm gonna move the domain to https://perspak.com early Feb but will keep all content

 

There are reasons behind this move which basically boil down to unifying my release schedule

 

My friends are welcome to play (I'll set you up your own areas if you desire them)

 

Please note that this process is messy so may take a few weeks 

Link to comment
Share on other sites

Oh

 

You can grep out c164ad1a-fabc-4c50-9238-c86f2f8999ad (Eofina's vendor ID from the conversationbundle)

 

This will reveal it only occurs in ar_0907_pm_huana_settlement_ext.lvl so that's the one to remove

 

This allows for a useful little utility as it's easy enough to grep out all the Vendor IDs (in game - not loot lists) from *.conversationbundle

 

These are easy enough to automate as well (which vendor has which in-game Vendor ID) from the SpeakerID which links back to items.gamedatabundle

 

So - I could create a page where you upload a savegame and it returns it minus the offending "Seen it"

 

More investigation required - I'd guess just changing the vendor ID to 00000000-0000-0000-0000-000000000000 would fix the issue (may try that later)

  • Like 1

OK Fair warning has been applied

 

I'm gonna move the domain to https://perspak.com early Feb but will keep all content

 

There are reasons behind this move which basically boil down to unifying my release schedule

 

My friends are welcome to play (I'll set you up your own areas if you desire them)

 

Please note that this process is messy so may take a few weeks 

Link to comment
Share on other sites

 

So - I could create a page where you upload a savegame and it returns it minus the offending "Seen it"

Good work.  :thumbsup:

 

I personally won't need this as I'm handling Ultra Rare/Mutually Exclusive unique items differently on my home mod(s), but this might be useful for many folks who are using mods like yours and others in the future. 

Edited by Zap Gun For Hire
Link to comment
Share on other sites

Lootlists occur in only two places

 

For example 6fa1e8b1-59da-490d-9b58-0889c7d0371a is in ...

 

[GREP wait for 8 mins]

 

I'd stick this on my server which would be a lot faster but it costs me cash

 

Pillars of Eternity II Deadfire/PillarsOfEternityII_Data/level55

Pillars of Eternity II Deadfire/PillarsOfEternityII_Data/exported/design/gamedata/items.gamedatabundle
 
Technically speaking, starting from the LootList attached two objects together - we now know level55 and items contain that UUID
 
What you NOW need to do is remove irrelevant data so look her up in characters - we're only looking for one UUID - the SpeakerID
 
So - a simple search shows her as 050e3a6a-d7d6-4b5b-a062-f4942d87bb44 (forget this one)
 
Her SpeakerID is 72f117fd-39eb-4f22-8969-55e8f98b13a4 so let's go find that one
 
Next search is for her SpeakerID - we already know it's gonna appear in character and implied speakers 
 
Pillars of Eternity II Deadfire/PillarsOfEternityII_Data/exported/design/gamedata/characters.gamedatabundle
Pillars of Eternity II Deadfire/PillarsOfEternityII_Data/exported/design/gamedata/speakers.gamedatabundle
Pillars of Eternity II Deadfire/PillarsOfEternityII_Data/exported/design/conversations/05_neketaka_artisans_district/05_cv_marihi.conversationbundle
 
We're only bothered about the convo bundle - Openit + look for OpenStore which yields 3f84e9ad-43c9-4ef6-a8c6-5b6acd3380b3
 
Let's go search for that (anyone feeling level55 coming up? Not pressed return yet)
 
Pillars of Eternity II Deadfire/PillarsOfEternityII_Data/level55
Pillars of Eternity II Deadfire/PillarsOfEternityII_Data/exported/design/conversations/05_neketaka_artisans_district/05_cv_marihi.conversationbundle
 
So - we've not got direct linkage
 
Level55 contains all three things we were looking for by backtracking and linking stuff together
 
We can now positively identify CHA_05_AD_Marihi owing the lootlist 6fa1e8b1-59da-490d-9b58-0889c7d0371a which is part of 3f84e9ad-43c9-4ef6-a8c6-5b6acd3380b3 (the last one not being in exported)
 
Fun, this, Eh?

OK Fair warning has been applied

 

I'm gonna move the domain to https://perspak.com early Feb but will keep all content

 

There are reasons behind this move which basically boil down to unifying my release schedule

 

My friends are welcome to play (I'll set you up your own areas if you desire them)

 

Please note that this process is messy so may take a few weeks 

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...