PDA

View Full Version : Multiple NPC armor textures


iEqualShane
03-08-2015, 04:28 AM
Is it possible to make the different armor textures you set through #npcedit/DB visible to clients? I know I can change the individual colors, but I haven't been able to make an NPC wearing a plate chest have on leather pants for example. If it's not possible on EQEmu is this a limitation of the EQ client, or is the feature just lacking right now on the server?

Kingly_Krab
03-08-2015, 06:59 AM
We do have the columns, although I do not believe anyone has written the support for them. Check the npc_types table to see what I'm talking about.

Also, for future reference (when these columns are supported): #npcedit Texture
#npcedit Helmtexture
#npcedit Armtexture
#npcedit Bracertexture
#npcedit Handtexture
#npcedit Legtexture
#npcedit Feettexture

iEqualShane
03-09-2015, 01:37 AM
Right, I see the column, but they don't appear to work. I just wanted to make sure before I started the work to try and enable them that I wasn't just using it incorrectly. Any pointers for enabling this? I've already added the code to read the data from the DB into the MOB object, but now I need to get this to the spawn packet. Is this one of the unknown fields, or is it something else? I might need to look at how the player packet sends the visible gear to other players.

iEqualShane
03-10-2015, 03:38 AM
Okay, I finally got NPCs wearing different armor materials in different slots! I'll need to go back and cleanup the code a bit now that I know what I'm doing. This was a fun way to start learning the code base.

http://i.imgur.com/ikDGPJr.png

dagulus2
03-10-2015, 06:02 AM
Cool! This is a feature I have wanted to see for years.

Kingly_Krab
03-10-2015, 06:24 AM
To do this, did you just assume that the unknowns in the spawn struct were these 5 texture slots? I looked into this and the amount of unknowns isn't consistent throughout all of the clients, specifically older clients like Titanium.

iEqualShane
03-10-2015, 02:17 PM
Luckily I didn't have to resort to using any of the unknowns. I just needed to fill the equipment array with the proper material values from the database and then set the high bit of the texture value (similar to herosforge) on the npc spawn struct. This was enough to make the client use the values in the equipment array instead of the texture override. It took me awhile and a bit of luck (and swearing) to figure out that setting the high bit on the texture value was the key to making the client use the equipment array material values. So far I've only verified this on the rof2 client, but I own the titanium client too, so I can test that tonight.

I can't begin to say how impressed I am with this project. You guys have really done an awesome job over the years putting this together, and it's been a blast looking through this and trying different things out. I've only been messing with eqemu since last week, but I plan to keep learning and and eventually make a public server with some ideas I have.

Also, has anyone tried to get the herosforge models to work on NPCs? I'm not too familiar with horosforge, but it didn't seem to work when I tried to use it through #npcedit. I'm not sure it's possible, but I want to see if I can make that work next.

dagulus2
03-10-2015, 02:47 PM
Heros Forge is working on NPCs, but I think they need a normal texture set to 1 or more as well as the Herosforgemodel field to display. I have most of the Guild Masters in PoK with Heros Forge models, and all are displaying correctly.

Note also that the Herosforgemodel values jump around a bit, I think they start at 50.

iEqualShane
03-10-2015, 02:55 PM
Okay, awesome. I played EQ from 1999-2002 so many of these features are new to me.

iEqualShane
03-10-2015, 11:09 PM
So I took the time to cleanup the code (mostly convert my spaces to tabs). Would the EQEmu devs be interested in this feature? Should I post the diff over in the code submission forums?

Akkadius
03-10-2015, 11:11 PM
So I took the time to cleanup the code (mostly convert my spaces to tabs). Would the EQEmu devs be interested in this feature? Should I post the diff over in the code submission forums?

Create a pull request against our Github repo and we'll review for submission.

Thanks :-D

iEqualShane
03-10-2015, 11:21 PM
Sounds good. This will be my first git pull request so bear with me. Looks like I cloned the master directly to my box, so I guess I'll need to fork then apply a patch to my fork then send the pull. I need to fork anyway for some private changes I want to make that aren't really useful for EQEmu.

iEqualShane
03-11-2015, 12:29 AM
Sorry for the delay. The pull request should be there for review, assuming I did that correctly.

Edit: Somehow missed a header in the commit. Resending.

iEqualShane
03-12-2015, 03:16 AM
This isn't part of the same change, but I went ahead and made it so I could specify herosforge armor on a per slot basis. Instead of adding new columns to the database I'm using the same texture columns for normal equipment, but if the texture is set to 50 or higher I will assign it to the slot's herosforge model.

Now I can make the worst looking outfits in all of Norrath.
http://i.imgur.com/I0dnvei.png

dagulus2
03-12-2015, 05:33 AM
That would be pretty useful when it came to the new hats. so far I can only make display without any other texture (which looks odd).

iEqualShane
03-12-2015, 02:11 PM
With the code I have it would be as easy as setting the helmtexture to the proper herosforge id. You can mix and match herosforge and regular armor textures.

Charles082986
11-23-2015, 09:52 PM
Was this ever merged into the main repository? I've run into this problem as well (with the texture GM commands not working), so I assume not. Just want to check first though.

Charles082986
11-23-2015, 09:57 PM
Just checked my source. The code appears to be in there (checked zonedump.h). I'm guessing there's another problem then, because the # commands aren't working as I'd expect.