Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 11-15-2012, 04:37 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I think the npc_types_tint table could be re-used for mercs as well. We would just need to add texture/model fields for each slot. It would be good to have that option for NPCs as well anyway, so you could have different textures for each slot if you wanted (plate chest, chain legs, etc). Then you would just assign a tint set ID to the merc and it would give the appropriate look.

I haven't tried the RoF beta yet (and don't plan to), but I hear that mercs may now have a new UI window that lets you at least view the equipment they are using. I don't have much detail on the subject, but if this is true, it would confirm that mercs do in fact equip gear. If no one can confirm now, we may have to wait until it goes live to be sure. Mercs equiping items could be something new to Live (assuming the info is true), or they may have done it all along.

Either way, even if it is true that Mercs can use gear, that is something that could always be added in later. Just like NPCs can use gear or not. It can factor into their combat, but not on the same scale as it does for player characters.

It is very possible that the casting bonuses and such come directly from focus effects on worn items. Though, it would be nice to have the option to change those values directly via a table like bad_captain mentioned.

As mentioned, a scaling option would be good if it could be worked out properly, but I think it would be pretty hard to really properly scale more than a few levels at a time. There may still be a good way to consolidate the large number of DB updates that would be required otherwise, though. We may be able to split stats out into a couple more tables and assign IDs from those stat tables to individual merc templates. There are probably different stats that overlap between different merc types. Maybe all tiers use the same STR/STA/INT/WIS/AGI/DEX/CHA and Resist values for each respective level of the merc, but they use different min/max and hp/mana/AC values. We could have one table that deals with stats and resists, then another that deals with min/max damage and hp/mana/AC, or whatever. It may take some analysis and thought to see if this approach would be worth-while, but if it can consolidate the amount of entries considerably, it could be worth it. Just kinda thinking out loud here, heh.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 11-15-2012, 09:25 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by trevius View Post
I haven't tried the RoF beta yet (and don't plan to), but I hear that mercs may now have a new UI window that lets you at least view the equipment they are using. I don't have much detail on the subject, but if this is true, it would confirm that mercs do in fact equip gear. If no one can confirm now, we may have to wait until it goes live to be sure. Mercs equiping items could be something new to Live (assuming the info is true), or they may have done it all along.
FYI, the info quoted above is false.

And, Noport, mercs have always displayed weapons and armor like you show in that pic. That is nothing new. It doesn't mean that they actually equip any of the items they are displaying, it could just be (and most likely is) for display only.

