Forage Issues
Example: In Firiona Vie, you only get the basic forages. (water/roots/berries/etc)
No one is getting the special forage like the Rose of Firiona. I checked my table to make sure it isn't corrupted and has the rows. It does. Not sure what is going on...any tips in researching this? |
ok researched a couple other issues with parchment/spell turn ins...the LAST one on the list of the random generator isn't getting rewarded on a list.
Was there a change to the way random numbers are generated? (in code or perl?) |
Found it! It was a change in the code!!
Just so many things started going wrong. Dyanmic/random mobs weren't working anymore...turnins that have an array, the last one wasn't being selected.... could this be it? Code:
==06/22/2010== |
Quote:
In regards to turnins, considering I can get ALL items from repeatedly doing a turnin that has an array of possible items, I'm quite certain that is not misbehaving as you say. Foraging had some very strange logic in place that may have had a problem. I replaced that logic with more tried and true logic found elsewhere in the code to select an item from a list based on its chance to be selected. |
Sure, no problem!
I used this code: Code:
sub EVENT_SAY { |
Are you sure you are using the latest? We had this issue resolved I believe.
|
Yup, using the one that is a binary off the compiled link. 1535.
|
Yes, what revision are you running that on? Because all evidence is that it works properly in my testing on PEQ.
|
I'm using the 1535 binaries posted. I'm sure PEQ compiles their own...perhaps they were compiled differently?
|
Quote:
The problem you are experiencing was resolved in revision 1547. |
Makes sense...can someone repost the windows binaries then...Please! :)
|
|
Well, FV now produces rares.
BUT for some reason Misty thicket, PoJ, and other zones are no longer producing rare forages. Any other 1590+ people having this problem? Can you test? I just have an active population, so this is a bug that it causing a lot of stops on TS/Epics. |
ok, I think I found the issue...now need a *real* coder than myself. :)
I put the following lines to show the results in the log. So either if you have multiple forages their sum must be = 100, or the code isn't working as intended....but then again I'm not a C++ guy. in the forage table for zone 33 there are 3 items with 100% chance within them Added code: Code:
if (RunQuery(query, MakeAnyLenString(&query, "SELECT itemid,chance FROM forage WHERE zoneid= '%i' and level <= '%i'", ZoneID, skill), errbuf, &result)) Code:
if (MakeRandomInt(0,199) < skill_level) { Code:
[07.18. - 10:36:40] Starting Log: logs/eqemu_commands_zone_4288.log Code:
rindex = MakeRandomInt(1, chancepool); |
The problem is because chance[] was an int8, making it's upper limit be 255. Since the pool you are pulling from has three items at 100 chance each, that meant it was trying to set the value to 300, but when you hit 256 it would change to 0. So setting it to 300 made a resultant value of 44.
It does not matter what the sum of the chances are. Only the relative values matter. And chance[index] is going to be the current item chance plus all prior item chances. It is required for the item select code to work properly. Just because the first item will show a 100 chance and the second item will show a 200 chance, it does not mean the second item has twice the chance of being foraged. It just means that when we generate the random number, any values less than or equal to 200 *might* be the second item, but since we check for the first item before the second and any value less than or equal to 100 will return the first, that means the actual range of values that would return the second item is 101-200. |
ok, thanks for looking into t again...maybe need to stop posting here and in PM. So I'll just post here for now on!
I don't know about the code and vs. intention or purpose....but all I do know is what my testing has objectively resulted in and its 100% reproducable. And that is being the only way to get rares to load correctly is to have the SUM of the entire zone's forage rate be 100% or less. Once I did that, all zones are now working correctly again. Maybe there was another change that took place this year because it USED to work. I just poorly associated it with the random change(since I am not a coder) But now a fix has been identified, but not sure if it is the right one. Just need to either 1) fix the code so it properly handles up to 55(hardcoded limit) chances of 100% as per the tables....or 2) have someone update the entire forage table to make each zone = < 100%. I have already done the 2nd to make it work...but I know other servers are having the issue as well. |
Irreverent, here's some Windows binaries that I compiled latest revision.
Anyone can use these who need those issues resolved. http://ilikekitti.es/binaries/ |
Thanks! Forgot to tell you that I'm a compiler type now! Had to learn how to do it, as well as basic code, so I could debug and assist with this issue. As usual, the entire emu staff is great!
|
All times are GMT -4. The time now is 05:23 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.