Skip to content

Adding New Objects To The SWG Server

IrishDarkshadow edited this page Oct 2, 2019 · 4 revisions

Files:

Scripts.rar

SWG Poster String Files.rar

SWG Posters.rar

=============================================================== Original discussion thread text for search result purposes:

SWGSOURCE FORUMS MARK FORUMS READ SEARCH FORUMS SUBSCRIBED FORUMS SUBSCRIBED THREADS NEW THREADS SHOWCASESWG FILESMEMBERSCHAT1 / 8 /

Forums SWG NGE Source Server Development FAQ & Guides Guide For Adding New Objects To The Swg Server V1.0 Discussion in 'FAQ & Guides' started by IrishDarkshadow, Jul 31, 2017.

Subscribe to Thread Go to First Unread IrishDarkshadow IrishDarkshadow Well-Known Member Joined:May 18, 2017 Messages:441 Likes Received:131 #1IrishDarkshadow, Jul 31, 2017 Last edited: Jul 31, 2017 Process Overview In order to demonstrate what can be called “The Elour Method”, coined after it’s originator, for adding new objects to your server / client we’re going to use a decor item, specifically a painting. The first thing you need to understand is the file types involved and what they are used for. You need to be advised in advance, this is a long process that gets quite in depth at times and will require you to learn what’s being done at why for each stage so that the next stage will make sense. I will explain as comprehensively as I can with screenshots for illustration wherever possible to make the journey a little less daunting.

For starters the painting object itself requires the following files:

TPF #1 Template file used purely for server side Plain text and can be edit using any text editor TPF #2 Template file used server side as a shared resource Plain text and can be edit using any text editor APT Appearance Template Use SIE to edit these files MSH Static Mesh Use SIE to edit these files SHT Shader Template Use SIE to edit these files DDS Texture File Requires a graphics editing program with a DDS plugin such as Photoshop 32-bit edition or paint.net which is a free download. IFF Object File Use SIE to edit these files Now let’s look a little deeper at what each of those files contain for the painting objects that we are going to be working with during this guide. I am building the files on a Windows 10 PC so the file paths used for this part will use that platform’s structure.

TPF #1 This file is intended to reside in your SWG Server when we’re done so I created the following folder structure to hold it during preparation:

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting​

The file itself was copied from another random painting already in the game and adjusted to fit our purposes. Code:Select All // This file ws written by the template editor @ 5:06:39 PM - Wed Sep 11 2002

@base object/tangible/furniture/base/furniture_base.iff

@class tangible_object_template 1

@class object_template 2

sharedTemplate = "object/tangible/painting/shared_painting_posters_tfa.iff"

You can see the original object in there that this new template is going to inherit from and you can see the shared IFF that will be present on the server after we’ve completed our tasks here. Adding that “sharedTemplate” part at this stage requires you to know what your naming scheme is ahead of doing the work.

TPF #2 This file is also intended to reside in your SWG Server but in a different location and so I’ve added extra folders to the structure I created on my desktop for the previous file:

\SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting​

Once more this file was copied from a random painting already in the game and had our modifications applied to suit our purposes.

Code:Select All //Created by TBailey 9.8.2004

@base object/tangible/furniture/base/shared_furniture_base.iff

@class tangible_object_template 6

@class object_template 5

objectName = "frn_n" "painting_posters_cws"

detailedDescription = "frn_d" "painting_posters_cws"

appearanceFilename = "appearance/frn_all_painting_posters_cws.apt" There are extra settings here compared to the previous tpf file.

The “objectName” value tells you where to place the string name for the file (more on those later) and the actual name of the object. Where “frn” means furniture and “_n” means name.

The “detailedDescription” value gives us the location where the text we see in the examine window in game should be located for this item with “frn” once more meaning furniture and “_d” referring to the description.

The “appearanceFilename” is a key value as it points the server to where the appearance template (apt) file for this object will be located within the server file system.

APT The first server based file which is “client focused” and also requires that we add more folders to our windows storage area: \SWG Posters\clientside\appearance​

Again, our file comes from a random painting already in the game but this time we need to use SIE to make our changes.

  • open a new IFF editor within SIE
  • navigate to the copied file after you’ve renamed it using the Open button

CCsuFneLRZ-73Si6On1LbpSMO5fsCpDcmDgm5D24hKfknB_R_WzLTIDN8Ewkw1V8wbgfqUJ7pdbw-ByEgPQuSqvZqzwRRBkA.jpg

The value here points the server to the Mesh template for this object.

MSH As with all of our other files this is copied from an existing object and edited in SIE but it also requires a new sub-folder to be added to our windows storage area:

\SWG Posters\clientside\appearance\mesh​

DCsPjNK5h0wYoAv7LlGK_CojBBz4xC77Tn3V0J39QpXlcQCi6SHg4DK-A0UihVYi4vBpsHsDnDYqDDPVxVFTHBdUkPtsF-o_.jpg

The value here points the server towards the Shader Template for this object.

SHT Also copied from another object this file needs to be opened in SIE so that we can manipulate the values inside and also needs a new folder in our storage area:

\SWG Posters\clientside\shader​

3c49Ve8x-h0xo6tlnxpnVmpA1ELutGHHLlxiZDtSOvgsEb570G4h1WU4YJLOOsdf6OTI8gtWSIwcr0fKNbrAw6g73VEhVUSi.jpg

The value here points the server towards the DDS Texture file (which is the actual image for the painting) of this object.

DDS These files are created from your chosen source images and also require a new folder within the storage area:

\SWG Posters\clientside\texture​

fHAldAnRSgC-E6kAXeiza-8JWmv1o9HviO4W_E1cPze34SsCCcFmTn5tAmWGw88Ova9opkkt_F8QzyfFKByFh7u4_Kaz51mD.jpg

Resize your source image to 256x512 pixels and save as DDS with default options.

At this point we have our basic ingredients in place for a painting object within SWG. The end result of the example we’re using in this guide is 12 new paintings. At this point it’s a good idea to list out the paintings and the tag we will be using to differentiate their files from each other.

The Phantom Menace = tpm Attack Of The Clones = aoc Revenge Of The Sith = ros Ewoks - Caravan Of Courage = ew1 Ewoks - Battle For Endor = ew2 Clone Wars Movie = cwm Clone Wars Series = cws Star Wars Rebels = rebels The Force Awakens = tfa Rogue One = ro The Last Jedi = tlj Darth Jar Jar = djj (as a nod to Elour based on the conversation that lead to this guide)​

We will run into some other file types as we move forward and those will be explained when they pop up. Now that the stage has been set it’s time to get into the nitty gritty of this process and don’t say you weren’t warned, this will take quite a while to complete and any mistakes made along the way can be very time consuming to track down. I will include some of the mistakes I made while learning this process as we reach those parts.

This post also has some attached files. You will need Scripts.rar to perform some of the steps in this guide. The SWG Posters.rar and SWG Poster String FIles.rar files are the completed work for paintings. Feel free to use that instead of making your own files but I really would recommend that you go through that process for yourself, it's much more helpful with learning how this process actually works.

