Jump to content
DerelictStudios Forums
Sign in to follow this  
jonwil

First Look At Some Of My C&c3 Moding Tools

Recommended Posts

Download http://users.tpg.com.au/jfwfreo/cc3tools.zip to see these tools. You will need the SDK prerequisites (specifically the visual C++ runtime) installed in order for these to work correctly.

 

Included in the zip file is an XML editor with syntax highlighting based on the SciTE editor. It should make editing C&C3 XMLs just that little bit easier.

 

Also included is a tool called aptextract.exe which can extract any APT UI file and give you an XML file and textures you can edit and use in your mod similar to the DefaultUIScreens items in the SDK. In addition to the GUI view, you can call it with a command line similar to aptextract aptlevel0 c:\output and it will extract the data for aptlevel0 to the folder c:\output.

 

I realize the names of the APT entries are not very descriptive, if anyone has any ideas on how to make the descriptions better, please let me know.

 

Also, I have written a tool called textureextract.exe. This will extract any texture from the game. Fill in the name of the texture (without any extention, e.g. abbhive_nrm) and it will generate a texture file plus texture XML. The texture files are in DDS format because that is how the game stores them internally and if I convert back to the TGA format used as input when the game was made, the quality of the texture would be degraded. You should edit the DDS file in something like photoshop and then use both the dds file and texture XML in your mod. Like aptextract.exe you can pass in the name of the texture and then the output folder on the command line.

 

Also, I have written a tool called w3xdecompiler.exe. This tool decompiles compiled streams back into w3x files. Pass in the name of the w3x file you wish to decompile including the .w3x extention (referenced in an include tag in one of the xml files from the SDK for example). The "decompile low detail version" checkbox says that you want to decompile the "low detail" version of the model. The output from w3xdecompiler.exe is NOT the same as what would have been passed as input when the game was made. In particular, it does not correctly decompile BoneInfluences tags, ShadeIndices tags or W3DAnimation (it may not actually be possible to decompile the data correctly as information appears to be thrown away by the build process). Again you can pass the filename followed by the output folder on the command line. If you put l (thats a lowercase L) as the third parameter, it will extract the low quality version. (so something like this will extract the low quality version: w3xdecompiler abbhive.w3x c:\output l)

 

Full source code for all tools is included. The SciTE code is under the licenses specified in those folders. The other code (cc3tools.dll, aptextract.exe, textureextract.exe, w3xdecompiler.exe) is under the GNU General Public License Version 3 (basically if you make changes to the code in question and distribute a new binary version, you must also include the source code changes). This also means that if you want to use cc3tools.dll or any of the other code in another program, you need to comply with the GPL for that program too and release its entire source code.

 

I have the following possible ideas in the pipeline as possible tools I may create:

If the audio codecs are ever reverse engineered, I will produce an audio extraction tool to extract audio from the game.

 

If I ever find out what langdata.dat is for and whether you would want to edit it or not, I may produce a langdata.dat editor

 

I may produce a tool to handle and manage *.BIG files similar to XCC Mixer or Final BIG but properly supporting C&C3. However, there is already OS Big Editor that can do this so I may not make my own tool.

 

An editor for the UI is on my list if I can figure out the remaining unknown fields (and think of how the UI editor should work)

 

I am also currently investigating how civilian objects (buildings,units,props etc) work and this may result in information/tutorials/tools to handle this.

 

I am looking into a program that would parse a set of XML files and dump certain tags into a file that can be loaded into a spreadsheet program such as Excel or OpenOffice.Org Calc. This could be used to see all the numbers related to balancing in the one place. At this time, I have no plans for a tool to go the other way (which would be VERY hard)

 

But the big tool I am thinking about creating is a program that would basically manage a whole mod. It would feature a list of files in the mod down the side. It would be able to launch other programs (including the EA BinaryAssetBuilder tool, the XML editor and the .big creation tool). It would be able to generate skudef files automatically as well as having support for multiple language versions of your mod (so you could build a version for German and a version for English and have both versions available). It would completely replace buildmod.bat. It would be able to produce "patches" so that you do not need to distribute the entire mod every time you release a new version. It would even be able to launch C&C3 with your mod directly via the relavent switch. But most importantly it would mean you would be able to do everything in C&C3 modding right from inside of it and never need to worry about command prompts, the & symbol in your C&C3 folder name or anything else related to command lines.

 

As part of this I am also considering a mod install program that would be able to install a mod automatically. It would detect which language you had installed and install the correct language version of the mod. (similar in nature to the install program I wrote for the last version of my walls mod).

 

I am basically looking for feedback on how to make these tools better (especially how to make them easier to use) as well as any questions, comments or requests you have (e.g. requests for certain tools).

Also, anyone with C++ skills who wishes to help, please contact me.

 

To contact me, you can post in this thread or you can contact me via:

Email jfwfreo@tpgi.com.au

MSN JonathanWilson623@hotmail.com

ICQ 77572965

AIM jonwil2002

Yahoo jonwil2002

 

Share this post


Link to post
Share on other sites

Thx for the tools!

I'm really looking forward to an APT editor.. modding the UI is an important part of a total conversion.

 

I may produce a tool to handle and manage *.BIG files similar to XCC Mixer or Final BIG but properly supporting C&C3. However, there is already OS Big Editor that can do this so I may not make my own tool.

 

Please write your own .big manager! Afaik, OS Big Editor was from the same author as the PMM, so I don't think we'll get updates, and the version we have isn't working well... ( some things like memory errors or so.. ). It can't even handle that much bimr-sets inside the big files, and it can't extract xmls. Now that we have the xsd files, we got all valid parameters for the xmls, don't we? We seriously need a big manager which can extract the original data, and I don't think we'll get official tools for that. :/

