Quote:
Originally Posted by jukeey
Thank you very much for detailed advices.
Info_chesspiece.ui opening only on main window as infobox, when right click on unit in hero army.
All other cases the dlg_chesspiece.ui opening when click on unit, as dialog form.
Ui files easy editable, i wrote a program which can read this files, and show me visually with names and coordinates, no problem (i adjusted some ui files and png interface-textures for better appearance).
|
Wow - you wouldn't have this available for other people to use would you?
I've actually been updating my HOMM3 Babies (H3B) mod to extend the spirit upgrade UI and have been doing it by hand. I've been making some changes and I was running out of room and so decided to start fiddling with the interface - your mod that did this helped me out, although when I replied to you at first I didn't realize you were the one who created this mod.
Quote:
Originally Posted by jukeey
But resistances:
I think, the first "gen_unit_res" function maybe a trash, only the second works.
Your advices was my first idea, Tried and failed. Maybe i did something wrong; but i think, its simply dont work.
|
Was it giving you an error with the AU library? It seems like you should be able to display whatever you want on these info cards, although maybe the limitation is that you have to use CPI parameters. Hmmm...
Quote:
Originally Posted by jukeey
My second idea: creating 6 global variables, and including to loop in "gen_unit_res" this:
if i==0 then fiz=res end
if i==1 then mer=res end
if i==2 then mag=res end
if i==3 then tuz=res end
if i==4 then fag=res end
if i==5 then ast=res end
function gen_unit_res(data)
local text=""
local res_count=AU.rescount()
for i=0,res_count-1 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
if i==0 then fiz=res end
if i==1 then mer=res end
if i==2 then mag=res end
if i==3 then tuz=res end
if i==4 then fag=res end
if i==5 then ast=res end
text=text.."<br> -<label=cpi_defense_res_"..(i+1)..">: "..res.."% "..t
end
if Game.LocIsArena() then
if Attack.act_feature(data, "humanoid") then
local count = Attack.val_restore(data,"contrstrike")
if count~=nil and count~="" then
text = text.."<br><br>Îňâĺňíűő ŕňŕę îńňŕëîńü: "..count
end
end
end
return text
end
This is work, new variables got the correct resistance values, when function execute, but problems:
This function execute when hint appear (onmouseover event on gui_object_name "defense" on chesspiece dialog).
So not enough to open the dialog, must move the cursor over "defense" text.
I can adjust this invisible object over cursor, or fullscreen 
Variables got the values, but new texts not refreshed actually, only when opening next time the dialog...
Events and other essential things seems absolutely unavailable. Its serious?
|
Hmmm... I wonder if this is once again because of the CPI values. I think I'll experiment with this and see if I can provide any new insight into the problem. Maybe if we put our heads together we can figure it out...
I know that a lot of stuff in TL is hard coded, but when they went to AP and beyond they opened stuff up.
Case in point, I'm still working on my H3B mod for TL and have made a change to the Ice Thorns ability where not only do they block passage, but they also hit and damage units if they are within the fall radius (the hexes surrouding the triad of 3, i.e. if the unit wasn't there a thorn would be created in that hex).
I've been able to get everything working except having the damage hint show up correctly. It seems like to get it to calculate the cells properly, you have to use Attack.multiselect(3), but when you do that, if you turn on hints, the units have to be within the multiselect triad to have damage displayed even though the calccells function selects the cells surrounding that triad.
So it is silly - the highlighted hexes will be the ones where the thorns go and are around the triad, but I have to place the triad on top of units (where the thorns don't go) to get it to display the damage hint, which is not correct.
I haven't given up, yet, but I know what you mean when it comes to dealing with limitations of the game engine / system. If you look at Fishes and Rage Drain, though, these abilities don't show the damage either and so I think that it is most likely a limitation of TL or it was too convoluted to implement so I might give up soon and have it not display the hint just like Fishes and Rage Drain (although if I figure out how to do it for Ice Thorns, then maybe I can try to do it for these two as well).
/C\/C\