Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 851 852 [853] 854 855 ... 1065

Author Topic: Future of the Fortress: List of Remaining Items  (Read 3663148 times)

Lancensis

  • Bay Watcher
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12780 on: February 18, 2010, 09:57:03 am »

Footkerchief, is there a way to set the incidence rate of a caste?
Hey, I beat him to something today =D

Yes, you can. You can set frequency numbers to anything you like and you'll get the ratio of them showing up.
Ex. Males set to 9 and females set to 1 would result in 10% females. 90 and 10 would give the same result. 900 and 100, etc.

I figured the personal touch would make it more likely that it'd get answered. Is there an lower limit on the appearance rate of a caste? One in ten thousand, perhaps?
Logged

tfaal

  • Bay Watcher
  • 'Ello, 'ello!
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12781 on: February 18, 2010, 10:23:01 am »

I wouldn't think so. I'd assume that it just did a die roll based on the caste probabilities every time it generated a new member of the species. The lower limit might be 1 in 32767, with probabilities lower than that looping into nonsensical negative probabilities like 1/-32767, 1/-32766 and so on. That's just an uneducated guess though.
« Last Edit: February 18, 2010, 10:24:45 am by tfaal »
Logged
I still think that the whole fortress should be flooded with magma the moment you try dividing by zero.
This could be a handy way of teaching preschool children mathematics.

GildedBear

  • Bay Watcher
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12782 on: February 18, 2010, 10:39:01 am »

You're probably right at there being an upper limit. I would expect Toady to be using an unsigned integer to store the values once loaded which would mean 1 in at least 65535. (double the signed integer variable type)  This would prevent the nonsensical negative ratios. Of course, Toady could have done it differently then I would have and I haven't looked at the code, so don't take my word for it, even if it's a good ballpark. If you /really/ want to know, you could always perform experiments for Dwarf Science.
Logged

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12783 on: February 18, 2010, 10:42:48 am »

Well, there wouldn't be an error in any case, however large you put it. The value would just be set to whatever's the limit. Also, considering that most worlds don't have members of any one race numbering in the hudreds of thousands... I doubt even the 65k limit is going to get used much. Unless you're planning on making some sort of killer ants the size of buildings or something.
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

G-Flex

  • Bay Watcher
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12784 on: February 18, 2010, 11:09:45 am »

Well, there wouldn't be an error in any case, however large you put it. The value would just be set to whatever's the limit.

That would be the correct way to do it, but if programming were always done correctly on the first go, we wouldn't have bugs. For all we know, the raw-parsing code doesn't take that into account because it's not a case that was considered.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12785 on: February 18, 2010, 11:20:06 am »

I think it does that for every numeric value in the raws. Up to and including color values. It either sets the maximum possible or wraps around. Case in point - size. We still don't know what value is maximum for size, because the game gives no errors and experimentation is pointless beyond the first few thousands.

