Jump to content


XVM Tank Minimap Ranges v2.0 (0.9.0)

mod xvm spotting radio artillery spg 0.9.0 0.9

  • This topic is locked This topic is locked
757 replies to this topic

Omegaice #1 Posted 19 August 2013 - 02:30 AM

    Staff Sergeant

  • Player
  • 6553 battles
  • 353
  • Member since:
    08-04-2013

*
POPULAR

XVM Tank Range


I was looking for a mod that would allow me to see my current tanks spotting range that changed based off of the tank used and all of the other factors that can affect that range. The only mod I found that did that was locastan's HD Minimap. Unfortunately, I didn't like the text and icons for the vehicles compared to the XVM minimap so I decided to make this modification. It is a simple one file modification at the moment.


This modification adds a white circle on your minimap with a radius set to the calculated value for your tank's spotting range. It is calculated whenever a tank is changed which means that if you add modules or your crew's skill improves the circle will change without you having to restart the game. It also adds a red circle for the maximum range your artillery tank can shoot.


Features

  • Adds a circle to the standard XVM minimap at your tank's spotting range
  • Adds a second circle to show where your binoculars extend to
  • Adds another circle to show the maximum range of your artillery's gun
  • Adds another circle for low tier autoloaders to show their maximum shooting range.
  • Dynamically updates all circles when you change tanks
  • Utilizes all skills, perks, modules and consumables that affect the tank's ranges


Configuration
The configuration for the mod is now added in tankrange.xc in the "res_mods/xvm" folder. This file is auto created the first time your game is launched with the mod installed and it has the configuration options at the end of the file in the "tankrange" section.


Your XVM configuration MUST load tankrange for the circles option of the minimap section. This can be done by using the following code, where the entire circles section is removed and replaced with the code below (... indicates the rest of the configuration for the minimap section):

"minimap": {
 "enabled": true,
 "circles": ${"../tankrange.xc":"circles"},
 ...
}

If your XVM configuration is in a different folder from "res_mods/xvm", you need to change the path to the file in your configuration. If your xvm configuration is in "res_mods/xvm/configs/@Default" then you need to modify the config and insert "../../" before tankrange.xc as shown below. This means that xvm will move back two directories to find the configuration.
"minimap": {
 "enabled": true,
 "circles": ${"../../tankrange.xc":"circles"},
 ...
}


Troubleshooting
XVM Issues
Any changes that occur with how XVM works are related to the XVM configuration and not this mod. It usually indicates that the XVM configuration file has an error in it.


Other Issues
Please follow these steps to help me and everyone else out:

  • Download XVM bundled version
  • Rename current res_mods directory
  • Delete python.log in World of Tanks directory
  • Install XVM bundled version to game directory
  • Run game and test
  • This will allow you to know if it is my mod alone that is the problem or a combination of already installed mods and mine. Please post a message giving me as as much information (python.log, xvm.xc, list of mods, steps to reproduce) as possible so that I can attempt to fix it.
  • Remove the bundled res_mods
  • Rename your original res_mods directory


By doing all of this, you will be testing if it is an issue with my mod alone or if it is an issue when it interacts with another mod.


If you need somewhere to put your files for me to look at, you can upload the files here. Please set the description to your username.


Change log

  • v2.0 - Updated to work with 9.0 with the help of mEDI-S.
 
Spoiler


Download (Base Mod)

http://adf.ly/kwYcu

http://www.mediafire.com/download/jh60abpgcsf3j34/XVMTankRange-v2.0.zip

 

Download (With XVM Minimap)

http://adf.ly/kwYYW

http://www.mediafire.com/download/4js2x4f6m8kkc01/XVMTankRange-WithXVM-v2.0.zip

 

Source Code

https://github.com/Omegaice/WOTTankRanges


Screenshots
Crusader (Left:50% Commander Skill with Binoculars only, Right: 100% Commander Skill with all affecting items)


Edited by Omegaice, 30 April 2014 - 02:30 PM.


MolochZ #2 Posted 19 August 2013 - 03:20 AM

    Second Lieutenant

  • Player
  • 16271 battles
  • 1,007
  • [CRM] CRM
  • Member since:
    08-20-2011
I don't really use the spotting circle to calculate my spotting range but rather use it to gauge others spotting range.