Good luck. Attached Files: Scripts.rar File size:948 bytes Views:17 SWG Poster String Files.rar File size:23.5 KB Views:10 SWG Posters.rar File size:857 KB Views:14 REPORT BOOKMARKLIKE + QUOTE REPLY scubasteve likes this. IrishDarkshadow IrishDarkshadow Well-Known Member Joined:May 18, 2017 Messages:441 Likes Received:131 #2IrishDarkshadow, Jul 31, 2017 Last edited: Jul 31, 2017 Part One - Creating The Files

Obtain the jpg files that you would like to turn into posters / paintings in SWG. For our example we have 12 of these files taken from random web sites. Use Photoshop 32-bit edition with a downloaded DDS plugin or the paint.net program or any other photo editing software with DDS export capabilities. Resize each image to 256 pixels wide by 512 pixels high. You will have to unlink the horizontal and vertical sizes to do this and it will slightly warp the image produced. Save the resized image as a DDS file and choose default settings when you do. Place all the files into \SWG Posters\clientside\texture Create a version of TPF #1 shown above for each painting using the appropriate naming tag e.g. tpm or tlj or ros Place all of these tpf files into \SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting Create a version of TPF #2 shown above for each painting using the appropriate naming tag e.g. ew2 or rebels or aoc Place all of these tpf files into \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting Create the MSH file for each painting object using the naming structure defined earlier Place all of these MSH files into \SWG Posters\clientside\appearance\mesh Create the APT file for each painting using the same naming structure Place all of these APT files into \SWG Posters\clientside\appearance Create the SHT file for each painting as done previously Place every SHT file into \SWG Posters\clientside\shader It’s a good idea to do a recap on what has been created for each object / painting at this point and I’ll use the Last Jedi as the example:

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting\painting_posters_tlj.tpf \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting\shared_painting_posters_tlj.tpf \SWG Posters\clientside\appearance\frn_all_painting_posters_tlj.apt \SWG Posters\clientside\appearance\mesh\frn_all_painting_posters_tlj.msh \SWG Posters\clientside\shader\frn_all_painting_posters_tlj_as8.sht \SWG Posters\clientside\texture\frn_all_painting_posters_tlj.dds

This makes 6 files per painting and 12 of those totalling 72 files and we haven’t even started the process of making all this stuff useful yet.

Grab a water / tea / coffee / soda / adult beverage of your choice because next up we’re diving into the SWG Server virtual machine.

We will need to set up some stuff first before we can move forward with adding our new objects.

Preparation Work The server virtual machine (VM) used for this guide is v2.5 which is Debian 8 (Jessie) based and contains two different SWG server. There is a prebuilt SWG server which you just need to do minor configuration to and then you can use it straight away.

The other server is where our attention will be focussed as it comes in raw form including the src and dsrc folders from which our SWG server can be built / compiled.

The src folder will be compiled into the binaries / executables / programs that are the heart of the SWG server.

The dsrc folder is where the magic happens. The files in there are what govern how the game server performs tasks, runs systems and is the brain of the SWG server.

The other principal component of our server is the Oracle database. This is already in place within the VM and is ready for an SWG server build to take place.

I’m not going to get into the entire server setup process but I’ll cover the key points we want to ensure are in place before proceeding with our project.

Configure the static IP address for the server DHCP reservations Update the Hosts file with that static IP Samba installation Virtualbox Shared Folders Emailing files to yourself Build_linux.sh

(a) Configure the static IP address for the server

When you first boot up the v2.5 server VM it is set to have an IP address of 192.168.1.47 and that probably won’t be what your VM actually gets. This happens because your router is configured to hand out IP addresses from a range which is specific to how it was configured. In the case of most home routers that’s the 192.168.x.x range but that can be modified to suit your needs depending on how “good” your router actually is. For my own setup I like to use the 10.x.x.x range.

If you are familiar with Linux then you can use the Networking applet in System Settings to configure your preferred static ip address. It truly doesn’t matter what address you choose so long as you remember it for the build phase and use it in the hosts file.

Open up your application menu (start menu equivalent) and choose System Settings. NvnFZVPKUKM3QCRCITJLZ3S1x_gCit0P8A6VHKrDZy97mD6TCUPAbiMZGLprONueAJ0w5vvLUQu1u0F95fayApl-ulPLUh_Z.jpg

When you open that applet you will see this window, choose the wired connection and then the Options button. NfTx9BY7ETQenir7H2vS9vrOfQ2qJVZCtZcTHeX6FXKaanl9G2KRJQ82M8XfHTpozoMgt9MWqs-9Db1yZc8-UMY3TQjemFsE.jpg

You can now verify that you’re virtual machine is set to DHCP (Dynamic Host Configuration Protocol) mode and is looking for an IP address from your router each time you boot up the VM. EwKCLWyXG7_USDEnflW1y4eaK915Oqvx2Qa0bGTbf4SEoSKfeda0auWXMS3eznd9xIk6nmDugpn0h9ozuFiZGjcx6Sns86nK.jpg

You can choose to set your own IP address in here by changing the mode to Manual mode and then provide the IP address, subnet mask, default gateway and the DNS servers. At that piont when you reboot the VM you just need to check the applet on your taskbar to see if the IP address you specified is now configured for your VM.

-bpxHuGU8MtT0aBuaCmpzMY-mo7U0OaA1eDOAnssUHU80AJYyAzusLyJYbJ2b3eW_mVksdum5ZkPVD2B5zJVqBJDgMZjtOsQ.jpg

(b) DHCP reservations There is another option other than changing the VM to a static IP address but still getting one for yourself and that is by telling your router to recognise when this specific VM wants an IP address and to give it the same one each time. This is called a DHCP reservation and is configured on your router so the screenshots I show won’t be the same as for you. To configure a reservation you just need one piece of information from your Virtualbox settings and an exact IP address that you want for your VM. For the server used in this guide I have set up a DHCP reservation to assign 10.0.0.235 to the VM.

Open up the settings for your VM from the Virtualbox Console and navigate to the same tab you see in the screenshot below for your VM. MNlGMeiFANpA04pcyQfoxmxz7naUQ-5ROoYC81YiGLAa00PavJawViL5Zv6JgjPYDTfFqpJXuNRoe31TghladSEgZ2N6K3Gq.jpg

Take note of that MAC Address entry, you will need it for configuring your router. Kwbf6JeMmDV06VL7pTBTFwla7-B8xzL5OYG3qXTdBl1AqbXhRDWtLAMPy1lsi1ZhKWhLaGYHhhVzWphBqYWq1uTiDYF9EWaa.jpg

What you’re seeing there is me using the MAC Address I got from the VM settings to reserve the 10.0.0.235 IP address so that each time I reboot the VM, my router assigns it that address. In essence this is a way to obtain a static IP address but from a dynamic method.

