View Full Version : Inquiry for Deadcode or CyberShadow
I was hoping you would enlighten me, and everyone in the worms community, about how exactly crate probability works in a scheme file. How does the game determine the probability of a weapon drop for the values 0 - 255? What is the fixed setting for Super Weapons? What are the chances of getting a Super Weapon or a Regular Weapon in a weapon crate if Super Weapons are enabled in a scheme?
Currently, my theory is that it takes the total value of all the probabilities, and then divides the setting by this total. For example, if you have bazooka set to 1, homing missile set to 2, and baseball bat set to 3, the probability of getting a homing missile might be 2 / (1 + 2 + 3) = 33.33%. There seems to be a maximum value somewheres, like all settings >10 have the same effect as a setting of 10. I am just guess, but I would really like to know for sure.
There also seems to be a... I guess you could call it a "bug", in the scheme system. All schemes have a certain probability >0% of getting a "Select Worm" from a weapon crate. The fewer and lower your probability settings are, the higher the probability of getting a select worm is. It's not a big deal. I'm just curious why this happens?
Joeyjoejoe
7 Nov 2006, 08:03
I would like an option in the next update that stops select worm from appearing in crates.
Because the relative crate probability system is falwed. It doesn't add up to 100% always. So there is a probability of getting an empty weapon crate. So to stop this, every empty weapon contains a select worm.
That's the gist of what deadcode? said once
Because the relative crate probability system is falwed. It doesn't add up to 100% always. So there is a probability of getting an empty weapon crate. So to stop this, every empty weapon contains a select worm.
That's the gist of what deadcode? said once
I think I said it first. I don't know if it was ever confirmed though.:-/
Deadcode
15 Nov 2006, 07:49
First the number of non-zero probabilities are counted. For example, if the scheme is as follows:
Weapon Crate = 0%
Health Crate = 100%
Utility Crate = 70%
Then the count is 2, and each value is divided by 2:
Health Crate = 50%
Utility Crate = 35%
This adds up to 85%; subtract it from 100% for the No Crate probability:
No Crate = 15%
Note that the division rounds down to an integer. And a scheme can be "hacked" to have probability values larger than 100%. Unfortunately, they can only go as high as "127%", because of the use of signed bytes.
But if this is done, it is possible for the total after division to exceed 100%.
scheme:
Weapon Crate = 127%
Health Crate = 127%
Utility Crate = 127%
Each one is divided by 3:
Weapon Crate = 42%
Health Crate = 42%
Utility Crate = 42%
But, 42+42+42=126, which is greater than 100. So what actually happens is this:
result:
Weapon Crate = 42%
Health Crate = 42%
Utility Crate = 16% (100-42-42=16)
No Crate = 0%
Here's some more examples:
scheme:
Weapon Crate = 126%
Health Crate = 126%
Utility Crate = 18%
result:
Weapon Crate = 42%
Health Crate = 42%
Utility Crate = 6%
No Crate = 10% (100-42-42-6=10)
scheme:
Weapon Crate = 126%
Health Crate = 126%
Utility Crate = 0%
result:
Weapon Crate = 63%
Health Crate = 37% (63+63 exceeds 100, and 100-63=37)
Utility Crate = 0%
No Crate = 0%
This is the best you can do if you want all types of crates to fall on every turn, weapons most often:
scheme:
Weapon Crate = 126%
Health Crate = 87%
Utility Crate = 87%
result:
Weapon Crate = 42%
Health Crate = 29%
Utility Crate = 29%
No Crate = 0% (100-42-29-29=0)
very nice deadcode thenks for that info.
robowurmz
15 Nov 2006, 17:08
/anon Deadcode Sucks!:p
/anon Boric6 sucks and doesn't know what he's talking about! :p
why is it decided this way? This looks absurd. Code/game design can easily be made to make it how you want....this way of deciding crates seems very....unprofessional. To me atleast:p
Yeah, but is the way that was implemented, "hard" to quit it for now (not hard to change in the code, but hard to implement for all)
id say at the time it was implemented (either via deadcode or by someone prior to the beta patches) it was the simplest bug free solution that also is possibly code friendly.
Hi Deadcode :-/
When you with CyberShadow upload new update an Forum Team17?
Thanks for informations
Hi Deadcode :-/
When you with CyberShadow upload new update an Forum Team17?
Thanks for informations
When it's ready.
AndrewTaylor
16 Nov 2006, 10:17
Yeah, but is the way that was implemented, "hard" to quit it for now (not hard to change in the code, but hard to implement for all)
I don't know if that's necessarily true. Deadcode seems perfectly capable of changing things like that relatively easily, but he'd also need to add a scheme option for which probability setting you wanted to use so that the old schemes work properly. A more precise system might well be added eventually, but since we now know how this one works, it probably isn't a priority.
I was going to suggest a new feature "oil drum drop", basically instead of just having the 3 crates dropping in, you could sometimes get an oil drum dropping in. (ALso set in scheme options like the other 3 crates)
But how would that affect this crate formular?
drum and random mine mine drops xD ownage.
AndrewTaylor
16 Nov 2006, 11:24
But how would that affect this crate formular?
It wouldn't, as long as drums were added on to the end and defaulted to zero. You could add mines as well, or anything else you liked, without affecting the formula.
See, crazy system it may be, but it has its uses.
Because the relative crate probability system is falwed. It doesn't add up to 100% always. So there is a probability of getting an empty weapon crate. So to stop this, every empty weapon contains a select worm.
That's the gist of what deadcode? said once
Using the forumlae above (and assuming the weapon crates work in the same way) you ought to be able to construct schemes where select worm doesn't come up.
When it's ready.
He just keeps showing up, doesn't he? http://www.nanacide.com/images/Emoticons/downs.gif
Deadcode
17 Nov 2006, 20:31
why is it decided this way? This looks absurd. Code/game design can easily be made to make it how you want....this way of deciding crates seems very....unprofessional. To me atleast:pAgreed. I did not design it that way; I've only maintained compatibility. (With the upcoming new scheme format you'll have direct control over the probability of a crate not falling.)
You haven't heard the worst of it, in fact. There is a probability "array" of size 100, filled with "weapon", "utility", "health", and "no crate". Every time one is chosen, it is subtracted from the array... making it a little less likely on the next turn. If you kept track of every single crate fall, you'd be able to know exactly what kind of crate would fall (or not fall) on the 100th turn. Once the array is reduced to nothing, it's reinitialized and everything becomes possible again.
That is also the way it works for other stuff like Sheep Heaven (where a sheep comes out of an exploding crate). If you keep track of the parity, you can predict exactly whether every second sheep will go right or left (it will go the opposite direction that the previous one did). And if the first 5 mines triggered turn out not to be duds, the sixth one is guaranteed to be a dud (assuming dud mines are enabled).
That is also the way it works for other stuff like Sheep Heaven (where a sheep comes out of an exploding crate). If you keep track of the parity, you can predict exactly whether every second sheep will go right or left (it will go the opposite direction that the previous one did).
So SheepBnG is less random than we thought.
However, I'm not convinced this is true. Either that or there's a rule somewhere which makes it a bit less black and white than that. I'm pretty sure I've seen a sheep jump out a crate, explode near another crate and the sheep went the same direction as the first. Conversely, I'm pretty sure I've seen the same happen but with the second sheep jumping in the opposite direction.
Am I going mad or is there some truth in my post?
Well deadcode you have my sympathy:)
Deadcode
17 Nov 2006, 22:15
For some reason my reply addressed the other kind of crate probability, rather than what Etho asked about. So here's the answer to what was asked.Currently, my theory is that it takes the total value of all the probabilities, and then divides the setting by this total. For example, if you have bazooka set to 1, homing missile set to 2, and baseball bat set to 3, the probability of getting a homing missile might be 2 / (1 + 2 + 3) = 33.33%. There seems to be a maximum value somewheres, like all settings >10 have the same effect as a setting of 10. I am just guess, but I would really like to know for sure.Very good guessing. The maximum is actually 12.6, acheived by using a byte value of 51. I've added a table to the page on nanacide.com (http://www.nanacide.com/wahelp/info-factoids.php). (The reason for this is, the byte value in the scheme file is converted into a crate probability by multiplying it by 20, but is stored in a byte, which truncates it after the multiplication. Obviously the intent was to convert the range 0-5 into 0-100, which is pointless really, because it's NOT a percentage.)There also seems to be a... I guess you could call it a "bug", in the scheme system. All schemes have a certain probability >0% of getting a "Select Worm" from a weapon crate. The fewer and lower your probability settings are, the higher the probability of getting a select worm is. It's not a big deal. I'm just curious why this happens?In the original design of W:A, Select Worm was "left out". It was not in the scheme format, but it was also not a super weapon. So, it gets assigned a probability equivalent to 0.5 (relative to the values in a scheme). One way to force it not to fall is to assign it a very high Delay.
Deadcode
17 Nov 2006, 22:21
So SheepBnG is less random than we thought.
However, I'm not convinced this is true. Either that or there's a rule somewhere which makes it a bit less black and white than that. I'm pretty sure I've seen a sheep jump out a crate, explode near another crate and the sheep went the same direction as the first. Conversely, I'm pretty sure I've seen the same happen but with the second sheep jumping in the opposite direction.
Am I going mad or is there some truth in my post?That's why I stated in my post that you need to keep track of the parity. If you don't keep track, then there is no guarantee that the sheep will go in the opposite direction than it did last — otherwise there'd be no randomness at all; sheeps would go right, left, right, left, ad infinitum.
If you didn't keep track from the very beginning of the game, you can "reacquire it" by noting when two sheeps go in the same direction in a row. Then it is guaranteed that the next one will go in the opposite direction; then the next will be random, next after that will be opposite, then random, then opposite, etc.
rednecks
18 Nov 2006, 02:08
deadcode sorry if this is posted some where else but when is a new patch coming out?
alsowhats your take on the trippenz claim?
would like to see what you think
a new patch is released when it is made... think about how logical it is to realease a non existent product to people.
[UFP]Ghost
18 Nov 2006, 02:54
deadcode sorry if this is posted some where else but when is a new patch coming out?
alsowhats your take on the trippenz claim?
would like to see what you think
dan thats the most offtopic post i'v seen in a week. I already talked about this it's been debated on well generally me vs everyone so we've come to the conclusion that no one will believe him till he releases a beta.
Now deadcode didn't comment in the thread but still.
and as many people have said before the patch will come out when it does, it could be a million years or one second, we just all have to sit tight and wait.
evilworm2
18 Nov 2006, 02:54
a new patch is released when it is made... think about how logical it is to realease a non existent product to people.
hehe, rednecks should know. ;)
That's why I stated in my post that you need to keep track of the parity. If you don't keep track, then there is no guarantee that the sheep will go in the opposite direction than it did last — otherwise there'd be no randomness at all; sheeps would go right, left, right, left, ad infinitum.
If you didn't keep track from the very beginning of the game, you can "reacquire it" by noting when two sheeps go in the same direction in a row. Then it is guaranteed that the next one will go in the opposite direction; then the next will be random, next after that will be opposite, then random, then opposite, etc.
Ah, I see!
Cheers :)
rednecks
18 Nov 2006, 03:57
im not going to hijack this topic but ghost i know that will can not make this patch happen as he has lied to me before, just found this out. if he lied to me over some thing as dumb as he did then i have had to become one of the doubters. hope he proves me wrong
All this information has been very helpful. Two more questions have come up that I hope to get answered as well.
1. The weapon crate probability rate of the mole, super sheep, cow, old woman, sheep launcher, pidgeon, holy hand grenade, and flame thrower gets set to a specific rate if Team Weapons are enabled in a scheme. What probability do they get set to?
2. There also seems to be a fixed probability rate for super weapons if they are enabled in a scheme. How does this work?
is it possible to control the frequency (directly or indirectly) of 2x damage utility crate drops?
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.