Page 1 of 1

Bug 101: (Lokked) First spawn combine, bad math

Posted: Wed Jan 14, 2015 8:56 pm
by BugTracker
Bug ID       : 101 - First spawn combine, bad math 
Bug Date     : 2015/01/14 08:48:50
Assigned To  : Lokked
Priority     : Low

Category     : WorldServer
Sub-Category : 
Severity     : Minor (e.g. Cosmetic)
Reproducible : Every time
Details:
We did a couple spawn combines in Halgarad today, and now we're seeing the message in console:
spawn_location_entry spawn_chance for location_id 43498 sums to more than 100 percent.
Originated From Forum: via BugTracker

Re: Bug 101: (Lokked) First spawn combine, bad math

Posted: Wed Jan 14, 2015 8:57 pm
by John Adams
Just a reminder that we have a "bad math" problem with .spawn combine. Halgarad loaded without error before I .spawn combine'd Derogar. That's the only spawn I did, and the error is now in the chunk startup. Lokked was going to check into this, and this is still a low-priority issue.

Re: Bug 101: (Lokked) First spawn combine, bad math

Posted: Wed Jan 14, 2015 10:29 pm
by Lokked
Some of the spawns are adding to less than 100. I'll review the logic. It won't matter, because the spawn chance is based on weights, as opposed to "per 100". This means that if the spawn_chance for a location_id sums to 50, the spawn chance for a particular spawn will be out of 50.

Also, I thought at some point we are stripping the different Attachments/Appearances off the NPCs to make the spawn table for NPCs truly unique (I don't think it is, right?). There are some _entry's that have 10 different spawns in them, from combine. I find it hard to believe someone found 10 different NPCs in the same location.

Re: Bug 101: (Lokked) First spawn combine, bad math

Posted: Thu Jan 15, 2015 9:09 am
by John Adams
Don't find it too hard, because Raw data is fugly. Tons of a single NPC in 1 location, which my auto-script attempted to populate only ONE of them, but for some reason the Derogar NPC in Halgarad entered the Raw data as 10 different NPC IDs. Not sure why yet, but that's part of my raw data refactor I was working on before the holidays.

We'll need to talk about the weight vs percent thing. I think I get what you're saying, and I'll ask you to convince me that simply doing 100% sum isn't better.

Re: Bug 101: (Lokked) First spawn combine, bad math

Posted: Thu Jan 15, 2015 6:28 pm
by John Adams
Yeah, sadly we're going to have to fix this one way or the other. This probably isn't right, no matter where you learn averages

Edit: attached instead, too big -- this is just ONE repop, btw.

Re: Bug 101: (Lokked) First spawn combine, bad math

Posted: Thu Jan 15, 2015 6:40 pm
by Moldew
OMG, you know everything I'm doing?!? I...I...uh...