Hello There, Guest! Login Register

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to add post 14.1 NPC's to the current SWGEMU Core.
First, here is a link to the SWGEMU forums to capture all Timbab's kewl visuals:

Assuming that Vlada or someone else doesn't remove it, it should be there for good. BUT just incase I wanted as much as I could in two places. So here it is:

Quote:Ok, so here's how to add grievous to your core. (sorry for the crappy formatting, I don't know how change bold/fonts/colors/etc...)

You'll need trepacker, treexplorer, and crcedit at a minimum. Check modsource.com for some of these, modthegalaxy for others.

some quick comments to get you started. Some creatures won't work with the current client. The Core will load them all just fine, but the client (your actual SWGEMU game client) won't load them. I'm guessing it's a shader / vertex / effect version issue. In lieu of a new non SOE client, I'm guessing that the NGE client would work IF there was a hacked non-launchpad version out there. I'd check with ProjectSWG and see what they're using, but I believe it's a launchpad system so it probably won't work.

Either way... I'm not certain how to fix the version issues, maybe someone else does.

Step one is create an area on your computer to build your new tre. I created a folder called "treroot".

In that folder you'll want to make the subfolder object/mobile/ep3 and copy the shared_general_grievous.iff file from the TOC files (in the same location).

Now you examine the IFF in treexplorer and identify any additional files it calls in each of the nodes. write them down, create the folder structure in treroot, and copy the needed files from the TOC files to their home in treroot.

You'll need to repeat this process for EVERY file that you add to your treroot folder, each will have nodes that point to files you need in other directories. those file will point to others, etc... it's a big load of work but...

here's what I found at a minimum, listed in ugly dos format for speed:

Added note: In tre explorer you can click on an an object file, and choose to export file chain. This will recursively get most of the necessary files that the host object needs or references. However, not every one of those files is necessary as they're in the older tre's, or worse yet the client won't work with the newer files properly. either way you do it you still have to do some due-dilligance to make sure your files are good...

Directory of C:\Users\duffstone\Desktop\swgemumods\treroot\appe arance
11/17/2013 06:05 PM 190 general_grievous.sat
11/17/2013 06:05 PM <DIR> mesh

Directory of C:\Users\duffstone\Desktop\swgemumods\treroot\appe arance\mesh
11/17/2013 06:05 PM 226 general_grievous.lmg
11/17/2013 06:05 PM 389,298 general_grievous_l0.mgn
11/17/2013 06:05 PM 258,290 general_grievous_l1.mgn
11/17/2013 06:05 PM 120,956 general_grievous_l2.mgn
11/17/2013 06:05 PM 54,186 general_grievous_l3.mgn

Directory of C:\Users\duffstone\Desktop\swgemumods\treroot\clie ntdata\npc
11/17/2013 06:05 PM 829 client_shared_general_grievous.cdf

Directory of C:\Users\duffstone\Desktop\swgemumods\treroot\misc
11/17/2013 06:05 PM 1,126,058 object_template_crc_string_table.iff

Directory of C:\Users\duffstone\Desktop\swgemumods\treroot\obje ct\mobile\ep3
11/17/2013 06:05 PM 2,127 shared_general_grievous.iff

Directory of C:\Users\duffstone\Desktop\swgemumods\treroot\shad er
11/17/2013 06:05 PM 312 grievous_eye_aeb15.sht
11/17/2013 06:05 PM 315 grievous_eye_sm_aeb15.sht
11/17/2013 06:05 PM 476 grievous_marble_asca20.sht
11/17/2013 06:05 PM 476 grievous_metal_asca20.sht
11/17/2013 06:05 PM 491 grievous_sm_asa15.sht

Directory of C:\Users\duffstone\Desktop\swgemumods\treroot\text ure
11/17/2013 06:05 PM 349,680 grievous.dds
11/17/2013 06:05 PM 349,680 grievous_cn.dds
11/17/2013 06:05 PM 5,616 grievous_eye.dds
11/17/2013 06:05 PM 496 grievous_eye_sm.dds
11/17/2013 06:05 PM 22,000 grievous_sm.dds
11/17/2013 06:05 PM 22,000 grievous_s_sm.dds

Now you'll need to edit the object_template_crc_string_table.iff and add the entry for grievous. the CRCtool I use does most of the work for me, just add the path/file (as it appears here) object/mobile/ep3/shared_general_grievous.iff and it will give it a CRC automatically, click add and it will insert it and sort it for you. Save, exit and you're g2g...

You should now be able to use trepacker to pack all this up into a custom tre for you client & server. Copy it as necessary, edit the cfg's and conf's and you're g2g. Use search on the forums if you need help with this.

Next you'll need to change the Core. Now i'm not an authority on this so a red-letter dev will need to correct my mistakes. But here's a quick overview:

In bin/scripts/objects/mobile you'll need to edit the objects.lua, serverobjects.lua, and copy an existing file and change it to grievous.lua. You can work right in the mobile directory, you don't have to put it in an ep3 directory. but you can if you want.

