CNCMods.net forums
Home » Command & Conquer 3 » News Posts » UI editing tutorial
UI editing tutorial [message #390] Tue, 26 February 2008 05:16 Go to next message
jonwil  is currently offline jonwil  
Messages: 79
Registered: November 2007
Location: Australia
Member
owner of CNCMods.net

From: *wa.bigpond.net.au
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™
http://img218.imageshack.us/img218/6456/userbar541068io9.gif
http://img161.imageshack.us/img161/9982/userbar541070lo5.gif
http://img160.imageshack.us/img160/7033/userbar541074li6.gif
Re: UI editing tutorial [message #391 is a reply to message #390 ] Tue, 26 February 2008 05:21 Go to previous messageGo to next message
ThunderX86  is currently offline ThunderX86  
Messages: 23
Registered: November 2007
Location: Vienna
Junior Member
From: *utaonline.at
Quote:

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.


Why not remove items? I "deleted" some buttons of the Main Menu just by removing the placeobject tag. I didn't see any problems after that. oO


http://www.thundermods.net/images/dawuserbar.jpg
Re: UI editing tutorial [message #392 is a reply to message #391 ] Tue, 26 February 2008 05:24 Go to previous messageGo to next message
jonwil  is currently offline jonwil  
Messages: 79
Registered: November 2007
Location: Australia
Member
owner of CNCMods.net

From: *wa.bigpond.net.au
Ok, if it works for you, thats good.
Its just that I was having problems before when I removed those tags.


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™
http://img218.imageshack.us/img218/6456/userbar541068io9.gif
http://img161.imageshack.us/img161/9982/userbar541070lo5.gif
http://img160.imageshack.us/img160/7033/userbar541074li6.gif
Re: UI editing tutorial [message #393 is a reply to message #390 ] Tue, 26 February 2008 08:44 Go to previous messageGo to next message
ThunderX86  is currently offline ThunderX86  
Messages: 23
Registered: November 2007
Location: Vienna
Junior Member
From: *utaonline.at
Uh.. ok.. Surprised
But it's good to know that there is another way to "remove" items. Maybe there are some problems for me too, I don't know yet.


http://www.thundermods.net/images/dawuserbar.jpg
Re: UI editing tutorial [message #394 is a reply to message #390 ] Tue, 26 February 2008 13:24 Go to previous messageGo to next message
Mighty BOB!  is currently offline Mighty BOB!  
Messages: 80
Registered: November 2007
Location: California, USA
Member
From: *hsd1.ca.comcast.net
You should add this to the cncmods editing wiki. Wink


WOL nick: migtybob
"Wesforce"

We are living in post-common sense society.
Re: UI editing tutorial [message #401 is a reply to message #390 ] Thu, 28 February 2008 18:19 Go to previous messageGo to next message
ThunderX86  is currently offline ThunderX86  
Messages: 23
Registered: November 2007
Location: Vienna
Junior Member
From: *utaonline.at
Some quick Info:
You can remove some object by using <removeobject depth="" /> where depth is the depth number of the <placeobject /> tag to remove. The removeobject tag has to be in the same frame as the object to be removed.


http://www.thundermods.net/images/dawuserbar.jpg
Re: UI editing tutorial [message #409 is a reply to message #390 ] Wed, 05 March 2008 12:14 Go to previous messageGo to next message
Mighty BOB!  is currently offline Mighty BOB!  
Messages: 80
Registered: November 2007
Location: California, USA
Member
From: *hsd1.ca.comcast.net
This looks like a job for menu hacking?


WOL nick: migtybob
"Wesforce"

We are living in post-common sense society.
Re: UI editing tutorial [message #774 is a reply to message #390 ] Tue, 30 March 2010 23:30 Go to previous message
samirabaza  is currently offline samirabaza  
Messages: 2
Registered: March 2010
Junior Member
From: 41.234.238*
Building all streams because c:\ra3 mod sdk\mods\test1\data\aptui\fe_shared_mainmenulib\art\textures \apt_fe_shared_mainmenulib_4.tga has no stream hints
in Ra3 it donot use this texture from the main menu textures
plz help
Previous Topic:New version of my "SDK Extras" C&C3/RA3/C&C4 tools available
Next Topic:Discoveries on PathMusic
Goto Forum:
  


Current Time: Mon Sep 6 17:26:52 MST 2010

Total time taken to generate the page: 0.00785 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software