Item Drops
Oct 22 2008, 1:29 am
By: alayou  

Oct 22 2008, 1:29 am alayou Post #1



Ok, i'm tying to make random item drops like from a zergling for example. I've got the randomized triggers and death counts taken care of and i know how to calculate the odds just can't get tie off my loose ends cause i'm also using death counts as experience.

trigger looks like this:

Cond:
Always

Action:
randomize switches 1-11
preserve

Cond:
P7 suffers @ least 1 death of ling

Action:
Modify Resources for P1 add 5 minerls.
Subtract 1 death of zergling
preserve

Conditions:
P7 suffers at least 1 death of Zling
switches 1-11 set clear set clear...

Actions:
Create 1 (super awesome item)
Subtract 1 death of ling.
Preserve trigger.

I tested this triggering with twelve lings, and non-random switches. but if u kill one at a time, it doesn't ever make it the rare drop item... This is what is happening: The death of the ling is being subtracted and giving the minerals before the death of the ling is subtracted for the item drop ratio. i mean, i guess i could remove one switch to increase odds and just risk losing the item more frequently... but i want it perfect...

Edit: The thing i'm goin for is the PSO approach, like i don't ALWAYS want an item dropped. No, it's not a NUKE! I know the odds with 11 random switches (1/2048) the posted triggers are NOT NOT the ones i tested with the first time

Post has been edited 2 time(s), last time on Oct 25 2008, 5:23 am by alayou.



None.

Oct 22 2008, 1:33 am alayou Post #2



I mean, i guess i could make a trigger that subtracts a death of ling, adds to pl 8's death count and use P8 death count for the item and P7's for the minerals and let P8's deaths be subtracted when any switch isn't met... does that sound about right?



None.

Oct 22 2008, 1:46 am Morphling Post #3



What unit is the item? Some units can't be created.
Edit: Next time use the edit button instead of making a new post.



None.

Oct 22 2008, 2:05 am Kaias Post #4



Yes, if it is something like mineral chunks or vespene sacs, you'll have to preplace, move and recycle.



None.

Oct 22 2008, 4:32 am Falkoner Post #5



Any unit not placeable in the Unit Layer of Staredit cannot be created via triggers.



None.

Oct 22 2008, 1:06 pm alayou Post #6



well the created unit is just like a beefy archon or something to the effect. like i know u can't create nukes n shutff...



None.

Oct 22 2008, 1:34 pm NudeRaider Post #7

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

You 2nd post sounds like a safe way to avoid problems, but the triggers in the first post should work too.
Are you sure you didn't make a small mistake somewhere?




Oct 22 2008, 1:40 pm Devourer Post #8

Hello

Quote from NudeRaider
You 2nd post sounds like a safe way to avoid problems, but the triggers in the first post should work too.
Are you sure you didn't make a small mistake somewhere?

read above... didn't he told us that he tried to place a nuke which isn't possible?....
i think his question has been answerd... or?



Please report errors in the Staredit.Network forum.

Oct 22 2008, 1:43 pm NudeRaider Post #9

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Devourer
Quote from NudeRaider
You 2nd post sounds like a safe way to avoid problems, but the triggers in the first post should work too.
Are you sure you didn't make a small mistake somewhere?

read above... didn't he told us that he tried to place a nuke which isn't possible?....
Did he?
Quote from alayou
well the created unit is just like a beefy archon or something
Then his answer wasn't very clear...




Oct 22 2008, 10:48 pm Falkoner Post #10



I think you don't get how randomizing switches works, if you randomize 11 switches, you get 2048 possible outcomes, and since there are only about 200 units in the game, I doubt you have special drops for each one of those combinations.



None.

Oct 23 2008, 12:12 am NudeRaider Post #11

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from Falkoner
I think you don't get how randomizing switches works, if you randomize 11 switches, you get 2048 possible outcomes, and since there are only about 200 units in the game, I doubt you have special drops for each one of those combinations.
Wow you're right. Why haven't we noticed earlier? :><:

If you randomize n switches you get 2^n outcomes.
Check this table: (cleared = 0, set = 1)

Now all you have to do is create one trigger for each possible outcome.

Of course you can "group" outcomes - let me show you using an example:
Lets say you have 3 Items (1 rare - 6.25%, 1 uncommon - 18.75%, 1 common - 75%) and you use 4 switches to have 1/16 = 6.25% chance of getting the rare outcomes (say all switches have to be set).
Then you'd have 15 outcomes left but instead of creating a trigger for every single outcome its enough to do the following triggers:
if switch 1 is cleared
then create common item.
(This covers 50% = 8 outcomes)

if switch 1 is set
and if switch 2 is cleared
then create common item.
(This covers 25% = 4 outcomes)

if switch 1 is set
and if switch 2 is set
and if switch 3 is cleared
then create uncommon item.
(This covers 12.5% = 2 outcomes)

if switch 1 is set
and if switch 2 is set
and if switch 4 is cleared
then create uncommon item.
(This covers 6.25% = 1 outcomes)

if switch 1 is set
and if switch 2 is set
and if switch 3 is set
and if switch 4 is set
then create rare item.
(This covers 6.25% = 1 outcomes)




Oct 23 2008, 12:32 am Falkoner Post #12



It seems to me that if you want to have different chances for different items, the simplest way to do it would be using Death Count Randomization instead, however, if these random drops happen frequently(say, more than once every 2 seconds) then you'd want to use Switches instead.



None.

Oct 23 2008, 4:41 pm alayou Post #13



Quote from Falkoner
I think you don't get how randomizing switches works, if you randomize 11 switches, you get 2048 possible outcomes, and since there are only about 200 units in the game, I doubt you have special drops for each one of those combinations.

no i totally get it, i knew the odds for the 2^n, like i want a dragoon's death to have the 1/2048 chance of dropping an archon. Ii'm not saying EACH combination has a diff unit. i know u understand the concept, i'm just making sure u know i know the concept...



None.

Oct 23 2008, 4:46 pm alayou Post #14



Quote from NudeRaider
You 2nd post sounds like a safe way to avoid problems, but the triggers in the first post should work too.
Are you sure you didn't make a small mistake somewhere?

in the first post, i didn't randomize the switches, i just made them all meet the condition. for some reason, the minerals would be added but no item create... and about that nuke thing... i never said that... it was just a counter-example



None.

Oct 23 2008, 5:20 pm rockz Post #15

ᴄʜᴇᴇsᴇ ɪᴛ!

Quote from alayou
no i totally get it, i knew the odds for the 2^n, like i want a dragoon's death to have the 1/2048 chance of dropping an archon. Ii'm not saying EACH combination has a diff unit. i know u understand the concept, i'm just making sure u know i know the concept...

Your theory is right, your execution is wrong.

Quote from alayou
in the first post, i didn't randomize the switches, i just made them all meet the condition. for some reason, the minerals would be added but no item create... and about that nuke thing... i never said that... it was just a counter-example

In the first post, you DID randomize the switches. see:
Quote
Cond:
Always

Action:
randomize switches 1-11
preserve
Say instead always set switches 1-11 to clear, or don't set them at all.

Also, I don't think you read morphling's suggestion:
Quote from Morphling
Edit: Next time use the edit button instead of making a new post.




"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Oct 23 2008, 8:07 pm alayou Post #16



Quote
In the first post, you DID randomize the switches. see:
continue reading, i tested without random.



None.

Oct 23 2008, 8:53 pm Biophysicist Post #17



Try posting the map? Then people can actually look at your triggers directly.



None.

Oct 23 2008, 8:58 pm alayou Post #18



Quote from name:TassadarZeratul
Try posting the map? Then people can actually look at your triggers directly.
i would so love to do that.... BUT daddy ripped my effin tower to my computer off and took it to work with him... douchefag.



None.

Oct 23 2008, 10:03 pm Falkoner Post #19



Where are you creating the special item?



None.

Oct 23 2008, 10:06 pm alayou Post #20



Quote from Falkoner
Where are you creating the special item?
In a remote location. Terrain is completely buildable and passable. And walk-on-able



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[01:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
Please log in to shout.


Members Online: Oh_Man, NudeRaider