For instance if I am playing a TD (ISU-152/Object 704) I like to support the heavies at the start of the game. Staying a bit behind the heavies I let them make the spot then I pull back or forward until the spotted enemy is just outside the circle. Then I blast away with confidence that I will not be spotted. I've sat in the open many times and this worked perfectly. Sixth sense never goes off.

Of course this tactic will not work on every map and in every situation with every tank, but on certain maps with no immediate cover or bushes (Sand River) it works a treat.

So I have to say I'll take a look at this but I might switch bac. Because you put so much effort into it here is a +1 well done dude.

Omegaice #3 Posted 19 August 2013 - 04:23 AM

    Staff Sergeant

  • Player
  • 6553 battles
  • 353
  • Member since:
    08-04-2013
I think that this mod probably helps less experienced players more as there are is a bigger difference between the global max spotting distance and what your tank is actually capable of. For me, I still don't have 100% crews in my tanks which means I need to do a rough calculation for each tank and try and guess on the map how big the circle is, however as I get higher skilled crews and higher tier tanks the differences between the reported value, the maximum and my actual value get smaller meaning there is less to think about.

Thanks for giving it a try and for the +1.

SirHamedo #4 Posted 19 August 2013 - 07:36 AM

    Lance-corporal

  • Player
  • 53186 battles
  • 86
  • Member since:
    05-02-2011
Just a honest question ,Is this sub mod legal ?

Edited by SirHamedo, 19 August 2013 - 08:55 AM.


CZ1Thor #5 Posted 19 August 2013 - 07:49 AM

    Staff Sergeant

  • Player
  • 28291 battles
  • 300
  • Member since:
    02-28-2011
well after few battles i really dont know if its working or its just not supported by latest XVM pack (the config file for this says 0.8.5) but it has one big issue - when you send the crew member in barracks or put in other tank (seems like only the commander and maybe other guy with view skill) , "updating modules" loading logo show up and stays there - cant do nothing, no matter what - alt+f4  :sceptic: ...tested with mod and without of course

Prfarc #6 Posted 19 August 2013 - 08:46 AM

    Corporal

  • Player
  • 26139 battles
  • 155
  • Member since:
    11-20-2011
Nice. I was thinking about doing this manually in regular XVM custom circles but your way is the right one. I'll definitely use it once it's done.

Any chance of drawing two circles in case of binocs installed?

In regard to MolochZs comment - does your mod keep the standard max spotting circle? If possible it would be best to use max in a different color.

Omegaice #7 Posted 19 August 2013 - 01:45 PM

    Staff Sergeant

  • Player
  • 6553 battles
  • 353
  • Member since:
    08-04-2013

View PostSirHamedo, on 19 August 2013 - 07:36 AM, said:

Just a honest question ,Is this sub mod legal ?
As I said, at least one other mod has features similar to this (without decompiling their code I don't know how close) so I would assume it is.

View Postdeathlove, on 19 August 2013 - 07:49 AM, said:

well after few battles i really dont know if its working or its just not supported by latest XVM pack (the config file for this says 0.8.5) but it has one big issue - when you send the crew member in barracks or put in other tank (seems like only the commander and maybe other guy with view skill) , "updating modules" loading logo show up and stays there - cant do nothing, no matter what - alt+f4 :sceptic: ...tested with mod and without of course
If it doesn't seem to be working it may be because of your XVM configuration, at the moment it does not check if circles are enabled or if there is even a circles section in your configuration. I will be making the code more robust so that it checks for the correct configuration options and creates them if it does not find them.
I can't seem to recreate that bug (I noticed it earlier when I trained a crewman I got that issue but I fixed that), can you send me your XVM configuration and the Python.log file and I will attempt to fix it when I get back from work later.

View PostPrfarc, on 19 August 2013 - 08:46 AM, said:

Any chance of drawing two circles in case of binocs installed?
The code current adds a second circle for binoculars, however I havn't added the test for them. I don't actually own a pair in the game at the moment but I do have some equipment so I will attempt to get that sorted later today.

View PostPrfarc, on 19 August 2013 - 08:46 AM, said:

In regard to MolochZs comment - does your mod keep the standard max spotting circle? If possible it would be best to use max in a different color.
This modification only changes the "special" circles for XVM, if you already have the max circle enabled in the "major" circles then it will stay enabled. One of the things I want to add is the option to configure the circle parameters so that you can pick and choose your color, line thickness and alpha values.
Thanks to everyone who has tried it so far.

Edited by Omegaice, 19 August 2013 - 01:45 PM.


draytek11 #8 Posted 19 August 2013 - 03:26 PM

    Private

  • Player
  • 5783 battles
  • 39
  • [P_B_S] P_B_S
  • Member since:
    12-21-2012
You can specify which entries in the XVM responsible for displaying these lines? I do not see anything special in the "circles".
The python.log file entries appear:
File "res_mods/0.8.7/scripts/client/currentvehicle.py", line 208, in __request
  File "scripts/common/Lib/json/__init__.py", line 307, in loads
  File "scripts/common/Lib/json/decoder.py", line 319, in decode
  File "scripts/common/Lib/json/decoder.py", line 338, in raw_decode
ValueError: No JSON object could be decoded
[NOTE] (res_mods/0.8.7/scripts/client/currentvehicle.py, 147): Tank Name:  ('stugiii',)
[NOTE] (res_mods/0.8.7/scripts/client/currentvehicle.py, 151): Base View Range:  (310.0,)
[NOTE] (res_mods/0.8.7/scripts/client/currentvehicle.py, 193): Scaled View Range:  (310.0,)
File "res_mods/0.8.7/scripts/client/currentvehicle.py", line 208, in __request
  File "scripts/common/Lib/json/__init__.py", line 307, in loads
  File "scripts/common/Lib/json/decoder.py", line 319, in decode
  File "scripts/common/Lib/json/decoder.py", line 338, in raw_decode
ValueError: No JSON object could be decoded

Edited by draytek11, 19 August 2013 - 03:32 PM.


Omegaice #9 Posted 19 August 2013 - 03:32 PM

    Staff Sergeant

  • Player
  • 6553 battles
  • 353
  • Member since:
    08-04-2013

View Postdraytek11, on 19 August 2013 - 03:26 PM, said:

You can specify which entries in the XVM responsible for displaying these lines? I do not see anything special in the "circles".
The application currently requires there be a minimap section in the configuration, in that section there must be a circles section which needs to be enabled and then there needs to be a special section. These can be seen in the provided configuration file.
The simplest XVM configuration that would work with this is as follows (Obviously in practice you want to make sure that these parts are in your configuration):
{
"minimap": {
  "circles": {
	"enabled": true,
	"special": [
	]
  }
}
The code also expects that the configuration file with this data in is part of "res_mods/xvm/xvm.xc", if it is not it wont be able to find and modify the parts.
If you can send me a copy of your XVM configuration I can have a look to see what the problem is.

Edited by Omegaice, 19 August 2013 - 03:33 PM.


Omegaice #10 Posted 19 August 2013 - 04:34 PM

    Staff Sergeant

  • Player
  • 6553 battles
  • 353
  • Member since:
    08-04-2013
I have added a new download which contains XVM's minimap flash file, a configuration file and my modification for people to test with.
I am not sure what XVM's policy is on repackaging parts of their modification, if anyone knows then please let me know.

Edited by Omegaice, 19 August 2013 - 09:48 PM.


Omegaice #11 Posted 19 August 2013 - 10:18 PM

    Staff Sergeant

  • Player
  • 6553 battles
  • 353
  • Member since:
    08-04-2013
I have just released an update that now should be more robust against peoples configuration files. This means that if you do not have any of the required configuration sections defined it will now create them.

Omegaice #12 Posted 20 August 2013 - 01:28 AM

    Staff Sergeant

  • Player
  • 6553 battles
  • 353
  • Member since:
    08-04-2013
I have just released another update that takes into account the brothers in arms perk and the recon skill. I can't test brothers in arms as I don't have a crew that has it 100% but it should work, also I can't test the recon skill if it is not the first skill because I only have one skilled crews at most.

Until I can get a radio operator to 100% I can't implement the situational awareness skill. Unfortunately the internal naming of skills is not the same as the external, for instance the recon skill is actually "commander_eagleEye" and the Eagle Eye perk is called "commander_expert".

Omegaice #13 Posted 20 August 2013 - 02:23 PM

    Staff Sergeant

  • Player
  • 6553 battles
  • 353
  • Member since:
    08-04-2013
I have had a few people PM me with issues, unfortunately until I get to 10 posts I can't respond. I have added two pictures to demonstrate how the mod looks, both were taken without restarting the game and show how changing the crew drastically changed the spotting range. I have also updated the troubleshooting section which should hopefully allow people to give me the most useful information so that I can improve the mod or remove bugs as quickly as possible.

JimmyBond #14 Posted 20 August 2013 - 03:24 PM

    Staff Sergeant

  • Player
  • 51308 battles
  • 313
  • [-TDB-] -TDB-
  • Member since:
    03-29-2011
Looks like a nice mod mate. Alot of work for you mind :)

Omegaice #15 Posted 20 August 2013 - 07:14 PM

    Staff Sergeant

  • Player
  • 6553 battles
  • 353
  • Member since:
    08-04-2013
I just updated the code with a new version that uses the correct formula from the wiki rather than the naive formula I previously had. This will make the commanders skill produce less extreme values.
Would anyone be interested in me adding a radio range circle that is dynamically updated as well?

Edited by Omegaice, 20 August 2013 - 08:25 PM.


draytek11 #16 Posted 20 August 2013 - 09:38 PM

    Private

  • Player
  • 5783 battles
  • 39
  • [P_B_S] P_B_S
  • Member since:
    12-21-2012
I do not know but I think there is something wrong with showing these districts on the map. A small circle shows 50m from the tank. Map is 600m so a 60m square. In my view, the circle is too large. The same will happen with a large circle. Unless I'm wrong ...

Omegaice #17 Posted 20 August 2013 - 09:44 PM

    Staff Sergeant

  • Player
  • 6553 battles
  • 353
  • Member since:
    08-04-2013

View Postdraytek11, on 20 August 2013 - 09:38 PM, said:

I do not know but I think there is something wrong with showing these districts on the map. A small circle shows 50m from the tank. Map is 600m so a 60m square. In my view, the circle is too large. The same will happen with a large circle. Unless I'm wrong ...
Indeed the images are from an older version where I was calculating the effect of the commanders skill incorrectly. I have now updated it so it should now calculate correctly.

Omegaice #18 Posted 21 August 2013 - 03:10 PM

    Staff Sergeant

  • Player
  • 6553 battles
  • 353
  • Member since:
    08-04-2013
I got some gold last night from changing my password, so I will be using it to train a radio operator to 100% and selecting situational awareness to work out what the skill name is and then I will release a version that takes that skill into account. I will also be adding some basic configuration options to that build to have the option to disable calculations for SPGs and to set the line properties.
To do the binoculars and coated optics I need to save up some in game silver or get some gold to convert to silver to buy them both (500,000 silver for both of them during the sale) which is going to take me a while as I have only just really got to tier V. If anyone wants to gift me some gold, it would obviously speed up this process.
In the mean time I will probably start working on the radio range as I can do a basic version pretty easily.

Edited by Omegaice, 21 August 2013 - 08:11 PM.


Omegaice #19 Posted 22 August 2013 - 08:26 PM

    Staff Sergeant

  • Player
  • 6553 battles
  • 353
  • Member since:
    08-04-2013
For anyone watching this, I just made a big update. Due to the sale going on at the moment and some of the events I received some free consumables that allowed me to add them to the calculations, I purchased a pair of binoculars and ventilation module. These things are all now taken into account.

cozie #20 Posted 22 August 2013 - 08:32 PM

    Private

  • Player
  • 11011 battles
  • 23
  • [SALLY] SALLY
  • Member since:
    11-27-2011

View PostOmegaice, on 22 August 2013 - 08:26 PM, said:

For anyone watching this, I just made a big update. Due to the sale going on at the moment and some of the events I received some free consumables that allowed me to add them to the calculations, I purchased a pair of binoculars and ventilation module. These things are all now taken into account.
You bet I'm watching this!
Your work is looking very good :)
I hope you keep it up.
When I find bugs I'll make sure to get them to you.
PS:
You taking into account a possible hardcap? (I dont have hard proof at what distance that is)
And bino+optical does not stack, but when equiped both the greater wins. (no hard proof again)





Also tagged with mod, xvm, spotting, radio, artillery, spg, 0.9.0, 0.9

1 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users