Quote:
Originally Posted by bad_captain View Post
Also, not sure about this, but just because a merc is 'wearing' a piece of equipment doesn't necessarily mean it has to use that texture, right? They could use the equipment for stats, but display what we specify, correct?
That is correct. We can send texture changes, or wearchanges to make any NPC appear to wear/wield whatever we want, no matter what their inventory actually is (or isn't). Keep in mind that there is 1 extra step that has to be taken to make different weapon type changes work as needed; we have to also change the attack message to match the weapon model (slashes, crushes, etc). NPCs already support this type of change in fields of the npc_types table.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 11-15-2012 at 09:33 PM..
Reply With Quote
  #3  
Old 11-15-2012, 08:52 AM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default

Trev these were found on a Merc FAQ I was looking at

Q: Can I give my mercenary weapons and armor similar to a pet?

A: No. your mercenary comes equipped with the armor and weapons he needs. Also his armor and weapons will get better as he levels up.

source http://almarsguides.com/eq/general/mercenaries.cfm


Can I give the mercenary gear?
No, you cannot gear the mercenaries or hand them any thing at all.

Source : http://www.necrotalk.com/showthread.php?t=9993

So it may be that in ROF giving them equipment is new..But looks like atm you cannot and their gear scales accordingly with preset sets of Gear based on level.
Reply With Quote
  #4  
Old 11-15-2012, 10:30 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Ya, but the information may not be accurate in those FAQs. They say that mercs come with their own gear, but they don't know for sure if that means they actually have a full set of equiped items (inventory) or if they are just simulating a set of gear by sending texture and wearchange packets and adjusting NPC stats accordingly to scale. Considering that all of the mercs I have seen in the past only wore armor with no tint, that makes me lean toward them just sending a texture change. If they were using actual gear, why not use existing gear sets made for players (which would have a tint applied)? Of course, they could also send a tint to simulate that as well, which we already have an option for in the emu.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 11-15-2012, 11:16 AM
Noport
Opcode Ninja
 
Join Date: Mar 2009
Location: San francisco
Posts: 426
Default

Reply With Quote
  #6  
Old 11-15-2012, 11:49 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

I have not looked into the MQ2 source for their spawn searches but found this over on their forums
Quote:
You're right, anything doing a spawnsearch using "pc" will not return a merc- there is "mercenary" for that (I use Autobot and had to heavily modify it to allow a tank merc as MT).
Reply With Quote
  #7  
Old 11-15-2012, 03:01 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

I'm tempted to just go ahead and add in equipment, as it won't be that much work (minus weapons), and it will affect the stats used as base stats (what I'm working on now & they would need to be significantly adjusted later if equipment we added). Not only that, but secondary stats such as spellshield, healing amount, etc would need to be addressed. Equipment allows mercs to have those stats without having to give them the stats initially. Plus, it allows for a lot of possible customization.

I would be curious to see just what equipment they do use on live, if any. I know it was odd to see my tank merc alternate between weapon types, using 1hs, 1hp, and hand-to-hand weapons at lower levels.

Also, not sure about this, but just because a merc is 'wearing' a piece of equipment doesn't necessarily mean it has to use that texture, right? They could use the equipment for stats, but display what we specify, correct?
Reply With Quote
  #8  
Old 11-15-2012, 09:43 PM
Noport
Opcode Ninja
 
Join Date: Mar 2009
Location: San francisco
Posts: 426
Default

i'll say this Trevius is correct there is nothing new. my mercenary hits for 2k a swing not counting crits. this is what you get when you receive your mercenary this is a tier V mercenary. the mercemary ui looks just like what Secrets posted (just for display only).
Reply With Quote
  #9  
Old 11-15-2012, 11:53 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

I think its fairly obvious that mercenaries wear opcodes.
Reply With Quote
  #10  
Old 11-16-2012, 10:51 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Yeah, not sure what I was thinking. I guess that's what I get for posting so late. A rule would be best. I would say sometime this weekend, Akkadius.
Reply With Quote
  #11  
Old 11-17-2012, 01:53 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Secrets, I took a look at your code and have a question. Why did you put the merc_npc_type_id in the merc_types table instead of putting the merc_type_id, merc_template_id, or something else within merc_npc_types to designate what it belongs to?

Because the stats aren't dependent on race, the table I created for holding merc stats had the class, proficiency, tier, and level to designate which record to use. Unless I'm missing something, I'm not sure how to get a specific record within the merc_npc_types table, although I guess id isn't auto_incremented, so I guess you could reuse the id multiple times. But, again, the stats aren't race dependent (I guess the appearance fields may be; although they are actually randomly generated on hire and may not be necessary to have in the table. They aren't level dependent anyway so it may be best to put that stuff in another table to avoid duplication). Plus, having to update the merc_types table with an arbitrary id from another table after the data has been generated, will most likely be tedious, and to me, harder to maintain.

If we add in trevius' suggestion to use the npc tints table (or at least a copy of it for mercs), it may be best to pull out the textures and tints to another table, especially since they will not be changing every level (I don't think armor changed but every 10-20 levels, where weapons changed every 5). I haven't done this in my example, but could easily be done.

Also, some of the fields in npc_types aren't relevant to mercs, and could most likely be removed.

Just for reference, here's how I had it broken down (I could easily remove the id and just use class, proficiency, tier, and level as the primary key - I just prefer one field for the key that is not dependent on any other field or in any way related to the actual data):

