More Awesome Than You!
Welcome,
Guest
. Please
login
or
register
.
2024 December 22, 07:14:30
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
SUPPORT THE MUNICIPALITY!
Have you destroyed a paysite today?
"Jelenedra" is the new "gay".
All Lythdans are stupid and suck!
DEATH TO ALL STUPID HAIRY-BELLIED NESSES!
All Kewians are stupid and suck! Accept no Kewian-based substitutes!
Clearly, BlueSoup has failed us! You must not! BlueSoup has a fat head!
Hobbsee has a
scrawny pencil neck.
Rohina the Ugly Butted is a Horny Turkey
540287
Posts in
18067
Topics by
6546
Members
Latest Member:
choodno
More Awesome Than You!
TS2: Burnination
Peasantry
RandomStuff: Configurable "dice rolling" program
0 Members and 1 Chinese Bot are viewing this topic.
« previous
next »
Pages:
[
1
]
2
3
4
Author
Topic: RandomStuff: Configurable "dice rolling" program (Read 120041 times)
Hook
Nitwitted Nuisance
Posts: 882
RandomStuff: Configurable "dice rolling" program
«
on:
2007 May 01, 20:33:50 »
VERSION 3! EVEN MORE SHININESS!
Lots of people use dice to make decisions for their Sims. For example, in the Legacy Challenge, you'd roll a die to determine if your Sim was Knowledge, Romance or whatever. Then you'd have to cross reference a table to match the number with an aspiration. Other people like to have random zodiac signs... got any 12 sided dice around?
Some people flip coins to make yes/no decisions.
I watched some people in chat using the chat bot to generate random numbers for them, and figured there might be an easier way. I finally got around to writing a program to do it.
What's special about the program is, you make a config file with the various values you want. For example, if you want the program to "flip a coin" the config file would include the following lines:
*Decision
Yes
No
If you want to pick a random aspiration, the config file also has:
*Aspiration
Knowledge
Pleasure
Fortune
Family
Romance
Running the program produces the output (with random values):
Decision
* Yes *
Aspiration
* Fortune *
You can put any decision you like in the config file, using simple formatting rules, and the program will generate a random value from the selections given.
The program is a small 20K DOS-type program. Just double click on it and it opens a window, selects from the available options, and displays them. No more referencing a table to figure out what aspiration you rolled!
Config file includes options for Decision(Yes/No), Zodiac, Aspiration, Random letter, and I think you can figure out the format to add whatever other random thingies you want. The config file must be in the same folder as the program exe.
Edit: Version 2 includes:
Weighted selections. Described in later posts. Example:
*Orientation
Gay [2]
Bi [4]
Straight [6]
... will give half straight Sims, 1/3 bi Sims, 1/6 gay Sims
Random numbers up to 9 digits. Example:
$$999999999
... will give a random number from 0 to 999,999,999
Random numbers in a range. For example:
*Cooking
$5-9
... will give a random number 5 to 9 inclusive for cooking skill.
Putting the string *csv in the file will cause a .csv file to be generated from that point on.
Lots of new examples in the enclosed config file. Feel free to remove the excess and modify as you wish.
Edit: Version 3
Includes support for drag and drop. Have multiple config files, just drag the one you want to use on top of the program icon and it will generate the data from that config file. Double clicking on the program icon will use the default config file.
Multiple selections for a category can be generated without duplicates. Useful for turnons/turnoffs. Coded as follows:
*Turnon/off [3]
Stinkiness
Cologne
Fitness
Brown hair
... etc...
See the RandomStuff.txt file for additional examples.
I've included a file of first and last names, set up to generate three male first names, three female first names and three last names. These names are taken from the US census data, so they shouldn't look too odd. At least if you're from the US.
The CSV file is now appended to, rather than overwritten each time, so it will preserve existing data. The CSV file will have the same filename as the config file you use to generate it.
When you get the option to "Press a key to continue" if you press R it will regenerate the list. You can scroll up in the DOS window to get the older lists if you wish.
There are a couple of minor bug fixes, including one that didn't handle the display of random numbers correctly if they weren't the first thing in the file. It should work correctly now.
Hopefully this will be the last version, but if anyone finds a bug or someone comes up with a really cool idea, I'm more than happy to get back into the code.
Enjoy.
Hook
RandomStuff.zip
(4.04 KB - downloaded 2142 times.)
RandomStuffV2.zip
(4.97 KB - downloaded 1688 times.)
RandomStuffV3.zip
(11.07 KB - downloaded 7086 times.)
«
Last Edit: 2007 May 03, 15:43:59 by Hook
»
Logged
If some is good and more is better, then too much ought to be just about right.
Hook
Nitwitted Nuisance
Posts: 882
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #1 on:
2007 May 01, 21:23:14 »
Just wanted to mention this in case it's not obvious. The config file can be used as-is, or you can add anything else you like. For example, the original Legacy Challenge rules allowed you to choose your own aspiration on a die roll of 6. To do this, simply add a line to the aspirations that says, "Choose any" and that will come up 1/6 of the time.
If you'd rather see more Knowledge Sims than anything else, you can do that too. Here's an example:
*Aspiration weighted for Knowledge
Knowledge
Knowledge
Knowledge
Knowledge
Fortune
Family
Romance
Pleasure
This will give you a Knowledge Sim half the time. You can also remove any aspirations from the list that you don't like.
Any comments or questions would be appreciated.
Hook
Logged
If some is good and more is better, then too much ought to be just about right.
rosenshyne
Dimwitted Dunce
Posts: 177
I/ENFJ
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #2 on:
2007 May 02, 01:03:39 »
As a matter of fact, I do have a 12-sided die lying around... *slinks away in geeky shame*
Logged
dizzy
Souped!
Posts: 1572
unplugged
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #3 on:
2007 May 02, 02:45:06 »
I use a deck of cards and redefine them in whatever way fancies me at the moment. For example:
Ace to Queen = 1 to 12 (Aries to Pisces, respectively)
King = Whatever personality I feel like
Spade = Knowledge or Family
Heart = Romance or Pleasure
Club = Popularity
Diamond = Fortune
Joker = Grilled Cheese (next card for personality)
Logged
Readability counts.
-
Have you destroyed a costly operating system today?
-
Copyright Must Be Destroyed!
-
Ex veritate veritas
Baroness
witch
Breakfast of Champions!
Senator
Posts: 11636
Shunning the accursed daystar.
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #4 on:
2007 May 02, 06:28:51 »
Quote from: Hook on 2007 May 01, 21:23:14
Any comments or questions would be appreciated.
I spent about an hour the other week looking for a legacy style sims generating chart, I'm more than willing to give this a bash. I get sick of trying to be random when making a clutch of townies, for instance, I bet I'm not really random at all.
I've just got all keen on the MATY sims again because it's the current trend dontcha know, I might add to my townie population this weekend.
Part of my non-randomness means I tend to give certain starsigns to certain aspirations, generally what I think would be a good personality for that type of sim. Which means I don't get hard ones to play like popularity sims who are shy or whatever.
Questions will no doubt be forthcoming.
Cheers for sharing this.
Logged
My fists are named Feminine and Wiles.
Hook
Nitwitted Nuisance
Posts: 882
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #5 on:
2007 May 02, 07:16:22 »
Quote from: dizzy on 2007 May 02, 02:45:06
I use a deck of cards and redefine them in whatever way fancies me at the moment. For example:
Ace to Queen = 1 to 12 (Aries to Pisces, respectively)
King = Whatever personality I feel like
Spade = Knowledge or Family
Heart = Romance or Pleasure
Club = Popularity
Diamond = Fortune
Joker = Grilled Cheese (next card for personality)
Here's how you'd set up the config file for that. Add the following two new sections:
*Dizzy Zodiac
Aries
Taurus
...etc... Fill in the correct signs
Aquarius
Pisces
Your choice
*Dizzy Aspiration
Knowledge or Family
Romance or Pleasure
Popularity
Fortune
There's no really easy way to set up for the joker, but you can generate a random number:
*Dizzy Cheese
1
2
... etc ... fill in the numbers
24
25
Grilled Cheese
The above is for a two joker deck. If you want one joker, the numbers end up 50, 51, Cheese.
Instead of the numbers, fill in all the lines with "Normal Aspiration" except the last one which would be "Cheese"
I probably should add a way to generate a random number within a range.
Hook
Logged
If some is good and more is better, then too much ought to be just about right.
Hook
Nitwitted Nuisance
Posts: 882
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #6 on:
2007 May 02, 07:27:11 »
Quote from: witch on 2007 May 02, 06:28:51
Part of my non-randomness means I tend to give certain starsigns to certain aspirations, generally what I think would be a good personality for that type of sim. Which means I don't get hard ones to play like popularity sims who are shy or whatever.
Set up a section as follows. I've used random things here; fill in your own preferences.
*Witch Combinations
Knowledge, Aries
Knowledge, Gemini
Knowledge, Cancer
Popularity, Taurus
Popularity, Leo
Fortune, Aquarius
Fortune, Pisces
Fortune, Aries
... etc ... Fill in the rest of your preferences here
I've intentionally used Aries for both Knowledge and Fortune, just to show what can be done.
I've played shy Popularity Sims. The only problems are that they sometimes complain when you ask them to do some action, and if you don't have the phone hack, it's harder to keep a relationship up by phone as they won't talk very long if their Social is maxed and their Social decays slowly.
Hook
Logged
If some is good and more is better, then too much ought to be just about right.
Baroness
witch
Breakfast of Champions!
Senator
Posts: 11636
Shunning the accursed daystar.
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #7 on:
2007 May 02, 08:05:35 »
Woohoo - first test sim and I get one I would NEVER have chosen.
***** RandomStuff *****
BodyType
* Fat *
Gender
* Male *
Orientation
* Straight *
Astrological Sign
* Virgo *
Aspiration
* Popularity *
Age
* Adult *
Press a key to continue:
I thought about trying to do interests - generate an interest, then a random number between 0 and 11, but there's no way to exclude an interest that's already been chosen, is there?
PS
Quote from: Hook on 2007 May 02, 07:27:11
Set up a section as follows. I've used random things here; fill in your own preferences.
*Witch Combinations
Knowledge, Aries
Knowledge, Gemini
Knowledge, Cancer
Popularity, Taurus
Popularity, Leo
Fortune, Aquarius
Fortune, Pisces
Fortune, Aries
... etc ... Fill in the rest of your preferences here
I don't quite get what you mean here. Do you mean set up odd combos? If so, I think I'd rather just random both asp. and sign individually.
Logged
My fists are named Feminine and Wiles.
Ness
Hairy-Bellied Heretic
Terrible Twerp
Posts: 2354
DOWN WITH CHEESE!
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #8 on:
2007 May 02, 08:26:57 »
You've made X3 redundant?!
Can it do the roll a 26-sided die to pick the first letter of a name thing? I'm guessing it can, but I haven't read all the details closely just yet.
Logged
Baroness
witch
Breakfast of Champions!
Senator
Posts: 11636
Shunning the accursed daystar.
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #9 on:
2007 May 02, 08:49:52 »
Yep. I saw that in there.
Logged
My fists are named Feminine and Wiles.
Hook
Nitwitted Nuisance
Posts: 882
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #10 on:
2007 May 02, 09:20:24 »
Quote from: witch on 2007 May 02, 08:05:35
I thought about trying to do interests - generate an interest, then a random number between 0 and 11, but there's no way to exclude an interest that's already been chosen, is there?
*Witch Combinations
Knowledge, Aries
Knowledge, Gemini
Knowledge, Cancer
Popularity, Taurus
Popularity, Leo
I don't quite get what you mean here. Do you mean set up odd combos? If so, I think I'd rather just random both asp. and sign individually.
In the example above, you would generate Knowledge Sims who would be Aries, Gemini or Cancer. Popularity Sims would be Taurus or Leo. If you have a preference for certain aspirations having certain zodiac signs, this would do it.
As for interests, do it this way:
*Food
0
1
2
3
4
5
6
7
8
9
10
11
*Animals
5
6
7
8
9
*Politics
8
9
10
11
This way you can generate numbers for all the interests, and limit them to certain numbers if you wish. There's a problem if you end up with more interest points than the game allows you to distribute, but you can adjust these manually if necessary when you actually fill in the numbers.
Good thing the DOS window has a scroll bar.
Hook
Logged
If some is good and more is better, then too much ought to be just about right.
Baroness
witch
Breakfast of Champions!
Senator
Posts: 11636
Shunning the accursed daystar.
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #11 on:
2007 May 02, 09:49:33 »
Quote from: Hook on 2007 May 02, 09:20:24
Good thing the DOS window has a scroll bar.
I'll say! I've also got it making choices about skintone, eye colour and hair as well. (Including all my geneticised skintones in the list).
I was trying the interests the wrong way round, making the list out of the interests instead of the numbers. D'oh! This means I can do skills too.
Then there's badges... turn ons...
CoolToy!
If I go something like this:
*Orientation
Gay
Gay
Bi
Bi
Bi
Straight
Straight
Straight
Straight
Straight
Straight
will that make any difference to percentage chances? Like there should be more chance a sim is straight? Or does that not matter in random choice?
ETA: Doesn't matter, I'm sure it has to work, there has to be more chance your exe will pick something that appears multiple times.
Logged
My fists are named Feminine and Wiles.
Hook
Nitwitted Nuisance
Posts: 882
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #12 on:
2007 May 02, 09:59:10 »
Quote from: witch on 2007 May 02, 09:49:33
I'm sure it has to work, there has to be more chance your exe will pick something that appears multiple times.
Yup, that was the whole idea. If you wanted something to appear more often, you'd put it in the list more times.
I probably need to figure out a way to weight the choices, hopefully without making the config file too complicated.
Hook
Logged
If some is good and more is better, then too much ought to be just about right.
Baroness
witch
Breakfast of Champions!
Senator
Posts: 11636
Shunning the accursed daystar.
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #13 on:
2007 May 02, 10:51:10 »
Don't s'pose there's any chance of exporting to a csv file or anything? Mate?
Logged
My fists are named Feminine and Wiles.
Gwill
Terrible Twerp
Posts: 2162
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #14 on:
2007 May 02, 10:53:41 »
Quote from: Hook on 2007 May 01, 20:33:50
Other people like to have random zodiac signs... got any 12 sided dice around?
I've got three D12s within reach of my computer, three D20s on the table as well as one in a necklace around my neck. Aside from that I have two D10s one D4 and exactly one D6.
I recent the implication that threre are no 12 sided dice.
Nerd discrimination!
Logged
Dibs on Darth Telligent!
INTJ bordering on P
Want to know where babies come from?
Hook
Nitwitted Nuisance
Posts: 882
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #15 on:
2007 May 02, 11:18:10 »
Lessee... fourteen 20 sided dice in various colors, thirty 6 sided dice, three 4 sided dice, four 8 sided dice... damn, no 12 sided dice here. I guess my son misplaced it last time he and his friends played D&D.
Not everyone is a nerd, y'know.
Witch: Next version will have additional features, like generating a random number (up to 9 digits if you want), weighted selections (for your gender preference thingy) and I can add a command to output a csv file as well.
*Orientation
Gay [2]
Bi [3]
Straight [6]
Weighted selections will also allow things like "If it's a joker, they're Grilled Cheese aspiration."
*Grilled Cheese
No [25]
Yes
Weighted selections doesn't work yet.
Edit: Well, I already have it working, but it's not in the current version.
Hook
Logged
If some is good and more is better, then too much ought to be just about right.
floopyboo
The Biter
Pinheaded Pissant
Posts: 1017
Back by popular demand!
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #16 on:
2007 May 02, 13:20:25 »
Gwill - you have a d20 necklace? /worships.
I have my favourite pointy dice in the bag on the desk beside me - they are two sets of uniques that came with the pound-o-dice bags we got ages ago.
Anyway, onto the topic. I usually roll 1d12 for the personality & 1d4 to see if I fiddle with it a bit (so not every aries is a neat freak sociopath).
I then roll 1d6 to determine aspiration (if it's family I roll again & if it's still family I stick with it. Well, most of the time.)
I then 1d4 to see if the fourth page of turnons & turn offs turns up (if it's a four, they like old wrinklies, lucky them), then 2d6 to determine the page ( 1-2 = page 1, 3-4 = page 2, 5-6 = page 3) to determine turn ons & turn offs.
Normally I'd be all for a random number generator, but that would mean my pointy dice would only get used when on a dungeon crawl. And that simply cannot be!
Logged
http://bigbrotherlawndale.deviantart.com/
The awesomest thing on the internet.
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
Posts: 26288
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #17 on:
2007 May 02, 13:32:55 »
Quote from: Gwill on 2007 May 02, 10:53:41
I've got three D12s within reach of my computer, three D20s on the table as well as one in a necklace around my neck. Aside from that I have two D10s one D4 and exactly one D6.
I have a barrel of them. A literal barrel. It cost me $5.
Logged
Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off.
Hook
Nitwitted Nuisance
Posts: 882
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #18 on:
2007 May 02, 13:42:41 »
New version up, enhancements described in first post, but it's all the stuff that's been asked for so far.
Anyone else have any other ideas, let me know, while I still understand my own code.
Hook
Logged
If some is good and more is better, then too much ought to be just about right.
Gwill
Terrible Twerp
Posts: 2162
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #19 on:
2007 May 02, 14:02:20 »
D20 necklace from here:
http://www.thinkgeek.com/apparel/jewelry/7ae3/
Currently out of stock.
I don't trust any form of electronic randomness generator, so I'll stick with my dice and scowl.
Logged
Dibs on Darth Telligent!
INTJ bordering on P
Want to know where babies come from?
Hook
Nitwitted Nuisance
Posts: 882
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #20 on:
2007 May 02, 14:08:37 »
I don't blame you for not trusting it, but I massaged the standard random number function severely a few years back for use in a wargame battle generator. I did all sorts of stuff to make sure the results were actually random, and didn't follow patterns. For example, I have a fix in the program for a rounding error that occurred 2 times out of a billion. You think it got tested sufficiently?
Hook
Logged
If some is good and more is better, then too much ought to be just about right.
gethane
Juvenile Jackass
Posts: 455
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #21 on:
2007 May 02, 16:18:34 »
I realize this is telling about my life, but this is the most excited I've been all week!
I added to my txt file
*Sim Type
Normal [46]
Vampire
Zombie
Werewolf
Plantsim
*Affair
Yes [15]
No [85]
*Kids
1 [20]
2 [20]
3 [6]
4 [3]
5 if family-go for 10 kid want
*Career
Normal [35]
Home Business [5]
Community Lot Business [5]
Artist or Farmer only [5]
That way occasionally I'll have to play less than normal sims. Occasionally I'll have to break the heart of my sims couples. Etc. etc.
«
Last Edit: 2007 May 02, 17:23:09 by gethane
»
Logged
Gethane Sims
Maxis only lots, neighborhood terrains, and more!
Zazazu
Fuzzy Pumpkin
Whiny Wussy
Posts: 8583
Potiron flou
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #22 on:
2007 May 02, 16:56:40 »
Hm, I use these:
aspiration die
. Revised ganked-over die that I don't recall who made originally, so I don't take complete credit. I like having something physical to toss around. However, this will help when Mikko decides to chew up my current one. Plus, I don't like my current set-up for astrological sign choice.
Thought: You could actually add a random name generator on to this. It would require a lot of text addition to the coding, therefore bloating the file, but could almost be better than using a die + the random name generator from babynames.com.
Logged
Capitalism, Ho!
"Continue to beat it in masturbatory ecstasy if you like, but only Pescado can make it go away." - Lemmiwinks
My Urinal
gethane
Juvenile Jackass
Posts: 455
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #23 on:
2007 May 02, 17:21:20 »
For things like turn ons/offs is there a way to make a list of items randomize then the output would only list three: turn on 1, 2, and turn off. That way you wouldn't get repeats?
disclaimer: i am not a programmer, no idea if that's realistic
Logged
Gethane Sims
Maxis only lots, neighborhood terrains, and more!
Hook
Nitwitted Nuisance
Posts: 882
Re: RandomStuff: Configurable "dice rolling" program
«
Reply #24 on:
2007 May 02, 19:20:46 »
Generating names: MikeInside has a great random name generator. Here's the link:
http://mikeinside.modthesims2.com/family/index.html
It shouldn't be too much trouble to generate multiple things from one list, for use in turnon/off. I can think of a couple of ways to do it right off the top of my head. I just want to make sure that you can give red hair, for example, a high weight and still have the program work.
In the mean time, you can run the program multiple times until you get three different things.
Hook
Logged
If some is good and more is better, then too much ought to be just about right.
Pages:
[
1
]
2
3
4
« previous
next »
Jump to:
Please select a destination:
-----------------------------
TS4: The Pee-ening
-----------------------------
=> Insert Amusing Name Here
=> Facts and Strategery
-----------------------------
TS3/TSM: The Pudding
-----------------------------
=> The World Of Pudding
=> Facts & Strategery
=> Pudding Factory
===> World of Puddings
===> Pudding Plots
-----------------------------
TS2: Burnination
-----------------------------
=> The Podium
===> Oops! You Broke It!
=> The War Room
=> Planet K 20X6
===> Building Contest of Awesomeness
=> Peasantry
===> Taster's Choice
-----------------------------
The Bowels of Trogdor
-----------------------------
=> The Small Intestines of Trogdor
=> The Large Intestines of Trogdor
-----------------------------
Awesomeware
-----------------------------
=> TS4 Stuff
=> Armoire of Invincibility
===> AwesomeMod!
=> The Armory
===> Playsets & Toys
===> The Scrapyard
-----------------------------
Darcyland
-----------------------------
=> Lord Darcy Investigates
-----------------------------
Ye Olde Simmes 2 Archives: Dead Creators
-----------------------------
=> Ye Olde Crammyboye Archives
=> Ye Olde Syberspunke Archives
-----------------------------
Serious Business
-----------------------------
===> Spore Discussions
Loading...