deestar12 / keeperfx

Automatically exported from code.google.com/p/keeperfx
0 stars 0 forks source link

Treasure room is full, but not according to the GUI #432

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When I saw the efficiency thing about the graveyard this popped in my mind. 

When you make a 5x5 treasure room (with fortified walls) it can hold 45000 
gold. When it reaches that, the flag on the room and the bar in the GUI show 
it's full. 

When you place a door, so the room is 100% efficient, the capacity will grow to 
+-52000 gold. Even when it's full, the flag on the room and the bar in the GUI 
will now show it isn't full. It will show that it's around 90% full.

Original issue reported on code.google.com by Krizzi...@gmail.com on 27 Nov 2014 at 12:54

GoogleCodeExporter commented 8 years ago
Actually, in KeeperFX, every slab holds up to 2000 gold (it's capacity is 
stored in gold_per_hoard variable). If efficiency is below 256, only part of 
this value is used as slab capacity - but not any part; only fractions 1/5, 
2/5, 3/5 or 4/5 are accepted.

What you've described is probably old algorithm, used in original DK - it was 
unclear and I couldn't easily parametrize it, so I replaced it completely.

btw, there most likely is a bug where an old function for removing gold from 
room is still used sometimes - it counts capacity in different way, so may lead 
to inconsistencies.

Original comment by mefistotelis on 27 Nov 2014 at 1:56

GoogleCodeExporter commented 8 years ago
I did a quick test (on DD Netzcaro) and you're right it's now 40.000 for a 
fortified 5x5 room and 50.000 for one with doors. 

But the GUI/Flag bug is still there as shown in the screenshot. Also the Imps 
kept putting gold in it even though it was full?! (Gold dropping sounds kept 
going, but the gold timer stopped at 50k)

Also I noticed that the GUI looks like a mix of the high and low resolution 
version of the game, that came in when I started using the Nightly builds (See 
my other issue with the health flowers and level indications) 

Original comment by Krizzi...@gmail.com on 27 Nov 2014 at 4:04

Attachments:

GoogleCodeExporter commented 8 years ago
I'm experiencing similar problems although my treasure rooms are jumping from 
"full" to "half full" piles, even though the imps keep putting gold into the 
room. As per seen in the game save I'll attach.

Original comment by nathanda...@hotmail.co.uk on 27 Nov 2014 at 8:08

Attachments:

GoogleCodeExporter commented 8 years ago
This should be fixed in latest nightly. Please let me know about the status.

Original comment by mefistotelis on 28 Nov 2014 at 6:07

GoogleCodeExporter commented 8 years ago
It's fixed, both the flag and gui show the right graphs now, also the Imps 
stopped filling the room when it was full. 

Now something new happened though, the maximum gold number is weird. It's not 
40.000 and 50.000 (with doors) but 49702 or something like that. (with a 5x5 
room)

Original comment by Krizzi...@gmail.com on 28 Nov 2014 at 6:45

GoogleCodeExporter commented 8 years ago
I can't reproduce that; are you sure you started the level from the beginning 
after nightly update?

Original comment by mefistotelis on 28 Nov 2014 at 8:35

GoogleCodeExporter commented 8 years ago
I used DD Netzcaro again (because you get doors at the beginning) 

-Made 20 imps, so the gold you get at start is gone for sure
-Made a 5x5 treasure room
-Dug out all the gold
-Placed doors to reach full efficiency 

Here are two screenshots

Also it feels like the gold counter is slower than what the sounds and imp 
movements suggest.

Original comment by Krizzi...@gmail.com on 29 Nov 2014 at 9:39

Attachments:

GoogleCodeExporter commented 8 years ago
Oh, I see.

It's not that the treasure room has incorrect capacity, it can still store the 
max amount if you drop it on. The issue you're describing is with imps, which 
won't fill the treasury by themselves. If there's only a little gold missing to 
the maximum, imps consider the treasury to be full.

Actually I don't think it's a problem.

Original comment by mefistotelis on 29 Nov 2014 at 10:49

GoogleCodeExporter commented 8 years ago
I have been looking for the gold_per_hoard variable as potofgoldholds no longer 
works as it used to (changes to it have no effect at all anymore I think). I 
would really appreciate it if someone could point me in the direction of 
gold_per_hoard please and thank you.

Original comment by agi...@gmail.com on 24 Feb 2015 at 3:06

GoogleCodeExporter commented 8 years ago
The gold_per_hoard value is currently hard-coded, it can't be changed in config 
files.

All the other variables with gold amount are used according to their names:
ChestGoldHold (when chest is created, gets this amount)
PotOfGoldHolds (when pot is created, gets this amount)
GoldPileValue (when gold pile is created, gets this amount)
GoldPileMaximum (when gold is dropped by a creature, this controls in how many 
piles)

Original comment by mefistotelis on 24 Feb 2015 at 9:51

GoogleCodeExporter commented 8 years ago
Looking at the code again, GoldPileMaximum is now unused - up to 8 pots are 
created, no matter how many gold the creature had while dying.

I will add a parameter for hoard capacity.

Original comment by mefistotelis on 24 Feb 2015 at 10:25

GoogleCodeExporter commented 8 years ago
Consider added the text 'unused' to the comment in the config file, if 
GoldPileMaximum is not used.

Original comment by Loobinex on 24 Feb 2015 at 10:50

GoogleCodeExporter commented 8 years ago
I appreciate you taking the time to reply mefistotelis, I'm sure you hear this 
all the time but let me say a big thank you for all your work and the amazing 
results we get to enjoy because of it.

On to PotOfGoldHolds, in the original game when changed it had an effect which 
allowed you to create more efficient (smaller) treasure rooms, however in 
keeperfx when changing this value nothing changes, there seems to be a 
hardcoded "2000 max" somewhere else in the code rendering this variable unused. 
I am guessing from what was discussed that this hard limit is set in 
gold_per_hoard.

Might I suggest making a public variable for gold_per_hoard as it seems it 
would have the same effect as the old PotOfGoldHolds in the original game and 
changing PotOfGoldHolds in keeperfx currently does nothing as it looks 
somewhere else for this value.

It would mean a lot to me if I had access to this variable again as I could 
play the game the same way I loved to years ago and I'm used to. I always 
changed it because treasure rooms ended up being 90% of the dungeon tiles 
dwarfing every other room. I know the wrong number can mess up the paydays and 
a bunch of other things, maybe people kept doing that so you had to remove 
access to save some useless threads repeating, but there is a point to be made 
about having total access to all aspects of the game.

P.S. gold pile maximum in not unused, it affects how much gold can be in a 
generic pile like on the ground, so if you set it to 99999 you can drop about 
100 1024 (default) gold from the hand on it and it will create a nice portable 
million gold item in hand.

Original comment by agi...@gmail.com on 25 Feb 2015 at 4:44

GoogleCodeExporter commented 8 years ago
Since r1605 the 'gold per hoard' is in the config files, which should have the 
effect you want.

Original comment by Loobinex on 25 Feb 2015 at 6:01

GoogleCodeExporter commented 8 years ago
Superb, thank you very much Loobinex, you guys are amazing.

Original comment by agi...@gmail.com on 26 Feb 2015 at 3:07

GoogleCodeExporter commented 8 years ago
Getting back to the original issue, is there something left to fix?

Original comment by mefistotelis on 27 Feb 2015 at 11:43