(c) Update the Hosts file with that static IP Earlier I mentioned that there were some crucial components to building your SWG server included in the v2.5 server with those being the src, dsrc and the Oracle database. Your VM is configured with the hostname “swg” and the IP address 192.168.1.47 by default but you’ve just changed the IP address so we need to update that somewhere. That place is your hosts file. The easiest way to get to it is from the top right pane of the terminator terminal which automatically opens for you when you boot up the VM. It is also conveniently logged in as the highest level administrator account on the VM known as “root” which we need to make changes to the hosts file.

Type in this command:

Nano /etc/hosts​

That should get you to the following situation: MiEx9PnNRvfmn5Ygvmt6sl9mTnHJRAcW7WbUp4a0-xI6KWmXInlCkcudIWaOK1-3GTFyEZmaqponTNVOhjE6woq6aa0Q69NF.jpg

Once you’ve run the command you will see this: LEGFfQK4L6zAV3t9XoOoOAt75qlhAY-8BVfw7OrO97BxDiHWehZRbwftaEBrLC79Iy9ZisZwk_XsNlEzV_2aGSKrDCzzAxUQ.jpg

As you can see the 10.0.0.235 IP address that my router gives to my VM has been set here in this file alongside the “swg” hostname.

Set the 10.0.0.235 IP address (which is probably 192.168.1.47 in yours) to the IP address that you chose in (a) or the one you reserved on your router in (b).

NOTE: Never, EVER change that swg bit or you will break your Oracle Database​

Hit ctrl+o then enter and finally ctrl+x to save your changes and exit the Nano editor.

(d) Samba installation At this point you would under normal circumstances be ready to starting building your SWG server but we need to set up some conveniences first. The process of adding objects into SWG requires a lot of file transferring back and forth between your VM and the Windows machine you are using for creating the files, using SIE and where your SWG Client is located.

If you are in a situation where you are can use network shares to transfer files back and forth then you should install Samba inside your linux VM. This will allow you to specify folders within your VM that can be accessed from any Windows PC on your network once that PC uses the correct Samba username and password. That is not the same as the accounts you use within the linux VM. You can set Samba up by following this guide:

https://www.swgsource.com/forums/th...v2-5-for-windows-compatible-file-sharing.403/

This method is very useful where you have a Windows PC running Virtualbox hosting your SWG Server VM and your SWG client on a different Windows PC. In that scenario your Windows PCs can transfer files to each other easily but without Samba in the VM your SWG Server is isolated from joining the network sharing.

(e) Virtualbox Shared Folders This is only useful in a scenario where the Windows PC you’re using with Virtualbox to host your SWG Server VM is also where you are doing your SIE editing and running your SWG client. You will be setting up a folder on the Windows PC through Virtualbox settings to appear inside your SWG Server VM as a device that can have files dropped into it in both directions.

To set this up you first need to open up your Virtualbox settings for the SWG Server VM: vQlXnYkde8LPJL4hMaMOvnKQbH6RB1mLLlrCysWvQtkmZsiYZrjDZl9IKqotVAikL6n6mVakWjfvI03dW8wPerG1BvmZGi09.jpg

Once you click the + button you can specify what folder on the Windows PC to use as the Shared Folder with your SWG Server VM. mwXFJRSZWZXUCdfj95-mZwnRRWoVrCKabd8nSHJsyorm1MZJVjLSmy6mQHijm-6_nB4GG_diojRGeu5A0_dq4rcXQVQWlY7H.jpg

Click the down arrow button and select Other to get to this screen: y5KadaWcWETG79J51V6P09n_NkYRT0BjPtDZTPigcZVUkcQUDES-rYbgJnubCW2yN93Egcii7vhCN91dHX3ttej6-a4uXmse.jpg

I have an allusers folder on my desktop which also happens to be the name I used for my Samba share. Select the folder you wish to use then progress to the next screen. hCE0ZCbG_72dvvvHVNWI9fAUOyF1oU1fl89qx5IIXa5VLeDvkOApFFecjqXtgJt3qYIH68YUCND0qohawKIyvO2mGubhf682.jpg

Set the auto-mount and make permanent options to have the shared folder activate each time you reboot the VM. When you next reboot the VM you should see the following: W41CP8z.jpg

Access that sf_allusers device and use it to pass files between linux and windows.

(f) Emailing files to yourself This is another way of getting files from inside your VM to your Windows PC and vice versa. Just use the browser on each to log into your email / gmail / yahoo / outlook.com / match.com / tinder mail / grindr mail or whatever floats your boat and email stuff back and forward. This is not exactly an efficient way of doing things but it gets the job done. No one will judge your for it, no really, we won’t. It’s perfectly fine.

(g) build_linux.sh Now it’s time to actually build your server. Rather than repeat the work done in the guides by Erusman I will just provide an overview with some sample answers and context for them.

In the top right pane of your Terminator terminal window use the following commands paying attention to the upper and lower case characters because you’re dealing with linux here:

cd Desktop <enter / return> cd swg-main1 <enter / return> ./build_linux.sh <enter / return>​

Now we’re off to the races and the server build process has begun. You will get a series of questions and here are the appropriate responses:

Do you want to pull/update git? y This grabs the latest updates from the online repository Do you want to build the server now? y This compiles your binaries using the src folder Do you want to build the config environment now? y Configure environment (local, live, tc, design)? local Enter your IP address of your VM on toolbar 10.0.0.235 for me, for you the IP you set earlier Enter the DSN for the database connection 127.0.0.1 Enter the database username swg Enter the database password swg Enter a name for your galaxy cluster swg How many nodes are in this cluster? 1 node0 ip: 10.0.0.235 for me, for you the IP you set earlier Do you want to build the script now? y Do you want to user multicore scripts or the safe option? Safe Do you want to pull / update git? y Do you want to copy over /clientdata to data? y Do you want to rebuild the Chat database? y Do you want to import the database to Oracle? y Enter the DSN for the database connection //127.0.0.1/swg Enter the database username swg Enter the database password swg

Now test your new server. In the Chat Server v2.5 pane type: ./chat <enter / return>​

In the Server v2.5 pane type: ./startServer.sh <enter / return>​

Connect to your server using your SWG Client to confirm everything is operational before proceeding with the rest of this guide. Make sure you use the IP address you specified for your VM in the login.cfg file of your SWG Client. REPORT BOOKMARKLIKE + QUOTE REPLY scubasteve likes this. IrishDarkshadow IrishDarkshadow Well-Known Member Joined:May 18, 2017 Messages:441 Likes Received:131 #3IrishDarkshadow, Jul 31, 2017 Last edited: Jul 31, 2017 Part Two - Adding The Objects To The Server

