Larian Studios
Posted By: iru ARTI - Always Regenerate Trader Inventory - 06/08/14 04:48 PM
So, I've found an easy way to make the vendors regenerate their stock, you only have to leave the barter window not dialog but the barter window will take longer to load. 6-7 seconds for me when I tried it just now.

I made a copy of the Trade in the Story Editor and in my copy I changed line 114 and line 140.

PROC
GenTradeItems((CHARACTER)_Player,(CHARACTER)_Trader)
AND
DB_TraderGeneratedTreasureForLevel(_Trader,_OldLevel)
AND
CharacterGetLevel(_Player,_NewLevel)
AND
_NewLevel > _OldLevel
THEN
NOT DB_TraderGeneratedTreasureForLevel(_Trader,_OldLevel);
DB_TraderGeneratedTreasureForLevel(_Trader,_NewLevel);
DoGenTradeItems(_Player,_Trader);

to _NewLevel >= _OldLevel

And also

PROC
GenTradeItems((CHARACTER)_Player,(CHARACTER)_Trader)
AND
NOT _Trader.DoesNotWantToTrade()
AND
LastTradeItemGeneration(_Trader,(INTEGER)_THLastGen)
AND
_THLastGen != 0
AND // check if last generation was long enough ago:
Time(_,_,_TH)
AND
IntegerSubtract(_TH,_THLastGen,_Delta)
AND
_Delta >= 48
THEN
DoGenTradeItems(_Player,_Trader);

to _Delta >= 0

I haven't looked into how to properly build and publish a mod yet though. I took Rhidians purchasable skill books and added my changes there just to try it out. If someone wanna make a module and share it with the world I'd only be grateful.

EDIT: Successfully made a mod after all:
https://www.dropbox.com/s/9s9snwsogeasitx/ARTI.zip
Posted By: iru Re: ARTI - Always Regenerate Trader Inventory - 06/08/14 06:16 PM
WARNING
Please note that this mod makes the game a whole lot easier. With crafting and ever regenerating vendors you got all the gold in the world. And thanks to the mod you can find stuff to spend it on as well.

If you want a challenge this isn't the mod for you.
Posted By: Joel Re: ARTI - Always Regenerate Trader Inventory - 06/08/14 06:31 PM
I've been waiting for something like this amazing work! I would love to see this module combined with modified loot and faster walking speed should be fun!
Posted By: iru Re: ARTI - Always Regenerate Trader Inventory - 07/08/14 11:15 AM
I did try this mod out a bit yesterday evening and found out that sometimes the trade will not work properly, resulting in you giving the trader your part of the trade put not receiving what you traded for. I don't know why it happens or how to counter it as of now. It happened rarely.
Posted By: Magus Re: ARTI - Always Regenerate Trader Inventory - 10/08/14 02:21 PM
I tried your mod with a new game and sold that starter hp potion to the drunken guards at the bridge. I kept reloading trade screen and that potion began duplicating till it hit the stack limit 50. It looks like this bug happens with every stackable item sold to trader's inventory. Odd.
Posted By: iru Re: ARTI - Always Regenerate Trader Inventory - 11/08/14 05:58 AM
That's fascinating. My mod keeps all of the code from Trade for clearing the vendors inventories Before generating so I have no idea why it does that. I'm currently playing without the mod and spend my time trying to finish the game so I won't do any updates to this for the coming week or so in the least. Anyone who feels like making changes to it are welcome to do so.
Hi I can't get this mod to work. I placed the folders into the mod and public folders in the \Divinity - Original Sin\Data folder and started a new game then copied the meta.lsb from the save folder across and 2 of the mods(fourplay and purchasable skillbooks) are working but this one is not please help.
Posted By: weixxx Re: ARTI - Always Regenerate Trader Inventory - 22/08/14 05:30 AM
I have the same problem.
Love this mod, makes it a ton of fun, it's almost as fun as loot-whore-reloading, if not more!

For those who cannot get working, all I did was drag the mod files to the Divinity main folder.
Hi, can you please update this mod so traders take less time to load and possibly make the mod crash the game a lot LESS? Thanks, Manwich!
Posted By: Sirian Re: ARTI - Always Regenerate Trader Inventory - 01/09/14 05:36 PM
Downloaded this and worked great for a day or two...now it crashes to desktop everytime I try and trade with anyone....no idea what its related to but it seems like once I trade one item to a vendor it won't ever let me trade with them again without a crash
Here's my attempt at doing the same thing. I deleted the lines which are marked in the first post, and also deleted the line with the "AND" above. Seems to work fine in my game so far.

Download
© Larian Studios forums