Jump to content

# RndTres.2da and gold generation.

## Recommended Posts

Okay gang, bear with me a moment. It's 0300hrs here, and I'm on my first 12hr nightshift after a 2 week vacation, so my question might be bleeding obvious.

I'm setting up a new system for my Greyhawk thing, and have noticed that number entries in the rndtres.2da have limits. (Numbers give you a direct value of Gold at this point.) You get a direct value for 1 to 231. If you make an entry over 231 up to 999, you get a max of 231. At entries of 1000 or over, you get some weird loopage. eg) A value of 1004 gives a consistant 15gp. Any ideas as to why?

##### Link to comment

I believe the limit should be 255. (one byte)

##### Link to comment

If it had kicked a 255 back at me I would've known that was the limitation. But it's a 231, which just doesn't make sense to me. I tested it several different ways and with multiple repeats. 231 be the max. *scratches head*

##### Link to comment

Regarding the high 'looping', perhaps it has something to do with gold being assigned a max stack of 999 in MISC07.ITM?

##### Link to comment

It could be. I'll try playing around with it some more tonight. Weird though if the stack max is 999 (which I figured and attempted to use) why it's being limited to 231gp.

##### Link to comment
It could be. I'll try playing around with it some more tonight. Weird though if the stack max is 999 (which I figured and attempted to use) why it's being limited to 231gp.

231 is the remains when you divide 999 by 256

999 = 3*256+231

I'll make sure GemRB create more piles of gold if the number is higher than 999 and won't have this stupid one byte wraparound.

##### Link to comment
It could be. I'll try playing around with it some more tonight. Weird though if the stack max is 999 (which I figured and attempted to use) why it's being limited to 231gp.

231 is the remains when you divide 999 by 256

999 = 3*256+231

I'll make sure GemRB create more piles of gold if the number is higher than 999 and won't have this stupid one byte wraparound.

HahHA! Give a gold mark to the math-man. I knew there'd have to be something like that as the rational. Thanks A. my curiosity is satisfied and GemRB just got a little bit better.

#### Archived

This topic is now archived and is closed to further replies.

×
×
• Create New...