| UI editing tutorial [message #390] |
Tue, 26 February 2008 05:16  |
|
Things you will need (all are on my download page):
Mod SDK 5.0
C&C3 UI source files
SDK prerequisites
current version of SDK Extras (with apt2xml.exe and xml2apt.exe)
This tutorial assumes you have the following skills:
Use of the command prompt
Knowledge of XML
Ability to put UI files into a mod (look at what they did with the sample mod in the SDK to see how to do that)
This tutorial will show you how to edit the main menu, move the movie clip element to the top left corner of the screen. Editing other elements can be done in the same way (if you wish to know what to look for to edit a specific element of the UI, let me know and I will tell you which UI file to edit and what to look for/change)
1.Open the C&C3 UI source files and find the mainmenu folder.
2.Extract the mainmenu.apt and mainmenu.const files into a folder. Place the apt2xml.exe, xml2apt.exe and cc3tools.dll files from SDK Extras into the same folder.
3.Open a command prompt and change to the folder containing the files
4.Type apt2xml mainmenu
5.Open the mainmenu.xml that was created.
6.Search for <sprite id="300" >
7.Once you find that, look down at frame 9 of that sprite.
See the PlaceObject tag with a name of MovieLoop. That controls the placement of the movie clip. To move the object, change the tx and ty values. For the main menu and other full-screen UI elements, the screen is treated as being 1024x768 for UI purposes.
8.Once this is done and you have made the edits you want to make, go back to the command prompt and type xml2apt mainmenu.
9.Take the mainmenu.apt that was just generated along with the mainmenu.const and other files from the cnc3ui_files.zip file (including textures etc) and put it into your mod. Then build your mod and see the UI changes take effect.
Some notes:
Do not remove or add items, just edit them. The easiest way to make an object invisible is to set the rotation matrix for the object placement tag to 0,0,0,0 (i.e. rotm00,rotm01,rotm10,rotm11 all zero). Do not edit any of the ActionScript coding. To edit the hit shape for a button (i.e. the shape of the area that the game will recognize when you press the mouse on the button), edit the vertex and triangle tags for that button.
If you want to get inside the UI files to locate a specific item, here is how to do it:
1.Find the UI element you are interested in
2.Grab the .eaf file for that UI element
3.Drag that .eaf file on top of eaf2swf.exe from SDK Extras
4.Open the resulting SWF file with a program that can read SWF files (such as Sothink SWF Decompiler)
5.Look for the object or objects you want to edit.
6.Once you find the object you wish to edit, open up the XML file for your UI element and search for the XML tag with the matching ID. Then edit the appropriate settings.
If anyone has any questions about UI editing (and I dont mean big questions like "how do I make the buttons square"), post them here or talk to me on IM and I will do my best to answer them.
Yes I know the tutorial isn't that good but I suck at writing tutorials. If someone with the needed skills as well as knowledge of Flash wants to help me write a better one, post here or talk to me on IM.
[Updated on: Tue, 26 February 2008 05:21] Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Coder of BHS.DLL
Official member of Blackhand Studios™



|
|
|
|
|
|
|
|
| Re: UI editing tutorial [message #409 is a reply to message #390 ] |
Wed, 05 March 2008 12:14   |
|
This looks like a job for menu hacking?
WOL nick: migtybob
| "Wesforce" | We are living in post-common sense society.
|
|
|
|
|