View Single Post
  #8  
Old 09-23-2011, 06:41 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

It has been so long since I messed with these destructible objects that I am having to redo a lot of the testing I originally did to figure everything out. There are still quite a few things that need to be worked on before the system can be considered fully functional. Until everything is worked out, I would recommend not investing too much time into setting up destructible objects, as there is likely to be changes to a field or 2.

Here is my current list of what needs to be done (many things are the same from my last list in this same thread):

1. Destructible Objects still need to be added to SoF and UF clients.

2. The OP_Untargetable opcode needs to be found for SoF and UF clients and added to the appropriate files.

3. The damaged level appearance needs to be set for new clients that enter the zone. I think we can just use _appearance to hold the damage level appearance. We probably set it by doing something like this:
Code:
ns->spawn.DestructibleAppearance = static_cast<EmuAppearance>(_appearance);
It would also need to be changed every time the appearance is changed while the object is damaged.

4. We need to set the damage states automatically based on HP percentages. Maybe having them changes appearances every 25% (100% = 0, 75% = 1, 50% = 2, 25% = 3, 0% = 4). We can probably handle this in the SetHP() or SendHPUpdate() functions easy enough. - DONE

5. Replacing an existing object with a destructible object currently isn't working with how I have it implemented so far. I forget offhand what actually sets that, but I think it is the 3rd string (ie. "ZoneActor_01186"). If so, then we will need 1 more string field added to the npc_types table, which I was trying to avoid.

6. If new field (or more) is needed to be added to the npc_types table, it would be good to find a better way of adding fields so it doesn't break player corpses every time due to adding more fields to mob.

7. The new OP_Untargetable opcode needs code to support it. It will be easy enough to add a function that can send it. It will also be easy to add a Perl function for sending it. This packet is cool, because it works on normal NPCs as well. If we can figure out how to make it return the NPC to targetable again, it could be very useful. We could then send it anytime bodytype is changed to type 11 or any other untargetable type, and send it again when they change to a targetable type again so targetable could be toggled on an NPC without repopping it, which is currently not possible. - PARTIALLY DONE

8. Since the bodytype is not sent for destructible objects, we would need some way for new clients zoning in to also see the object as untargetable after OP_Untargetable has been sent. We could just check when the entity list is sent if the NPC is a destructible object and then if it is set to untargetable, and send that packet if so. - DONE

Extra Notes:

Even once destructible objects are fully functional, we will still need the packet collector tool to be updated to parse the information into the right fields. This shouldn't be worked on until it is more final, though (mainly a note for Derision if he sees this).

Currently, I have the luclinface field in npc_types set to handle the damage level of the object when it spawns. Ideally, we would have a new field for this, but again, I was trying to avoid having to add any new fields.

Good zones to test and work on or play with destructible objects are devastation or mesa, but there are definitely others too.

I definitely plan to do more work on this, but if anyone else wants to help out, please feel free, as there is a lot left to do
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 09-23-2011 at 02:27 PM..
Reply With Quote