EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Database/World Building (https://www.eqemulator.org/forums/forumdisplay.php?f=625)
-   -   Equiping mobs with showing items (https://www.eqemulator.org/forums/showthread.php?t=5412)

LiquidIce 02-21-2003 07:38 PM

Equiping mobs with showing items
 
Ok i have placed some mobs in zones that I made up and I was just wonder how i can modify the look of them using the eqemu admin tool... I would like make the enemy weild the sword he drops for loot... im just wondering how i can do this plz reply thanks.

Drawde 02-21-2003 10:43 PM

I think that setting the "Equip" value to 1 in the loot table is -supposed- to do this - however it doesn't work ATM.
This would be a really nice feature, especially for guards etc. (with my DB addon, guards now carry their sword and shield, but you can't see them)

Lurker_005 03-04-2003 06:08 PM

You can manually add items in the NPC_TYPE table, but it will not automatically match the loot drop.

d_meele_texture1 and d_meele_texture2 for each hand

Drawde 03-04-2003 11:34 PM

Thanks for that info, Lurker - I had no idea what the d_meele_texture values actually did, now I can use this to give guards and NPCs (e.g the PoD) visible weapons and shields. I'll code this into EQNPC ASAP - I'll add two new values to eqspawns.txt that contain the model numbers of the two weapon slots.
I'll leave the values blank for humanoid creatures/mobs, e.g orcs, since they should wield whatever weapon (if any) is in their inventory - Edgar's NPC equipping code should do this.

Edgar1898 03-05-2003 01:32 AM

Quote:

I think that setting the "Equip" value to 1 in the loot table is -supposed- to do this - however it doesn't work ATM.
This would be a really nice feature, especially for guards etc. (with my DB addon, guards now carry their sword and shield, but you can't see them)
I fixed this yesterday and the day before. If your using the newest code from cvs, all you need to do is set the equip value to 1 and they will equip the item if they carry it. POD looks soo much better equiping his robe and the staff. I also added the ability to give npcs items and have them equip them. Some races dont display armor very well (orcs and gfay guards come to mind), so if you try to give them items other than weapons the graphics might not show up on them. Just test it out on normal races (ie humans, dark elves, etc). AC and str are also added to the npc from the items. Hehe it might be fun adding full plate to a lvl 1 skelly and watching the player try to kill it :P

Drawde 03-05-2003 02:15 AM

The d_meele_texture values don't seem to work - I gave all the Qeynos guards a sword (1) and shield (200), and all the Priests of Discord their staff (29), but they are not visible. (I confirmed the values were set correctly using EQEmuAdmin).
If you create a NPC using #spawn with these numbers, they appear correctly.
This is using 0.4.2DR3 from http://cecugfile.net .

Edgar1898 03-05-2003 06:29 AM

Did you setup equip_item to 1?

Drawde 03-05-2003 06:58 AM

This is using the d_meele_texture values in npc_types, not equipment in the loot table (I haven't got a compiled binary with this latest code in).
From looking at the 4.2 source code, it appears that the d_meele_texture values should work, they are assigned to the NPC when it is created. However the NPCs remain empty-handed when I enter the world.

Edgar1898 03-05-2003 07:18 AM

You want a copy of it? If you want it now, I can either email it to you or dcc it to you on the irc server.

Drawde 03-05-2003 07:48 AM

Thanks, that'd be really useful - my e-mail address is edwardpinniger@bctalk.net .

Edgar1898 03-05-2003 09:18 AM

Its sent. I just added procs to npcs too but Ill let you play with that when the cvs you guys can access gets updated :P

Trumpcard 03-05-2003 09:30 AM

I'll push it out this afternoon when i get in..

Another server crash last night.. DOH! Power blinked and my UPS didnt kick in. Now grub wont boot correctly, having to manually mount my filesystems till I can figure out what happened...

Lurker_005 03-05-2003 06:05 PM

Drawde, were you putting 1 or the actual item number in d_meele_texture? It should be the item number.

Granted perhaps moot now, but oh well.

Drawde 03-06-2003 01:18 AM

Thanks very much for sending me the binaries, they work OK and NPCs with items, e.g guards, now equip them. Great work on adding this feature, how hard was it to code?

About d_meele_texture (shouldn't it be melee?), I was using the item's model ID (using the EQEmuAdmin item_visuals.txt as a reference), - e.g 34 for a short sword, 21 for a lute, rather than an actual item number from the DB. I'll try using item numbers instead and see if it works.
This feature isn't totally redundant (from my point of view) since I wanted to give NPCs such as guildmasters visible items such as weapons and shields, without having to set up a loot table for them.

Edgar1898 03-06-2003 01:42 AM

It was not too hard to code. d_meele_texture1 and d_meele_texture2 might be using the item number instead of the item texture. The code for the npc equiping a primary weapon directly from the db is as follows:
Code:

                                        npc->d_meele_texture1=atoi(newid);
                                        npc->equipment[7]=item2->item_nr;
                                        if (item2->common.spellId0!=0)
                                                npc->CastToMob()->AddProcToWeapon(item2->common.spellId0,true);
                                        npc->AC+=item2->common.AC;
                                        npc->STR+=item2->common.STR;

See how equipment[7] (primary slot) uses the item id? When an npc spawns, its d_meele_texture1 is automatically set to the equipment[7] so without looking to deep into the code, it might very well be the item id number its looking for.


All times are GMT -4. The time now is 11:29 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.