Code:
CREATE TABLE merc_stats (
  	id int(11) NOT NULL auto_increment,
  	class tinyint(2) unsigned NOT NULL default '1',
	proficiency tinyint(3) unsigned NOT NULL default '1',
	tier tinyint(3) unsigned NOT NULL default '1',
	level tinyint(2) unsigned NOT NULL default '1',
  	hp int(11) NOT NULL default '1',
  	mana int(11) NOT NULL default '0',
  	AC smallint(5) NOT NULL default '1',
  	ATK mediumint(9) NOT NULL default '1',
  	STR mediumint(8) unsigned NOT NULL default '75',
  	STA mediumint(8) unsigned NOT NULL default '75',
  	DEX mediumint(8) unsigned NOT NULL default '75',
  	AGI mediumint(8) unsigned NOT NULL default '75',
  	_INT mediumint(8) unsigned NOT NULL default '80',
  	WIS mediumint(8) unsigned NOT NULL default '80',
  	CHA mediumint(8) unsigned NOT NULL default '75',
  	MR smallint(5) NOT NULL default '15',
  	CR smallint(5) NOT NULL default '15',
  	DR smallint(5) NOT NULL default '15',
  	FR smallint(5) NOT NULL default '15',
  	PR smallint(5) NOT NULL default '15',
  	Corrup smallint(5) NOT NULL default '15',
  	mindmg int(10) unsigned NOT NULL default '1',
  	maxdmg int(10) unsigned NOT NULL default '1',
  	attack_count smallint(6) NOT NULL default '-1',
  	attack_speed float NOT NULL default '0',
  	specialattks varchar(36) NOT NULL default '',
  	Accuracy mediumint(9) NOT NULL default '0',
  	hp_regen_rate int(11) unsigned NOT NULL default '1',
  	mana_regen_rate int(11) unsigned NOT NULL default '1',
  	runspeed float NOT NULL default '0',
  	PRIMARY KEY  (id)
)

CREATE TABLE merc_armortextures (
  	id int(11) NOT NULL auto_increment,
  	class tinyint(2) unsigned NOT NULL default '1',
	proficiency tinyint(3) unsigned NOT NULL default '1',
	tier tinyint(3) unsigned NOT NULL default '1',
  	minlevel tinyint(2) unsigned NOT NULL default '0',
	maxlevel tinyint(2) unsigned NOT NULL default '0',
	texture tinyint(2) unsigned NOT NULL default '0',
  	helmtexture tinyint(2) unsigned NOT NULL default '0',
  	armortint_id int(10) unsigned NOT NULL default '0',
  	armortint_red tinyint(3) unsigned NOT NULL default '0',
  	armortint_green tinyint(3) unsigned NOT NULL default '0',
  	armortint_blue tinyint(3) unsigned NOT NULL default '0',
  	PRIMARY KEY  (id)
)

CREATE TABLE merc_meleetextures (
  	id int(11) NOT NULL auto_increment,
  	class tinyint(2) unsigned NOT NULL default '1',
	proficiency tinyint(3) unsigned NOT NULL default '1',
	tier tinyint(3) unsigned NOT NULL default '1',
  	minlevel tinyint(2) unsigned NOT NULL default '0',
	maxlevel tinyint(2) unsigned NOT NULL default '0',
  	d_meele_texture1 int(10) unsigned NOT NULL default '0',
  	d_meele_texture2 int(10) unsigned NOT NULL default '0',
  	prim_melee_type tinyint(4) unsigned NOT NULL default '28',
  	sec_melee_type tinyint(4) unsigned NOT NULL default '28',
	prim_melee_delay tinyint(4) unsigned NOT NULL default '30',
  	sec_melee_delay tinyint(4) unsigned NOT NULL default '30',
  	PRIMARY KEY  (id)
)
Any thoughts, or am I thinking too deeply about avoiding duplicate data within the table? I'm mostly just trying to keep it as easy as possible for admins to manage, as well as us if we need to make tweaks (which we will).
Reply With Quote
  #12  
Old 11-17-2012, 03:35 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Also, is the purpose of the client_level just so we can have mercs not have the same level as clients if admins want to?
Reply With Quote
  #13  
