Jump to content


Photo

Random treasure


  • Please log in to reply
18 replies to this topic

#1 TotoR

TotoR
  • Modder
  • 105 posts

Posted 10 December 2020 - 09:50 AM

Hi,

I am not sure if it is the right place for this post but let me explain: when I use the component "Change creature gold carried" the random treasure table get fill with stars (*) - this is not the issue.

After that when I open a create with random loot I might find an empty groud item box that bloc all my inventory. Does anyone know of this bug and is there a way to get rid of it without changing every star for the rnd table for another value?

I play with BGT and some others mods but the game is reacting the same way with the component "Change creature gold carried" alone.



#2 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 10 December 2020 - 02:47 PM

Hi,

 

This is odd, since that component by itself does nothing with random treasure tables, but it might be something in the main component or something else. For starters, can you post your SETUP_AURORA.DEBUG file contents and also WeiDU.log from your game installation folder. If they're huge (most likely), just attach them or enclose them in SPOILER tags (if those still work 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


#3 TotoR

TotoR
  • Modder
  • 105 posts

Posted 11 December 2020 - 04:41 AM

Hi Miloch,

 

First thing first, thank for your mods and time that you share with others.

Like I have try to say, I am not sure where post this bug. I don't think that there is an issue with AURORA component but more with BG2...

When the component from AURORA change 001 to " * " in the rndtreas.2da (as intended), it seems that the engine does not treat it like it should:

  • If I understand it correctly " * " in rndtreas.2da is used to create "no treasure". However, when I loot some random treasure where there is one (a "no treasure" - for exemple rndtre01.itm in a create) the loot bloc looks empty but there is something that I can loot.
  • If looted, it fills one bloc that look empty in the inventory, it makes impossible further loot and is undropable - Only Near infinity can solve this issue.

 

I have attached Weidu and Debug but I don't think that would help.

Attached Files


Edited by TotoR, 12 December 2020 - 08:49 AM.


#4 Truman

Truman
  • Member
  • 75 posts

Posted 12 December 2020 - 03:08 AM

I'm curious to see what you come up for this, i have had it for years. When you open a chest, crate, table, shelf, whatever and the first square is blank but there are items in the following squares, what i do is drop an item in the container and see if it fills the empty square. If it does fill the empty square then the Aurora mod moved the original item but didn't update the position of the rest of the items, it is then safe to loot the container. If the item i drop doesn't fill the first square, i take back my item and then leave the container alone and don't touch anything else, because you are right only shadow keeper or some other game editor can clear your inventory of the non item.

Sometimes there is a blank square somewhere after the first, my test will still work.


Edited by Truman, 12 December 2020 - 03:09 AM.


#5 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 13 December 2020 - 02:28 AM

Okay, so let me get this straight... this bug happens with the "Change creature gold carried" component installed but not without it? Also, I stand corrected (by my own coding); this component does change the random treasure tables (namely for random amounts of gold creatures might carry). Therefore, can you please attach the rndtreas.2da file from your game's override folder so we can take a look at it.

 

Offhand, it sounds like the game is trying to spawn a nonexistent item (not just a * that the game should interpret correctly), but I dunno; it really seems we would've caught that after all of these years. I vaguely recall something similar cropping up under Nvidia glitches but can't find any reference to that now. But you might as well note your video hardware too.


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


#6 Truman

Truman
  • Member
  • 75 posts

Posted 14 December 2020 - 04:21 AM

I missed the part about creature gold carried. My problems stems from the randomizing the treasure location component. I believe that the Auroa mod is the only one that does that in my installs. The graphics are done by Nvidia GeForce GTX 1050 Ti, however that is only my current graphics card, it has been doing this for longer then my current card. Regarding an attachment i don't know how to do it, the help page didn't help.



#7 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 14 December 2020 - 08:10 AM

If you go to More Reply Options at the bottom when replying to a post, you should be able to Upload and Attach files.

 

If you can reproduce the bug on a character (by looting the offending non-item) and then export and attach the character (.chr) file, that might also help.

 

Edit: Oh, and also include your WeiDU.log and SETUP_AURORA.DEBUG since you seem to have issues with a different component than TotoR does.


Edited by Miloch, 14 December 2020 - 08:12 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


#8 TotoR

TotoR
  • Modder
  • 105 posts

Posted 14 December 2020 - 10:56 AM

Hi Miloch,

This bug is not related to AURORA components (I have try with or without) but with the " * " in the rnd*.2da files but it is revealed by it. In vanilla game you won't come across this bug as the rnd*.2da are not filled with " * ". It is possible to change all " * " by, for example, "1" to avoid this bug.

