![]() |
|
Mods Everything about mods |
|
Thread Tools | Display Modes |
#5
|
|||
|
|||
![]() Quote:
Quote:
I think the files you need to start with are: 1) ENG_UNITS.LNG (or your equivalent LNG files) and 2) TEMPLATES.LNG. At the top of ENG_UNITS.LNG, you'll see where the text descriptions of the abilities are (i.e. you'll see such labels as CPI_LEADERSHIP, CPI_ATTACK, etc. (note that I've capitalized them here so they standout, but they are lower case in my LNG file)). Then you'll see equals (=) and usually a template surrounded by the caret, i.e. ^int_cpi_t0^. Such templates are in TEMPLATES.LNG (search in there for that template) and essentially serve as keywords for a "macro" that can do many different things to display text such as change the color, display a text string, run an LUA function, etc. Now if you compare the unit cards between TL and WotN, you'll notice that Crit has been added and the unit's Current Health removed from the unit card. Now what you want to do is add more lines to the the unit card. For this, I think the files you need to edit are DLG_CHESSPIECE.UI and INFO_CHESSPIECE.UI. From your other posts, I can see that you've been modding the UI files pretty extensively and so I think you already know how to edit these files. As far as I can tell, DLG_... is used for outside of the arena and INFO_... is used inside the arena (i.e. when you are not and are fighting battles, respectively). For all the "begin simple text" statements, the text strings should be in the *.LNG files. For example, "cpi_initiative2" is in ENG_UNITS.LNG. You probably know a lot more about the UI files than I do, but there are other text strings (for example "text_15" or all the "text_##" strings for that matter) that I don't know where they are. Now if you want to add the resistances, you need to look at the [res] macro under the cpi_defense_h label (in ENG_UNITS.LNG) using the def_hint_t1 template with the res macro (these are located in TEMPLATES.LNG): gen=gen_unit_res. This refers to the gen_unit_res function located in TEXTGEN.LUA. What you probably want to do, since you want the resistances to be spelled out separately, is you're going to want to create variants of that function (i.e. gen_unit_res_physical, ..._astral, ..._fire, etc.) that simply list a value for one resistance type that display the resistance values (as well as the base values). You'll then want to add the lines to display new text lines to the UI files and you can add the new labels to either ENG_UNIT.LNG or your can make a new LNG file with your new labels. After that, you need to edit the picture of the dialogue to extend its space, but I think you already know how to do this. I think that is pretty much it - hopefully I've been clear and if not ask more questions! ![]() Quote:
TL TEXTGEN.LUA (lines 121-136): Code:
function gen_unit_res(data) local text="" local res_count=AU.rescount() for i=0,res_count-2 do local res = AU.resistance( data, i ) local t="" if res>95 then res=95 end if res> 0 then t="<label=cpi_defense_res_D>" end if res< 0 then t="<label=cpi_defense_res_U>" end text=text.."<br> -<label=cpi_defense_res_"..(i+1)..">: "..res.."% "..t end return text end Code:
function gen_unit_res(data) local text="" local res_count=AU.rescount() for i=0,res_count-2 do local res = AU.resistance( data, i ) if res>95 then res = 95 end local t="" if res> 0 then t="<label=cpi_defense_res_D>" end if res< 0 then t="<label=cpi_defense_res_U>" end text=text.."<br> -<label=cpi_defense_res_"..(i+1)..">: "..res.."% "..t end return text end Let me know if any of this works for you - if you're still having trouble, I'll try to see if I can get it to work, although my time is really limited right now. Good luck! ![]() /C\/C\ P.S. One thing I'd like to do is to be able to allow units other than Priests to be upgraded via the DLG_CHESSPIECE.UI. I'm not sure how to do this, but I thought it would be neat to allow Beholders to be upgraded to Evil Beholders, etc. when you get the Paladin Inquisition skill. It seems like there has to be a way to get it to work with units other than just Priests, but maybe this is a limitation... |
|
|