Jump to content


Photo

Realistic random treasures


  • Please log in to reply
108 replies to this topic

#61 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 25 September 2009 - 07:01 AM

No, I am talking about moving POOR_BG1 to RNDMAGIC.2DA in a vanilla BGT install. to get it right would be to try and imitate BG1 behaviour in relation to getting the distribution the same (2D10 vs. 1D20).

I'd say leave it, because it might break some mods (like this one :P). I need 4 rows in either rndtreas or rndmagic to implement this, so if you added a row to rndmagic there'd only be 3. Plus now that I'm looking at it, it's not all that unbalancing if POOR_BG1 is unweighted, as long as the scroll is removed. You have a 1-in-20 chance of scoring a gem of either 5 or 10gp. Arguably, the latter (misc16 Fire Agate) might be a bit excessive for the "poor" but it is 1-in-20 so I guess we can let it ride. Plus you get an extra 1-in-20 chance of getting nothing with it in rndwep, so I guess it kind of balances out.

Now on the other hand, if you can move the other 4 BG1 rows from rndtreas to rndmagic in a non-CtB install, it'd make my job a lot easier, because then rndtreas has open rows either way, and I don't have to account for different versions with a lot more hackery than is already in this code.

Edit: Actually, I'm only appending 3 rows, so you could move it to rndmagic if you wanted, if it doesn't break other mods. I suspect there are very few mods that do anything with these tables apart from BGT, CtB and maybe 1 or 2 others, like UB and Exnem Vault (so says change-log anyway).

Edited by Miloch, 25 September 2009 - 07:27 AM.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#62 OneEyedPhoenix

OneEyedPhoenix
  • Member
  • 308 posts

Posted 25 September 2009 - 07:46 AM

Edit: Actually, I'm only appending 3 rows, so you could move it to rndmagic if you wanted, if it doesn't break other mods. I suspect there are very few mods that do anything with these tables apart from BGT, CtB and maybe 1 or 2 others, like UB and Exnem Vault (so says change-log anyway).


BGT and BG1UB for rndmagic.2da, BGT and CtB for RNDWEP.2DA, CtB for RNDSCROL.2DA, BGT for RNDEQUIP.2DA and nothing for rndtreas.2da in my BWS.
So not that many, no.

Edited by OneEyedPhoenix, 25 September 2009 - 07:46 AM.


#63 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 25 September 2009 - 05:03 PM

Now on the other hand, if you can move the other 4 BG1 rows from rndtreas to rndmagic in a non-CtB install, it'd make my job a lot easier, because then rndtreas has open rows either way, and I don't have to account for different versions with a lot more hackery than is already in this code.

The 4 BG1 rows from RNDTREAS reference RNDMAGIC, so it cannot be put in RNDMAGIC. If you are making dynamic modifications, you could try having a look at the BG1UB code. It's not very clean, but does its job.

Edit: Actually, I'm only appending 3 rows, so you could move it to rndmagic if you wanted, if it doesn't break other mods. I suspect there are very few mods that do anything with these tables apart from BGT, CtB and maybe 1 or 2 others, like UB and Exnem Vault (so says change-log anyway).

I will move the line then. BG1UB is the only mod that touches that line, and it looks at all five RND files for the line.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#64 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 26 September 2009 - 08:37 PM

BGTv1.07_rnd.zip

Cheers. Would you mind installing BG1UB and then send me the rnd*.2DAs again? You can uninstall it afterwards if you like. Either that, or if someone has an install with BGT and BG1UB (just not CtB or Exnem Vault) I'd appreciate your rnd*.2da files.

Edit: And I guess I need the rnd*.2da files from someone who has BGT and CtB (in either order) without Exnem Vault (damn mods :P).

If you are making dynamic modifications, you could try having a look at the BG1UB code. It's not very clean, but does its job.

I'm not so sure that it does now. Because although I got amul02 and ring01 entries in my rndmagic.2da, there's none in my rndtreas.2da. I suspect the problem may be with the READ/SET_2DA... 20. The weighted tables have only 19 columns (with the initial label column being 0), so you're not reading any rows with that. (Edit: doesn't make a lot of sense though, since rndmagic, being the other weighted table, should also have 19 columns). Edit2: Nevermind, it probably works. I bet I don't see them because Exnem overwrites rndtreas.2da :blink:.

If I do find those items, I'm moving them to columns 3(2) and 19(18), because I don't think they should be quite as common. As it is now, BG1UB patches them into columns 9 and 10, overwriting previously null treasure values, so it's upping the loot quotient again.

