SpazmoJones Posted April 15, 2015 Author Share Posted April 15, 2015 Ok, I'm making some progress with this. I would like to avoid changing the size of the swf file if possible. Instead of changing the Push "text" to Push "htmlText" (which increases the size of the file by 8 bytes), would it work if I found a reference to "htmlText" in another function in this file and used that "pointer" value instead? Link to comment Share on other sites More sharing options...
SpazmoJones Posted April 15, 2015 Author Share Posted April 15, 2015 Hey you can ignore that last question. I understand how the string references work now. I added my own "htmlText" string reference to the constant portion at the beginning. To keep things the same size I reduced the size of one of the strings used in a trace command. It's working great so far. I hope to have my new mod out soon. Thanks so much for your help!!! Link to comment Share on other sites More sharing options...
SpazmoJones Posted April 15, 2015 Author Share Posted April 15, 2015 Finished it! Thanks for the help!It's here: http://www.nexusmods.com/xcom/mods/548/? Link to comment Share on other sites More sharing options...
Zyxpsilon Posted April 15, 2015 Share Posted April 15, 2015 (edited) OH! That's what this was all about. :wink:Extremely cool new stuff for my gameplay UI... but, may i suggest another "method" or alternate principle for it? Ideally this feature would be most useful somewhere on each individual Trooper screens when we actually think about the roster extent and then, proceed to click on his/her assignment SPEC Icons-Trios as final decisions. :D May i also suggest of a way to compress that entire row without losing some clear details? SN: SC: RK: GN: MD: EG: AS: IN: -- or whatever else suits you best, as rather simplistic abbreviations only! This might even mean, the sizing of anything on that key HUD line could grow a bit larger if need be while keeping the default proportion of the XX/YY total field as it once was. ( PS... current totals of SHIVs, PFCs -- possible? ) The custom colors i can take care of straight from your sturdy PatcherGUI code, it's certainly a nice provisional touch from you. Excellent QOL idea and solid code results, as usual buddy. Edited April 15, 2015 by Zyxpsilon Link to comment Share on other sites More sharing options...
SpazmoJones Posted April 15, 2015 Author Share Posted April 15, 2015 OH! That's what this was all about. :wink:Extremely cool new stuff for my gameplay UI... but, may i suggest another "method" or alternate principle for it? Ideally this feature would be most useful somewhere on each individual Trooper screens when we actually think about the roster extent and then, proceed to click on his/her assignment SPEC Icons-Trios as final decisions. :D May i also suggest of a way to compress that entire row without losing some clear details? SN: SC: RK: GN: MD: EG: AS: IN: -- or whatever else suits you best, as rather simplistic abbreviations only! This might even mean, the sizing of anything on that key HUD line could grow a bit larger if need be while keeping the default proportion of the XX/YY total field as it once was. ( PS... current totals of SHIVs, PFCs -- possible? ) The custom colors i can take care of straight from your sturdy PatcherGUI code, it's certainly a nice provisional touch from you. Excellent QOL idea and solid code results, as usual buddy. Thanks mate. I'm using localised strings at the moment, thus the rather long names. I'm thinking of changing it so that each class works like the total xx/yy value so that you can see how many of a certain class are ready for action out of the total. If I do that I'll have to abbreviate, or maybe go on 2 lines or something. It's a bit tricky as there are very few local variables available in that function. Link to comment Share on other sites More sharing options...
XMarksTheSpot Posted April 15, 2015 Share Posted April 15, 2015 How about using images in place of the class names? You can use HTML <img> tags for that purpose, like so: <img src='img:///LongWar.ClassIcons.sniper' height='16' width='16'> Here's the list of available class icon path strings used in Long War: LongWar.ClassIcons.super_sniper LongWar.ClassIcons.super_heavy LongWar.ClassIcons.super_support LongWar.ClassIcons.super_assault LongWar.ClassIcons.mech LongWar.ClassIcons.sniper LongWar.ClassIcons.rocketeer LongWar.ClassIcons.support LongWar.ClassIcons.assault LongWar.ClassIcons.scout LongWar.ClassIcons.heavy LongWar.ClassIcons.engineer LongWar.ClassIcons.infantry LongWar.ClassIcons.sniper_psi LongWar.ClassIcons.rocketeer_psi LongWar.ClassIcons.support_psi LongWar.ClassIcons.assault_psi LongWar.ClassIcons.scout_psi LongWar.ClassIcons.heavy_psi LongWar.ClassIcons.engineer_psi LongWar.ClassIcons.infantry_psi LongWar.ClassIcons.sniper_gene LongWar.ClassIcons.rocketeer_gene LongWar.ClassIcons.support_gene LongWar.ClassIcons.assault_gene LongWar.ClassIcons.scout_gene LongWar.ClassIcons.heavy_gene LongWar.ClassIcons.engineer_gene LongWar.ClassIcons.infantry_gene LongWar.ClassIcons.sniper_psi_gene LongWar.ClassIcons.rocketeer_psi_gene LongWar.ClassIcons.support_psi_gene LongWar.ClassIcons.assault_psi_gene LongWar.ClassIcons.scout_psi_gene LongWar.ClassIcons.heavy_psi_gene LongWar.ClassIcons.engineer_psi_gene LongWar.ClassIcons.infantry_psi_gene LongWar.ClassIcons.sniper_psi_gene LongWar.ClassIcons.rocketeer_psi_gene LongWar.ClassIcons.support_psi_gene LongWar.ClassIcons.assault_psi_gene LongWar.ClassIcons.scout_psi_gene LongWar.ClassIcons.heavy_psi_gene LongWar.ClassIcons.engineer_psi_gene LongWar.ClassIcons.infantry_psi_gene This is for example how we got the little interceptor/firestorm icons into the hangar ship list menu. You can also provide images of your own if you put them in a new UPK file and edit a few INI files to make it load in the appropriate places (like the strategy game). Link to comment Share on other sites More sharing options...
SpazmoJones Posted April 15, 2015 Author Share Posted April 15, 2015 How about using images in place of the class names? You can use HTML <img> tags for that purpose, like so: <img src='img:///LongWar.ClassIcons.sniper' height='16' width='16'> Here's the list of available class icon path strings used in Long War: LongWar.ClassIcons.super_sniper LongWar.ClassIcons.super_heavy LongWar.ClassIcons.super_support LongWar.ClassIcons.super_assault LongWar.ClassIcons.mech LongWar.ClassIcons.sniper LongWar.ClassIcons.rocketeer LongWar.ClassIcons.support LongWar.ClassIcons.assault LongWar.ClassIcons.scout LongWar.ClassIcons.heavy LongWar.ClassIcons.engineer LongWar.ClassIcons.infantry LongWar.ClassIcons.sniper_psi LongWar.ClassIcons.rocketeer_psi LongWar.ClassIcons.support_psi LongWar.ClassIcons.assault_psi LongWar.ClassIcons.scout_psi LongWar.ClassIcons.heavy_psi LongWar.ClassIcons.engineer_psi LongWar.ClassIcons.infantry_psi LongWar.ClassIcons.sniper_gene LongWar.ClassIcons.rocketeer_gene LongWar.ClassIcons.support_gene LongWar.ClassIcons.assault_gene LongWar.ClassIcons.scout_gene LongWar.ClassIcons.heavy_gene LongWar.ClassIcons.engineer_gene LongWar.ClassIcons.infantry_gene LongWar.ClassIcons.sniper_psi_gene LongWar.ClassIcons.rocketeer_psi_gene LongWar.ClassIcons.support_psi_gene LongWar.ClassIcons.assault_psi_gene LongWar.ClassIcons.scout_psi_gene LongWar.ClassIcons.heavy_psi_gene LongWar.ClassIcons.engineer_psi_gene LongWar.ClassIcons.infantry_psi_gene LongWar.ClassIcons.sniper_psi_gene LongWar.ClassIcons.rocketeer_psi_gene LongWar.ClassIcons.support_psi_gene LongWar.ClassIcons.assault_psi_gene LongWar.ClassIcons.scout_psi_gene LongWar.ClassIcons.heavy_psi_gene LongWar.ClassIcons.engineer_psi_gene LongWar.ClassIcons.infantry_psi_gene This is for example how we got the little interceptor/firestorm icons into the hangar ship list menu. You can also provide images of your own if you put them in a new UPK file and edit a few INI files to make it load in the appropriate places (like the strategy game). That's awesome! I don't suppose there's a way to color those icons? Link to comment Share on other sites More sharing options...
XMarksTheSpot Posted April 15, 2015 Share Posted April 15, 2015 That's awesome! I don't suppose there's a way to color those icons?I don't think it's possible using HTML as Flash's support for that is rather limited. You could apply some dynamic tinting via ActionScript, but using the current setup you'd tint the text field as a whole, not individual sections of it. A more involved approach would be to do what I did for the soldier stats in the barracks list, i.e. to basically create a bunch of separate icon sprite-and-text field pairs and place them at the top of the screen. This is quite a bit more work than injecting a bit of HTML markup into an existing text field, mind you ;) A more straightforward option would be to simply create your own images and put them in a separate UPK, like I mentioned earlier. Technically you could place them in LongWar.upk if you wanted, but re-distribution of that file would be a concern :) Link to comment Share on other sites More sharing options...
SpazmoJones Posted April 15, 2015 Author Share Posted April 15, 2015 Hey I've updated it again to use the class icons. Having coloured icons would be nice but it seems like a lot of work. :) Link to comment Share on other sites More sharing options...
Zyxpsilon Posted April 15, 2015 Share Posted April 15, 2015 (edited) Well, for custom Icons Coloring there's always the indirect TexMod solution but that would alter ALL instances of Rank Icons even from the list, cards and tactical bottom-left corners, etc. :wink: Generally, i feel the new version is better. See below for a sample of what the ReCLR mod does to the icons and how it translates for your Summary-Line... http://s10.postimg.org/64i5tp0m1/Spazmo_Roster_Summary_Line.png Kinda cool! :D PS; Found a typo in your code. The Medic font-color field begins with two (#) instead of one. I've corrected it on my version but i dunno if that would affect the other D/L'able files that everyone pulls off the Nexus. PS2; I wonder if that line should (or will) auto-relocate when the basic screen ratio changes. As you know, it can get much wider (promotion tags, augmentation notes, Psi training tags, etc) or even narrowly "cut" the far right side maximum (No medals, early month roster, etc) down by quite a margin. Edited April 15, 2015 by Zyxpsilon Link to comment Share on other sites More sharing options...
Recommended Posts