Old 11-17-2012, 05:07 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Quote:
Originally Posted by bad_captain View Post
Also, is the purpose of the client_level just so we can have mercs not have the same level as clients if admins want to?
The purpose of client_level is to assign an appropriate template for the client's level. For example, let's say a merc template is an erudite paladin and the client is 66. The two key system works like this:

merc_npc_type ID 644, level 66: We get the stats, appearance (some mercs have weapon changes and/or texture changes on specific pieces of gear at specific levels) of merc type 644. We duplicate the race/class appearance currently in the table and that can be changed. What is not duplicated however is the stats, weapon appearance, and any other npc-specific fields.

If the client is 65, and the merc_npc_type ID is 644, we get ID 644-65 instead. This allows us to fine-tune npcs by ranges at the expense of more database entries. Keep in mind we're not loading this entire table, only specific NPCs as they are referenced just like the npc_types table, so it is highly memory efficient as well.

What is loaded, however, is the entire list of templates. We reference a specific template, which references a specific merc_npc_type_id. When it comes time to actually getting the template, we have to pass the client's level to the equation in getting the absolute proper merc_npc_type_id

This allows us to fine-tune a merc_npc_type to a specific level. For example, from 65 to 66 on live, I believe there's a rather large gap in power. A simple scaling template will not be plausible in that scenario. Also, npc weapons vary depending on level. I suppose we could template that as well, not sure.

The class/race IDs are still there in the templates table right now for determining stances. No other purpose is what I intended... might be bugging out atm though. Just for live-collected data purposes.

I suppose we could have appearance in its own table and assign each merc_npc_type an entry, but that seems like it would overcomplicate things by adding another table.
Reply With Quote
  #14  
Old 11-18-2012, 12:48 AM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Is there any difference between client_level and level in merc_npc_types? Since the merc is supposed to be the same level as the client, couldn't you just go by level? It's not a big deal, just curious.

Also, I don't think having the merc_npc_type_id in the merc_types table will work. There will by many merc_npc_types for every merc_type. Merc Types are what show up in the dropdown of the mercenary purchase window. It only relies on the race and proficiency (apprentice or journeyman). Subtypes include the class & tier. The merc_npc_types table will also depend on the merc_subtypes, since there will be different stats for different classes & tiers. You could put it in merc_templates, but because the stats really don't depend on race, you would have to duplicate the merc_npc_type_id for each record in merc_templates with the same class, proficiency & tier. That's why I just included the class, proficiency & tier in my stats table, but it could be done in merc_templates as well.

I just want to make sure I understand your logic before putting the stats in, since it will be harder to change once it's merged into the trunk and people start playing around with them.
Reply With Quote
  #15  
Old 11-18-2012, 12:55 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Quote:
Originally Posted by bad_captain View Post
Is there any difference between client_level and level in merc_npc_types? Since the merc is supposed to be the same level as the client, couldn't you just go by level? It's not a big deal, just curious.

Also, I don't think having the merc_npc_type_id in the merc_types table will work. There will by many merc_npc_types for every merc_type. Merc Types are what show up in the dropdown of the mercenary purchase window. It only relies on the race and proficiency (apprentice or journeyman). Subtypes include the class & tier. The merc_npc_types table will also depend on the merc_subtypes, since there will be different stats for different classes & tiers. You could put it in merc_templates, but because the stats really don't depend on race, you would have to duplicate the merc_npc_type_id for each record in merc_templates with the same class, proficiency & tier. That's why I just included the class, proficiency & tier in my stats table, but it could be done in merc_templates as well.

I just want to make sure I understand your logic before putting the stats in, since it will be harder to change once it's merged into the trunk and people start playing around with them.
Could do it by level, I just wanted to have the opportunity for different merc levels than what the client is actually having for custom server purposes. For example, a merc might be level 44 for a level 50 character, 45 for a 51, etc, in a custom scenario anyways.

I wanted to leave it open-ended enough that PEQ and other servers that need the merc to be more modular can use it in their own way without having to change too much.

Currently the class/race is set from the merc's template, not the merc_npc_types table. If you would like to trim that merc_npc_types table of duplicate entries be my guest.
Reply With Quote
Reply


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 03:20 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