I guess the ultimate limit would be that 4-something billion number I won't be able to recall now, the one originally used for worldgen seeds. That's the utmost maximum, the game won't go farther than that with any value if it won't go farther than that with a value it uses once per world. (yes, I know it probably uses it later, but it's still one value per world).
« Last Edit: February 18, 2010, 11:22:39 am by Sean Mirrsen »
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

G-Flex

  • Bay Watcher
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12786 on: February 18, 2010, 11:22:07 am »

I think it does that for every numeric value in the raws. Up to and including color values. It either sets the maximum possible or wraps around.

I don't get it, then; you said it intelligently caps at the maximum for all numeric values, but also sometimes wraps around? I'm not sure what you mean.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Lancensis

  • Bay Watcher
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12787 on: February 18, 2010, 11:24:51 am »

Well, there wouldn't be an error in any case, however large you put it. The value would just be set to whatever's the limit. Also, considering that most worlds don't have members of any one race numbering in the hudreds of thousands... I doubt even the 65k limit is going to get used much. Unless you're planning on making some sort of killer ants the size of buildings or something.

Well, while I'm glad that you won't be able to get legions of superchampions in the next version, (at least not to the degree you can now), I'm going to miss having the occaisional maniac who can punch dragons into orbit.
So I'm going to add some very rare castes of dwarves with special talents

EDIT: I wonder how this will work when creating characters for adventure mode. Does anyone know?
« Last Edit: February 18, 2010, 11:26:50 am by Lancensis »
Logged

Mel_Vixen

  • Bay Watcher
  • Hobby: accidently thread derailment
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12788 on: February 18, 2010, 11:38:59 am »

Well depending on which data type toady uses the numbers differ. A 32bit-integer (As in most c compilers iirc) gives you a Range of 0 to 4.294.967.295 (4 and 1/3 Milliard(european)) which would be a rather interesting for races with much more the 2 or 3 castes - like zerg. The size of the data-type isnt that important here i think.

The values could wrap around to avoid an wrong average because iirc our RNGs often spare the start and endvalues a bit.

what "wraps around" means: The RNG gives you a value and with this value you begin to count. If the value from the RNG is higher then the End-value you start to count at 1 again. Say if you have a list from 1 to 5 and the RNG provides an 8 you count like this: 1,2,3,4,5,1,2,3.
« Last Edit: February 18, 2010, 11:44:10 am by Heph »
Logged
[sarcasm] You know what? I love grammar Nazis! They give me that warm and fuzzy feeling. I am so ashamed of my bad english and that my first language is German. [/sarcasm]

Proud to be a Furry.

G-Flex

  • Bay Watcher
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12789 on: February 18, 2010, 11:42:51 am »

Yeah, the probabilities might get progressively weirder if the value approaches the actual maximum value that the rand() function can return.

Of course, if Toady's using one of the more typical C++ implementations of rand(), all bets are off because it's freaking terrible. Hopefully he's got a Mersenne Twister in there instead or something.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12790 on: February 18, 2010, 11:50:25 am »

I think it does that for every numeric value in the raws. Up to and including color values. It either sets the maximum possible or wraps around.
I don't get it, then; you said it intelligently caps at the maximum for all numeric values, but also sometimes wraps around? I'm not sure what you mean.
So far, it seems in most cases the value resets to the maximum possible - when there is, of course, a defined maximum. Which there frequently isn't. Notable exceptions include material color values and the buildingdestroyer tag, which both wrap around in unspeakable ways, at least while I was experimenting on them.

And yes, I believe he has stated that he has an implementation of the Mersenne Twister for random numbers.
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

Mel_Vixen

  • Bay Watcher
  • Hobby: accidently thread derailment
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12791 on: February 18, 2010, 11:51:25 am »

A Mersenne twister might make sense in the Worldgen but could be a bit to expensive on the L1 cache (stanmdart mersene works with around 2.5 KB) in Df-mode. A TT800 would be my guess on the Dwarf-mode RNG since it uses only 800 bits and is still suffiecently random.
Logged
[sarcasm] You know what? I love grammar Nazis! They give me that warm and fuzzy feeling. I am so ashamed of my bad english and that my first language is German. [/sarcasm]

Proud to be a Furry.

sweitx

  • Bay Watcher
  • Sun Berry McSunshine
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12792 on: February 18, 2010, 12:02:36 pm »

For gaming simulation a standard LCG (the one used in rand()) is generally sufficient.  You generally don't want "high quality" RNG (which sometimes takes a long time to compute and is memory intensive) during a game's run-time.
A Mersenne twister might make sense in the Worldgen but could be a bit to expensive on the L1 cache (stanmdart mersene works with around 2.5 KB) in Df-mode. A TT800 would be my guess on the Dwarf-mode RNG since it uses only 800 bits and is still suffiecently random.
Other then a problem with serial correlation and issues with number distributions, what's wrong the LGC type RNG?  Sure it's no where near a good RNG, but it's fast and may be "good enough".

EDIT:  Or use this...
http://en.wikipedia.org/wiki/Linear_feedback_shift_register
« Last Edit: February 18, 2010, 12:05:49 pm by sweitx »
Logged
One of the toads decided to go for a swim in the moat - presumably because he could path through the moat to my dwarves. He is not charging in, just loitering in the moat.

The toad is having a nice relaxing swim.
The goblin mounted on his back, however, is drowning.

smjjames

  • Bay Watcher
    • View Profile
Re: Future of the Fortress: List of Remaining Items
« Reply #12793 on: February 18, 2010, 12:59:17 pm »

Quote from: Devlog
I also fixed a mood bug that was making them go to the work shops and yell "I must have items!" instead of being more specific

Related to the bug where a noble demands or mandates no specific item maybe?

Edit: I was just curious about that and related bugs and found an old one related to macabre/fel moods, possibly distantly related to it and you may want to double check now that it resurfaced in fey moods. 000828 ▪ (0.28.181.39a) [dwarf mode][moods]   macabre/brooding mood dwarf requests blank item
« Last Edit: February 18, 2010, 01:09:17 pm by smjjames »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Future of the Fortress: List of Remaining Items
« Reply #12794 on: February 18, 2010, 01:11:13 pm »

Quote from: devlog
The latest dwarf, an idler, threw his splint on the ground immediately because it wasn't part of what he expected for his normal clothing and because he didn't think his arm was broken at all. He also threw his wound dressing on the ground. Fortunately he didn't pull out the sutures. That's all fixed.

There should be a chance for dwarves with certain personality traits to do this anyways - "What do you think I am, some sort of girly-man-dwarf? I'm much too Macho to need bandages or a splint for this injury - 'tis but a scratch."
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.
Pages: 1 ... 851 852 [853] 854 855 ... 1065