View Single Post
  #9  
Old 06-15-2014, 06:52 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,450
Default

There's a part of the eqgame.exe that deals with exactly what you are trying to do.

The identifier for NPCs, as you have noted in your disassembly, can be a string that identifies a specific model and its parts.

For example, HUM refers to human male models. So in disassembly, we have pseudocode that looks like this in the class constructor:

Code:
  CRaceGenderInfoManager::AddRaceGender(pCRaceGenderInfoManager, 1, 0, "HUM", 4, 522);
 CRaceGenderInfoManager::AddRaceGender(pCRaceGenderInfoManager, 1, 1, "HUF", 4, 522);
*The first parameter is the global instance of CRaceGenderInfoManager.
*The second parameter is the ID of the race.
*The third parameter determines the gender (0, 1, 2) of the NPC. The fourth is a bitmask that tells the client what the latest model file format will be for this NPC. I'm unsure of its purpose but all EQG formats have 8 as the bitmask. Basically, it's for animations in some way.
*The fifth parameter is optional and contains fallback race animations in case those listed for the model fail to load. For Humans and some other races, it is 522 (Drakkin) for the fallback animations.

You can find the class constructor in the UF/SoD client by searching for "SHIP" and it's the only reference of the string "SHIP" in the defined strings list in IDA.

The animations are linked to the base model, and as such there's no way to load them from the client I believe. The animation data is stored in the wld file for S3Ds.

Yes, it is possible to add VoA+ models to the UF client. You'd just copy the lines from disassembly to a DLL to add the NPC models from the later clients.
Hook CRaceGenderInfoManager::CRaceGenderInfoManager() (the constructor that adds the races) and after it's done constructing, add in the races you'd like while using the instance returned from the thisptr.

Hope that gives some insight.
Reply With Quote