Open up Objects.lua, copy / paste the first listing, delete all the remarked out blue text (you don't need it), and change the text to reflect grievous. here's mine:

object_mobile_shared_general_grievous = SharedCreatureObjectTemplate:new {
clientTemplateFileName = "object/mobile/ep3/shared_general_grievous.iff"
-- clientObjectCRC = 2349144374
ObjectTemplates:addClientTemplate(object_mobile_sh ared_general_grievous, "object/mobile/ep3/shared_general_grievous.iff")

first thing to note is that the quoted paths DO include the ep3 folder, as this is the actual path within the tre to look. you're basically declaring the grievous object as a new shared creature object, telling it where to get it, then adding it to the client template table.

Next you need to create your new grievous file, this file basically refactors the object and drops the shared_ from the file name. Not sure why they do it like this but... it is what it is. here's mine:

object_mobile_general_grievous = object_mobile_shared_general_grievous:new {
ObjectTemplates:addTemplate(object_mobile_general_ grievous, "object/mobile/ep3/general_grievous.iff")

Notice that the new object doesn't include the shared_ in the name, but you're telling that it = the shared_ object in objects. Then it refactors the path dropping shared_ from the iff file.

when refering to grievous in any mobile templates, screenplayes, etc, you'll now refer to this shortened path without the shared_, if you try to include the shared_ it won't work.

next you'll need to edit the serverobjects.lua file to include the file you just made.

Reboot the core and you shouldn't get any errors. You still don't have any NPC's loaded into the world, but you can use the /createcreature object/mobile/ep3/general_grievous.iff and spawn him manually. He won't do anything tho, and his name will be funky as I'm not including how to edit the STF data to make everything pretty. You can figure that out from other sources I'm sure. I'm also not going to explain how to add the NPC to the world as that's already on these forums somewhere. it's done in the bin/scripts/mobile directory and you have to setup an LUA for your npc, then call it in a screenplay or other spawning routine.

If you do have errors then #1 first and foremost check your spelling and punctuation. It wasted a few of my hours, and it will for you too if you're not thorough.
loving your work u should make your own website and add all these files pre-made up for quick download ive managed to do it but was a bit off a mission
keep it up
(2013-11-25, 12:59 PM)thedarkone Wrote: loving your work u should make your own website and add all these files pre-made up for quick download ive managed to do it but was a bit off a mission
keep it up

Got me thinking about this, I like this idea.

Nice guide aswell DuffSmile
(2013-11-26, 11:54 AM)Lasko Wrote:
(2013-11-25, 12:59 PM)thedarkone Wrote: loving your work u should make your own website and add all these files pre-made up for quick download ive managed to do it but was a bit off a mission
keep it up

Got me thinking about this, I like this idea.

Nice guide aswell DuffSmile
Well if u get one up let me no saves alot of time and hassle if someone already has them made up Tongue
I have no intention of doing anything other than providing guides on how to do things. If you guys use that information to script everything up and / or pubish the necessary .tre data then that's fantastic. But I don't have that kind of time or desire.

Sorry folks.
Finally spawned GrievousSmile

Tried to put him in an /object/mobile/ep3 folder and it did not work, seems my pointers were wrong.

Check for typo's...... Then triple check lol

Houses nextSmile
Just for completeness to Duffs guide and a handy reference for me, Here's how to add all the Lua scripts for the Mobs you add. In this case General Grievous. I put him in a new folder called /ep3 just to make it easier to add and keep track of new mobs, so...

Create an new folder

In that folder create three files: general_grievous.lua, objects.lua and serverobjects.lua

In the general_grievous.lua file add the object details:

object_mobile_ep3_general_grievous = object_mobile_ep3_shared_general_grievous:new {
ObjectTemplates:addTemplate(object_mobile_ep3_general_grievous, "object/mobile/ep3/general_grievous.iff")

In the objects.lua file add the following:

object_mobile_ep3_shared_general_grievous = SharedCreatureObjectTemplate:new {
clientTemplateFileName = "object/mobile/ep3/shared_general_grievous.iff"
ObjectTemplates:addClientTemplate(object_mobile_ep3_shared_general_grievous, "object/mobile/ep3/shared_general_grievous.iff")

And in the serverobjects.lua add the pointers for above:


Now you need to reference the objects.lua file, so edit:

/scripts/object/allobjects.lua and add the line:

includeFile("mobile/ep3/objects.lua") in alphabetical order

Next is to create the Mobs attributes file, so create file:

/scripts/mobile/ep3/general_grievous.lua. Now copy/paste details from a similar mob and edit the attributes (Guide for this on the SWGEmu dev hints & tips forum (See elpetes screenplay guides)).

Reference the above file by adding the following to /scripts/mobile/serverobjects.lua:


Thats the files complete, just for one point. STR object name. As Duff points out the name is wrong so to get the correct object name for Grievance, in Tre explorer open the string file:


There are two columns in the table, Name and Value. The left hand column contains the correct mob reference, so in the Grievous Lua attribute file it should be:

objectName = "@mob/creature_names:ep3_general_grievous",

quote " the CRCtool I use does most of the work for me" any links to this tool please my son is doing my head in and wants grievous i did it before but now dosnt work lol
Kyles tool


They both work but the one you want is SWGEmuCRCTool.exe
Remember to save after adding!!!

Im getting this error and I did add it (grievous) to the crc table (it was actually already in the crc table, just not in the files)... A little rusty been a while since my env worked. Any help is appreciated, thank you!

[ObjectManager] ERROR - trying to create object with unknown objectcrc 0x0

Forum Jump:

Browsing: 1 Guest(s)