What a pain this is. I think BGT and CtB should both just hardcode their row additions, since they're the only two mods doing it (besides this one). Yes, the dynamic patching code is very fancy, but not really desirable IMO.

Edit: Tables obtained.

Edited by Miloch, 27 September 2009 - 08:48 PM.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#65 --OneEyedPhoenix--

--OneEyedPhoenix--
  • Guest

Posted 26 September 2009 - 10:36 PM

Edit: And I guess I need the rnd*.2da files from someone who has BGT and CtB (in either order) without Exnem Vault (damn mods :P).


I have these, can post them later today if you like. I have however done a changelog on all of them and posted the results above, so if that's all you need then consider yourself served.

#66 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 26 September 2009 - 11:17 PM

Edit: And I guess I need the rnd*.2da files from someone who has BGT and CtB (in either order) without Exnem Vault (damn mods :P).

I have these, can post them later today if you like. I have however done a changelog on all of them and posted the results above, so if that's all you need then consider yourself served.

I need the actual contents, since apparently Exnem Vault overwrote my rndtreas.2da. So I guess I just need that one.

Still kinda curious as to what happens with the tables if CtB is installed after BGT though. Not sure if I'm curious enough to do a test install on an external drive or something... :ph34r:

Edit: Tables obtained.

Edited by Miloch, 27 September 2009 - 08:47 PM.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#67 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 26 September 2009 - 11:54 PM

Cheers. Would you mind installing BG1UB and then send me the rnd*.2DAs again?

Sure I can, it's not like I am using this game anymore, after all I have about 10 others. :lol:
Attached File  BGTv1.07Tweaked_rnd.zip   3.06K   210 downloads
And BGT and then CtB installed.
Attached File  BGT_CtB_2das.zip   3.11K   211 downloads

Edited by Jarno Mikkola, 27 September 2009 - 09:03 PM.

Deactivated account. The user today is known as The Imp.


#68 OneEyedPhoenix

OneEyedPhoenix
  • Member
  • 308 posts

Posted 27 September 2009 - 05:27 AM

I need the actual contents, since apparently Exnem Vault overwrote my rndtreas.2da. So I guess I just need that one.


There you go.

Attached Files



#69 Hoppy

Hoppy

    Mage Hunter

  • Member
  • 2107 posts

Posted 27 September 2009 - 11:56 AM

Still kinda curious as to what happens with the tables if CtB is installed after BGT though. Not sure if I'm curious enough to do a test install on an external drive or something... :ph34r:



The random treasures in CtB are a bit screwy in some parts and I have not had the time to look into them for any of my recent CtB updates. There are instances where creatures have 10K gold or gems apiece. Mainly it is with the CBC8xxx named creatures or for the Company of Eight quests.

I can modify the CTB tables appropriately with the random treasure mod idea if that would make things easier :unsure:

I will keep following this topic in case something should be done on CtB's part and then I can update it for more compatibility with the random treasure mod.
?May God defend me from my friends; I can defend myself from my enemies.? - Voltaire

"If you think that a size of the mod indicates an amount of bugs that it introduces and their severity you're totally wrong...
Try not to use next time a load of shitty "super-mega-improving-tweaking-revising" small mods that you have installed and try to meet Wulfgar once again."
- King Diamond


Posted Image The Definitive Guide to Trolls

"Finding food and a place to sleep is your own business. I imagine Paul the Cat should have some fun with you, too" - Potencius in The Darkest Day
"You have been warned, little bastard!" -Khelben to a young <CHARNAME>in Check the Bodies
There are those who will snivel, and offer nothing in return except criticism, meanwhile never lifting a finger to do other than to cut other peoples labor down simply for the fact that they lack the capability to put anything of their own together. -erebusant

#70 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 27 September 2009 - 08:46 PM

The random treasures in CtB are a bit screwy in some parts and I have not had the time to look into them for any of my recent CtB updates. There are instances where creatures have 10K gold or gems apiece. Mainly it is with the CBC8xxx named creatures or for the Company of Eight quests.

I think it is not so much the random treasure, but hardcoded treasures on those creatures. And you've got a dracolich and a bunch of liches in that group. The dracolich alone has a star sapphire, a diamond and a "ring of dragons" worth 20,000gp :(. Not to mention a whole lot of other gear... but it is a dracolich after all. None of that is random treasure though. The liches have up to 4 random treasures - not something this would change (because they're liches). Some of the other cultists have more than one random treasure, which (most options of) this mod would reduce to 1. Also cbc8ctm1.cre gets his INT bumped up so he has a chance for scrolls. But oddly, all these CREs use the standard rndtreas.2da table, rather than the ones that CtB adds its items to dynamically - maybe there are other CREs that use those.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#71 Hoppy

