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

Development::Tools 3rd Party Tools for EQEMu (DB management tools, front ends, etc...)

Reply
 
Thread Tools Display Modes
  #1  
Old 06-13-2014, 11:04 PM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default EQG Zone Importer

By request-ish. A simple program for importing custom models and editing data for EQG-based zones.

Download link. Also on github.





Zones are imported from the Wavefront .obj format. Instructions are mostly the same as for the EQG Weapon Model Importer.

Namely, from your 3D modelling program (such as Blender) you'll want to export to .obj with these options or equivalents:

* Apply Modifiers
* Include Edges
* Write Normals
* Include UVs
* Write Materials
* Triangulate Faces
* Objects as OBJ Objects

However, unlike with weapon models, zone models stick closely to the in-game coordinate system. So you'll want to export with positive Z as the Up direction.


This tool may have bugs etc etc. Some improvements could also be made if there is any interest. Currently it can only view data for zones using some of the earlier EQG formats (which is what this tool imports custom zones as). Also, it would probably be nice to survey existing "regions" in various zones to see what the options there are -- the "type" of region seems to depend on the region's name (e.g. "AWT_water" presumably makes the region count as water). The effects of individual bits in the per-triangle flags is also unknown -- if anyone figures some of them out, I'll add labels and make it possible to mass-edit triangle flags somehow.
Reply With Quote
  #2  
Old 06-14-2014, 06:29 AM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

Just wanted to confirm something I'd been wondering about: namely, whether the client cares if a particular zone is loaded from an S3D or an EQG.

It doesn't. Creating a "gfaydark.eqg" and importing a zone model to it was enough to make the game load that over the gfaydark.s3d files. So, hopefully, there won't be any reason to bother with the old, terrible formats as far as zones are concerned.

edit: added the ability to make empty EQG files to the tool in order to facilitate that.

One mild annoyance is that the zone's _chr.s3d file won't be loaded by default if the main geometry is loaded from an .eqg file instead. But I imagine you could get around that via the _chr.txt file just fine.
Reply With Quote
  #3  
Old 06-14-2014, 11:59 PM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

Quote:
Originally Posted by Zaela_S View Post
Just wanted to confirm something I'd been wondering about: namely, whether the client cares if a particular zone is loaded from an S3D or an EQG.

It doesn't. Creating a "gfaydark.eqg" and importing a zone model to it was enough to make the game load that over the gfaydark.s3d files.
So long as I'm talking to myself here, I suspect the same would be true of NPC models, at least the non-built-in-global ones. Will be interesting to see if I get around to making an animated model importer.
Reply With Quote
  #4  
Old 06-15-2014, 12:02 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,594
Default

Quote:
Originally Posted by Zaela_S View Post
So long as I'm talking to myself here, I suspect the same would be true of NPC models, at least the non-built-in-global ones. Will be interesting to see if I get around to making an animated model importer.
That would be cool, once people start making use of these tools we'll start seeing much more custom stuff and this will open a new world of ideas and content to people.
Reply With Quote
  #5  
Old 06-15-2014, 02:29 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Once again Zaela, you're going to be talking to yourself at first. For most people its just seeing before believing.

You're doing remarkable work.
Reply With Quote
  #6  
Old 06-15-2014, 06:52 AM
Weldarr
Sarnak
 
Join Date: Oct 2005
Posts: 45
Default

Quote:
Originally Posted by Zaela_S View Post
So long as I'm talking to myself here, I suspect the same would be true of NPC models, at least the non-built-in-global ones. Will be interesting to see if I get around to making an animated model importer.

Zaela, you can definitely do this with the older graphic animations. I have been able to manually overwrite older graphics using the same identifier.





Both of these use the old akheva identifiers (akf, akm) and were manually edited to use the newer EQLive akhevan graphics (identifiers; ahm, ahf). Also an interesting thing about some older models, is that many actually have male, female and neutral model types but only one or two of them have a graphic associated with them. (Old Akhevan Identifers: akf, akm, akn)

This is the model identifier list that I pulled from EQGraphicsDX9.dll for Titanium Client (other clients will have more on their respective lists):