I have taken a look at the link you provide, but I haven't found any clues about this bug (I will that a new look when I can). However, One thing is strange, if I drop an item from my inventory to the container, it will fill the blank block and the 'no treasure" bug will disappear.

 

I will continue searching; my graphic configuration is Nvidia GTX 970M + HD graphics 530.

 

Attached Files



#9 Truman

Truman
  • Member
  • 75 posts

Posted 15 December 2020 - 04:32 AM


If you go to More Reply Options at the bottom when replying to a post, you should be able to Upload and Attach files.

 

If you can reproduce the bug on a character (by looting the offending non-item) and then export and attach the character (.chr) file, that might also help.

 

Edit: Oh, and also include your WeiDU.log and SETUP_AURORA.DEBUG since you seem to have issues with a different component than TotoR does.

 

That is interesting. On my page the 'More Replay Options' is greyed out. I assumed that it didn't work so i never tried it. However, i did get it to work. This post has ben modified by me several times, this time i got it right.

 

 

Attached File  SETUP-AURA.DEBUG   68K   229 downloads

Attached File  WeiDU.log   51.83K   202 downloads

Attached File  RNDTREAS.txt   6.46K   202 downloads 


Edited by Truman, 15 December 2020 - 01:35 PM.


#10 TotoR

TotoR
  • Modder
  • 105 posts

Posted 16 December 2020 - 06:03 AM

Hi Miloch,

 

Sometimes the answer is already in your possession...

 

I have found this on gibberlings3 : https://gibberlings3...ob/rndtreas.htm

 

"If RNDTREx#.ITM references a non-existant or an ignored row number (or if #=0 under any circumstances), then RNDTREx#.ITM is replaced by an erroneous invisible item that cannot be removed. Note that the replacing item is NOT RNDTREx#.ITM itself, in this case. This blank item can likely be altered by setting the default 2da entry to a valid item."

 

" *, that is, a single asterisk, generates an erroneous item, i.e. an invisible item that cannot be removed. This is useful if you want your creature not to drop anything, but you do not want to use this for containers and item piles"

 

In conclusion, "Change creature gold carried" by replacing figures by "*" create an invisible item that cannot be removed in containers. One way to avoid this seems to simply replace in "ag_cres.tpa" the ligne 23 ~*~ by ~001~.



#11 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 16 December 2020 - 07:54 AM

Yeah, I saw that. Apparently, that's a new finding since we made the mod; I doubt we'd've used the * otherwise. Other mods seem to use it (apparently SCS or another DavidW mod judging from Truman's rndtreas table). But I am guessing this *might* work for creatures but not random gold in chests. Either way, having invalid items in the game doesn't seem right.

 

So yeah, I have put in a minimum check of 1 and maximum of 256 (also per the IESDP) for random table-generated gold here. Uninstall the component, download the attached ag_cres.tpa file (below) into your aurora/lib folder (overwriting or renaming the existing file), and reinstall it. Let me know if there are other issues.

 

Changelog (of sorts) for ag_cres.tpa 2020-12-19:

- Added minimum and maximum random table gold checks

- Changed hardcoded creature list to regexp

- Replaced * values with 1 gold to prevent invalid items from appearing


Edited by Miloch, 19 December 2020 - 07:16 AM.
attachment updated

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


#12 Sam.

Sam.
  • Administrator
  • 1335 posts

Posted 16 December 2020 - 09:59 AM

So yeah, I have put in a minimum check of 1 and maximum of 256 (also per the IESDP) for random table-generated gold here. Uninstall the component, download the attached ag_cres.tpa file into your aurora/lib folder (overwriting or renaming the existing file), and reinstall it. Let me know if there are other issues.

 

Changelog (of sorts) for ag_cres.tpa 2020-12-16:

- Added minimum and maximum random table gold checks

- Changed hardcoded creature list to regexp


If I get a confirmation from a player that this solves the issue without having unintended side effects, I'll push it as an update to the official Aurora GitHub repo.


Edited by Miloch, 19 December 2020 - 07:13 AM.

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

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

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#13 Truman

Truman
  • Member
  • 75 posts

Posted 16 December 2020 - 05:23 PM

Yeah, I saw that. Apparently, that's a new finding since we made the mod; I doubt we'd've used the * otherwise. Other mods seem to use it (apparently SCS or another DavidW mod judging from Truman's rndtreas table). But I am guessing this *might* work for creatures but not random gold in chests. Either way, having invalid items in the game doesn't seem right.

 

