.TRE Manipulation Guide?

XionicFire

New Member
Joined
May 23, 2017
Messages
46
Hi

Ive been searching around the web and forums for a proper step by step guide on how to manipulate .tre files

Most of the info ive found is outdated and used 5 different tools, that now can be done with sytners, but none of the info explains exactly why or how, or to put it better the do's/dont's/why's of tre building

The most usefull one ive found is this one:
https://www.scribd.com/document/182317734/Creating-a-New-Object-in-SWGEMU

Does anyone know if theres a newer step by step guide like that but that takes into account sytners new tool?

The guide leaves a bunch of newbie questions unanswered, most of the guides assume we already know the basic stuff, and i havnt found a single guide anywere save for that out dated one that does.

Things like, why does it need a CRC?, can it be avoided all together?

Why doesnt it work just like copying the files into the folder and the game assumes its the newest version, can the game be told to treat the newest tre as always the newest version?

I understand the game has individual file-by-file crc versioning so you can do "incremental" patches, but that would require you to add individual crc histories to every file, but honestly as the meme says: Aint nobody got time for that!

I figured id rather just do a new version of the tre every time we do a patch, and split the tres into different areas, so only the affected tre is re-downloaded and always has the most up to date files.

In todays world a 1gb download is no longer an issue.

Aside from the guide question does anyone know if anything like this can be done? or the crc is like an enforced thing?

Sorry for the dumb questions, im not much of an expert in client side mods, and our main dev that usually does this has his hands full with new content, and has little time as is, and i need to learn how to do this stuff anyway.

Since the info is not very easy to find I imagined asking it here and having it as a record would be benefitial to new up and comming coders as well

Thanks in advance everyone!
 

Lasko

Moderator
Staff member
Moderator
Joined
Feb 13, 2012
Messages
295
While there isn't a guide like this, there are several smaller guides on tre manipulation in the guides section that cover areas similar to what your intending to do. A guide for the whole subject would be pages long and nobody would read it. So..... Where does that leave newcomers to the whole proces??

First you have to ask yourself, what is it I actually want to achieve?

Break it down to seperate areas and narrow the search for relevant info.

So lets assume that you want to add new stuff (by far the most popular use of SIE).

You'll need to understand how the tre files are organised and what they actually contain. Then what do i need to do to make it happen.

Importing new stuff from the NGE is covered in other guides and a good place to start is the adding the BARC guiide as it covers the process for adding a new item. This can be transposed for pretty much any other item (give or take).

There's also a guide on consolidating tre files which looks at how they evolved and how to remove all the unecessary duplicate files. While not that much of an issue with downloads today, it does make for good housekeeping with your files.

So getting back to your OP.

Dont be afraid to ask questions...... EVER!!!!!

The best way of learning is to dive in see if you can do something in one of the smaller guides and then if/when you get stuck, make a post here.

So CRC's, firstly there's no dark art to what they actually are. Google crc32 and you'll get the definition, but simply put, it's a number generated from the string of an object (in our case), and is used to validate object data.

So what the hell does that mean lol.

If you open up a crc file in SIE you'll see the object path with the crc next to it. Unless you need to add it for some change server side there's usually not much need to worry about it. But....

Every object in-game has one so if you look in the tre's in /object, every .iff file in there has an entry in the crc file which the server uses to generate objects. It only needs to be added once then you can forget about it. But EVERY new object that you add will also need to be added to that crc file and included with your new tre. If you dont add an item to this file it'll never work in game and you'll get console error messages at best or more likely it'll seg fault the server.

How you release this to your players is up to you. If you have an auto patcher in your launcher then it's easier to amend an existing one than just add a new one. Too many options to talk about here.

The client reads the tre's in a set order (explained in detail in the consolidating tre guide), newest versions overwriting older versions. Same server side, as seen in the config.lua and swgemulive.cfg.

What I would also suggest, is you document your learning experience and maybe consider posting it as a guide. That would, as you say, be a great guide for other newcomers to the process. Sometimes we may forget how big the whole subject is.

Please feel free to ask questions (or PM me) if you get stuck. Believe me, it really doesnt take that long to start to understand how it all fits together, especially if your working with serverside code too.


Also...
Consider joining us in the discord channel. I'm usually there 24/7 and there's a lot of people that can answer questions in real time, or just ask you question and someone will answer when they're ATK.
Or just drop in for a chat:)
 
Top Bottom