The first thing you will need to do is take the SWG Posters folder where you have all 72 files that you made during Part One and copy it over to your SWG Server VM. Here is a list of what you should have in there at this point: ZBp-4K2gp1654tVFx2eIPCiNNL15YxtWliWiJEYot87KbgVLIOMDpqw2PP7VyH8FWfoM1PcXN8feXpAbbWnegxq55Cz6QvXu.jpg

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting\painting_posters_aoc.tpf \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting\shared_painting_posters_aoc.tpf \SWG Posters\clientside\appearance\frn_all_painting_posters_aoc.apt \SWG Posters\clientside\appearance\mesh\frn_all_painting_posters_aoc.msh \SWG Posters\clientside\shader\frn_all_painting_posters_aoc_as8.sht \SWG Posters\clientside\texture\frn_all_painting_posters_aoc.dds

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting\painting_posters_cwm.tpf \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting\shared_painting_posters_cwm.tpf \SWG Posters\clientside\appearance\frn_all_painting_posters_cwm.apt \SWG Posters\clientside\appearance\mesh\frn_all_painting_posters_cwm.msh \SWG Posters\clientside\shader\frn_all_painting_posters_cwm_as8.sht \SWG Posters\clientside\texture\frn_all_painting_posters_cwm.dds

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting\painting_posters_cws.tpf \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting\shared_painting_posters_cws.tpf \SWG Posters\clientside\appearance\frn_all_painting_posters_cws.apt \SWG Posters\clientside\appearance\mesh\frn_all_painting_posters_cws.msh \SWG Posters\clientside\shader\frn_all_painting_posters_cws_as8.sht \SWG Posters\clientside\texture\frn_all_painting_posters_cws.dds

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting\painting_posters_djj.tpf \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting\shared_painting_posters_djj.tpf \SWG Posters\clientside\appearance\frn_all_painting_posters_djj.apt \SWG Posters\clientside\appearance\mesh\frn_all_painting_posters_djj.msh \SWG Posters\clientside\shader\frn_all_painting_posters_djj_as8.sht \SWG Posters\clientside\texture\frn_all_painting_posters_djj.dds

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting\painting_posters_ew1.tpf \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting\shared_painting_posters_ew1.tpf \SWG Posters\clientside\appearance\frn_all_painting_posters_ew1.apt \SWG Posters\clientside\appearance\mesh\frn_all_painting_posters_ew1.msh \SWG Posters\clientside\shader\frn_all_painting_posters_ew1_as8.sht \SWG Posters\clientside\texture\frn_all_painting_posters_ew1.dds

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting\painting_posters_ew2.tpf \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting\shared_painting_posters_ew2.tpf \SWG Posters\clientside\appearance\frn_all_painting_posters_ew2.apt \SWG Posters\clientside\appearance\mesh\frn_all_painting_posters_ew2.msh \SWG Posters\clientside\shader\frn_all_painting_posters_ew2_as8.sht \SWG Posters\clientside\texture\frn_all_painting_posters_ew2.dds

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting\painting_posters_rebels.tpf \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting\shared_painting_posters_rebels.tpf \SWG Posters\clientside\appearance\frn_all_painting_posters_rebels.apt \SWG Posters\clientside\appearance\mesh\frn_all_painting_posters_rebels.msh \SWG Posters\clientside\shader\frn_all_painting_posters_rebels_as8.sht \SWG Posters\clientside\texture\frn_all_painting_posters_rebels.dds

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting\painting_posters_ro.tpf \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting\shared_painting_posters_ro.tpf \SWG Posters\clientside\appearance\frn_all_painting_posters_ro.apt \SWG Posters\clientside\appearance\mesh\frn_all_painting_posters_ro.msh \SWG Posters\clientside\shader\frn_all_painting_posters_ro_as8.sht \SWG Posters\clientside\texture\frn_all_painting_posters_ro.dds

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting\painting_posters_ros.tpf \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting\shared_painting_posters_ros.tpf \SWG Posters\clientside\appearance\frn_all_painting_posters_ros.apt \SWG Posters\clientside\appearance\mesh\frn_all_painting_posters_ros.msh \SWG Posters\clientside\shader\frn_all_painting_posters_ros_as8.sht \SWG Posters\clientside\texture\frn_all_painting_posters_ros.dds

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting\painting_posters_tfa.tpf \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting\shared_painting_posters_tfa.tpf \SWG Posters\clientside\appearance\frn_all_painting_posters_tfa.apt \SWG Posters\clientside\appearance\mesh\frn_all_painting_posters_tfa.msh \SWG Posters\clientside\shader\frn_all_painting_posters_tfa_as8.sht \SWG Posters\clientside\texture\frn_all_painting_posters_tfa.dds

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting\painting_posters_tlj.tpf \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting\shared_painting_posters_tlj.tpf \SWG Posters\clientside\appearance\frn_all_painting_posters_tlj.apt \SWG Posters\clientside\appearance\mesh\frn_all_painting_posters_tlj.msh \SWG Posters\clientside\shader\frn_all_painting_posters_tlj_as8.sht \SWG Posters\clientside\texture\frn_all_painting_posters_tlj.dds

\SWG Posters\serverside\dsrc\sku.0\sys.server\compiled\game\object\tangible\painting\painting_posters_tpm.tpf \SWG Posters\serverside\dsrc\sku.0\sys.shared\compiled\game\object\tangible\painting\shared_painting_posters_tpm.tpf \SWG Posters\clientside\appearance\frn_all_painting_posters_tpm.apt \SWG Posters\clientside\appearance\mesh\frn_all_painting_posters_tpm.msh \SWG Posters\clientside\shader\frn_all_painting_posters_tpm_as8.sht \SWG Posters\clientside\texture\frn_all_painting_posters_tpm.dds

The next step we need to take is some recon on how the SWG Server VM is structured from a file system perspective. CYSuzSmu5yZV2mUOOAPZPkn8-kfGsKQ24MPGTux0MCNKuOIp8XclxvODbtiZyPj8hIQsDfumNcC4gK3X4MwVPsAJEZY0k9Qh.jpg

clientdata This is a large folder of around 10.5 GB which contains all of the files which make up the assets for the SWG Server.

swg-main1 This is the area where we will be doing all of our work from here on out. It contains the src / dsrc for our SWG Server and will be the receptacle for the files we created during Part One.

swg-main2 This is the prebuilt server and once you’ve set your IP address and edited your hosts file then you can fire it up immediately. It has no src / dsrc included.

When we look inside the swg-main1 folder we see the folders which will be spending our time with during the rest of the process. t0t4P6wf83Rd1rMK3lGVTbP7n35pSIrMl0ECGd99Ow9DBWS-w4m4YpK5UyB5BY-GNTx_NUgnXV_yPxjbuh71OXdreVwionjb.jpg

The green highlights are scripts and utilities that we won’t interact with directly but they will be called upon by actions taken when we use the purple highlighted item which is the main build script for the SWG Server VM.

The red highlights are where all of the ingredients for our SWG Server are located.

We saw earlier that the src folder is used to build the binaries / executables / programs that drive our server.

The dsrc folder contains all of the files that build the entire game which is run by those binaries e.g. java classes which control the crafting system, template files for every object in the game.

Let’s focus on the dsrc folder: VWCWMrbMvmmFUEgsCmRwkbQg9BY_L3S0ZmuzuqKt7VPFCnCEYv6YYF5WInAKKB4vdaActQJ1-cixYdQMZf_rBCxQGRnWh2Um.jpg

