RelicNews Forums

Go Back   RelicNews Forums > RDN - Relic Game Mods > Dawn of War - Adeptus Modificatus > DoW Modding Tutorials and How-Tos
User Name
Password
Register FAQ Members List Arcade Mark Forums Read



Reply
 
Thread Tools
Old 10th Jun 07, 5:46 AM Forum Rules   # 1
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
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:
GameData["ui_ext"]["ui_info"]["help_text_list"]["text_01"] = "$97142" GameData["ui_ext"]["ui_info"]["help_text_list"]["text_02"] = "$97143" GameData["ui_ext"]["ui_info"]["help_text_list"]["text_03"] = "$97144" GameData["ui_ext"]["ui_info"]["help_text_list"]["text_04"] = "$97145" GameData["ui_ext"]["ui_info"]["icon_name"] = "space_marine_icons/tacticalmarine_icon" GameData["ui_ext"]["ui_info"]["screen_name_id"] = "$97140"


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:
97140 Space Marine Squad 97141 97142 - Heavy Infantry. 97143 - Resilient general combat unit strong at range and close combat. 97144 - Broad range of weapon upgrades. Can be upgraded to be strong against most unit types. 97145 - Effective against Infantry.


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.
__________________
"Life is not full of successes, it is full of failures from which we learn" - Tony Benn
Octopus Blog (14.02.10)DOW2 2.2.2 GridKeys
DOW1 Modding Tutorial ListDOW2 Tactical Primer

Last edited by Octopus Rex : 26th Aug 07 at 1:47 PM. Reason: Spelling Errors & Tip
Octopus Rex is offline  
Old 10th Jun 07, 7:06 AM Forum Rules   # 2
compiler
Retired modder
 
compiler's Avatar
 
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.
__________________

compiler is offline  
Old 10th Jun 07, 10:08 AM Forum Rules   # 3
Finaldeath
Christmas Commissar
 
Finaldeath's Avatar
 
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).
__________________
Finaldeath

Current DOW information on modding + FAQ - A good read for new and old modders alike!
RDN Wiki Temp Location - Help, tutorials, Mod Tools info.
Finaldeath is offline  
Old 20th Aug 07, 12:57 AM Forum Rules   # 4
fuggles
I love lamp
 
fuggles's Avatar
 
Join Date: Oct 2004

This thread is just the ticket! Don't know how I didn't see it first time around :/
fuggles is offline  
Old 19th Oct 07, 8:00 AM   # 5
DeusImperator
Member
 
DeusImperator's Avatar
 
Join Date: Dec 2006

What is the advantage of UCS instead of just writing the tooltip down as a "text" reference that you type in?
DeusImperator is offline  
Old 19th Oct 07, 8:04 AM Forum Rules   # 6
Corsix
The 19th Hyperspace Core
 
Corsix's Avatar
 
Join Date: Sep 2004
Location: Oxford

Quote:
Originally Posted by DeusImperator
What is the advantage of UCS instead of just writing the tooltip down as a "text" reference that you type in?

Quote:
Originally Posted by Octopus Rex
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.

<3 ability to read ;P
__________________
irc.reliccommunity.com #modding
www.corsix.org | mod studio | theme hospital
Corsix is offline Send a message via MSN to Corsix  
Old 23rd Oct 07, 10:01 AM   # 7
DeusImperator
Member
 
DeusImperator's Avatar
 
Join Date: Dec 2006

Okey thanks.
DeusImperator is offline  
Old 10th Nov 07, 10:12 PM   # 8
Minion_Master
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?
__________________
Looking for a mod team? Youre in luck. Check out our website if you are interested.
Minion_Master is offline  
Old 11th Nov 07, 2:57 AM Forum Rules   # 9
compiler
Retired modder
 
compiler's Avatar
 
Join Date: Dec 2004
Location: Nougat land

The ucs doesn't crash the game. At worst, you get plenty of "no range" lines where there should be text.
compiler is offline  
Old 11th Nov 07, 3:19 AM Forum Rules   # 10
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

Quote:
Originally Posted by Minion_master
6) Went into the AE and loaded mod
7) Added numbers to units Screen_Id and some other field i cant remember
At what point does the tutorial tell you to do this? The tutorial specifically states NOT to do this.
Quote:
Originally Posted by the tutorial
although you can see the ui_ext number in the Relic Attribute Editor, you cannot edit them there


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:
Originally Posted by the tutorial
Rename it to the same name as you mod folder
Octopus Rex is offline  
Old 13th Feb 08, 2:30 AM Forum Rules   # 11
fuggles
I love lamp
 
fuggles's Avatar
 
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?
__________________
My SCAR proves my worth!

fuggles is offline  
Old 13th Feb 08, 2:47 AM Forum Rules   # 12
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
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?
Octopus Rex is offline  
Old 13th Feb 08, 3:52 AM Forum Rules   # 13
fuggles
I love lamp
 
fuggles's Avatar
 
Join Date: Oct 2004

Nailed it. For some reason I had managed to copy "$1784998 No Range" into the box. Don't know how....but have put it behind me now. Thanks!
fuggles is offline  
Old 13th Feb 08, 3:56 AM Forum Rules   # 14
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

Ha ha ha!
Octopus Rex is offline  
Old 27th Mar 08, 6:31 AM   # 15
BulletSix
Member
 
Join Date: Mar 2008

noobie-question:
can you edit the "ui_ext" entry via corsix tool in the RGDs?
BulletSix is offline  
Old 27th Mar 08, 6:33 AM Forum Rules   # 16
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

Don't know, I don't use Corsix. Just try it and see what happens, usually it's much quicker than waiting for a response on forums. (He says, answering the post in almost the same minute!)
Octopus Rex is offline  
Old 27th Mar 08, 7:05 AM   # 17
BulletSix
Member
 
Join Date: Mar 2008

jep you´re right, trying out is normally quicker
but ím stuck at work for a few hours more and i thought maybe someone knew
BulletSix is offline  
Old 27th Mar 08, 7:12 AM Forum Rules   # 18
Octopus Rex
Ouroboros-in-training
 
Octopus Rex's Avatar
 
Join Date: Jul 2006

Ha ha, the old daydreaming-at-work-about-what-modding-you'll-do-when-you-get-home scenario! I like your style! I'm doing the same!
Octopus Rex is offline  
Old 13th Jun 08, 1:59 PM   # 19
PanzerVII
Banned
 
PanzerVII's Avatar
 
Join Date: Feb 2008

@bullet six

In corsix, you can edit them

for the screen_name_id:
Code:
open your rgd research file ui_info screen_name_id value=put number in i.e. $97140

for the help_text_list
Code:
open your rgd research file ui_info help_text_list text_01...=where u put the number in i.e.$97142


for the icon_name
Code:
open your rgd research file ui_info icon_name value=put name in i.e. space_marine_icons/tacticalmarine_icon


@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
PanzerVII is offline  
Reply



Go Back   RelicNews Forums > RDN - Relic Game Mods > Dawn of War - Adeptus Modificatus > DoW Modding Tutorials and How-Tos
User Name
Password
Register FAQ Members List Arcade Mark Forums Read



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




All times are GMT -7. The time now is 8:47 PM.

Page generated in 0.43173003 seconds (88.72% PHP - 11.28% MySQL) with 9 queries

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.