|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Support::Windows Servers Support forum for Windows EQEMu users. |
08-12-2020, 11:12 AM
|
Sarnak
|
|
Join Date: Nov 2008
Location: Germany
Posts: 50
|
|
I would like to look at the code that populates a land
A bunch a years ago I played around with eqemu, and I was able to look into the internals.
But I am now older and having problems remembering yesterday. I know I was able to look into how spons were generated, but I cannot see how to do it now.
It seems to me that a land would be populated with a random mob from a list of possible mobs. I would like to look how Misty Thicket is populated on my own server.
I am harvesting spider webs and I run out of spiders. But it seam that the number of other mobs increase. I would like for someone to give me a hint on where I can look in the code to see if mobs are generated from a random list of mobs. That way I will know if I need to kill other mobs to increase the chance that more spiders get generated.
thanks
|
|
|
|
08-12-2020, 03:48 PM
|
|
Sarnak
|
|
Join Date: Sep 2016
Posts: 91
|
|
The whole thing is database-driven. There is a table npc_types which defines the NPC, their level, race, strength, etc. And there is a table spawn2 that defines where, with what probability the NPCs from npc_types spawn.
With the following SQL query you can see how the tables are linked and how to query which NPC spawns in a zone.
Code:
SET @myZone = NULL;
SET @myNpcName = NULL;
SET @myNpcID = NULL;
SET @myZone = 'misty';
SELECT nt.id as npcID, nt.name, nt.level, nt.hp, s2.respawntime,
s2.spawngroupID as spawngorupID, s2.pathgrid, s2.zone, s2.x, s2.y, s2.z
FROM npc_types nt
LEFT JOIN spawnentry se ON se.npcID = nt.id
LEFT JOIN spawngroup sg ON se.spawngroupID = sg.id
LEFT JOIN spawn2 s2 ON s2.spawngroupID = sg.id
WHERE (s2.zone = @myZone OR @myZone IS NULL)
AND (nt.name LIKE @myNpcName OR @myNpcName IS NULL)
AND (nt.id = @myNpcID OR @myNpcID IS NULL)
GROUP BY name, level ,respawntime
ORDER BY name, level, respawntime ASC
LIMIT 500;
Because of your request: you probably want to shorten the respawn time of the spiders in Misty.
You can find all of the very extensive and complex C++ code at GitHub:
https://github.com/EQEmu/Server
The code which handles spawning can be found here:
https://github.com/EQEmu/Server/blob...one/spawn2.cpp
You can get even more information yourself from the project's GitBook. Everything is well documented there:
https://eqemu.gitbook.io/server/
Have fun in the wonderful (and incredibly complex) world of EQEmu
|
|
|
|
08-13-2020, 05:13 AM
|
Sarnak
|
|
Join Date: Nov 2008
Location: Germany
Posts: 50
|
|
Thanks Thalix for the quick reply.
I had a C course over 40 years ago and only used it once or twice since than for small personal projects. So the C++ links you provide are way over my head.
But even though I have had no formal training in SQL, I enjoy it and have done several small personal projects using it. So I mostly understand your SQL suggestion on how to get the info I want. But when I do a cut and paste of your query I get an error that I don't understand:
ERROR 1267 (HY000): Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (cp850_general_ci,IMPLICIT) for operation '='
Even though it is my own server (and I am the only one using it), I do not want to "cheat" by shortening the spider respond time, I just want to know if there are other mobs I could kill that would increase the chance a a spider responing.
|
08-13-2020, 05:56 AM
|
|
Sarnak
|
|
Join Date: Sep 2016
Posts: 91
|
|
No idea why the SQL does not work for you. It works under HeidiSQL and phpmyadmin (both with mariadb) without problems.
To your question, in this case you have to look in the spawngroup table. The Spawns are organized in groups. E.g. Spider1 33%, Spider2 33%, Bat1 33%. If that would be the case, you would have to kill the Bat1 as well as the spiders to get a 33% higher spawn chance for Spider1/2.
Edit: Found this on google about your SQL Error: https://stackoverflow.com/questions/...ns-mysql-error
|
08-13-2020, 09:22 AM
|
Sarnak
|
|
Join Date: Nov 2008
Location: Germany
Posts: 50
|
|
Thanks for answering my original problem. Looks like I will be declaring war on bats.
You know I feel kind of stupid for not thinking of google on the sql problem I was having.
I wonder how people were able to do their work before google came along. I started my career in the mid '70s repairing IBM 360 main frame computers (down to the logical gates). God only knows how I did that without google.
|
08-13-2020, 10:59 AM
|
|
Sarnak
|
|
Join Date: Sep 2016
Posts: 91
|
|
Haha, I can still remember how I had learned the 68000 assembler including all CPU registers on an Atari ST.
But something like Google existed quite early. My first (high speed!) acoustic coupler with 300 baud was able to dial into mailboxes with "boards" over the phone. There we talked about everything and also answered questions. Everyone knew everyone and the name of his sister. Those were times After that there was CompuServ with similar background. And in the early days of the public internet there were Usenet boards. Something like Reddit today, but of course without pictures. To transmit such pictures via 14400 Baud modem took days
I think we're not that far apart, maybe 10-15 years? I was born in the early '70s.
|
08-13-2020, 04:18 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
Quote:
error 1267 (hy000): Illegal mix of collations (latin1_swedish_ci,implicit) and (cp850_general_ci,implicit) for operation '='
|
donaldcanard [and Thalix,] you'll need to look at the tables used in the query and see which ones are using the different collations.
Whenever data is joined from multiple tables, they must be of the same collation type.
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
|
|
|
08-13-2020, 11:42 PM
|
Sarnak
|
|
Join Date: Nov 2008
Location: Germany
Posts: 50
|
|
Uleat,
Thank you for taking the time to reply to my question. I don't use HeidiSQL, so I really did not understand your post. In the future , if I have a future (sick joke), I may look into HeidiSQL. But in the present I just use SQL.
Thalix,
We are over 20 years apart, I was born 1950 (exact). In my high school years there were no such thing as micro processors to play with. In fact, all through high school and into university, there were no hand calculators available. We used slide rules. (I find very few people now days who have any idea what that is). 4 Function (+, -, X, and divide) hand calculators were released while I was in university at over $400 (1970s $400). There was no way could I afford one while I was in collage. I guess that is enough of "Well sonny boy, back in my day ..."
Well back to the question at hand. There are only two types of spiders, large and giant. So that matches quite well with Spider1 and Spider2. But there are 3 types of bats, a bat, a large bat, and a giant bat. So I guess it is a safe bet that Bat1 is the first, "a bat".
Oh, one last comment on the first paragraph to you. By the time "bullion boards" came around, I was married with two children. The was no reason to know people's sisters, at least no reason that would keep me from being killed.
|
|
|
|
08-14-2020, 08:29 AM
|
|
Demi-God
|
|
Join Date: Oct 2010
Posts: 1,332
|
|
Quote:
Originally Posted by donaldcanard
all through high school and into university, there were no hand calculators available.
|
This would give the modern student PTSD
|
08-14-2020, 01:39 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
That's definitely a modern reproduction -- they didn't have plastic back then :P
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
08-14-2020, 03:29 PM
|
|
Demi-God
|
|
Join Date: Oct 2010
Posts: 1,332
|
|
Quote:
Originally Posted by Uleat
That's definitely a modern reproduction -- they didn't have plastic back then :P
|
You're right, I didn't even pay attention to that. We didn't have one at home, just one of those simple little one's to stick the pencil in and turn, while the shavings fall on the floor. That's how my mom knew if I did homework or not.
|
|
|
|
08-15-2020, 03:05 AM
|
Sarnak
|
|
Join Date: Nov 2008
Location: Germany
Posts: 50
|
|
Quote:
Originally Posted by Uleat
That's definitely a modern reproduction -- they didn't have plastic back then :P
|
Since the subject is on my school years, late 50s to early 70s, we had lots of plastic. Even clear plastic, my toy cars had see through windshields. So although I cannot remember a pencil sharpener with a clear storage chamber, it would not have been impossible
Also there was a substance call Bakelite Plastics in the decades before me. It was dense dark plastic used in electrical applications. Just out of curiosity I looked up Bakelite on Wikipedia and found that it was invented in 1912. Also something I did not know is that it could also be made translucent and used in pipe steams and jewelry as well as lots of other uses.
Well enough of this, time to go back to killing spiders. I hate spiders (I think that this was caused by my older brother and sister taking me to see the the 1955 film "Tarantula" when I was around 7 years old. Since then, until about about 25 years ago when I moved to Europe, I would wake up and see a 1 to 2 foot spider crawling on the walls. When this happen, I usually lay still telling myself I am dreaming again. But once I woke up and saw about 12 inch tarantula dangling from the ceiling fan above the bed. I did what I always did, lay there telling myself I am dreaming again. It just so happened that for some reason my wife set up in the bed directly under the tarantula. I then also sit up so I could hit on the back with both hands. I screamed to her "Run!!!". I am very proud of myself for getting closer to the tarantula in order to save my wife. I caught up to her in the hall way between our two children's rooms where she was trying to decide which child to save. She screamed at me what's wrong. I said a giant tarantula is over the bed. She said "Oh, that again" and went back to bed. The above part about my wife was not part of a dream, we talked about it the next morning. I think that she started hating my brother and sister at that point. Sorry about the long off topic story)
|
|
|
|
08-15-2020, 03:09 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
Bakelite was the go-to standard for years
Automotive distributor caps and rotors were made of it.
No, my 'recollection' only goes back to the mid-70s .. and there was plenty of plastic around - just not in your standard school supplied pencil sharpeners
The only plastic ones of those I know about were the little personal ones found in that vinyl notebook pouch used to hold your pencils.
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 05:50 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|