Code:
HUM.HUF.KRB.FRY.CWR.ZMM.ZMF.MNR.EVE.SNK.SHL.MYG.KOR.GGY.FGP.DRC.DCM.DCF.CRL.CRH.ORK.CWG.FNG.KBD.WWF.FGT.SHD.LSQ.LSP.SEG.ASM.LVR.DRS.DRE.ANS.SPQ.TAR.PMA.SDR.MDR.BAS.LDR.KRN.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DEN.DIA.COC.CAZ.LIZ.ALL.SPE.SCA.REA.ORC.FUN.DRK.BIX.SHA.TRE.WIL.GIA.WER.BEH.FRO.RTN.BTN.RAT.BAT.ELE.PIR.CUB.FIS.SNA.TNF.TNM.SEF.SEM.LMF.LMM.MMF.MMM.IZF.IZM.IWF.IWM.TZF.TZM.EPF.EPM.HPF.HPM.OPF.OPM.DPF.DPM.GPF.GPM.TSF.TSM.FBF.FBM.TBF.TBM.REF.REN.REM.TPF.TPN.TPM.GSF.GSN.GSM.AKF.AKN.AKM.SDM.SHM.HSF.HSN.HSM.VPF.VPM.GMF.GMN.WAL.VRM.SIF.SIN.SIM.DRF.DRM.IVF.IVM.CEF.CEN.CEM.GEF.GEM.GDF.GDM.GFF.GFM.MIF.MIM.DVF.DVM.VSF.VSM.KAN.GAR.HLF.HLM.CLN.LIM.EGF.EGM.NGF.NGM.FPF.FPM.PIM.SPI.TEF.TEN.FAF.FAM.BRF.BRM.BGF.ZOF.ZOM.HHF.HHM.AVI.GOF.WOF.WOL.WOM.QCF.QCN.QCM.BEA.GOB.GNN.DRA.SHP.LAUNCHM.LAUNCH..DWF.DWM.OGF.OGM.ELF.ELM.BAF.BAM.DAF.DAM.HOF.HOM.HIF.HIM.HAF.HAM.ERF.ERM.IKM.KEF.KEM.FRM.PRE.SHIP....BOAT....PPOINT..MINIPOM200
Thing to note: the list counts down from KRB as the first real graphic as Race #475

I would assume it to be possible to add a dll hook/inject in that would allow us to make our own identifiers, but that is beyond my expertise level and something that I have never honestly tried. Maybe someone with a bit more knowledge on that front could look into it.

- Vaion
The Hidden Forest
Reply With Quote
  #7  
Old 06-15-2014, 11:39 AM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

Quote:
Originally Posted by Weldarr View Post
Zaela, you can definitely do this with the older graphic animations. I have been able to manually overwrite older graphics using the same identifier.
Makes sense.

Quote:
Originally Posted by Weldarr View Post
I would assume it to be possible to add a dll hook/inject in that would allow us to make our own identifiers, but that is beyond my expertise level and something that I have never honestly tried. Maybe someone with a bit more knowledge on that front could look into it.
Saw someone do this just the other day! Beyond me too, though... Probably a bit heavy-duty for general use anyway.


Anywho: added region types to this tool since they had apparently been figured out already.
Reply With Quote
  #8  
Old 06-15-2014, 04:01 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Secrets has quite a bit of dll injection experience.
Reply With Quote
  #9  
Old 06-15-2014, 06:52 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
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
  #10  
Old 06-15-2014, 09:50 PM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

Thanks. Knew most of that at this point, actually. It's the "how to do dll injection 101" part that is beyond me ;p

Not really relevant (yet?) anyway. I can't see myself making any injection patcher type thing.
Reply With Quote
  #11  
Old 06-16-2014, 08:45 AM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

Added a small utility to convert S3D-based zones into EQG-based zones. Not at all complete -- just handles the main geometry at the moment, not things like placed objects, texture transparency masking, vertex lighting, etc...

Not terribly useful and easily the Feature Most Likely to Crash, but I mostly just wanted to put gfay underwater for a minute:





Underwater rain is a bit surreal. Making all of Kelethin into a slippy-slidey ice region would be fun too, but obviously harder to show.

I've decided that if I ever do try to make a zone, it'll be an epic tower climb where at least one floor is made of lava.
Reply With Quote
  #12  
Old 06-16-2014, 04:10 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,447
Default

Quote:
Originally Posted by Zaela_S View Post
Added a small utility to convert S3D-based zones into EQG-based zones. Not at all complete -- just handles the main geometry at the moment, not things like placed objects, texture transparency masking, vertex lighting, etc...

Not terribly useful and easily the Feature Most Likely to Crash, but I mostly just wanted to put gfay underwater for a minute:





Underwater rain is a bit surreal. Making all of Kelethin into a slippy-slidey ice region would be fun too, but obviously harder to show.

I've decided that if I ever do try to make a zone, it'll be an epic tower climb where at least one floor is made of lava.
/that/ is fucking amazing rofl
Reply With Quote
  #13  
Old 06-16-2014, 06:31 PM
Packet's Avatar
Packet
Hill Giant
 
Join Date: Jun 2010
Location: Omicron Percei-8
Posts: 106
Default

Thank you for the help Zaela. Much appreciated.

Just to show what I am working on, this is my latest work in building a moba-style server. The layout & concept was inspired by League of Legends and will resemble it as much as legally possible. This has not been imported yet however I'll be trying my best to work this in as the cornerstone zone for matches. I've put roughly 22 hours into this map so far.

- The beginning of the geometry & texture mapping.


- Got some shiny rocks and a tree!


- Getting closer to finishing.

-

-



More shots on the next post.
__________________
Packet Loss
Current project:
Dark Horizons

Formerly "Richardo"
Reply With Quote
  #14  
Old 06-16-2014, 06:32 PM
Packet's Avatar
Packet
Hill Giant
 
Join Date: Jun 2010
Location: Omicron Percei-8
Posts: 106
Default


-

-

-
__________________
Packet Loss
Current project:
Dark Horizons

Formerly "Richardo"
Reply With Quote
  #15  
Old 06-16-2014, 07:01 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I wondered why you were asking me about how EQG Regions worked the other day, I didn't know it would be to drown the elves.
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 10:13 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3