Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-08-2010, 01:12 PM
Irreverent
The Solo Server
 
Join Date: May 2007
Posts: 416
Default

Makes sense...can someone repost the windows binaries then...Please!
__________________
OP of Irreverent Server (The Solo Server)
Our Forums
Reply With Quote
  #2  
Old 07-08-2010, 04:17 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

No time like the present
Reply With Quote
  #3  
Old 07-15-2010, 11:06 AM
Irreverent
The Solo Server
 
Join Date: May 2007
Posts: 416
Default

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.
__________________
OP of Irreverent Server (The Solo Server)
Our Forums
Reply With Quote
  #4  
Old 07-18-2010, 10:48 AM
Irreverent
The Solo Server
 
Join Date: May 2007
Posts: 416
Default

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))
	{
		safe_delete_array(query);
		while ((row = mysql_fetch_row(result)) && (index < FORAGE_ITEM_LIMIT)) 	{
			item[index] = atoi(row[0]);
			chance[index] = atoi(row[1])+chancepool;
			LogFile->write(EQEMuLog::Commands, "Possible Forage: %d with a %d chance", item[index], chance[index]);
			chancepool = chance[index];
			index++;
		}
and

Code:
	if (MakeRandomInt(0,199) < skill_level) {
		uint32 foragedfood = 0;
		int32 stringid = FORAGE_NOEAT;
		
		if (MakeRandomInt(0,99) <= 25) {
			LogFile->write(EQEMuLog::Commands, "Requesting Forage from zone: %d with a %d skill", m_pp.zone_id, skill_level);
			foragedfood = database.GetZoneForage(m_pp.zone_id, skill_level);
			LogFile->write(EQEMuLog::Commands, "Returned item: %d from zone %d chance", foragedfood, m_pp.zone_id);
		}
RESULT:
Code:
[07.18. - 10:36:40] Starting Log: logs/eqemu_commands_zone_4288.log
[07.18. - 10:36:40] Requesting Forage from zone: 33 with a 255 skill
[07.18. - 10:36:40] Possible Forage: 14933 with a 100 chance
[07.18. - 10:36:40] Possible Forage: 16496 with a 200 chance
[07.18. - 10:36:40] Possible Forage: 20465 with a 44 chance
[07.18. - 10:36:40] Returned item: 14933 from zone 33 chance
[07.18. - 10:43:33] Requesting Forage from zone: 33 with a 173 skill
[07.18. - 10:43:33] Possible Forage: 14933 with a 100 chance
[07.18. - 10:43:33] Possible Forage: 16496 with a 200 chance
[07.18. - 10:43:33] Possible Forage: 20465 with a 44 chance
[07.18. - 10:43:33] Returned item: 14933 from zone 33 chance
[07.18. - 10:45:15] Requesting Forage from zone: 33 with a 173 skill
[07.18. - 10:45:15] Possible Forage: 14933 with a 100 chance
[07.18. - 10:45:15] Possible Forage: 16496 with a 200 chance
[07.18. - 10:45:15] Possible Forage: 20465 with a 44 chance
[07.18. - 10:45:15] Returned item: 14933 from zone 33 chance
what is weird is where it selects what is returned:
Code:
	rindex = MakeRandomInt(1, chancepool);
	for(int i = 0; i < index; i++) {
		if(rindex <= chance[i]) {
			ret = item[i];
			break;
		}
	}
	
	return ret;
Again, not a coder...but it always just allows "black root" to be the foraged rare of the 3 available...log never changes and players never get anything else but commons
__________________
OP of Irreverent Server (The Solo Server)
Our Forums
Reply With Quote
  #5  
Old 07-19-2010, 11:01 AM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

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.
Reply With Quote
  #6  
Old 07-19-2010, 02:47 PM
Irreverent
The Solo Server
 
Join Date: May 2007
Posts: 416
Default

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.
__________________
OP of Irreverent Server (The Solo Server)
Our Forums
Reply With Quote
  #7  
Old 07-19-2010, 03:43 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Irreverent, here's some Windows binaries that I compiled latest revision.

Anyone can use these who need those issues resolved.

http://ilikekitti.es/binaries/
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:06 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3