Zyxpsilon Posted September 4, 2014 Author Share Posted September 4, 2014 (edited) What the heck... might as well share final phase result(S) i currently stand with for each OTS Officers; http://s24.postimg.org/kfe6ivfth/Preview_Officers_LT_CPT_MAJ_COL_FC.png All of 'hem -- DONE :cool: , (to be) promoted and will Lead by Examples!I'll be sending the files through the usual pipeline to you ((JL)), soon. :D Edited September 5, 2014 by Zyxpsilon Link to comment Share on other sites More sharing options...
Zyxpsilon Posted September 5, 2014 Author Share Posted September 5, 2014 (edited) At the rate my current game is going, it will probably take WEEKS before i can field a Commanding Officer and thus won't find (soon!) the exact Icons for their Promotions. Just had my first Major, yeah. :wink:I know from the Wiki that they are; So Others May Live & Combined Arms and that they might be using Honor_A and Honor_B medals. Most importantly... which is LEFT and the other, to the RIGHT during the promo screen selection phase?? I've tried watching some YouTube videos to catch the process in the act (That's how i found the Colonel facts this evening from an epic serie by Marbozir, btw)... but, i believe in Luck or patience but NOT that much. Soooo please, someone help me with that specific info. PS; The above request might not be needed upon "files confirmation status" -- soon?! Edited September 5, 2014 by Zyxpsilon Link to comment Share on other sites More sharing options...
Zyxpsilon Posted September 5, 2014 Author Share Posted September 5, 2014 (edited) That's the theory anyway, and that's why I'd recommend you perhaps make the rank differences more prominent on the SGT (last three), Major and Field Commander icons. The size on the other icons is perfectly readable, even at a glance. :smile: Alright... this is what i ended up with for Sergeants;What do you think? Specially with these new "proportions". **Obsolete, refer to previous updated set! :) Edited September 18, 2014 by Zyxpsilon Link to comment Share on other sites More sharing options...
Zyxpsilon Posted September 6, 2014 Author Share Posted September 6, 2014 (edited) Want to work on properly "colored" meshing for LW texture projects?You have warping and perspective rendering tools?Heck - you might even have a library of 3D models willing and able to receive whatever creative urges and genial ideas? Fear not that's the ONLY reference file you'll ever need;http://s24.postimg.org/5wu3p8ul1/Cyan_Meshing_Sample.png Sample. Layered with appropriate transparency in the Zip below. :smile: EDIT; And -- here's another picked up from a UPK file; a seemless version of AugmentSoldier_I21.DDS (128x128) to which i applied the general Firaxis-Cyan (RGB=102,232,236).http://s30.postimg.org/4ad0u9nql/Augment_Soldier_I21_Cyan.png Just Click/SaveAs_PNG directly from the browser and you should have a proper file with transparency. Edited September 9, 2014 by Zyxpsilon Link to comment Share on other sites More sharing options...
Zyxpsilon Posted September 11, 2014 Author Share Posted September 11, 2014 XMarksTheSpot, You're probably already aware of this "processing" function that i'd like to somehow customize to my needs. -- When we return from missions, Troopers get promoted. While the debrief screen is active, their rank Icons are being surrounded by a Yellow glower gimmick that mimics the overlayed rank shapes. -- At first, i reasoned the "Promos" textures for each could be replaced (via Texmod) by a single generic symbol (Flash!) such as this for example;http://s29.postimg.org/aozbn47o3/Promo_Flash.pngCurrently, only blackened as sample... but eventually if possible, with specific re-coloring shades for individual ranks. -- Tried it, no luck... i suspect the SWF routine takes this UI feature over by inserting its own resources. In your opinion, is there any easy (or rational) way to mod whatever files to perform the above custom process? Link to comment Share on other sites More sharing options...
XMarksTheSpot Posted September 11, 2014 Share Posted September 11, 2014 -- When we return from missions, Troopers get promoted. While the debrief screen is active, their rank Icons are being surrounded by a Yellow glower gimmick that mimics the overlayed rank shapes.This effect is achieved by overlaying the rank icon on top of another rank icon which has been scaled to 120% and which has a color transform that turns it completely yellow. Basically like this: http://i.imgur.com/VfshN9G.png As you can see this faux stroke effect works reasonably well for circular shapes, but less so for more complex concave shapes. In any case, since the outline is based on the actual rank image it would work automagically if you were to swap out the rank textures. Replacing the effect with a static promotion image onto which the rank sprite is layered is technically possible, that is, I believe you could embed a raster image directly into the Debrief GFX file and use that as a bitmap fill for a new shape that would be used in place of the tinted rank sprite. However, this procedure is not really straightforward and making it easily installable as a user mod is similarly tricky, I assume. Link to comment Share on other sites More sharing options...
Zyxpsilon Posted September 11, 2014 Author Share Posted September 11, 2014 (edited) Oh - okay (somehow!). The reasoning behind this Firaxis code acrobatic completely baffles me. Ideally, a swift dispatch by Texmod could have been a much simpler method but if i understood you correctly, the necessary "Debrief GFX file" is embedded into the process while the 120% re-sizing and Yellowing of all these elements is auto-performed by some UI functions (also driven by SWF dispatch). The trick then would be to re-allocate new assets for each (as Texmod post-injection pulls such new textures via hashtags referencing) so that the engine would be fooled to grab instead of such secondary regular (as in, defaults) rank sprites. Right?? Strangely when i scanned for additional "layers", Texmod Log-Mode displayed a doubled-green-box that seemed to stack a yellow'ing component (exactly as you described it), but the actual sprite/or/texture isn't easily assumed as being the correct loaded (in memory terms) asset. I think the only way to make sure is through extensive trial&error detection attempts. 7 (excluding the Rookie) different Times!Promos are rare events and only happen upon mission returns.See how tough? Worthy of my exploration time nevertheless. Am i making any sense to you? PS; If i never had a good enough reason to use the Dev-Console, now it looks like a much easier way to perform such inspection tasks. :wink: Edited September 11, 2014 by Zyxpsilon Link to comment Share on other sites More sharing options...
XMarksTheSpot Posted September 11, 2014 Share Posted September 11, 2014 Am i making any sense to you?You have a really convoluted manner of speaking, I have a hard time understanding what exactly it is you are asking (plus you're often using technical terms not quite correctly). The reasoning behind this Firaxis code acrobatic completely baffles me.The game, or rather the engine, uses Scaleform middleware for user interfaces, which are basically Flash files, nothing baffling about that. It's simply easier and more efficient to stack the same image on top of another with a color transformation instead of having to paint a separate set of outline textures for such a minor UI element (the promotion outline effect appears nowhere else, after all). The trick then would be to re-allocate new assets for each (as Texmod post-injection pulls such new textures via hashtags referencing) so that the engine would be fooled to grab instead of such secondary regular (as in, defaults) rank sprites. Right??To elaborate on the term 'rank sprite', a sprite in Flash terms is a container which can hold other objects like text fields, vector shapes or other sprites. The rank sprite in XCOM is a shared resource (i.e. it is defined in a common file and can be imported into other GFX files at runtime) and is set up to contain a series of rectangle shapes each with one of the rank images as a bitmap fill. You can think of this as a bunch of simple polygons with rank textures on them. The rank sprite furthermore is set up to contain a bunch of labeled animation frames which are used to control which image sub-shape to display at a time. Back to the faux stroke effect, the rank sprite is imported into the Debrief file and two instances of it are placed inside the so-called SoldierSlot sprite which is the prototype of, you guessed it, the soldier slots in the debriefing screen list. One of the rank sprite instances gets a color transform which makes its contents all yellow as described in my previous post. Most of the time this instance is left invisible, it's only made visible when told so via ActionScript (the Flash-internal scripting language which the Unreal Engine's scripting language, UnrealScript can interface with thanks to Scaleform). The other instance is placed on top of the yellowed one and servers as the general rank icon you see most of the time. So, what I was trying to say earlier is that it is feasible to hex-edit the SoldierSlot sprite to replace the yellowed rank icons sprite with a simple static image shape. To actually get a new image into the GFX (i.e. Flash) file additional steps would need to be taken, to most straightforward one being to embed a texture directly in the file - like you would do when building a Flash video, but XCOM does that by pulling assets from the UPK file the GFX file is embedded in, again, Scaleform doing its magic here. In any case, this form of user interface modding (or 'Flash hacking' as I like to call it) is not for the faint of heart. For instance, adding data to a GFX file would obviously increase its size and getting that to work is a bit more involved and requires software like UPKModder or UPKUtils (i.e. a simple search-and-replace hex-edit won't do). To summarize, possible: yeah, easy: no. Link to comment Share on other sites More sharing options...
Zyxpsilon Posted September 11, 2014 Author Share Posted September 11, 2014 Shoootttss! What that means is very simple; too much trouble for so little of a tricky change.Thus i can only conclude something two-fold. 1) Either i could find a way to just "re-color" the actual instances once and for all elements that are being used by default. Say going from their choice of sharp Yellow to a more subtle dark grey that would make the "effect" less startling. Or.... 2) Delve a lot deeper into the structured process and completely re-write the functional system into a custom bunch of direct texturing attempts. Which is even more complex, and certainly too much for my programming skill level. Thanks for your patience and tolerance with my "convoluted" ways of writing and mis-directed use of some technical terms in improper context. The result remains though. I just can't do it alone and without extensive help from someone willing and able -- which i won't ask of you or anyone else considering such a nearly superfluous detail. Gosh -- if only adapting a code was as easy as creating small 256x128 designs in two subtle shades of cyan! ;) Again - thanks. Link to comment Share on other sites More sharing options...
XMarksTheSpot Posted September 12, 2014 Share Posted September 12, 2014 1) Either i could find a way to just "re-color" the actual instances once and for all elements that are being used by default. Say going from their choice of sharp Yellow to a more subtle dark grey that would make the "effect" less startling. Or....Okay, this can be done with a simple hex edit. Well, not so simple actually, but let me explain:Basically a color transform in a Flash file defines up to 8 values, i.e. two sets of RGBA values, one for multiplying color values and one for adding to color values. In the case of the rank outline the red, green and blue values are multiplied by 0 and then to that (255, 209, 56) is added. Now you might think looking for the hex representation of the additive color terms (i.e. FF D1 38) would be a good idea, but that won't help here. This is due to the way SWF files (and in extension GFX files, which are a Scaleform-specific extension of the SWF format) are set up, meaning that they make heavy use of bit packing to encode data. Now to dive into the relevant hex data. The section corresponding to the rank highlight component (inside UICollection_Strategy_SF.upk) is as follows: BF 06 27 00 00 00 2E 12 00 57 00 C5 8F 84 C7 C2 2D 32 19 40 E8 00 00 00 04 00 FF 34 43 80 00 72 61 6E 6B 48 69 67 68 6C 69 67 68 74 00In SWF terms this is a PlaceObject2 tag which in this case defines position and scaling information, a color transformation and a name for the sprite so it can be referenced by ActionScript.The color transform subsection resides in the following bytes: E8 00 00 00 04 00 FF 34 43 80 00Using the SWF File Format Specification document we can decode that sequence (a so-called CXFORMWITHALPHA record) as follows: hex E8 00 00 00 04 00 FF 34 43 80 00 binary 1110100000000000000000000000000000000100000000001111111100110100010000111000000000000000 ^^<10>< r* >< g* >< b* >< a* >< r+ >< g+ >< b+ >< a+ > To explain in detail, the first bit denotes that the record features additive terms and the second bit that there's also multiplicative terms. The next 4 bits encode the number of bits each term occupies (in this case 0b1010 = 10 bits). The following 80 bits are the multiplicative and additive terms as signed bit values.Here we see that the multiplicative terms for red, green and blue all end up as zero and the alpha mult as 0b0100000000 = 256 which means that the alpha value is essentially multiplied by 1.0, i.e. it is effectively left alone.Now for the interesting values, the additive terms, and how to change them. Here in the sequence we find our yellow color values, r = 0b0011111111 = 255, g = 0011010001 = 209, b = 0b0000111000 = 56.Now let's say we want to replace that with a light blue hue, for example (90, 152, 220). First we translate the decimal values to 10-digit binary, e.g. using windows calculator in programmer mode: (0b0001011010, 0b0010011000, 0b0011011100). Then we insert those values in the binary sequence above and convert the result back to hex: 00 5A 26 0D C0 00 ... 000000000101101000100110000011011100000000000000 a* >< r+ >< g+ >< b+ >< a+ > Et voilà, this is also part of our final hex replacement block: BF 06 27 00 00 00 2E 12 00 57 00 C5 8F 84 C7 C2 2D 32 19 40 E8 00 00 00 04 00 5A 26 0D C0 00 72 61 6E 6B 48 69 67 68 6C 69 67 68 74 00 Sorry about the lengthy exposition, but this is basically what you have to deal with when mucking around with SWF/GFX files :) I hope this makes sense to you, let me know if you run into any problems. Link to comment Share on other sites More sharing options...
Recommended Posts