So yeah, I have put in a minimum check of 1 and maximum of 256 (also per the IESDP) for random table-generated gold here. Uninstall the component, download the attached ag_cres.tpa file into your aurora/lib folder (overwriting or renaming the existing file), and reinstall it. Let me know if there are other issues.

 

Changelog (of sorts) for ag_cres.tpa 2020-12-16:

- Added minimum and maximum random table gold checks

- Changed hardcoded creature list to regexp

 

AH, When this first showed up, the Auroa mod was the only new mod that i installed. It seemed obvious that it was the culprit. I believe that i was wrong about the randomizer in the Auroa mod. I admit that it was a guess on my part. TotoR went a few more steps then i ever thought of. Once i found a work around, i never bothered to post it anywhere. I kept looking to see if anyone else ever had the problem with blank squares in containers, i never knew anything about creatures. Either creatures had something or they didn't. 

Just to clarify one point for Sam, if i looted 100 containers i might have one of them with an empty square, on occasion two. There is no telling if and when i may run into an empty square, it was always rare.

However, i am appreciative of the effort put into this. I will follow Miloch's suggestion and make the switch. Thank you.


Edited by Miloch, 19 December 2020 - 07:15 AM.
old attachment removed (see below for new one)


#14 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 17 December 2020 - 04:41 AM

I believe that i was wrong about the randomizer in the Auroa mod. I admit that it was a guess on my part. TotoR went a few more steps then i ever thought of.

Well, we confirmed this Aurora component was at least part of the problem. If you (uninstall the component and then) install it after other mods that might affect random treasure, it should fix those as well (at least as far as rndtreas.2da). I recommend installing it after at least Stratagems (since your log shows SCS appears to add * entries to rndtreas.2da). It looks like you have a nonstandard mod order, or is that the latest BiG World suggested order? Another thing that might be useful is to run a --change-log on rndtreas.2da to see which mods in your install are affecting it.


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


#15 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 18 December 2020 - 03:23 AM

I see that the component from Stratagems is one that i have problems with. The mod VCV20 puts a file into the override that is corrupted somehow. That file also screws up the TBTweaks component, 'Mages drop spellbooks'. The offending file is SLMAGE1.cre. What i have always done is after i install the VCV20 mod, i take my backup copy of that file, which i have altered to make it work, and copied it into the override folder. The TBTweak mod and the Stratagem mods both load without problems.

I am not sure any of that is related to this random treasure issue, so I have split the intervening posts to this topic. Frankly, you have unrelated issues with a bunch of other mods, but with respect to random treasure, only Aurora and SCS affect rndtreas.2da in your install as your first change-log showed. So therefore, my advice still stands: uninstall the old Aurora component, copy the revised ag_cres.tpa above to aurora/lib, and reinstall the component (ideally after SCS).


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


#16 Truman

Truman
  • Member
  • 75 posts

Posted 18 December 2020 - 08:53 AM

I will do so. Thank you.



#17 TotoR

TotoR
  • Modder
  • 105 posts

Posted 19 December 2020 - 03:16 AM

Hi Miloch,

Thanks for the update.

I have finally found time to test the file, and for what I have observed:

  • the Aurora part works fine.
  • the "fix" part doesn't work. The rnd*.2da are still filled with "*".

I have taken a look to the ag_cres.tpa and one thing seem to be part of this behaviour - line 12 : STRING_EQUAL ~/*~; I think it should be ~*~ but I may be wrong.

 

In my configuration, mods that affect the rnd*.2da are SCS and BGT, I have attached the rnd*.2da files.

 

 

Attached Files



#18 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 19 December 2020 - 07:09 AM

I have taken a look to the ag_cres.tpa and one thing seem to be part of this behaviour - line 12 : STRING_EQUAL ~/*~; I think it should be ~*~ but I may be wrong.

Yeah, I forget STRING_EQUAL ignores regexp (for which we need / to quote the special regexp character *). The previous fix made sure * would not appear but did not address cases where you may have existing ones. Try this version for that.

Attached File  ag_cres.tpa   2.13K   244 downloads

 

Note that the game also ignores leading zeros in numeric values, as does SET_2DA_ENTRY(IES), so I didn't bother replicating 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


#19 TotoR

TotoR
  • Modder
  • 105 posts

Posted 19 December 2020 - 02:28 PM

Hi,

I have taken the time to test it on my mega installation and it work like a charm.

Thanks Miloch.