Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Toy Probability Mod + Spellcard Collection Game  (Read 1731 times)

drawf_irons

  • Bay Watcher
    • View Profile
Toy Probability Mod + Spellcard Collection Game
« on: July 02, 2009, 05:15:00 pm »

This is basically a simple and inelegant way of affecting toy or instrument probabilities. I looked around and didn't see anyone else mentioning it here. I don't know if it's a novel method or not; maybe everyone already knows about this. But the worst thing that happens is everyone ignores me, so here goes.

By default, when a dorf creates a toy, the chances of making a mini-forge or a toy hammer or whatever, are equal. By making a massive number of toys and an enormous number of entries in the entities file, the probabilities of individual types of toys can be significantly changed, making some very common and others so rare that it may take quite a while to get one. If you throw in 37,999 entries of toy hammer and only 1 entry of mini-forge in the dorf section of the entities, then when a craftsdorf goes to Make Toy, he should have 1 in 38000 chance of making a mini-forge.

As an unintended but beneficial side effect, you cannot request toys from a dwarven caravan.

Below is a simple toy collection mod I used as a test. It's basically a mega toy mod (~250 items) with a huge entity file that has about 38000 lines used to shift the probabilities of getting each item. There is no other change. It is tested but not heavily tested so I don't know if the intended probabilities actually match up. There is a very definite effect though – you'll get some items showing up a lot and others showing up rarely. I have not yet found any reason why it might not work with say, 380000 lines, though I bet 3.8 million will crash the game or something. A list of the items and relative rarities is provided, ranging from untagged up to S+.

Two sources of error I can think of are:
1) I copy pasted wrong.
2) The sheer number of lines has crapped it up in a subtle way.
*An earlier test using 4 entries of trumpet and 1 of piccolo and nothing else yielded pretty much expected results at embark.

http://www.mediafire.com/download.php?nnlbznnxzim

Spoiler (click to show/hide)
Logged

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: Toy Probability Mod + Spellcard Collection Game
« Reply #1 on: July 02, 2009, 05:25:18 pm »

Well, actually- since each line is a different "item" that just happens to have the same name, you now have a 1/38000 chance of getting the correct one, rather than a 1/6 or something.

Nice job breaking it, hero.
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

xaque

  • Bay Watcher
    • View Profile
Re: Toy Probability Mod + Spellcard Collection Game
« Reply #2 on: July 02, 2009, 06:05:41 pm »

Actually, there are only duplicate entries in the entity file, not in the item definition file. So this is actually pretty clever. I like the example mod too.
Logged

drawf_irons

  • Bay Watcher
    • View Profile
Re: Toy Probability Mod + Spellcard Collection Game
« Reply #3 on: July 02, 2009, 06:22:56 pm »

That being said, I don't know how the game picks items to mandate, whether it'll choose from the entities list or the item definitions. Whatever the case, you're probably hooped with any specific card - make the appropriate arrangements in the noble's room with your lever brigade.
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: Toy Probability Mod + Spellcard Collection Game
« Reply #4 on: July 09, 2009, 04:04:41 pm »

There's a vector (expandable array) of potential items the game chooses from at random. A bigger vector will eat up more memory. That's all.

Arathanar

  • Bay Watcher
  • [PREFSTRING: mind-boggling awesomeness]
    • View Profile
Re: Toy Probability Mod + Spellcard Collection Game
« Reply #5 on: July 09, 2009, 06:26:28 pm »

Nice job breaking it, hero.

It's not like it made shoelaces for orphans or anything.
Logged
Urist, you can't go there! The ground is PURPLE!

Eagle0600

  • Bay Watcher
  • Highly Confused
    • View Profile
Re: Toy Probability Mod + Spellcard Collection Game
« Reply #6 on: July 09, 2009, 08:18:35 pm »

This is pretty clever. You could probably get away with making the rarer ones more valuable, too.
Logged
GENERATION 21:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

drawf_irons

  • Bay Watcher
    • View Profile
Re: Toy Probability Mod + Spellcard Collection Game
« Reply #7 on: July 17, 2009, 08:32:31 pm »

I have no idea how to make the rarer ones more valuable. I'd do it if I could. :(
Logged

Deimos56

  • Bay Watcher
  • [PREFSTRING: unicorpion]
    • View Profile
Re: Toy Probability Mod + Spellcard Collection Game
« Reply #8 on: July 17, 2009, 08:38:48 pm »

Nice job breaking it, hero.

It's not like it made shoelaces for orphans or anything.

How, dare I ask, would making shoelaces for an orphan entail a Nice Job Breaking it, Hero moment? ???
Logged
I'm curious what the barely conscious ai wrote about.
Well that went better than expected.  He went nuts and punched a rabbit to death, then the dogs and the whole dining hall ripped him to shreds.

Squeegy

  • Bay Watcher
  • I don't really have any answers for you.
    • View Profile
Re: Toy Probability Mod + Spellcard Collection Game
« Reply #9 on: July 18, 2009, 12:00:45 am »

It made shoelaces rarer.
Logged
I think I'm an alright guy. I just wanna live until I gotta die. I know I'm not perfect, but God knows I try.
Kobold Name Generator
⚔Dueling Blades⚔
Fertile Lands
The Emerald Isles