We have sys.client, sys.server and sys.shared folders inside of dsrc. Look familiar? Let’s have a quick look at the folder structure we made earlier to hold all of our files from Part One: gsUtMJKrn1dTCTBLp9lxv5h_eYuBl_nKNY6soQA91uwsNcdzYW5lx4kip7SvM9GpSt5wbxshbTz_NO4Q0BZy_5FygBoGZ9X-.jpg

Oy5lNL4KoLTSAmVxFnQfZuKki1zOHEmhPyhOP5IcCpX_DwVnDD-jqv-HF08u4cPXm-qkoQKfjDYeNpjqrrt-4gdk77Q51QBh.jpg

The folder structure we created is designed to mirror how the files are organised within the SWG Server’s folder structure.

What we’re going to do now is insert our files into the appropriate folders within our server.

Source (Our Files) Destination (SWG Server) \SWG Posters\serverside\dsrc\sku.0\sys.server /home/swg/swg-main1/dsrc/sku.0/sys.server \SWG Posters\serverside\dsrc\sku.0\sys.shared /home/swg/swg-main1/dsrc/sku.0/sys.shared \SWG Posters\clientside\appearance /home/swg/clientdata/appearance \SWG Posters\clientside\shader /home/swg/clientdata/shader \SWG Posters\clientside\texture /home/swg/clientdata/texture

You can transfer the files / folders individually or perform two copy & paste operations and choosing the MERGE option when prompted. Use whichever method you find easier for you and afterwards verify the all 5 items went where they were supposed to go. This won’t be the last time that you’ll be performing actions and then following up on them with a test before moving forward. Being diligent at each step will make any back tracing or debugging efforts later on far less taxing. It also serves to give you confidence that you’ve done a step correctly and can safely take on the next step.

We’ve already built our SWG Server from the steps earlier just prior to starting Part Two and we’ve now added new files so we’re going to have to run another build process so that those new files get incorporated into the server properly.

Now we need to revisit build_linux.sh so that we can have the server convert our newly embedded files into formats that the game server can use. This process also takes care of some other important tasks involved some master table files and the database which we will need to run tests on once our build process is complete.

In the top right pane of your Terminator terminal window use the following commands paying attention to the upper and lower case characters because you’re dealing with linux here:

cd Desktop <enter / return> cd swg-main1 <enter / return> ./build_linux.sh <enter / return>​

Do you want to pull/update git? n Do you want to build the server now? n Do you want to build the config environment now? n Do you want to build the script now? y Do you want to user multicore scripts or the safe option? safe Do you want to pull / update git? n Do you want to copy over /clientdata to data? y (already sym-linked but use y for safety) Do you want to rebuild the Chat database? n Do you want to import the database to Oracle? y Enter the DSN for the database connection //127.0.0.1/swg Enter the database username swg Enter the database password swg

92qZGQEo0QitJn3JrtWiPeKL1-oGeTFlYnaqZ7ZRXwZd-DpjAC4VWhNnIgBTTwmqyv-89q0CRtXJJ9A1Cz7rFshdllJuB1bJ.jpg

The script building process you just ran through has 4 phases:

Compiling Java scripts: This is building the classes that govern the in-game systems. Generating IFFs: This is converting our tpf files into iff files the server requires Generating Datatables: This is converting tab files (more on those later) into iff files Generating Object Templates: More iff conversion but specific to the type of files we added

The next piece of the process requires us to do a little Linux black magic using some scripts from Elour and making some edits to scripts already present in the server VM.

There will be a file called Scripts.rar attached to this thread but I will include the code here too in case you’ve stumbled onto this guide in an offline format such as a PDF file.

The paths used in these files are specific to the v2.5 Server VM so you will need to adjust them if you are running a different version of the server.

newObject.sh Code:Select All

/home/swg/swg-main1/build_object_template_crc_string_tables.py perl /home/swg/swg-main1/src/game/server/database/templates/processTemplateList.pl < /home/swg/swg-main1/dsrc/sku.0/sys.server/built/game/misc/object_template_crc_string_table.tab > /home/swg/swg-main1/build/templates.sql sqlplus swg/swg@127.0.0.1:1521/swg @/home/swg/swg-main1/build/templates.sql > /home/swg/swg-main1/build/templates.out

build_object_template_crc_string_tables.py Code:Select All

#!/usr/bin/python from os import walk, path, makedirs from subprocess import PIPE, Popen serverdir = './data/sku.0/sys.server/compiled/game/object' shareddir = './data/sku.0/sys.shared/compiled/game/object' def read_objects(objectdir): files = [] for (dirname, dirnames, filenames) in walk(objectdir): for filename in filenames: if '.iff' in filename: objfile = path.join(dirname, filename) objfile = objfile.replace(objectdir.split('/object')[0] + '/', '') files.append(objfile) return files def build_table(type, objs): tabfile = "./dsrc/sku.0/sys.%s/built/game/misc/object_template_crc_string_table.tab" % (type) ifffile = "./data/sku.0/sys.%s/built/game/misc/object_template_crc_string_table.iff" % (type) if not path.exists(path.dirname(tabfile)): makedirs(path.dirname(tabfile)) if not path.exists(path.dirname(ifffile)): makedirs(path.dirname(ifffile)) crc_call = ['./tools/buildCrcStringTable.pl', '-t', tabfile, ifffile] p = Popen(crc_call, stdin=PIPE, stdout=PIPE) for obj in sorted(objs): p.stdin.write(obj + '\n') p.communicate() serverobjs = [] sharedobjs = [] allobjs = [] serverobjs.extend(read_objects('./data/sku.0/sys.server/compiled/game/object')) sharedobjs.extend(read_objects('./data/sku.0/sys.shared/compiled/game/object')) sharedobjs.extend(read_objects('./data/sku.0/sys.server/compiled/game/object/creature/player')) build_table('client', sharedobjs) allobjs.extend(serverobjs) allobjs.extend(sharedobjs) build_table('server', list(set(allobjs))) Now we need to make a minor change to a script already contained in your server VM.

Navigate to this folder: /home/swg/swg-main1/tools, locate buildCrcStringTable.pl then open it for editing. Scroll down to line 154

It looks like this: system("Miff -i tempfile -o $outputFileName");

change it to this: system("/home/swg/swg-main1/build/bin/Miff -i tempfile -o $outputFileName"); MMgj-PSvTZGZkMR8Iaozs2zS5vTAYOnLbIquBoNJaEdCBf2wkOSJU-Z-FJ7Ub5f9xdhxB01b5_JQo2pTUKvOx8G66E7eY-Dr.jpg

You can locate the line your cursor is at by checking the lower right area of the status bar at the bottom of the window as shown here: kRHEMJcmw8CgjZaQs4E3wwOyKGHBqeDvUqoIraruOVvp3JjO5cUIcBdyA_Psc-XmsxmghChqEhy2SGfgnvuJgiSETOs2WY4P.jpg