Hoppy

    Mage Hunter

  • Member
  • 2107 posts

Posted 28 September 2009 - 03:38 PM

The dracolich alone has a star sapphire, a diamond and a "ring of dragons" worth 20,000gp :(. Not to mention a whole lot of other gear... but it is a dracolich after all. None of that is random treasure though. The liches have up to 4 random treasures - not something this would change (because they're liches). Some of the other cultists have more than one random treasure, which (most options of) this mod would reduce to 1. Also cbc8ctm1.cre gets his INT bumped up so he has a chance for scrolls. But oddly, all these CREs use the standard rndtreas.2da table, rather than the ones that CtB adds its items to dynamically - maybe there are other CREs that use those.



The main enemy like the dracolich and Zannaster have challenge related loot and they are fine. Mages and liches are fine as well as the undeads. There is a peculiarity in the Cult fighters usually having a rndtre01 or 02 item two to three times in the inventory. They have 0 gold on the CRE file but I noticed that the Quantity/Charges for these rndtre01/02 items are set to 1. Does this effect amplify the amount at all for the treasures? This is only in the CBC8CTF1, 2 and 3 CRE's. The others seem to have the other variants of rndtre__ items with Quantities/Charges set to 0 which seems more normal.
?May God defend me from my friends; I can defend myself from my enemies.? - Voltaire

"If you think that a size of the mod indicates an amount of bugs that it introduces and their severity you're totally wrong...
Try not to use next time a load of shitty "super-mega-improving-tweaking-revising" small mods that you have installed and try to meet Wulfgar once again."
- King Diamond


Posted Image The Definitive Guide to Trolls

"Finding food and a place to sleep is your own business. I imagine Paul the Cat should have some fun with you, too" - Potencius in The Darkest Day
"You have been warned, little bastard!" -Khelben to a young <CHARNAME>in Check the Bodies
There are those who will snivel, and offer nothing in return except criticism, meanwhile never lifting a finger to do other than to cut other peoples labor down simply for the fact that they lack the capability to put anything of their own together. -erebusant

#72 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 29 September 2009 - 06:46 AM

There is a peculiarity in the Cult fighters usually having a rndtre01 or 02 item two to three times in the inventory. They have 0 gold on the CRE file but I noticed that the Quantity/Charges for these rndtre01/02 items are set to 1. Does this effect amplify the amount at all for the treasures?

Zero and 1 should be equivalent on items that have no charges. The main problem seems to be they have multiple treasures - like I said, these'll get reduced to 1 unless they're liches or dragons. I can also nerf the fighters' intelligence so they don't get scrolls. I reckon you'll have enough chances for those what with all the mages and liches in that group.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#73 Hoppy

Hoppy

    Mage Hunter

  • Member
  • 2107 posts

Posted 29 September 2009 - 09:23 AM

There is a peculiarity in the Cult fighters usually having a rndtre01 or 02 item two to three times in the inventory. They have 0 gold on the CRE file but I noticed that the Quantity/Charges for these rndtre01/02 items are set to 1. Does this effect amplify the amount at all for the treasures?

Zero and 1 should be equivalent on items that have no charges. The main problem seems to be they have multiple treasures - like I said, these'll get reduced to 1 unless they're liches or dragons. I can also nerf the fighters' intelligence so they don't get scrolls. I reckon you'll have enough chances for those what with all the mages and liches in that group.


Sounds cool and I will definitely try the mod/component when it is available. It is probably something else in CtB that I can look into to fix locally but I remember form older versions' bug reports and King Diamond saying something was messed with the random treasure table. It never was mentioned as a CtB issue but it is an identical problem here with version 1.7.

http://www.shsforums...&...st&p=247583

I will try to look into it more because there is another oddity with that same quest with the cultists so I will test some things with this too.

Edited by Hoppy, 29 September 2009 - 09:25 AM.

?May God defend me from my friends; I can defend myself from my enemies.? - Voltaire

"If you think that a size of the mod indicates an amount of bugs that it introduces and their severity you're totally wrong...
Try not to use next time a load of shitty "super-mega-improving-tweaking-revising" small mods that you have installed and try to meet Wulfgar once again."
- King Diamond


Posted Image The Definitive Guide to Trolls

"Finding food and a place to sleep is your own business. I imagine Paul the Cat should have some fun with you, too" - Potencius in The Darkest Day
"You have been warned, little bastard!" -Khelben to a young <CHARNAME>in Check the Bodies
There are those who will snivel, and offer nothing in return except criticism, meanwhile never lifting a finger to do other than to cut other peoples labor down simply for the fact that they lack the capability to put anything of their own together. -erebusant

#74 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 29 September 2009 - 10:30 AM

It is probably something else in CtB that I can look into to fix locally but I remember form older versions' bug reports and King Diamond saying something was messed with the random treasure table.

I think it's a problem with the CtB CREs and item slots, not the tables - posted more details here, maybe something there will help. I do know that a lot of the creatures in the cb*.cre range are hosed in one way or another... there must be at least a couple hundred or more listed specifically in the Resource Fixer (and I'm not sure it actually fixes all of them them properly :().

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#75 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 05 October 2009 - 05:12 PM

As mentioned earlier, this is now a component in Aurora v2. OneEyedPhoenix and I tested it and it seems to be working as intended.

If you have any issues or thoughts for improving this component, please post them here.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#76 OneEyedPhoenix

OneEyedPhoenix
  • Member
  • 308 posts

Posted 09 October 2009 - 05:35 AM

Possibly, though you may just want to check that most of the relevant ones are addressed. Attached below in HTML and XLS (the latter is better if you have a spreadsheet program).

Note these are just unmodded BG2 CREs, though it'll affect other similar CREs in a Megamod (or Tutu etc.) install.


Do you know if it would be possible to make a list like this of party items in a savegame Miloch?
I'm thinking in terms of a reference list for balancing purposes without having to type it all out manually.

Edit: Never mind... Wisp was able to help me.

Edited by OneEyedPhoenix, 09 October 2009 - 08:03 AM.


#77 melkor_morgoth75

melkor_morgoth75

    Lord

  • Modder
  • 1509 posts

Posted 12 October 2009 - 12:21 AM

Miloch, i guess there should be something wrong with the "gold component". I dind't have time to dig and undestand through scripts, but i noticed in my game (i installed 10% gold for creatures) a Gibberling had 48 gold and a Ghoul the "standard vanilla" 45 gold. I don't believe they have assigned originally more than 400 gold ...

mm75

Tired of the same boring spawned creatures u face in BG? Try BGSpawn


#78 OneEyedPhoenix

OneEyedPhoenix
  • Member
  • 308 posts

Posted 12 October 2009 - 06:30 AM

Miloch, i guess there should be something wrong with the "gold component". I dind't have time to dig and undestand through scripts, but i noticed in my game (i installed 10% gold for creatures) a Gibberling had 48 gold and a Ghoul the "standard vanilla" 45 gold. I don't believe they have assigned originally more than 400 gold ...


I don't think this component affects random treasure... Or am I mistaken?

#79 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 12 October 2009 - 06:39 AM

Miloch, i guess there should be something wrong with the "gold component". I dind't have time to dig and undestand through scripts, but i noticed in my game (i installed 10% gold for creatures) a Gibberling had 48 gold and a Ghoul the "standard vanilla" 45 gold. I don't believe they have assigned originally more than 400 gold ...

I don't think this component affects random treasure... Or am I mistaken?

Actually it shouldn't affect stashes that have less than 200 GPs in them.

Deactivated account. The user today is known as The Imp.


#80 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 12 October 2009 - 10:21 AM

Miloch, i guess there should be something wrong with the "gold component". I dind't have time to dig and undestand through scripts, but i noticed in my game (i installed 10% gold for creatures) a Gibberling had 48 gold and a Ghoul the "standard vanilla" 45 gold. I don't believe they have assigned originally more than 400 gold ...

The creature gold component does nothing with scripts. Do those creatures *always* have the same amounts of gold? If not and the amounts were different, I'd say this is their random treasures generating a certain amount of gold as per rndtreas.2da. But a gibberling with "average" treasure shouldn't spawn more than 15 gold and a ghoul as "wealthy" (not sure why but this is standard BG2) can spawn 47 gold, but not 45 as far as I can tell. Neither creature has any "carried gold" in the vanilla game, so the gold component wouldn't affect them. And the random treasure component mainly prevents them from getting scrolls, not other stuff like gold.

Might want to do a weidu --change-log on those CREs (gibber01.cre and ghoul01.cre I guess) and attach the actual .cre files here too.

I don't think this component affects random treasure... Or am I mistaken?

Actually it shouldn't affect stashes that have less than 200 GPs in them.

The creature gold component only affects carried gold (hardcoded on the CRE files at offset 0x1c). I guess I could have it affect random gold if people want that - hadn't really thought about that. Currently, it affects any hardcoded gold greater than 3 (kinda pointless to do division on amounts under that). I don't know what Jarno's talking about - maybe the quest gold component which affects dialogue rewards greater than 100 gold.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle