From: SourceForge.net <no...@so...> - 2010-11-01 23:42:08
|
Feature Requests item #3101134, was opened at 2010-11-02 00:42 Message generated for change (Tracker Item Submitted) made by toolchild You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=351111&aid=3101134&group_id=1111 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: toolchild (toolchild) Assigned to: Nobody/Anonymous (nobody) Summary: [Stendhal] Wishing Well Initial Comment: Updating the Wishing Well 1. Introduction I believe that the source of the Wishing Well should be changed. In order to explain I will analyse the existing Wishing Well and its function in the game. Then I will offer my proposal how the Wishing Well could work and last I will give reason why a changed Wishing Well would be an improvement. 2. Analysis 2.1 Assumption My analysis is of course based that I interpret the WellSource correctly and that the WellSource used in the game is this one: (http://arianne.cvs.sourceforge.net/viewvc/arianne/stendhal/src/games/stendhal/server/entity/mapstuff/useable/WellSource.java?view=markup). I also assume that the character using the Wishing Well has a Karma of 0 and no Lucky Charm on him. 2.2 What the code says 2.2.1 The items you can get and how often you get them: 38 private static final String[] items = { "money", "wood", "iron ore", 39 "gold nugget", "potion", "home scroll", "greater potion", 40 "sapphire", "carbuncle", "horned golden helmet", "dark dagger", 41 "present" }; ... 149 if (successful) { 150 final String itemName = items[Rand.rand(items.length)]; .... 159 } else if (itemName.equals("money")) { 160 /* 161 * Assign a random amount of money from 1 to 100. 162 */ 163 amount = Rand.roll1D100(); This means that if the character finds something it's one of the following: money, wood, iron ore, gold nugget, potion, home scroll, greater potion, sapphire, carbuncle, horned helmet, dark dagger, present and if it is money it is a random amount from 1 to 100. That makes 12 items and they all have the same chance to be found. 2.2.2 The probability to find 1 out of the 12 46 private static final double FINDING_PROBABILITY = 0.05; ... 121 final int random = Rand.roll1D100(); ... 126 double karma = player.useKarma(FINDING_PROBABILITY*10); ... 131 if (karma <= 0) { 132 karma = karma - FINDING_PROBABILITY*5; 133 } 134 karma = karma / 10; ... 136 return random <= (FINDING_PROBABILITY + karma) * 100; Unfortunately I am not a programmer and sourcecode confuses me. But by my understand the probability to find anything with Karma 0 is either 5%, 2,5% or since the resulting 2,5 get compared to a Dice with 100 numbers only 2%. I might also be totally wrong here since I have no idea what player.use karma does. 2.3 Expected Value We now know that the character has a chance of 5%, 2,5% or 2% to find 1 of the 12 possible items. And we know that the character pays 30 money each time he tries. Now the question arises if a character with Karma 0 gains or loses money by wishing at the wishing well on the long run. In other words we are looking if the Expected Value is positive or negative. To do that I will assign money values and probabilities to each item and see what happens if the play wishes x times. To chancel out luck and only work with probabilities I would have to do it infinite times. 2.3.1 Item Values and Probabilities Since there are 12 Items each Item has the probability of 1/12 or ~8,33% if the Wishing is lucky 2.3.1.1 Money = 50,5 Probability = 1/12 Money is randomly given from 1 to 100. I believe that makes it an average of 50,5 Money 2.3.1.2 3 Wood and 1 Gold and Iron Oren= 325 Probability = 3/12 Since Wood cannot be sold to a NPC it is quite hard to set a value for it. I believe a reasonable Value would be something between 20 and 40 because that is what I have Wood being sold for. Taking into account that Wood can be used to make Gold Bars and you need 2 Wood + 1 Gold Nugget to create 1 Gold Bar which can be sold to NPC for 250 money I come to the conclusion that 2 Wood + 1 Gold Nugget must be given a Value of 250. Short: 2 Wood + 1 Gold Nugget = 250 money. Also Wood and Iron Ore can be used to make Iron which can be sold for 75 money which leads to Wood+Iron Ore = 75 Since chances to get Wood or Gold Nuggets or Iron Ore are the same I can merge those 3 items by tripling their probabilities. I am not taking into account that you will get the same amount of Gold Nuggets and Wood and Iron Ore, so after a lot of wishing you would only have half of the Wood you need to turn all Gold Nuggets into Gold Bars and no Wood for Iron at all. But since there are other Wood sources I think it is no problem to do that. I am also not taking into account that Wood can be used to make Mithril Bars and therefore might have an even higher value. All together the set value is 3 Wood + Gold Nugget + Iron Or e= 325money. 2.3.1.4 Potion = 400/3 Probability = 1/12 You cannot sell potions (as far as I know) to Npc. The cheapest way to buy Potions though is at Dr. Fellgood for 200 money. A greater Potion though has a better Hp/money rate. It has the rate of 4HP/3money. A Potion gives 100 HP and therefore has a value of 400/3 money or ~133 money 2.3.1.5 Home Scroll = 250 Probability= 1/12 Home Scrolls cannot be sold but bought for 250 money. Since they are barely sold and I am to lazy to calculate probabilities for gambling in Semos Tavern I will just set the value to 250 money. 2.3.1.6Great Potion = 400 Probability = 1/12 See 2.3.1.4 2.3.1.7 Sapphire = 400 Probability = 1/12 Sapphires can be sold for 400 money at a NPC. As far as I know there is no other use for that that would change there value. Maybe quests. 2.3.1.8 Carbuncle = 600 Probability = 1/12 See 2.3.1.7 2.3.1.9 Horned Golden Helmet = 5000 Probability = 1/12 Horned Golden Helmet can be sold for 5000 money to a NPC. IT cannot be sold to other players since it is bound to the player who found it in the Wishing Well. 2.3.1.10 Dark Dagger = 8000 Probability = 1/12 See 2.3.1.9 2.3.1.11 Present = 100 Probability = 1/12 Since I don't know what the present can possibly contain I cannot calculate its average value. I know that there can be a Cherry, a Sandwich and a Pie in it. Maybe also other items. I assume it will only be food items so I believe the value of the Present is rather low. Something between 1 - 200. So I just set average value to 100. 2.3.2 Calculations We now have the different values for each item and there probabilities to be found if something is found in the well. Since Wood has been covered 2 times it does not have to have an assigned value on its own. Ass you can see the probabilities add up to 12/12. I need to take into account that I need in order to get the values we have to win 14 times. 2.3.2.1 Average Item Value Having the item Values and their probabilities I can now calculate an Average Item Value for each time we win. (ItemValues*Itemprobability/times) ((50,5*1/12)+(325*3/12)+(400/3*1/12)+(250*1/12)+(400*1/12)+(400*1/12)+(600*1/12)+(5000*1/12)+(8000*1/12)+(100*1/12))/14 = 94,69 So every time we find something it has the Average Value of ~95 money. 2.3.2.2 Average Wish Value We now have the Average Item Value and we can combine it with the Probability to find something in order to see what our Avarage Play Value is. 2.1.2.3 5%; 2,5%; 2% Chance 0.05*94,69 = 4,73 0,025*94,69 = 2,36 0,02*94,69 = 1.89 2.3.2.3 Flaws Since I am not a programme nor a mathematician I can only hope I understood the sourcecode correctly and that I didn't make any calculating mistakes. Also this calculation only works for characters with 0 Karma and no Lucky Charm. The Item values have been set by me with the most reason, though they are still only assumption and as you can see it is quite hard to make good assumptions of the value of some items, for example Wood. 2.3.3 Expected Value Conclusion Looking at the results and seeing that even if one has a 5% chance to find something with 0 Karma and no Lucky Charms I can definitely say that the Wishing Well has a negative Expected Value. Throwing 30 money in with a chance of 5% gets you out 4,73 money in average. Now that we know how small the Expected Value is we can come to the Proposal. 3. Proposal First of all I want to say that my intention is not to raise the Expected Value since the Wishing Well should not be turned into a source of money but stay a place where one can try his luck hoping to find the big expensive and rare item. 3.1 Different Probabilities for Items and higher Probability to find Something It is way more motivating if one finds items more often so I believe the Chance to find something should be increased. I think about twice or 3 times the probability to find something. When increasing the probability to find something the probability to find specific items must also be controlled in order to not increase the Expected Value. This means that while one finds more items the items one finds have less value.So the cheap items have to be found a lot more often than the expensive ones. We know the Expected Value of the existing Wishing Well so we can balance the new system to get the same Expected Value. 3.1.1 Probability Categories if something is found. The distinctions between items could be in categories, something like this: Rare Special 0.01% or even less Super Rare 0.1-0.5% Very Rare 0,5-1% Fairly Rare 1-1,5% Common Fairly Common 1-3% Often 2- 4% Very Often 4 5% The amount of Items in the different Categories now must add up to 100%, so we cannot have 20 Items in the Very Often category and also have other items. This proposal of categories goes hand in hand with adding more items to the Wishing well. Also the Categories are very vague right now and not backed up with maths. One could use a random 1-10000 to choose for the items and giving more probably items bigger intervals for example to realize this. 3.1 Adding Items I think it would be more interesting and motivating and even fun to use the Wishing well if the amount of different Items would be increased. That can contain cheap items but also expensive and rare items. Also new players should be motivated to try their luck at the Wishing Well so I think there should be some items they can use to improve their equipment. Here are some ideas 3.1.1 Items to add + Probability Category 3.1.1.1 Ammunition I think all kinds of Ammunition should be available at the Wishing Well. A reasonable amount would be a random 1 to 10. (Wooden Arrow and Steel Arrow could be Common and Golden and Power Arrow Rare) 3.1.1.2 Armor and Shield Chain Armor - can be sold and therefore has some value for everyone (Common) Golden Chainmail - can be sold and therefore has some value for everyone + might be an improvement for very new players (Fairly Common Red Set Items - can be sold and therefore has some value for everyone + might be an improvement for very new players(Rare) Maybe one Armor or Shields with a little higher level to keep the lvl 50 or 80 motivated to try their luck at the Wishing Well.(Special) Maybe a Cloak? Aventail - not very valuable but might be an improvement for newcomers and therefore they have motivation to use the Wishing Well Any resources or food could be added. Depending on their value with a random amount, and according to their value different probabilities. Flowers - useless but beautiful (Rare) 3.1.1.3 Weapons Scythe - need for a quest elsewhere useless. Still it is fun because it can be used for harvesting. (Very Rare) Halberd - can be sold and therefore has some value for everyone + needed for a quest (Super Rare) Skull Staff - mostly useless but still funny item, might represent an improvement (Super Rare) Crossbow - can be sold and might be an item that lower levels want to get but cannot by hunting (Super Rare) Chaos Sword - can be sold and might be an item that lower levels want to get but cannot by hunting (Special) Sword - can be sold and might be wanted by lower levels (Common) 3.2 Pros and Cons 3.2.1 Pros - Adding more items to the Wishing Well will increase the diversity of the Wishing Well. Therefore the wishing Well will stay interesting longer for everyone because you will not get all possible items that you can get in the wishing well so soon - Adding more items makes the Wishing Well more interesting for newer players because they get more ways to improve their equipment - Increasing Probability to find something also increases the motivation to play because you don't feel like loosing all the time - Different Probabilities for different Items ensures makes it possible to hope for the big score whereas now it is just a matter of time until one gets the dark dagger or the horned helmet. It will still stay a matter of time but it will be much less likely to get an expensive item, instead they will get more but cheaper items - Adding items increases the variety of items and also the amount of slots needed to take them with the character, this makes the use of macros at the wishing well less efficient because the character will have filled all slots sooner. 3.2.2 Cons - Higher Levels might loose interest in the Wishing Well because they get to many items that have not a high value. Although the Expected Value is intended to stay unchanged in this Proposal it will be connected with more work to turn the items from the Wishing Well into money - Finding a balance between Probability to find Something and the Probability to find specific items without changing the Expected Value could turn out to be some work and the more items the more complicated it gets. At least I think so. 4. Conclusion Knowing /based on the calculations) that the Wishing Well is a waste of money for a character with Karma 0 my proposal significantly improves the motivation to use the Wishing Well because it gets more interesting. Although it is a lot of work to find the right items to add to the Wishing Well and the right amounts for money, ammunition, food and other resources I believe it is worth it. If you have any questions just ask. Sorry if the proposal gets pretty sloppy at the end, took me way to long to write this. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=351111&aid=3101134&group_id=1111 |