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.
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.