Jump to content
Korean Random


  • Posts

  • Joined

  • Last visited


0 Noob

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you for teaching me the knowledge! This kind of __execute is totally a new idea to me!
  2. I'm just curious where the "@xvm.export" function (the one which makes a function to be callable by {{}} macro in xvm config) is defined and governed. I only found class XvmNamespace from xvm_pymacro/__init__.py , in which a function export() is defined, but to use the @xvm.export function I really don't need to import xvm_pymacro XvmNamespace . And I can't figure out why. I think I listed all the relevant source code folders to my VSCode workspace, but still, the VSCode cannot find where the @xvm.export is defined. But they are still all working normally. (I know the pylance of VSCode makes many false errors in XVM development because of various reasons, including the difference between Python 2.7 and Python 3.11, just curious)
  3. Okay, now I have access to the game client source code, and I understand that I cannot inject 'female voice overriding' into main_sound_modes.xml. Because the classes SoundGroups.SoundModes.SoundModeDesc and SoundGroups.SoundModes.NationalPresetDesc are very rigidly defined, any 'inappropriate' xml tags are all filtered out, not to be injected into the module. It's impossible to fix the order SoundModes displayed in the settings, either, because of the same reason. A shame. But I still don't know why the switch modding by audio_mods.xml is not working.
  4. Also, editing the \gui\soundModes\main_sound_modes.xml makes the voice profiles added by me appear to the settings menu, but the voice profiles are in a random order each time I edit the xml file. I want to fix the order of those profiles. I tried adding a <priority> tag into each profiles, but it didn't work. What should I do? (I know that without relevant configuration in XSD, I cannot force xml tags to be order-sensitive)
  5. Thank you very much for nice mods. I have a suggestion on VoiceOverrider mod (and also call for help for self-modding). I want to change the 'national commanders' voice to female versions, but I still want the unique-voiced commanders to retain their own voices. Currently, if I choose National: male or National: female voiceover in VoiceOverrider mod, the mod overrides even the unique-voiced commanders. I want a mod that I have an option for whether the overriding applies to unique commanders or not. Before installing your mod, I also tried to achieve this by tweaking the xml files (because I am quite used to tweaking them to combine multiple voiceover mods), but to no avail. I found that unlike usual voiceover mods (where all you need to do is just adding another .bnk archive into \audioww\audio_mods.xml and a new "mode" into \gui\soundModes\main_sound_modes.xml to make it appear in the settings) there are switches governing the selection between male and female voiceovers: namely SWITCH_ext_vo_gender_male and SWITCH_ext_vo_gender_female . First, I tried making another <preset> within \gui\soundModes\main_sound_modes.xml 's nationalPresets tag. The new "preset" appeared in the settings as I intended, but I couldn't figure out how to make the new preset to trigger the SWITCH_ext_vo_gender_female switch by xml tags. Then, I gave up to make it as a selectable profile within the settings, and tried just overriding the switch in audio_mods.xml , so the female voice would become the default for national commanders. I tried adding <switch> <name> SWITCH_ext_vo_gender_male </name> <mod> SWITCH_ext_vo_gender_female </mod> <states/> </switch> into the <switches> tag, but it didn't work. I also tried other names like SWITCH_ext_vo_gender or even SWITCH_ext_vo_gender/SWITCH_ext_vo_gender_male but to no avail. I would thank you very much if you add the option to your mod, or just teach me how to achieve my goal by xml editing.
  6. Improved version, as of 2023-04-10 1. (as in 2023-04-07 version of mine) Anonymized (and thus no XVM rating info available in match) players will be given an 'average rating' as a default value. I made the codes in def setVehicleStats(vid, vehicle): (and some other functions) further cleaner and neatier, as my understandings of the code is improved. 2. The color scheme now follows the XVM dynamic color scale of https://kr.cm/f/t/2625/ , but also somewhat modified. In the game, the win chance value at the point of the beginning of the match seldom goes lower than 30% (ally wn8 is below 60% of enemy wn8), and that is already quite a rare landslide situation. So I 'amped up' the win chance percentage for color scale 2.5 times. Instead of the value defined in the above link (and as a default, colors.xc/"x" in the XVM config file set), the color will be determined according to the following color scale: below 36.56% = "very_bad" (red) 36.56% - 43.36% = "bad" (orange) 43.36% - 50.96% = "normal" (yellow) 50.96% - 60.16% = "good" (green) 60.16% - 66.96% = "very_good" (teal) above 66.96% = "unique" (purple) It is apparent that this color scale is still quite distorted, especially because the boundaries of yellow color (looks like evenly matched) and green color (looks like the allies are in advantage) are lower than the intuition. I chose this color scale just for simplicity of code. We need a better alternative for this. mod_wn8_chance.py
  7. It seems like the different servers (EU, NA, Asia, RU) have different average ratings, while the one called by your code is an average for all servers. Also, I think using the "active users" value is more plausible, because only active users will bother to set the anonymizer on. That's why I chose 1237 from https://wotlabs.net/ .
  8. Okay, there was one line I forgot to add. Reuploading. mod_wn8_chance.py
  9. Anybody still interested or well-informed about this macro? Anonymizer hides the XVM rating of its users and this macro is currently giving 0 score to such users, rendering it useless. My idea to counter this is, take an "average rating" of the users and anonymized users are given that average rating for win chance calculation purpose. (The average rating of whole server users can be seen in website like this: https://wotlabs.net/ for example, SEA realm's average WN8 rating is 909 while the average WN8 rating of 'active' users is 1237.) I don't know how to design an API to retrieve real-time value of that average, so I tried just declaring a global constant like DEFAULT_RATING = 1237.0 . I succeeded to modify the "frag update" function. Every time an anon user dies, the rating of DEFAULT_RATING is subtracted from the total rating. @xfw.registerEvent(FragsCollectableStats, 'addVehicleStatusUpdate') def FragsCollectableStats_addVehicleStatusUpdate(self, vInfoVO): ... else: if vid in vehicles: vehicle = vehicles.pop(vid) if vehicle.get('wn8', None) is not None: if is_ally: allies_wn8 -= vehicle['wn8'] else: enemies_wn8 -= vehicle['wn8'] LOG_DEBUG('ALLIES=%d ENEMIES=%d RATIO=%s' % (allies_wn8, enemies_wn8, (allies_wn8 * 100 / enemies_wn8) if enemies_wn8 != 0 else -1)) as_event('ON_UPDATE_TEAM_RATING') # kwj mod - blank stats (by anonymizer) are set to DEFAULT_RATING else: if is_ally: allies_wn8 -= DEFAULT_RATING else: enemies_wn8 -= DEFAULT_RATING LOG_DEBUG('ALLIES=%d ENEMIES=%d RATIO=%s' % (allies_wn8, enemies_wn8, (allies_wn8 * 100 / enemies_wn8) if enemies_wn8 != 0 else -1)) as_event('ON_UPDATE_TEAM_RATING') But the same trick did not work for initially summing the ratings. It turns out that, the function def onStatsReady(): for vid, vehicle in vehicles.iteritems(): if vehicle.get('stats') is None: setVehicleStats(vid, vehicle) LOG_DEBUG('%s => %s' % (vid, vehicle)) is calling the function setVehicleStats(vid, vehicle) many more times than the actual number of vehicles (the array vehicles.iteritems() is somewhat larger?), so I can't figure out how to get the correct sum of ratings. It's always too many or too less. I tried many roundabouts but all failed, and now I ran out of idea. At least, I need to know 1. Exactly how does the vehicles.iteritems() look like? 2. If a user is using anonymizer, how does his returns to getPlayerStats(vid) function look like? Or any other ideas to do this? ============================================================================================== Okay, I finally figured out how to set all anonymized players to a certain constant "Default rating". Here is the product. The default rating must be manually set ( DEFAULT_RATING = ****.* ). If anybody knows how to load a real-time statistics of average WN8 rating from a website, please add.
  10. In most other map arenas, the interactive musics (including drone) are configured like below. (excerpt from res\scripts\arena_defs\14_siegfried_line.xml) <wwmusicSetup> <wwmusicLoading>music_siegfried_loading_screen</wwmusicLoading> <wwmusicIntensive>music_siegfried_dron_intensive</wwmusicIntensive> <wwmusicRelaxed>music_siegfried_dron_relaxed</wwmusicRelaxed> <wwmusicStop>music_dron_stop</wwmusicStop> <wwmusicEndbattleStop>music_dron_endbattle_stop</wwmusicEndbattleStop> <wwmusicResultWin>music_siegfried_result_win</wwmusicResultWin> <wwmusicResultDrawn>music_siegfried_result_drawn</wwmusicResultDrawn> <wwmusicResultDefeat>music_siegfried_result_defeat</wwmusicResultDefeat> </wwmusicSetup> I can call the music by using the above event names in any mods, given that the interactive music .pkg files are loaded normally. But in frontline maps, it's a bit different. (excerpt from res\scripts\arena_defs\209_wg_epic_suburbia.xml) <wwmusicSetup> <wwmusicLoading>music_epic_suburbia_loading_screen</wwmusicLoading> <wwmusicIntensive>music_epic_suburbia_dron_battle</wwmusicIntensive> <wwmusicRelaxed>music_epic_suburbia_dron_battle</wwmusicRelaxed> <wwmusicStop>music_dron_stop</wwmusicStop> <wwmusicEndbattleStop>music_dron_endbattle_stop</wwmusicEndbattleStop> <wwmusicResultWin>music_epic_suburbia_result_win</wwmusicResultWin> <wwmusicResultDrawn>music_epic_suburbia_result_win</wwmusicResultDrawn> <wwmusicResultDefeat>music_epic_suburbia_result_defeat</wwmusicResultDefeat> </wwmusicSetup> Here, you can see that a single event name music_epic_suburbia_dron_battle is used for both "Intensive" and "Relaxed" battle musics. In the mods, the musics for ..._result_win, ..._result_defeat, and ..._loading_screen are normally loaded by calling these event names. But the battle music does not load just by ..._dron_battle event. Also, I don't know how to call multiple events simultaneously, if I need additional event to trigger specific part of the battle music. I skimmed through the wwise project of WoT client (shared here: https://wgmods.net/4894/ ) but could not find any clue. Could you please teach me about this? I can translate Russian text, so there is no problem about it.
  11. I am editing my custom clock widget on the hangar. I found that in py_macro\xvm.py, the module datetime does not get "timezone" info, so I cannot get from datetime.datetime.now() and related things any timezone reference. Instead, I found that the module "time" does. So, In the py_macro\xvm.py file, I inserted the following lines: import time @xvm.export('xvm.tzoffset', deterministic=False) def xvm_tzoffset(): offset = time.strftime('%z') return offset and in the widgetsTemplates.xc, I called it with {{py:xvm.tzoffset}} But nothing appears in the place. It does not crash the mod (so that the xvm resort to the default profile) either. What should I do? If the code works as I intended, a text like should appear in place. Ahh, nevermind. A bit of tweaking and restarting the client, now works.
  • Create New...