Once you’ve modified the line appropriately you can save your changes and exit.

Extract the two files in Scripts.rar to /home/swg/swg-main1 Right click each file Select Properties Click Permissions

Ensure both files have a checkbox for “Allow executing file as program” ADN7v0cgRmtcnKIsoWIS8om0EGL1S9euCuoKCF50-0Wmdro4muYhc-Ug_U25N5DaZitH-tNPblnazMLIqM8_3oSZCyHk-y6x.jpg

Now we need to test the work we’ve just done.

The first thing we need to check is that our tpf files were converted to iff files. To do this we can simply check the folders within the server vm for the new files.

ha5Yv12pHVXUeyJnOYcsm4S_7Ye42lW12RmTaI9j4ThetmtqEtywZ7a711cbpizMv5evfThysaL9Tsmz_A5GHWmvt0c_4sRe.jpg

This search was run on /home/swg/swg-main1/data using the filter “posters iff” and as you can see we now have 24 new IFFs on the server which means all of our tpf files were successfully converted.

Now we need to learn a little bit about another key aspect of how SWG handles objects and that is something called the CRC ID.

A CRC ID can be thought of as a fingerprint from an object that the game server can use to explicitly identify that object wherever it is to be used. During the build process that we just completed the objects that were newly generated (our paintings) were assigned CRC IDs in a table called object_template_crc_string_table. The raw version of this is tab file but we need to see what is in that table from after it has been converted to an iff file. That means we need to pull the file across from the server VM onto the Windows PC so that we can use SIE to take a peek inside.

Grab the file from this location inside your server VM: /home/swg/swg-main1/data/sku.0/sys.server/built/game/misc/object_template_crc_string_table.iff

Once you have it on your Windows PC we can open it in SIE. You will need to be patient while SIE works to display the file contents as there are some 60,000 rows inside. If you see messages about SIE not responding then you just need to wait for it to respond.

Open SIE Choose New Editor >> New IFF Editor Click Open

Navigate to where you pasted object_template_crc_string_table.iff from your server VM qLw94brAHU8P9L606H6g1aFokFeKcD8gAhWwzDkxqjdYmf25Pcmfo5oU_RAdBJA0gtuE3N6J_Jc1ZskA7ctWe8qtYqCqYI5_.jpg

Once loaded click on FIND then for the String enter “posters” zTUGQ-8pLf804UGnRRKQiJhW6x-CoV_ORnb3AV5BBdsWNIJMM4buY_znxf0F4i5OCF10H-8R04JF3DUKFAJw1s-u3R7SKgtO.jpg

Click Find and you will return to the previous screen but now there will be a highlighted entry. VpHIb_1K_zuydI4HVy4DF_S6SzOQzG4_WtdP2cuGGaQlLBGC4j7zUPTaAdEn6LmQa7QwxYw1RjkVxr_flh-NXOktP5uisB4O.jpg

You can continue by using Find Next to confirm all 24 entries but once you see one of them in this file you can be relatively certain that this portion of the build process ran successfully.

The third and final test we need to perform requires us to dive into the Oracle database and verify that our newly converted IFFs were added there in the OBJECT_TEMPLATES table.

There are a couple of approaches to doing this, you can use the Oracle SQL Developer program that is already installed in your server VM or you can download the Windows version and install it on the same PC you are using for SIE. We will be able to use your local network from there to talk directly to the database. Regardless of how you do it, the steps are the same.

Configure a database connection to your server VM. NGvPrFM1IgDmPnp9vLK2tr8jXp2a_uBPhKsN3A_j4IH20tigD_v1rACA87oR7nV9joUNZWC08HTkUE89fNo0veyiytBTM3eC.jpg

This example shows you the values that are required, you will need to adjust the Hostname value to the IP address you specified for your VM during Part One. The Username / Password values are swg / swg and once you have entered the values hit the Test button. When you get the Success message in the lower left you’re ready to move forward. If it fails then go through the values you’ve entered and ensure they match your server VM configuration exactly.

Now connect to the database and in the Tables menu on the left locate the OBJECT_TEMPLATES table and open it.

In the right pane choose the Data tab.

For the filter you should use this Name like '%posters%' Dtxg6HBDOSh3VqQHNO3nigRjj9XnsDHdnT-E7uxAOyt3xANwP6ys2yQF46vsDr60tDysCNDRxluCFdaIiXueVu8IzLB3icRR.jpg

Once you see all 24 entries then you’ve verified that all of the file additions and build scripts have done their job and we can move on to the next phase. REPORT BOOKMARKLIKE + QUOTE REPLY scubasteve likes this. IrishDarkshadow IrishDarkshadow Well-Known Member Joined:May 18, 2017 Messages:441 Likes Received:131 #4IrishDarkshadow, Jul 31, 2017 Last edited: Aug 1, 2017 Part Three - Obtaining The New Objects With Your SWG Client

As with the previous two parts of this guide we need to do some prep work to make our SWG client connect to the server VM, modify it so it can “see” the new objects and learn how to spawn the new objects. There is also a tidying up piece you can choose to use or not, it won’t affect your ability to get the new objects in the game, it will just give them “pretty” names rather than code strings.

The first thing you need to do is open up the SWG client folder on your Windows PC and locate a file called login.cfg.

The contents will look something like this:

[ClientGame] loginServerPort=44453 loginServerAddress=10.0.0.235​

Change that loginServerAddress value to match the IP you assigned to your VM in Part One.

This points your client at the server VM and will allow you to login there later after we’ve done some more black magic.

The second thing to do in your SWG client folder is to configure the user.cfg file to allow you to work with admin commands. If you don’t have this file just create it and use the following settings inside it:

[SwgClient] allowMultipleInstances=true

[ClientGame] 0fd345d9 = true freeChaseCameraMaximumZoom=9

[ClientGame] disableCutScenes=1 skipSplash=1

[ClientUserInterface] debugExamine=1 debugClipboardExamine=1 allowTargetAnything=1 drawNetworkIds=1​

These settings will allow you to run more than one instance of the SWG client at a time, permit admin commands to be sent to the server, increase the distance you can zoom out the camera, choose cut scene and splash screen visibility, enhance the /examine command to provide you with detailed information on a targeted object and have every object display the ID for it above the object. This is very useful for running commands on that object.

When the game was live we used to get patches with new content. Those patches would add files to your client that allowed it to interact with the assets in that new content. If you look through your SWG Client you will see lots of tre files. Those are essentially compressed archives which contain the files that allow your client to display the objects available on the SWG Server.

We’ve essentially just done the same thing, we’ve added content to the server so now we need to “patch” our SWG client so we can work with that new content. This requires us to manually locate the files we need from inside the SWG Server VM and copy them over to the Windows PC. Once we have that completed we need to place those files into very specific places within the SWG client folder structure.

At the bare minimum for our paintings we need to locate 6 resources: Appearance Files (apt) Mesh Files (msh) Object Files (iff) Shader Files (sht) Texture Files (dds) CRC Table Appearance Files & Mesh Files Inside your Server VM create a folder called SWG Client and within it a sub-folder called appearance.Navigate to this location within the VM:

/home/swg/swg-main1/data/sku.0/sys.client/compiled/game/clientdata/appearance​

Search for “posters” and click Location to sort by folder. yQrZw47aPI86tJMP-1U2HChMgODZdJW5Csvyn0k-LYZa3N07S_h43PTKP7BRVnBXgxBaLiE9NIgfJnAwAz72hjFid3ljZlQ2.jpg

Copy the apt files into your new SWG Client/appearance folder. Create a sub-folder inside of SWG Client/appearance called mesh Copy the msh files into that SWG Client/mesh folder

Object Files We’ve created 24 IFF files from our original 24 tpf files. The SWG client will require 12 of those files for this process to work.

Create another folder in SWG Client called object then a sub-folder called tangible and inside that a folder called painting

Inside your server VM search /home/swg/swg-main1 using this:

shared posters iff

eoLv4Eq386CjxxTeYcR7S_q-O6qbI6UZ1fpifslXSuhSEj_zrHJbNm_ta1SmHDnDi9938ZFWF3BPhYeKB-wF4mc0QQWJMDwz.jpg

Copy these 12 files into your SWG Client/object/tangible/painting folder

Shader Files Create another folder in SWG Client called shader Inside your server VM search /home/swg/swg-main1 using this:

posters sht

fCoCsnnIutEsO55kN-dODwx_Qed7JlayHirB3qxyjJw_1anl7zFV7OHuNo4YPvlgB6VMCpx9o1W_jK1lEULj0SQ_dXFLAHmc.jpg

The server already had 2 similar files so only copy the 12 related to our posters / paintings into the SWG Client/shader folder.

Texture Files Create another folder in SWG Client called texture

Inside your server VM search /home/swg/swg-main1 using this:

posters dds

anqhUqpvHqUH-co0726YdnI5FBmSxsx_CkVZrmQmcd33_15TvkCzgagKhlDGqJ4e69HCoUAFH5-cZsUlWboRZoWj5RUX_5nL.jpg

The server already had 2 similar files so only copy the 12 related to our posters / paintings into the SWG Client/texture folder.

CRC Table We’re going to have to grab object_template_crc_string_table

Create one last folder in your SWG Client called misc

Navigate to this location in your server VM:

/home/swg/swg-main1/data/sku.0/sys.client/built/game/misc​

There is a file here called object_template_crc_string_table.iff

Copy that file to your SWG Client/misc folder Copy your entire SWG Client folder over to your Windows PC.

Move the contents of your SWG Client folder into the base folder of where your actual SWG game client is located. In my case that folder is C:\SWG-NGE Client

After the files we retrieved from the server vm have been put into our game client folder it should look something like this: Bapx5FDHX7hMjEOo4HtC-qYHYsvzlHRjYCtjgqvZaKjUDotORYUKyyQ2_MC4369NUp0Y7g0v9H2Qy7MzwQYVJJ1Y9Iiz9TrR.jpg

Now head back over to your server VM. We need to fire it up. In the Chat Server v2.5 (SWG-MAIN1) pane of the Terminator terminal type ./chat then hit enter In the Server v2.5 (SWG-MAIN1) pane type ./startServer.sh then hit enter

Once your server has booted successfully go to your Windows PC and launch your SWG game client.

Run the /setgod 99 command to elevate your character to admin level

Use these commands to spawn the new paintings:

/object spawn object/tangible/painting/painting_posters_aoc.iff /object spawn object/tangible/painting/painting_posters_cwm.iff /object spawn object/tangible/painting/painting_posters_cws.iff /object spawn object/tangible/painting/painting_posters_djj.iff /object spawn object/tangible/painting/painting_posters_ew1.iff /object spawn object/tangible/painting/painting_posters_ew2.iff /object spawn object/tangible/painting/painting_posters_rebels.iff /object spawn object/tangible/painting/painting_posters_ro.iff /object spawn object/tangible/painting/painting_posters_ros.iff /object spawn object/tangible/painting/painting_posters_tfa.iff /object spawn object/tangible/painting/painting_posters_tlj.iff /object spawn object/tangible/painting/painting_posters_tpm.iff

Client Side Naming Of Objects You will quickly notice that every painting you’ve spawned has a strange code string rather than an actual name. This is coming from the information we provided all the way back at the beginning in the tpf files. We said that frn_n was “furniture” and “name” then we said that frn_d was “furniture” and “description”.

The data for those two values needs to be added into a new file type that we have not dealt with yet called a string file (stf). We’re going to have to obtain the naming file from within the SWG client files, add entries for our new objects and then place the updated file into our SWG client folder structure as we just did for all of our other files.

Set SIE into NGE mode, select the String node then En node and filter for “frn”. Vnf60ac_3G35i-txfYu0B2WS4brBB3ciDNmjbwlnXkwrUurlRNlgVH9J5ysRctawQqAKuCJGccRAZ1grCkxqrnVFBJal0s9Y.jpg

The two files listed are frn_n.stf and frn_d.stf and both are located in patch_57_shared_00.tre

Highlight both files in SIE, right click them and extract them.

Start up a new string file editor in SIE then open the frn_n.stf file you just extracted.

Add an entry for each new object using this format:

painting_posters_aoc Attack Of The Clones

Once the first entry is made you can filter for the word “posters” to clean up the list on screen.

Use the let entry box for the file name of the object, the right entry box for the in-game name and the blue + button to add the entry to the list inside the file.

Don’t forget to click the SAVE button near the top to record your additions into the stf file. adc38WQzvqxTgdnzuqWwW9VnNTOEjisKZVLcttOt_TasmRLem9zOGH26Q9eK76ZV7OsVVxhkfdlpOWVM2LHlnUSMeLofKJfQ.jpg

Place the extracted folder from SIE \string\en into your SWG Client folder. dnTLIfkx3TPQclII3iuL_rPv0zvtdEcS7GHhc87G36b5lfnqZOIG901Xl5cpb0smLItlpXudXibF-mcSjinEy73OvJ2mZf9S.jpg

You should now log into your SWG client, spawn the paintings or simply check previously spawned versions to see the in-game name changes have taken place. l3AoMsdntSJ-a1sx_VFtodw12glNw0DQ4AqOGINviNcEjc_DyzfcPSpKHjlfV4bVVjxbJio52QsBbUAjG6lwU-Q9wAgUVvNp.jpg

Without updating frn_n.stf you would see this: VNDfIAL.jpg

Once you have placed the updated frn_n.stf file in your client you see this instead: QHdyDvC.jpg

Repeat the process for the frn_d.stf file to add descriptions to your items. ZYVByoySYPnkTlkJP3Mi4AFAz4eCnTdhW0mcg3Jlg3g96y8Bv_2BW3uVZxhecwsMmhh2WPOXEpuxaVVsgyScRjElCkJBiU83.jpg REPORT BOOKMARKLIKE + QUOTE REPLY scubasteve likes this. IrishDarkshadow IrishDarkshadow Well-Known Member Joined:May 18, 2017 Messages:441 Likes Received:131 #5IrishDarkshadow, Jul 31, 2017 Last edited: Jul 31, 2017

