EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   Minor tools for spawn editing ingame. (https://www.eqemulator.org/forums/showthread.php?t=6782)

Elrach 04-23-2003 01:17 AM

Minor tools for spawn editing ingame.
 
As I started populating my zones, I realized it was a pain to figure out what models were available in each zone. So here is my first contribution: #fixmob

#fixmob [nextrace|prevrace|gender|nexttexture|prevtexture|n exthelm|prevhelm]

Start with #spawn, then use #fixmob with the different parameters to easily navigate through the different races, gender, textures and head textures (head only seem to work for giants). I'll look to add facial features shortly. Finish it off with #npcspawn and you're close to having a full ingame mob editor.

I just wish there was a way to skip innexistant textures... Anyone got any insight? Error returned by client maybe? Gonna look into this to next.

here is my patch file for client.cpp of EQEmu 0.4.4-DR1.

#patch client.cpp client.patch.

Code:

3568a3569,3665
>    // WORKPOINT 1
>    else if (strcasecmp(sep->arg[0], "#fixmob") == 0) {
>      if (!sep->arg[1])
>          Message(0,"Usage: #fixmob [nextrace|prevrace|gender|nexttexture|prevtexture|nexthelm|prevhelm]");
>    // Series of functions to manipulate spawns.
>      else if (strcasecmp(sep->arg[1], "nextrace") == 0) {
>      // Set to next race
>          if ((target) && admin >= 100) {
>            if (target->GetRace() == 329) {
>                target->SendIllusionPacket(1);
>                Message(0, "Race=1");
>            }
>            else {
>                target->SendIllusionPacket(target->GetRace()+1);
>                Message(0, "Race=%i",target->GetRace());
>            }
>          }
>      }
>      else if (strcasecmp(sep->arg[1], "prevrace") == 0) {
>      // Set to previous race
>          if ((target) && admin >= 100) {
>            if (target->GetRace() == 1) {
>                target->SendIllusionPacket(329);
>                Message(0, "Race=%i",329);
>            }
>            else {
>                target->SendIllusionPacket(target->GetRace()-1);
>                Message(0, "Race=%i",target->GetRace());
>            }
>          }
>      }
>      else if (strcasecmp(sep->arg[1], "gender") == 0) {
>      // Cycle through the 3 gender modes
>          if ((target) && admin >= 100) {
>            if (target->GetGender() == 0) {
>                target->SendIllusionPacket(target->GetRace(), 3);
>                Message(0, "Gender=%i",3);
>            }
>            else {
>                target->SendIllusionPacket(target->GetRace(), target->GetGender()-1);
>                Message(0, "Gender=%i",target->GetGender());
>            }
>          }
>      }
>      else if (strcasecmp(sep->arg[1], "nexttexture") == 0) {
>      // Set to next texture
>          if ((target) && admin >= 100) {
>            if (target->GetTexture() == 25) {
>                target->SendIllusionPacket(target->GetRace(), target->GetGender(), 1);
>                Message(0, "Texture=1");
>            }
>            else {
>                target->SendIllusionPacket(target->GetRace(), target->GetGender(), target->GetTexture()+1);
>                Message(0, "Texture=%i",target->GetTexture());
>            }
>          }
>      }
>      else if (strcasecmp(sep->arg[1], "prevtexture") == 0) {
>      // Set to previous texture
>          if ((target) && admin >= 100) {
>            if (target->GetTexture() == 1) {
>                target->SendIllusionPacket(target->GetRace(), target->GetGender(), 25);
>                Message(0, "Texture=%i",25);
>            }
>            else {
>                target->SendIllusionPacket(target->GetRace(), target->GetGender(), target->GetTexture()-1);
>                Message(0, "Texture=%i",target->GetTexture());
>            }
>          }
>      }
>      else if (strcasecmp(sep->arg[1], "nexthelm") == 0) {
>      // Set to next helm.  Only noticed a difference on giants.
>          if ((target) && admin >= 100) {
>            if (target->GetHelmTexture() == 25) {
>                target->SendIllusionPacket(target->GetRace(), target->GetGender(), target->GetTexture(), 1);
>                Message(0, "HelmTexture=1");
>            }
>            else {
>                target->SendIllusionPacket(target->GetRace(), target->GetGender(), target->GetTexture(), target->GetHelmTexture()+1);
>                Message(0, "HelmTexture=%i",target->GetHelmTexture());
>            }
>          }
>      }
>      else if (strcasecmp(sep->arg[1], "prevhelm") == 0) {
>      // Set to previous helm.  Only noticed a difference on giants.
>          if ((target) && admin >= 100) {
>            if (target->GetHelmTexture() == 1) {
>                target->SendIllusionPacket(target->GetRace(), target->GetGender(), target->GetTexture(), 25);
>                Message(0, "HelmTexture=%i",25);
>            }
>            else {
>                target->SendIllusionPacket(target->GetRace(), target->GetGender(), target->GetTexture(), target->GetHelmTexture()-1);
>                Message(0, "HelmTexture=%i",target->GetHelmTexture());
>            }
>          }
>      }
>    }
4350a4448
>          Message(0, "  #fixmob [nextrace|prevrace|gender|nexttexture|prevtexture|nexthelm|prevhelm]");


Trumpcard 04-23-2003 01:52 AM

Very nice ! I'm sure our world developers/tweakers will love this functionality. I'll try to get it in to CVS for you this evening.

Only extra thing I could request is to put the new commands in a usage statement so a #help will list them as available commands.

Mortamer 04-23-2003 03:46 AM

/sigh. I can't wait until I learn C++. I wish I could contribute code, but I don't think you'd have a use for my calculator code :P

Elrach 04-23-2003 04:12 AM

Trump, the last line in the patchfile:

Code:

>          Message(0, "  #fixmob [nextrace|prevrace|gender|nexttexture|prevtexture|nexthelm|prevhelm]");
This line adds the symantic of the #fixmob to the #help menu. I will add a full help tonight for when you use #fixmob without arguments. Explaining what each does.

P.S. Mortamer, this type of patch is very easy to do. Anybody with minimal understanding of programming languages and a good textbook as reference could do this. I'm pretty much using the tools already in place, and re-arranging them to produce the results I wanted. I did want to start small, as my skills are pretty rusty. :wink:

Trumpcard 04-23-2003 02:17 PM

Merged it into ST and pushed it out to CVS for you.

Thanks for the update!


All times are GMT -4. The time now is 09:11 AM.

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