• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

Prepping a Truespace 7.6 X file for easy conversion to XSI using Threed.

Started by BNG Da BZ Fool, January 01, 2009, 12:20:14 PM

Previous topic - Next topic

BNG Da BZ Fool

Before I used to have to manually delete the extra -num that the TS exporter added to the end of each and every stinkin object name entry in Notepad. The task was really time consuming and needed to be removed on BZII manipulated objects like hp's, __h, __2g, etc to get them to work right. I tried several attempts to use the global replace function to delete these problematic extra entries in the X file that TS exported without any success; it would always mess up the X file making it unreadable by Threed the ever popular piece of crap that nobody likes, but always seems to fall back to so frequently.

Anyways, I figured out how to globally add a simple space character between the offending -num in the object name, so that it doesn't mess up the X file prior to converting it to XSI.

Here's how to do it in a matter of seconds using Notepad.
1. Open the X file.
2. Hit edit in NPad and select replace.
3. In the find box type -
4. In the replace box hit the space bar to insert a space plus a -.
5. Now hit replace all.
6. Now save the file again and open it in Threed.
7. Now hit file>save as>xsi and open the file in the BZII map editor. Your model is ready to be added for testing. Don't forget to prep the ODF ahead of time too.

Note: The above mentioned process adds an extra space to numerical entries in the body of the file as well, but BZII apparently doesn't care about the extra space and loads the file just fine. It's a shame I'm just about the only one that uses TS, so I guess maybe only modeling noobs will find this post of any real value...BNG.

Here's a GT prepped with NP and saved as XSI; it has only material colors now, but I can add a texture later on.
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.

Red Devil

What box???

BNG Da BZ Fool

One word of caution on really long files is that NP may really take a long time if there's a lot -'s in the X file. On such files I find it easier to find frame and manually delete the -num at the end of the object name. I actually had NP freeze up on one really large file. No harm was done to the actual file as it had not been saved yet, but it scared the hell out of me just the same. Most of the X files processed in only maybe 15 to 20 seconds. This is a pretty good alternative to doing things manually one at a time. Also, much easier if I have to re edit the model in TS 7.6.

For example hp_gun_1-1 results in a non operative object name to the BZII game engine, but hp_gun_1 -1 is read perfectly by BZII. I guess this is valid as the additional space character makes hp_gun_1 distinctive and readable when BZII processes the model file and ODF definitions.

Update: WIN ME users should use Word Pad as that OS's version of NP doesn't have a replace function. X files with animation should be manually edited as the mentioned process mess's up the animation somehow. More to come hopefully as I happily Bump N Go along. BNG.

Processing the X files have really reduced the time from making the model and getting it into the game. I need to find a better text editor that can search for specific text strings so I don't have to add spaces where I don't want them. For now though doing things this way is pretty efficient as I only need to use Threed to convert the X file to XSI, modify my ODF file and load the model into the game. My old manual method used take quite a few minutes and now it's only a few seconds per file. God, I love technology. 

   Gosh I just love dredging old posts up again; don't I? Anyways, I found a more efficient way to get rid of those annoying -num entries that TS adds to x file object names with out affecting the -numbers in the body of the file where stuff like XYZ coordinate numbers are stored.

What I do now is add z to the end of the object name, i.e., tread_lz for example. Then in NPad I use the replace function to find z- and replace it with a space character. This way it totally ignores the numerical XYZ numbers in the body altogether and goes straight for the z- entries which really speeds the replace process; before some files took quite some time as any entry with a - whatever had a space added. As you can imagine a typical file contains literally hundreds of - with an XYZ number.

I find doing things this way quite a bit more efficient as I typically test new models in the map editor prior to adding stuff like texturing to my models and testing weapons hp's and other BZII influenced parts like __h, __2g, stuff. This way if I spot a problem in the map editor I can easily go back into TS to make changes without having to spend a lot of time prepping the model for the game. Tank God for technology short cuts; I was getting tired of always pulling my hair out waiting to get a silly model into the game.

Wow, adding the z thingy needs to be applied consistently when naming stuff in TS. I made another unit and forgot to add the z to both hp_gun_1 and 2 recently. I followed the above mentioned process and couldn't figure out why the guns wouldn't work at all. Then after loading the model back into TS I realized that the hp guns were being skipped in NP and as a result were still wrongly named hp_gun_1-0; not a good thing for the game engine.
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.