Jump to content

Q/A; custom IconImage(s) for RANKS labels.


Zyxpsilon

Recommended Posts

In step #23 (( http://imgur.com/a/rQ3aJ )), this guy claims any referenced custom Icons packaged in a UPK (located in our Mod\Content folders) can be directly invoqued by the correct instructions written in a properly configured XComClassData.INI file... *IF* the original instance had been pulled (and used as template for any given copies) from the usual default hosting archive UILibrary_Common as valid resources.

 

CLASSES worked as proven by my qUIck_CLR mod uploaded on Steam.

 

But what i'm now after is the RANKS (9 of them).

Including this "rank_fieldmarshall" TGA for the Avatar...

http://s18.postimg.org/bxlh1yhrp/rank_fieldmarshall.png

 

I've dug into various UC files and discovered this function from UIUtilities_image.UC ...

 

----------------------------------------------------

simulated static function string GetRankIcon(int iRank, name ClassName)
{
local string strImageName;

if (ClassName == 'PsiOperative')
{
switch (iRank)
{
case 0: strImageName = "rank_rookie"; break;
case 1: strImageName = "psirank_initiate"; break;
case 2: strImageName = "psirank_acolyte"; break;
case 3: strImageName = "psirank_adept"; break;
case 4: strImageName = "psirank_disciple"; break;
case 5: strImageName = "psirank_mystic"; break;
case 6: strImageName = "psirank_warlock"; break;
case 7: strImageName = "psirank_magus"; break;
case 8: strImageName = "rank_fieldmarshall"; break;
}
}
else
{
switch (iRank)
{
case 0: strImageName = "rank_rookie"; break;
case 1: strImageName = "rank_squaddie"; break;
case 2: strImageName = "rank_lieutenant"; break;
case 3: strImageName = "rank_sergeant"; break;
case 4: strImageName = "rank_captain"; break;
case 5: strImageName = "rank_major"; break;
case 6: strImageName = "rank_colonel"; break;
case 7: strImageName = "rank_commander"; break;
case 8: strImageName = "rank_fieldmarshall"; break;
}
}
return "img:///UILibrary_Common." $ strImageName;
}

------------------------------------

 

I think this is *IT*.

 

But, i'm not really sure how to proceed within the constraints of whatever code logic or assuming step #23 mentionned above would allow to actually refer correctly to my custom stuff and then replace the default versions.

I guess replacing that red string with this; "" qUIck_RCP_UILibrary. "" should work. Still, how would the XComClassData instructions be able to connect these new Icons??

 

End-of-my-rope... please help! :smile:

Edited by Zyxpsilon
Link to comment
Share on other sites

Oooookay... this is the current XComClassData.INI file;

 

------------------------------

;XComClassData.INI (custom for RCP)

[Rookie X2SoldierClassTemplate]
IconImage=img:///qUIck_RCP_UILibrary.class_rookie

[Ranger X2SoldierClassTemplate]
IconImage=img:///qUIck_RCP_UILibrary.class_ranger

[sharpshooter X2SoldierClassTemplate]
IconImage=img:///qUIck_RCP_UILibrary.class_sharpshooter

[Grenadier X2SoldierClassTemplate]
IconImage=img:///qUIck_RCP_UILibrary.class_grenadier

[specialist X2SoldierClassTemplate]
IconImage=img:///qUIck_RCP_UILibrary.class_specialist

[PsiOperative X2SoldierClassTemplate]
IconImage=img:///qUIck_RCP_UILibrary.class_psiop

----------------------------

 

If nothing else is needed -- how come none of my custom Rank Icons (same names) show up ingame?!

 

http://s16.postimg.org/eywgfkc11/XC2_Preview_RANKS.png

 

Wrongfully defined "Texture2d" properties, or what? Weird stuff, AFAIC.

 

PS; These textures are just streamed as (A8R8G8B8) instead of the TC_Linear default compressions (loaded in_by UI group) that can have various DXT1-5 settings which AFAIC ruin any images quality (bigger sized.. but should be compatible). BUT that didn't stop Classes from appearing. Still no luck with Ranks.

Edited by Zyxpsilon
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...