over 4 years ago - MedvedevTD - Direct link

Hi, everyone!

As the time goes by, old solution are being changed and replaced by new one. While it’s a normal process for any game, such changes might often bring changes to game modification methods as well.

In this topic I’d like to post a solution, that’ll allow to work with “Compass” element and its part in the current game state.

There are, in fact two solutions.

First is a partial work with the battle_layout.xml file an editing the compass.unbound file
It’s suitable for quick deployment, but has several take offs (issues with scaling, no versatility in display resolution, extra files baggage) Besides, during the game client optimization some files are simply being removed.

Second solution is working with Unbound 2
The solution itself follows these steps:
- Create Mod_compass.unbound file
Add following code to it:

For comparison – the original code in compass.unbound looks like this:

- Add following line to unbound_settings.xml file:

./gui/unbound2/pc/battle/Mod_compass.unbound

NB! This row is being processed by the alphabet order
At first the special symbols, i.e. (!) are being processes
Then the upper case letters in alphabet order (A,B.C,D)
Then lower case letters in alphabet order (a,b,c,d)

It's crucial that you at first process the modified file, and only then - the original file

Element positioning settings

(var compassScaleRatio:number = "0.6") – this variable is responsible for object scaling with 1.0 is 100% of object size (var leftOffset:number = "stageWidth / 2 - COMPASS_SIZE * compassScaleRatio / 2 - 20") – this variable is responsible for location on horizontal axis, with 20 being a gap compensation from battle_layout ; and in current settings it sets sets the element in the center (var bottomOffset:number = "stageHeight / 2 - COMPASS_SIZE * compassScaleRatio / 2 - 250") – this variable is responsible for location on vertical axis with 250 being a shift from the center



You can remove the “extra” circle from the compass by simply adding a piece of additional code with commented value of compass element to our modified file

In the end we’ll see this:



Also, one more thing :)
Here I attached an example of ready solution: gui.zip
I have full trust in you that you do realize that unbound_settings.xml can sometimes be changed and that you’ll always compare it with the original file from every version patch (well, you’ll still need to put in the line) – it’s really not that troublesome, I swear! :)

Also also,
This mod will Not break any other mod and is compatible with any other modifications.

Best regards,






Recent World of Warships Posts