|
|
|
|
# 1
|
|
Ouroboros-in-training
Join Date: Jul 2006
|
Tooltips and UCS Editing
Rating: Rookie Friendly,but try at least some modding first.
Note: this tutorial is for Relic Mod Tools or hand LUA editing. So you're modding stuff into your game and now you've come across a question: where on earth do I put the tooltips? Why are they coming up wrong or coming completely empty? Okay. You need to get yourself UCS editing at this point. The UCS file. The UCS file is a large simple text file that has sequential numbers down the side with lines of text after each one. Go and look at the Relic DC one using notepad or another text editor - you'll find it in Dawn of War - Dark Crusade/DXP2/Locale/*yourlanguage*. Each lua/rgd file that has tooltips associated with it (these will be almost everything) will have a few numbers in the file that relate to the numbers down the side of the UCS file. The reason for this is so that each lua file will be the same, regardless of what language the gamer is playing in. All that needs to happen for a different langauge to appear is for the a different, fully translated, UCS file to be used which is set when you pick which language you want for the game during the installation. ["ui_ext"]["ui_info"] Code:
So this is the section of an lua that you need to be interested in. This is the section for a Tactical Marine EBPS (note most LUAs use the same/similar ui_ext, but SBPS use a different one). As you might be able to work out, there's four lines of help text, a link to an icon (not relevant to this tutorial) and then the name of the entity at the bottom. The screen_name_id is the main, large text name of a thing and the most important line to get right. Code:
This is the relevant section in the UCS file that it refers to. As you can see, it skips out line 97141. That's fine. The lines you choose to link to a file don't have to be consequetive in any way and many lines are used by more than one unit. Also, the amount of help text is up to you. You can have four lines, none or I think seven is the most I've seen. Your limit is basically the size of the box on the screen. Setting up a new UCS file Do NOT edit the DXP2 UCS file. You must set up your own UCS file. Set up the folder tree in you Mod folder to mirror that of the one in DXP2. Now, copy the UCS file over to the same place in your Mod Folder. Rename it to the same name as you mod folder. Open up this new copy and delete all the contents. You must copy the file in this way because it is slightly different from a text file; you cannot make your own then simply change the extension to .ucs. Your new UCS is now ready to be used. First you'll need to do some numbering down the side in number order. Relic has set aside the numbers 15000000 to 20000000 for modding. You can start anywhere within that range and you can put as few or as many numbers as you want in. Put one space or TAB after each number then type in the text that you want. Feel free to leave little headings and notes to yourself in there because that text will only appear in game if you link it to a file. Linking the text to a file Here's the odd bit: although you can see the ui_ext number in the Relic Attribute Editor, you cannot edit them there. No idea why, you just can't. What you have to do is close the AE, find the relevant LUA, edit the numbers by hand, reload the AE and then Save to Binary. For this reason it's better to do the UCS editing in big chunks, do a lot of files at a time then re-load and save them. You may find that the file you want doesn't have ui_ext in its LUA. Simple: copy and paste the bits from it that you need from a file of the same type and then edit them in the new file. Be sure to put them in the right order; they are in alphabetical order (not the tooltips in the UCS, the lines in the LUA file). Feel free to omit any ilne that you don't need like the icon line, but be careful to override any tooltips that the file will inherit. You'll understand more about this when you have more experience with inheritance. If you put "$0" then you'll get nothing. The same will happen if you reference an empty text line, but the lines of text will move up to fill the gap. Sometimes it's useful to give each file a screen_name and then setup four or five lines of text for it in the ui_ext. These lines will probably be empty in the UCS at first, but when you edit the UCS at a later date, adding tips etc when you're nearing completetion, then you can simply type the text into the UCS file and you will have already had links setup to it, so it will appear in game with no hassle! Tip: if your tooltips get screwed up the first thing to check is your numbering down the side: if you've accidentally put the same number twice it will reject the whole file. Missing out numbers in the sequence is fine, but not doubles. Good luck. Last edited by Octopus Rex : 26th Aug 07 at 1:47 PM. Reason: Spelling Errors & Tip |
|
|
|
|
# 2
|
|
Retired modder
Join Date: Dec 2004
Location: Nougat land
|
Just to add a couple of tips :
- UCS range : sure, you can use the line numbers you want, but if you want your mod to be played in combination with other mods, you must chose a ucs range that is chosen by no one else. You can check the already reserved ranges here : http://forums.relicnews.com/showthread.php?t=111234 - be warned that there are ucs lines which describe a unit both in the squad bps and in the entity bps. You need to have both, usually. - don't ever edit the ucs with word, wordpad or such. They change the header. Use notepad, that'll be OK. |
|
|
|
|
# 3
|
|
Christmas Commissar
Join Date: Aug 2004
Location: UK
|
Also note that SCAR UCS range usage for cutscenes has to be every even numbered line, as detailed here; http://www.relic.com/rdn/wiki/DOWUCS (which also includes other technical details on the UCS file itself).
|
|
|
|
|
# 6
|
||
|
The 19th Hyperspace Core
Join Date: Sep 2004
Location: Oxford
|
Quote:
Quote:
<3 ability to read ;P |
||
|
|
|
# 8 |
|
Member
Join Date: Jun 2006
|
OK heres what ive done.
1) Made my new unit 2) Copied the DXP2 tooltip file over to my mods folder 3) Deleted all it's content 4) Opened it and added 15000000-15000006 (i think,anyway the numbers done matter) 5) Typed lines of text for each number 6) Went into the AE and loaded mod 7) Added numbers to units Screen_Id and some other field i cant remember 8) Tested it and game crashed, What did i do wrong? |
|
|
|
|
# 10
|
|||
|
Ouroboros-in-training
Join Date: Jul 2006
|
Quote:
Quote:
Also, compiler is absolutely right messing up the UCS will not crash your game. You must have changed something else in between. Lastly not sure whether you did this bit from the UCS file: Quote:
|
|||
|
|
|
|
# 11
|
|
I love lamp
Join Date: Oct 2004
|
Puzzling. I've created UCS before for win conditions, but when I try to add a unit name I'm getting the 'No range' message. Number is in the UCS file, even tried copying, appending and renaming the DXP2.ucs to ensure fidelity.
eep? |
|
|
|
|
# 12
|
|
Ouroboros-in-training
Join Date: Jul 2006
|
Do you mean adding a unit name to an already working UCS that names a win condition correctly? Or do you mean a separate file? Make sure you're editing OUTSIDE of the AE, then loading up and saving to binary (sounds like you've saved to binary alright as you're getting errors, just wondering if the editing has been done right). Is the UCS for the win condition still working while the unit name doesn't? or is the whole file borked?
|
|
|
|
|
# 19 |
|
Banned
Join Date: Feb 2008
|
@bullet six
In corsix, you can edit them for the screen_name_id: Code:
for the help_text_list Code:
for the icon_name Code:
@all in corsix, there is a tool that allows you to open the .ucs file after copied..lot simplier, and it has button tht adds the new entry for you after u typed number in simpler personally |
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|