Share this post


Link to post
Share on other sites

The SDK includes the XML files. You don't need to be able to extract them from the BMRI sets. Also, OS Big Editor is done by Banshee, and I know he's working hard on updating it to fix issues and such.

Share this post


Link to post
Share on other sites

K, if OSBE is developed by someone else, it's a good thing.

But someone said, that the files EA gave us aren't up to date, and I also do think that there are some other files which aren't in the zips from EA...

Edited by ThunderX86

Share this post


Link to post
Share on other sites
But someone said, that the files EA gave us aren't up to date

right. just take a look into the LogicCommandSet.xml

patch 1.07 deleted defensive structures for cranes... but they are still there. that's just one example

Share this post


Link to post
Share on other sites
I may produce a tool to handle and manage *.BIG files similar to XCC Mixer or Final BIG but properly supporting C&C3. However, there is already OS Big Editor that can do this so I may not make my own tool.

 

Please write your own .big manager! Afaik, OS Big Editor was from the same author as the PPM, so I don't think we'll get updates, and the version we have isn't working well... ( some things like memory errors or so.. ). It can't even handle that much bimr-sets inside the big files, and it can't extract xmls. Now that we have the xsd files, we got all valid parameters for the xmls, don't we? We seriously need a big manager which can extract the original data, and I don't think we'll get official tools for that. :/

 

The version you are talking about is what that Karl Kenner did. Anyway, I'm working in a newer OS BIG Editor which is not based on his work. I decided to not use his work, because he adds some stupid racist liscense that doesn't make any sense in the internet. I had to stop developping it back in march due to my university, but since last month, I've been working hard on it again. The current beta version that you can get HERE (check the welcome.txt and use SVN Tortoise software to get it) doesn't support b.i.m.r. files yet, but it saves .BIG files with and without refpack compression, it displays the contents of .BIG files as windows explorer does and has multi language support and more.

 

 

K, if OSBE is developed by someone else, it's a good thing.

But someone said, that the files EA gave us aren't up to date, and I also do think that there are some other files which aren't in the zips from EA...

 

Yes, it's being developped by myself and I think I can finish it in few weeks, specially when I get a little more free time.

Share this post


Link to post
Share on other sites

IMO, functionality to read BMRI is not required (not as part of OS Big Editor anyway).

 

All OS Big Editor should be is a simple BIG tool to open big files and work with them.

Oh and I may still write a BIG editor/tool myself anyway since I have some ideas that wouldn't fit with the way OS Big Editor currently works.

 

Share this post


Link to post
Share on other sites

@Banshee: Looked at your OSBE and it's good to see you implemented a tree view. :)

 

IMO, functionality to read BMRI is not required (not as part of OS Big Editor anyway).

All OS Big Editor should be is a simple BIG tool to open big files and work with them.

 

Hmn.. but then, we need another tool to get the files from the bmri sets. :P

Edited by ThunderX86

Share this post


Link to post
Share on other sites

For the data in BMRI, the only data in there that we don't have is:

1.Textures (my programs handle those)

2.W3X files (my programs also handle those)

3.Stuff from the map specific BMRI streams

and 4.XML that matches up with 1.08

I don't know for sure but I expect EA will release the XML for 1.08 as soon as they can clean it up/prepare it for release/get it approved.

 

As for maps, I hope EA will release XML for that too but even if they don't, its not something we actually NEED.

 

What is there in the BMRI files from the game that you would want to extract and that isn't covered by the tools I have posted?

 

Share this post


Link to post
Share on other sites

Thanks! I like your tools jonwil, specially the adapted SciTe xml editor, cool tab browsing and easy on the eyes. I'd like to know of an XML/code editor that allowed me to collapse logical blocks of text and make cross searches in multiple open files or even in folders - even if it's a commercial one. Any hint?

 

Share this post


Link to post
Share on other sites

NotePad++

http://notepad-plus.sourceforge.net/

 

IMO, functionality to read BMRI is not required (not as part of OS Big Editor anyway).

 

All OS Big Editor should be is a simple BIG tool to open big files and work with them.

 

I'm considering the possibility of adding BMRI support for it or a possible usage of the Build Tool from it to build mods in SVN repositories.

Edited by Banshee

Share this post


Link to post
Share on other sites

I think SVN support might work great for my "project manager" actually.

Also, the XML editor I posted has a "find in files" option.

 

Share this post


Link to post
Share on other sites

I bit the bullet and bought a copy of UltraEdit for my modding work. I've gotten used to it at work, and like working with it.

Share this post


Link to post
Share on other sites
I think SVN support might work great for my "project manager" actually.

Also, the XML editor I posted has a "find in files" option.

 

NotePad++ also have it.

 

Anyway, my main motivation to work on OS BIG Editor is the SVN support, so I'll continue to work on it...

Share this post


Link to post
Share on other sites

sorry but when open some w3x models i decompiled, the viewer report error like this:

post-5662-1188745437_thumb.jpg

 

this happens when i decompiled GUAPC_SKl.w3x and GUAPC_SKN.w3x and try open them. however, the GUFireHwk_SKl.w3x and GUFireHwk_SKN.w3x are no problem :blink: :

w3x.rar

Share this post


Link to post
Share on other sites
NotePad++

For the record, I've found the perfect tool for my modding needs in Oxygen XML. It's a really wonderful nifty tool, with xml syntax validation, auto-completion, schema nested grid viewing, and it even remembers the blocks you've collapsed after you reload the file B) here goes a screenshot:

post-5438-1189695801_thumb.jpg

Edited by MaDDoX

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×