Process Summary ======================================================================​ Created tpf file for /dsrc/sku.0/sys.server/compiled/game/object/tangible/ Created tpf file for /dsrc/sku.0/sys.shared/compiled/game/object/tangible/ Created apt file for /clientdata/appearance Created msh file for /clientdata/appearance/mesh Created sht file for /clientdata/shader Created dds file for /clientdata/texture Set a static IP address for the server VM Configured a method for transferring files to / from the server VM Built the SWG server using build_linux.sh Copied all 72 files created for the new objects into the server VM Placed those files into their appropriate folder as per steps 1 to 6 above Ran build.linux.sh to convert tpf to iff and update crc table Copied over Scripts.rar to the server VM Extracted Scripts.rar to the /swg-main1 folder Made newObject.sh and build_object_template_crc_string_tables.py executable Edited buildCrcStringTable.pl to provide the path to the mIFF program Ran newObject.sh to ensure file conversion and updates to the Oracle database Check (a) tpf files were converted to iff files by searching /swg-main1/data Check (b) /swg-main1/data/sku.0/sys.server/built/game/misc/ for object_template_crc_string_table.iff to verify CRC entries using SIE Check (c) Oracle database using SQL Developer, OBJECT_TEMPLATES table for entries related to the iff files we generated Configured SWG client to connect to the server VM by editing login.cfg Configued SWG client to display admin items by editing user.cfg Copied apt files from /clientdata/appearance to \apperarance Copied msh files from /clientdata/appearance/mesh to \appearance\mesh Copied sht files from /clientdata/shader to \shader Copied dds files from /clientdata/texture to \texture Copied “shared” iff files from /swg-main1/data/sku.0/sys.shared/compiled/game/object/tangible/painting to \object\tangible\painting Copied object_template_crc_string_table.iff from /home/swg/swg-main1/data/sku.0/sys.client/built/game/misc to \misc Booted up server VM (./chat and ./startServer.sh) Logged on to SWG server using SWG client Entered God Mode using /setgod 99 Spawned each of the 12 new paintings using /object spawn object/tangible/painting/painting_posters_xxx.iff replacing xxx with the naming scheme for the objects e.g. cwm, aoc, rebels Log out of the SWG client Use SIE to extract the two stf files for naming and descriptions Edit both files with string entries for all 12 new objects Check the objects in game for the updated names and descriptions REPORT BOOKMARKLIKE + QUOTE REPLY scubasteve likes this. IrishDarkshadow IrishDarkshadow Well-Known Member Joined:May 18, 2017 Messages:441 Likes Received:131 #6IrishDarkshadow, Jul 31, 2017 Last edited: Aug 1, 2017


Errors Noticed When Creating This Guide Due To Mistakes *********************************************************************************************************​

Spawn Commands Complete But No Objects Appear During the initial test run for this process I was able to successfully run the object spawn commands but nothing appeared for me in game. I had used the painting_posters_xxx.iff versions of the files in the SWG client \object\tangible\painting folder rather than the shared_painting_posters_xxx.iff versions. Replacing the files solved the issue.

All Paintings Showing The Same Image After completing the entire process I spawned each new object and every painting was The Force Awakens movie poster. All of the initial files I used were copied from Elour’s original files. In my stumblings to understand the inner workings of the process I had neglected to edit the contents of the shader (sht) files to point to the correct texture files (dds) resulting in every painting use the tfa texture. Easy to fix but a bit surprising when I first saw it.

One Painting Shows The Same Image As Another Painting The last iff file alphabetically amongst the new objects is tpm and having successfully spawned the other 11 paintings with the correct result I spawned tpm (The Phantom Menace) but it was tlj (The Last Jedi). I traced backwards through the file chain for that object - dds to sht to msh to apt to tpf2 to tpf1. The last one showed that I had not changed the file path when I copied it so it showed the tag from the previous file (tlj) instead of tpm. Once corrected I ran newObject.sh and afterwards the correct painting spawned.

SWG Client Folder Missing The Shader Files The entire guide was written as I was performing the steps on my test server. Upon completion of that first run through I restored the server to a snapshot taken prior to having started the process. The idea was that this would allow me to repeat the process reading back the guide and following along. When I spawned the paintings they were all some green tree / leaf image. Once again I back traced the files but this time found nothing was wrong. I started to check the SWG client folders and noticed that I hadn’t put the shader folder inside. Once that was added the paintings were all corrected. RBF84KX.jpg​

We can add to these errors / bugs over time as they help with troubleshooting and also show the effects the mistakes made can have on the in game objects.

e6FWw08.jpg​

The creation of this guide would not have been possible with @Elour@Elour being wililng to provide information and suffer through incessant questions on the minutia of every step.

Additional guidance was provided by @Kosh@Kosh and @Erusman@Erusman along the way. REPORT BOOKMARKLIKE + QUOTE REPLY scubasteve likes this. IrishDarkshadow IrishDarkshadow Well-Known Member Joined:May 18, 2017 Messages:441 Likes Received:131 #7IrishDarkshadow, Aug 1, 2017 I've tested this process using the v2.6 server (based on Stella Bellum's dsrc folder) and the v2.6 Erusman client with the patch_70 files included. As I post this those files restore some TCG Series 8 items - Yoda Backpack / C-3PO Backpack / Dark Meditation Throne / Torture Table. This combination is capable of this: t4FrOEj.jpg The test character has spawned the ep2 painting in the middle of Bestine (and it's named correctly) while wearing the Yoda backpack which contains the torture table and dark meditation throne and the C-3PO backpack is sitting in his inventory. So basically, everything working fine. REPORT BOOKMARKLIKE + QUOTE REPLY scubasteve and Kosh like this. Ken Ken LordHorrar Joined:Dec 4, 2017 Messages:15 Likes Received:0 #8Ken, Apr 29, 2018 NewAwesome guide thanks, I'll get to work attempting it this way. REPORT BOOKMARKLIKE + QUOTE REPLY Go to First Unread Write your reply...

Write your reply...

Users Who Are Viewing This Thread (Users: 1, Guests: 0) Users Who Have Read This Thread (Total: 27) KenFelarioRabiatorIrishDarkshadowLockhartSlayertomtomislarBobTOXICEhessDarthVinsRerakurdtBrojioweizKoshGreenRegulusBamocIosnoworeScytaleShaneBapperLightlordvoidoswin Share This Page ABOUT US Community for sharing and guides on how to get a SWG Server up and running. Our goal is to allow people to share information freely and publicly and to preserve that information.

QUICK JUMP Home About Forums Downloads USEFUL LINKS Alpha Delta Omega REGULATIONS Forum software by XenForo™ ©2010-2017 XenForo Ltd.

SWGSource Home Help Terms and Rules

===============================================================

Clone this wiki locally