Questions about npctemplate table

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

Questions about npctemplate table

Postby saltyteabag » Sun Dec 06, 2015 1:07 pm

Been trying to figure out why I have some mobs spawning at totally inappropriate levels. For example, the Demoniac Familiars at the entrance to Mid side of DF should all be around level 20 +/- a couple levels. Yet I keep getting them spawning with levels in the high 30's. I've tried changing them with /mob level and by editing the mob table with no luck. After a bit of research on here I found the ReplaceMobValues field in npctemplate. I set that to 0 and then edited the levels in mob.level, and they stayed.

My question is, how to make sense of the levels listed in npctemplate? In theory, different models of the mob should have different level ranges, but all I got is this:
Code: Select all
30;24;35;25;27;15;18;20;16;17;19;21;39;23;28;33;29;36;22;37;34;38
Npctemplate.size is the same story. Is there any rhyme or reason to this list of values?
saltyteabag
DOL Visitor
 
Posts: 6
Joined: Sun Nov 29, 2015 12:50 pm

Re: Questions about npctemplate table

Postby Eudes » Sun Dec 06, 2015 9:59 pm

Hello,

You can find a lot of good information in the articles from the Resources top menu of the forum.

There is one about mobs and npctemplate tables from Leodagan (thanks to him!): http://www.dolserver.net/articles/?article=47
Collection and Ranges of integer representing the Mob/NPC Level, based on the same levels as players... for example a Mob that can spawn at level 46 or 48 to 52 would be the string “46;48-52”
It means that when you are using a list in the level field, all mobs created ingame from the npctemplate will have various levels depending of your list. Same for size and model.
Eudes
DOL Freak
 
Posts: 561
Joined: Wed Dec 05, 2007 12:27 am

Re: Questions about npctemplate table

Postby Marko » Sat Mar 12, 2016 1:30 am

Honestly the level column should NOT be included in the npctemplate table - it can really mess things up. I would recommend deleting that column and only using the level column in the mob table for the simple reason that when you use the mob table, you can set the level according to what map the mob is in. The way it is now, like you've noticed, you have mobs in some areas that are completely level inappropriate for the map they're in - I've got level 28 skeletons in a level 7 area for godsakes. If the mob table were used, it's a very simple MySQL line to fix all of the mobs in that map (update whatever where x between n, n and y between n, n) and you're done. Something that simply cannot be done if the level is defined in the npctemplate table since it does not include the mob coordinates.
User avatar
Marko
DOL Novice
 
Posts: 80
Joined: Mon Jun 09, 2014 8:17 pm
Location: Rural Central Utah (Near Bryce Canyon)

Re: Questions about npctemplate table

Postby Graveen » Sat Mar 12, 2016 9:50 am

The proper way to do is rather to have 2 differents NPCTemplates. NPCTemplate is created in the scope of mass creation of mobs (the level can be a range for slightly random levels), and to improve the database access. The NPCTemplate also randomizes models, aggrorange, aggrolevel, and everything i forget. In your case, you should simply have 2 NPCT: first for level 7, second for level 28.

Ideally, MOB table only contains locations, while NPCtemplate factorizes everything remaining. In the end, you should roughly have in your DB the NPCTs for a given mob spot, and some NPCT dedicated to named mobs.

We have the 2 systems (full MOB vs full NPCTemplated mobs) living side-by-side mainly to compatibility reasons :
- existing databases that have full mob table
- existing script that are creating/moidying mobs on the fly (although the mob should never reach the DB, because not saved :p)

To go further, i think personnally NPCT should also contains spatial locations (position + range) giving possible swarm creation (a named would have fixed position), but this is a brand new table not really fitting NPCT nor Mob - a new name must be choosen.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Questions about npctemplate table

Postby Dinberg » Sun Mar 13, 2016 11:25 am

I guess what you are suggesting is something like:

NPCTemplate - holds a list of mob archetypes which mainly affect appearance/behaviour (eg if they have healing spells)
NPCSpawnTemplate(?) - holds a list of spawn parameters for a given npc template, allowing the same 'Skeleton Mage' npc to be reused in a low level zone and a high level one.

but then there is a problem - for NPCTemplates with spells/styles, these are highly level dependent. In the above example, a level 7 'Skeleton Mage' has the same spells as a level 50 one! I suppose a logical way around that is to create spell lines for npcs, but this adds a lot of extra database work
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: Questions about npctemplate table

Postby Graveen » Sun Mar 13, 2016 3:02 pm

More a NPCT with variable parameters, similar to what is done with CSV and/or Range for model, size, level. Position would not be a fixed point but a range to describe a basic area. I don't think we need NPCSpawn or what ever.

I don't really see the issue with spell/style. In a given spot, the range level is not so wide (let's say, +/- 2 levels). So spot 1 "level 7" is a different NPCT from spot 2 "level 30". So the spells/styles are set accordingly. Even if they share names/models, that's definitively different NPCT.

My opinion is really the mobs are handled as single object. Except for named, quests, all particuliar mobs in fact, an auto fuzzy instanciation is suitable for a lot of areas.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Questions about npctemplate table

Postby Dinberg » Sun Mar 13, 2016 7:52 pm

I don't really see the issue with spell/style. In a given spot, the range level is not so wide (let's say, +/- 2 levels). So spot 1 "level 7" is a different NPCT from spot 2 "level 30". So the spells/styles are set accordingly. Even if they share names/models, that's definitively different NPCT.
I realise that is how the current system is supposed to work, but I was responding to the concerns highlighted by Marko
that people have not used it in this way - and as a result there are generic mobs defined in npc template (like 'skeleton') that have replaced mobs previously defined in mob table with inappropriate levels
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: Questions about npctemplate table

Postby Marko » Fri Mar 25, 2016 12:14 am

I guess the 'real fix' may be to try and never use 'generic' mob names, esp. in higher level areas - i think we're kind of stuck with 'skeleton' in the low level maps - since that's what they were called in 'classic' DAOC. I didn't check to see where those level 28 versions were located - usually the skellys in that level range were out in Cornwall and were named something like 'Giant Skeleton' or some such...

I do wish there were a way to keep levels only in the mob table for the reasons noted above, mainly so you can tweak level by mob location.
User avatar
Marko
DOL Novice
 
Posts: 80
Joined: Mon Jun 09, 2014 8:17 pm
Location: Rural Central Utah (Near Bryce Canyon)

Re: Questions about npctemplate table

Postby Dinberg » Fri Mar 25, 2016 12:17 pm

I think you can always tweak level by mob location if you just use a direct entry into the mob table rather than an npc template. But then you don't get any of the perks that npc template offers.
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest