Adding CU Weapons To SWGEmu

Lasko

Moderator
Staff member
Moderator
Joined
Feb 13, 2012
Messages
295
Adding CU Weapons To SWGEmu..

This guide assumes you know how to manipulate SWG .tre files, that is, examine, extract and create new .tre's with all of the files needed to add new items to the game. If you are not familiar with this process you REALLY should be so check out other guides on this forum.

This guide just adds CU weapons, NGE are slightly different as the .lod files actually need to be edited and this will be covered in a seperate guide. Also to point out this process actually adds these items to your SWGEmu server, it is not just a simple mod.


For this guide we'll start with the Proton Carbine from the Rage of the Wookies expansion.

http://i.imgur.com/pLN1X25.png

Tools needed, or at least what I used.

Tre Explorer
treEdit

Both are widely available.



Server Side additions.

All of the ammended and additional files on the server are Lua files and pretty much everything that you can add will follow a similar format.

Additional files.

1. First create the object template file.

/object/weapon/ranged/carbine/carbine_proton.lua

Copy the contents of a similar file and amend to suit the Proton Rifle, pay particular attention to the objectTemplate lines at the begining and end of the file and make sure they are changed to reflect the new weapon using the same format and check for typo's. This is where the weapon attributes can be customised with endless possibilities if so desired.

2. Next amend the file....

object/weapon/ranged/carbine/objects.lua

To this, again copy the details from a similar weapon, and paste them so the new block sit in alphabetical order in the list. Change the details to reflect the new weapon attributes, these can be found using view pane in tre explorer. To find the object crc, open the .tre file in treEdit, find the shared_carbine_proton.iff and right click and select proporties where it will be listed.

3. Now amend file....

object/weapon/ranged/carbine/serverobjects.lua

Add the includeFile line for the file you created in step 1.

This conludes the steps for adding the template files.

4. Lastly copy the .tre file with the relevant proton rifle files (for the sake of this exercise we'll call it patch_proton_rifle.tre) to the directory containing your servers .tre files, them amend config.lua and add this file to the list.

These four steps is all that is needed to add the Proton Carbine to the server. After you have completed the client side additions you can add this weapon to the blue frog and pull it from there. At this moment there is no other method of obtaining the carbine in-game. It can now be added to loot tables and groups or a new loot group specifically for this weapon can be created. Also a custom screenplay could be created with this weapon given as the reward.


Client side additions.

Once the server side changes have been completed, copy the file "patch_proton_rifle.tre" to you client directory where all the .tre's reside and add the following addition to the file

[SharedFile]
maxSearchPriority=26

searchTree_00_26=patch_proton_rifle.tre

The numbers may vary on your file depending on what(if any) changes you have made. Just follow the same numbering system and all will be well.

NOTE****

If you use LPE it wll throw up an error, choose the ignore option or it will download and overwrite the changes you have made. Better still, dont use LPE.



If you wish to make the weapon craftable, the files are there in the .tre's to allow this, I'll update the guide with how when I've finished it.
 

Hawk39704

Member
Joined
May 6, 2015
Messages
37
Location
Boston, MA
which TRE is this from? i've looked around for guides on how to set up items serverside via LUA, but the only knowledge i've been able to figure out on my own is playing with other servers TRE files.. i was told the client and server use the same .TRE but no clue how to pull my own specifically such as for this proton carbine? sorry if this is the wrong place for this. i just posted here also asking about which TRE to use for this specific guide.
 

Timbab

Administrator
Staff member
Administrator
Moderator
Joined
Oct 6, 2010
Messages
1,057
Location
Magna Germania
They're from .tre's that were introduced after what you currently have in your preCU install.

You'll need to obtain them, look through them, extract files and if you do server stuff, pack them into a custom .tre again. Note that, post patch 18, you can't open .tre files alone and need .toc files, I made custom ones which I'll link.

For the extracting and packing bit, you'll want to use SIE
 

teekay

New Member
Joined
Dec 22, 2015
Messages
1
I followed this as accurately as I could but during sever start-up I receive an error "Invalid Path"
 

Lasko

Moderator
Staff member
Moderator
Joined
Feb 13, 2012
Messages
295
If you could post the error it would be very useful.

What exactly has an invalid path?

Without any further info I would have to suggest a typo somewhere.
 

Ghostsoldier007

New Member
Joined
Aug 11, 2015
Messages
2
I read this and great stuff! But the trouble I am having and cant seem to find a guide for. Is how do I add weapons/armor/items/droids to schematics?? Like for instance, if I wanted to add droideka to the Master-DE list. All my attempts have failed thus far..
 

Himalayas

Member
Joined
Jan 19, 2016
Messages
106
Ghostsoldier007 said:
I read this and great stuff! But the trouble I am having and cant seem to find a guide for. Is how do I add weapons/armor/items/droids to schematics?? Like for instance, if I wanted to add droideka to the Master-DE list. All my attempts have failed thus far..
Hey ghost, could you provide a breakdown of your procedure to add an item. It can help us help you to see where in the process you're going wrong.

Also I'm sure on the discord some of our community members could help walk you through an addition like that. :)
 

Ghostsoldier007

New Member
Joined
Aug 11, 2015
Messages
2
https://gist.github.com/ghostgamings007/52f6647c61709133caee5968f15c228c
There are the files and iff chain extracted.
When I go to /object createobject object/tangible/deed/pet_deed/deed_droideka_advanced_basic.iff
I get an error of it saying that it is not tangible or the dependencies are not tangible.
but the iffs and lua files are all there....
 

gyrantol

Member
Joined
Jan 16, 2015
Messages
127
make sure it is added to the allobjects list if you are using a custom folder. Also make sure it is added to the objects crc database.
 

Revan84

New Member
Joined
Mar 7, 2018
Messages
1
Hi
both links are broken.
May you make again .tre and .toc files available for download, please?
 
Top Bottom