Dumadidak Posted October 11, 2014 Share Posted October 11, 2014 (edited) Hello guys, again.I have a little question. How could I put image of nation (flag) into the carousel? I done something like this: But I was using flash file (Flags.swf), sadly it interacts with other hangar places like "about the tank" or in "tech tree". So i have to do it in my XVM config carousel.xc. I tired to use this macro: {{v.nation}} in carousel.xc // Nation Flag { "x": 0, "y": 13, "align": "right", "alpha": 100, "format": "<img src='xvmres://nation_{{v.nation}}.png' width='26' height='26'>", "shadow": { "enabled": true, // false - no shadow. "distance": 0, // (in pixels) "angle": 0, // 0.0 - 360.0 "color": "0x000000", // "0xXXXXXX" "alpha": 80, // 0 - 100 "blur": 6, // 0.0 - 255.0; 6 is recommended "strength": 4 // 0.0 - 255.0; 3 is recommended } }, And ofc i add my icons to the res folder called for example "nation_china.png". It doesn't work. I think, that when macros hiding numbers (like in mastery badge or color code) it is working fine. But when there is text (china, ussr or other) it doesn't work properly.If someone will have some idea how could I fix it, it will be fabulous :)GreetingsDumadidak Edited October 12, 2014 by Dumadidak @ Quote Link to comment Short link Share on other sites More sharing options...
sirmax Posted October 11, 2014 Share Posted October 11, 2014 You made all right, IDK why it doesn't work. Better use "src" for images: { "x": 0, "y": 13, "src": "xvm://res/nation_{{v.nation}}.png" }, and use xvm:// schema instead of obsolete xvmres://. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Dumadidak Posted October 11, 2014 Author Share Posted October 11, 2014 (edited) Sirmax :( I found my mistake. Everything was about align="right", probably if i had other coordinates i could see the flag, and i won't start this topic.For now it is working fine. But Sirmax, I have to tell u, that u helped me a lot, becouse quality of "src" is MUCH better, than put this into the "format". Could u tell me something more? How could i change the width or height of that img? The difference: (probably u should change in the default config, part about masterybadge in carusel.xc) Part about mastery badge doesn't work for me: // Sign of mastery. { "x": 2, "y": 73, "width": 26, "height": 26, "alpha": 100, "src": "img://gui/maps/icons/library/proficiency/class_icons_{{v.mastery}}.png" }, Edited October 11, 2014 by Dumadidak @ Quote Link to comment Short link Share on other sites More sharing options...
sirmax Posted October 11, 2014 Share Posted October 11, 2014 (edited) becouse quality of "src" is MUCH better, than put this into the "format". This is the reason for the presence of this field. But Sirmax, I have to tell u, that u helped me a lot, becouse quality of "src" is MUCH better, than put this into the "format". Could u tell me something more? How could i change the width or height of that img? Try "w" and "h" Edited October 11, 2014 by sirmax 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Dumadidak Posted October 12, 2014 Author Share Posted October 12, 2014 (edited) Thx Sirmax, ofc that "w" and "h" is working good. I have one more question, is it some option in code to disable some part of "extrafields"? For example i have this one, and i want disable it: // Sign of mastery. { "x": 2, "y": 73, "width": 26, "height": 26, "alpha": 100, "src": "img://gui/maps/icons/library/proficiency/class_icons_{{v.mastery}}.png" }, I know there are 2 options: - I could use "//" at the beginning of all lines... - or set "alpha" to 0 But I'm looking for option rather like "enable", "visible". Why this options doesn't work in extrafields? And one more question, because i also made some little modification ("clean up" in text/lc_messages/menu.mo) It looks like this, but also I have issue about image quality. Maybe it's not a 'big deal' about difference of qualities... but I'm wondering, that, is it possible to take some data from game and make macros like this? {{damaged}} // "1" for damaged, empty if not{{ammoNotFul}} // "1" for damaged, empty if not (no ammo loaded) {{battle}} // "1" for damaged, empty if not (still in battle) {{inPrebattle}} // "1" for damaged, empty if not (tank preapared in platoon or CW, for the battle) {{crewNotFull}} // "1" for damaged, empty if not (there is no crew on this tank) {{destroyed}} // "1" for damaged, empty if not {{exploded}} // "1" for damaged, empty if not Ofc it is only some idea, i don't want to cause any troubles for U. But maybe someone want use it also?I also feel the lack of this macro {{v.c_premium}}... maybe or is it other way to make text "gold"? I done "name of tank" in extrafield becouse in the main part i couldnt put short name of it, and that was important for me. Edited October 12, 2014 by Dumadidak 1 @ Quote Link to comment Short link Share on other sites More sharing options...
sirmax Posted October 12, 2014 Share Posted October 12, 2014 I have one more question, is it some option in code to disable some part of "extrafields"? I know there are 2 options: - I could use "//" at the beginning of all lines... - or set "alpha" to 0 But I'm looking for option rather like "enable", "visible". Why this options doesn't work in extrafields? Not required, use line comment. Maybe it's not a 'big deal' about difference of qualities... but I'm wondering, that, is it possible to take some data from game and make macros like this? {{damaged}} // "1" for damaged, empty if not {{ammoNotFul}} // "1" for damaged, empty if not (no ammo loaded) {{battle}} // "1" for damaged, empty if not (still in battle) {{inPrebattle}} // "1" for damaged, empty if not (tank preapared in platoon or CW, for the battle) {{crewNotFull}} // "1" for damaged, empty if not (there is no crew on this tank) {{destroyed}} // "1" for damaged, empty if not {{exploded}} // "1" for damaged, empty if not This macros are planned I also feel the lack of this macro {{v.c_premium}}... maybe or is it other way to make text "gold"? I done "name of tank" in extrafield becouse in the main part i couldnt put short name of it, and that was important for me. You can use macro formatting: {{v.premium?#AAAAAA|#BBBBBB}} 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Dumadidak Posted October 12, 2014 Author Share Posted October 12, 2014 Thanks Sirmax :) This macros are planned Good to hear it! So I'm first one to wait for it :) You can use macro formatting: {{v.premium?#AAAAAA|#BBBBBB}} Problem solved! Sorry for so many questions! I'm pain in the ass, again and again. Btw. I can't believe that U are sooooo helpful, thx for your time! @ Quote Link to comment Short link Share on other sites More sharing options...
sirmax Posted October 12, 2014 Share Posted October 12, 2014 (edited) You are welcome. I understand that it's not easy to guess all features, so you can ask what you need. Our english community is not so big as russian, but we try to help everyone who ask not trivial questions. Edited October 12, 2014 by sirmax 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Dumadidak Posted October 12, 2014 Author Share Posted October 12, 2014 Ok, so i have next trouble.I have code like this: // Vehicle name premium. { "x": 156, "y": 80, "align": "right", "alpha": "{{v.premium?100|0}}", "format": "<font size='12' face='$FieldFont' color='{{v.premium?#F5BE4B|#FFFFFF}}'><b>{{v.name}}<b></font>", "shadow": { "distance": 0, // (in pixels) "angle": 0, // 0.0 - 360.0 "color": "0xF5BE4B", // "0xXXXXXX" "alpha": 50, // 0 - 100 "blur": 1, // 0.0 - 255.0; 6 is recommended "strength": 2 // 0.0 - 255.0; 3 is recommended } }, // Vehicle name notpremium. { "x": 156, "y": 80, "align": "right", "alpha": "{{v.premium?0|100}}", "format": "<font size='12' face='$FieldFont' color='{{v.premium?#F5BE4B|#FFFFFF}}'><b>{{v.name}}<b></font>", "shadow": { "distance": 0, // (in pixels) "angle": 0, // 0.0 - 360.0 "color": "0x000000", // "0xXXXXXX" "alpha": 50, // 0 - 100 "blur": 1, // 0.0 - 255.0; 6 is recommended "strength": 2 // 0.0 - 255.0; 3 is recommended } }, I need different shadow for type of vehicle premium/notpremium, and there is a problem which I had earlier. How i could disable all part (no comment lines). I thought that I could use macro {{v.premium?100|0}} to turn off this part, but it's not working in "alpha" line. @ Quote Link to comment Short link Share on other sites More sharing options...
sirmax Posted October 13, 2014 Share Posted October 13, 2014 I need different shadow for type of vehicle premium/notpremium, and there is a problem which I had earlier. How i could disable all part (no comment lines). I thought that I could use macro {{v.premium?100|0}} to turn off this part, but it's not working in "alpha" line. It must. I'll check this. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
vlad_cs_sr Posted October 13, 2014 Share Posted October 13, 2014 Maybe that format will work? "alpha": "{{v.premium?#00|#FF}}", @ Quote Link to comment Short link Share on other sites More sharing options...
Dumadidak Posted October 13, 2014 Author Share Posted October 13, 2014 (edited) Maybe that format will work? "alpha": "{{v.premium?#00|#FF}}", Sadly, also doesn't work :( First I wanted to do it in shadow part (so second field would be unnecessary, and ofc. eneble/disable option too) But: "color": "{{v.premium?#F5BE4B|#000000}}", doesn't work. I have no idea how could I made glow under the premium name, only premium. Edited: It must. I'll check this. OMG. "alpha": "{{v.premium?100|0}}" is working... I probably doesnt put changes with JSGME to the WoT... to many WoT runs... sorry guys for disturbing u. Ok. Now I know that it doesn't work just in shadow part. So I could disable main oneonly. But it is enough! Thx. Edited October 13, 2014 by Dumadidak @ Quote Link to comment Short link Share on other sites More sharing options...
Dumadidak Posted October 13, 2014 Author Share Posted October 13, 2014 (edited) Ok guys, with your priceless help, I finished my carousel for now! The XVM developers and community here is wonderful and helpful! Thx everyone for help. Now I "only" need to change position of filters and arrows. Sooo swf changes now!Now I have something like this: Edited October 13, 2014 by Dumadidak 2 @ Quote Link to comment Short link Share on other sites More sharing options...
vlad_cs_sr Posted October 13, 2014 Share Posted October 13, 2014 Now I have something like this: Nice!) @ Quote Link to comment Short link Share on other sites More sharing options...
HermanHitro Posted October 13, 2014 Share Posted October 13, 2014 (edited) Ok guys, with your priceless help, I finished my carousel for now! The XVM developers and community here is wonderful and helpful! Thx everyone for help. Now I "only" need to change position of filters and arrows. Sooo swf changes now! Now I have something like this: Looks great! How did you get the battle tiers (min and max) in there? I tried battletier-min and battletier-max, but that doesn't seem to work in the carousel. EDIT: Nevermind, found the answer. In case someone else is looking for it, it is v.battletiermax and v.battletiermin without the "-". Edited October 13, 2014 by HermanHitro 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Dumadidak Posted October 13, 2014 Author Share Posted October 13, 2014 (edited) Hi, thx for appreciating! How did you get the battle tiers (min and max) in there? I could share with u my code (It's not finished yet, but close to be ready)I mark for u the part about BattleTier (green color) just scroll code down to see. /** * Parameters for tank carousel * Config by Dumadidak [EU] * If you have any questions or observed errors write to me: [email protected] * Version | WoT 9.3 | XVM-5.3.7-dev: 3324 (nightlybuild) * If u want to disable any "extraFields", use comments "//" (like in MarksOnGun part) or just delete it * Thanks to Sirmax [RU] for priceless help in many cases! And the whole XVM team for opportunity to change oryginal carousel! * Thanks to my friends: man1aq_ [EU] and Kartoniak [EU], for many sugestions when I was blind after many hours spent on configuring */{ "carousel": { "enabled": true, // false - Disable customizable carousel. "zoom": 1, // Scale of carousel cells. "rows": 2, // Number of rows at carousel. "padding": // Spacing between carousel cells. { "horizontal": 4, "vertical": 4 }, "alwaysShowFilters": true, // true - show filters only if all tanks do not fit on the screen. "hideBuyTank": true, // true - hide cell "Buy tank". "hideBuySlot": true, // true - hide cell "Buy slot". "filters": // Visibility filters. { "nation": { "enabled": true }, // nation "type": { "enabled": true }, // vehicle class "level": { "enabled": true }, // vehicle level "favorite": { "enabled": true }, // favorite tanks "prefs": { "enabled": true } // other filters }, "fields": { "tankType": { "visible": false, "dx": 0, "dy": 0, "alpha": 100, "scale": 1 }, // Vehicle class icon. "level": { "visible": false, "dx": 2, "dy": -3, "alpha": 100, "scale": 1 }, // Vehicle level. "multiXp": { "visible": true, "dx": 0, "dy":0, "alpha": 100, "scale": 1 }, // Icon of double (triple etc.) dayily exp "xp": { "visible": true, "dx": 0, "dy": 0, "alpha": 100, "scale": 1 }, // "tankName": { "visible": false, "dx": 2, "dy": 5, "alpha": 100, "scale": 0.8 } // Vehicle name. }, "extraFields": // Extra cell fields (see playersPanel.xc). [ // Selected horizontal. { "x": 0, "y": 41, "w": 160, "h": 18, "alpha": 100, "src": "xvm://res/Dumadidak/Carousel/{{v.selected}}ected_horizontal.png" }, // Selected vertical. { "x": 71, "y": 0, "w": 18, "h": 100, "alpha": 100, "src": "xvm://res/Dumadidak/Carousel/{{v.selected}}ected_vertical.png" }, // Sign of mastery. { "x": 4, "y": 74, "w": 26, "h": 26, "alpha": 100, "src": "xvm://res/Dumadidak/Carousel/class_icons_{{v.mastery}}.png" }, // NOT elite tank marker. { "x": 1, "y": 1, "alpha": 100, "src": "xvm://res/Dumadidak/Carousel/notelitetank{{v.elite}}.png" }, // Number of battles. { "x": 30, "y": -1, "align": "left", "alpha": 100, "format": "<font size='12' face='$FieldFont' color='#e3dfc6'>{{v.battles}}</font>", "shadow": { "enabled": true, // false - no shadow. "distance": 0, // (in pixels) "angle": 0, // 0.0 - 360.0 "color": "0x000000", // "0xXXXXXX" "alpha": 80, // 0.0 - 1.0 "blur": 6, // 0.0 - 255.0; 6 is recommended "strength": 4 // 0.0 - 255.0; 3 is recommended } }, // Vehicle name - premium. // Color variations: // TEXT | SHADOW // #E7B622 | 0x642D1A - more yellow // #F68A4A | 0x6A1A00 - more orange (similar to the vanilla) { "x": 156, "y": 80, "align": "right", "alpha": "{{v.premium?100|0}}", "format": "<font size='12' face='$FieldFont' color='{{v.premium?#E7B622|#FFFFFF}}'>{{v.name}}</font>", "shadow": { "distance": 0, // (in pixels) "angle": 0, // 0.0 - 360.0 "color": "0x642D1A", // "0xXXXXXX" "alpha": "1", // 0.0 - 1.0 "blur": 6, // 0.0 - 255.0; 6 is recommended "strength": 3 // 0.0 - 255.0; 3 is recommended } }, // Vehicle name - normal. { "x": 156, "y": 80, "align": "right", "alpha": "{{v.premium?0|100}}", "format": "<font size='12' face='$FieldFont' color='{{v.premium?#E7B622|#FFFFFF}}'>{{v.name}}</font>", "shadow": { "distance": 0, // (in pixels) "angle": 0, // 0.0 - 360.0 "color": "0x434343", // "0xXXXXXX" "alpha": "1", // 0.0 - 1.0 "blur": 6, // 0.0 - 255.0; 6 is recommended "strength": 3 // 0.0 - 255.0; 3 is recommended } }, // Winrate. { "x": 30, "y": 13, "align": "left", "alpha": 100, "format": "<font size='12' face='$FieldFont' color='#7d7d75'>{{v.winrate%d~%}}</font>", "shadow": { "distance": 0, // (in pixels) "angle": 0, // 0.0 - 360.0 "color": "0x000000", // "0xXXXXXX" "alpha": 80, // 0.0 - 1.0 "blur": 6, // 0.0 - 255.0; 6 is recommended "strength": 4 // 0.0 - 255.0; 3 is recommended } }, // MarksOnGun. // { // "x": 160, // "y": 50, // "alpha": 60, // "align": "right", // "format": "{{v.marksOnGun}}" // }, // Nation Flag. { "x": 2, "y": 1, "w": 28, "h": 28, "alpha": 100, "src": "xvm://res/Dumadidak/Carousel/Flags/nation_{{v.nation}}.png" }, // Battle Tier for vehicle. { "x": 156, "y": 67, "align": "right", "alpha": 100, "format": "<font size='12' color='#7d7d75'>({{v.battletiermin}}-{{v.battletiermax}}) <font size='12' color='#FFFFFF'><b>{{v.rlevel}}</b></font></textformat>", "shadow": { "distance": 0, // (in pixels) "angle": 0, // 0.0 - 360.0 "color": "0x000000", // "0xXXXXXX" "alpha": 80, // 0.0 - 1.0 "blur": 6, // 0.0 - 255.0; 6 is recommended "strength": 4 // 0.0 - 255.0; 3 is recommended } } ] }} Edited October 13, 2014 by Dumadidak @ Quote Link to comment Short link Share on other sites More sharing options...
nixxxie Posted October 14, 2014 Share Posted October 14, 2014 You need to share your pngs too ;) . I'd like to use your "selected" frame. @ Quote Link to comment Short link Share on other sites More sharing options...
Dumadidak Posted October 14, 2014 Author Share Posted October 14, 2014 (edited) @nixxxie Ofc, but i don't have full pack. For now only without icons of [no ammo/crew not full/tank damaged]My pack: - Flags.swf - to switch off background - advanced.swf - to change (x2, x3, x5) image to shorter - carousel.xc - place to your config folder - res with my icons - Deep Vehicle Icons (if u want vehicle icons more contrast, I'm using 'deep' graphic filter so it is better for me)DOWNLOAD Edited October 14, 2014 by Dumadidak 1 @ Quote Link to comment Short link Share on other sites More sharing options...
nixxxie Posted October 15, 2014 Share Posted October 15, 2014 I meant the frame - selected horizontal & vertical pngs. @ Quote Link to comment Short link Share on other sites More sharing options...
man1aq Posted October 15, 2014 Share Posted October 15, 2014 @nixxxie and it's there, check this directory: "Dumadidak CarouselPack.rar\Dumadidak CarouselPack\Dumadidak Clear Carousel\xvm\res\Dumadidak\Carousel" and there you find your files: selected_horizontal.png selected_vertical.png @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.