More Awesome Than You!
Welcome,
Guest
. Please
login
or
register
.
2024 November 23, 01:47:44
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
6545
Members
Latest Member:
cincinancy
More Awesome Than You!
TS2: Burnination
The Podium
Multiple Pollination Technicians Hack
0 Members and 1 Chinese Bot are viewing this topic.
« previous
next »
Pages:
[
1
]
Author
Topic: Multiple Pollination Technicians Hack (Read 9319 times)
Oddysey
Nitwitted Nuisance
Posts: 861
Robotic Baby Harp Seal!
Multiple Pollination Technicians Hack
«
on:
2005 July 18, 15:05:33 »
For anyone familiar with fwiffo's original, I have a modification that chooses from eight PTs. I'm going to post it on MTS2 as soon as I get permission from fwiffo, but in the mean time, does anyone know a better, more efficient way to choose between eight or more possibilities than coin flips? Right now it takes 7 lines of code. More would require around 15 lines. I know very little about simantics, but I figured there might be someone here who would have an idea of what the proper command would be. I'd like to be able to use around 20 PTs in my game, at least eventually, if it's not *too* insane.
Logged
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
Posts: 26288
Re: Multiple Pollination Technicians Hack
«
Reply #1 on:
2005 July 18, 15:07:51 »
Err, well, that depends. If you're simply iteratively going down the list and want to make sure you select one in a single pass? No, not really. Otherwise, you could run a two-pass scheme: One pass to count the number of PTs you have, then do a Random call. Alternatively, you could get really fancy, and try to delve into the messy and ugly realm of Array Operations, so you assemble them into an Array for a single pass, and then randomly select by index....tricky stuff.
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.
Oddysey
Nitwitted Nuisance
Posts: 861
Robotic Baby Harp Seal!
Re: Multiple Pollination Technicians Hack
«
Reply #2 on:
2005 July 18, 15:10:49 »
Hmm. Well, considering that I have no skill, and never did really understand arrays even in BASIC, I think I'll just stick with coinflips until I get a better handle on things. Thanks.
Logged
J. M. Pescado
Fat Obstreperous Jerk
El Presidente
Posts: 26288
Re: Multiple Pollination Technicians Hack
«
Reply #3 on:
2005 July 18, 15:18:02 »
Well, an artifact of using coinflips is that there's a cascade effect in pollination technicians:
For instance, if you flip a coin to decide each time, the first pollination technician has a 50% chance of being chosen, the next one has a 50% chance for a 25% chance that this one is chosen, the third one has another 50% chance, which comes down to 12.5%, and then the fourth one (assuming 4) is the fallback option, so gets the remaining difference, 12.5%.
This, of course, means there's a clear hierarchy of pollination technicians here.
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.
Oddysey
Nitwitted Nuisance
Posts: 861
Robotic Baby Harp Seal!
Re: Multiple Pollination Technicians Hack
«
Reply #4 on:
2005 July 18, 15:21:24 »
Except that the way it's set up, coinflip A choose between coinflip B and coinflip C, coinflip B and C choose between coinflips D, E, F and G, respectively, and those coinflips each choose between two PTs. It requires a power of two, but it gets a roughly even distribution, to my knowledge.
Logged
Pages:
[
1
]
« 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...