Compass Display...
Moderators: rbodleyscott, Slitherine Core, Gothic Labs
Compass Display...
How is the display of the compass icon controlled?
Currently, having swapped the Stratton map round, the Royalists are now attacking from the East.
Currently, having swapped the Stratton map round, the Royalists are now attacking from the East.
-
- Field of Glory 2
- Posts: 28294
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Compass Display...
It's orientated according to the orientation of the play map - side 0 in the west, side 1 in the east. Nothing you can do about it I am afraid except toggle it off in options. It isn't terribly useful anyway.parmenio wrote:How is the display of the compass icon controlled?
Currently, having swapped the Stratton map round, the Royalists are now attacking from the East.
Incidentally you should be able to toggle it off in your scenario by putting (in PreBattleSetup() in your scenario script) :
SetOption("AdvancedOptions", GetOption("AdvancedOptions") | 8 );
or possibly
SetOption("AdvancedOptions", GetOption("AdvancedOptions") & 65527);
(I can't remember exactly which way round it is - I am 99% certain it is the first one to hide the compass, as it defaults to on when its bit is zero)
Richard Bodley Scott


Re: Compass Display...
As I can't control it programmatically - other than off - I've gone for creating a Data\UI\Textures folder in my campaign directory and putting a vertically flipped copy of Icon_Compass.dds in there. Seems to work. There was a battle_compass.tga file in the original folder as well - don't know where that's used.rbodleyscott wrote:It's orientated according to the orientation of the play map - side 0 in the west, side 1 in the east. Nothing you can do about it I am afraid except toggle it off in options. It isn't terribly useful anyway.
-
- Field of Glory 2
- Posts: 28294
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Compass Display...
Cunning. You, sir, are a man of enterprise.parmenio wrote:As I can't control it programmatically - other than off - I've gone for creating a Data\UI\Textures folder in my campaign directory and putting a vertically flipped copy of Icon_Compass.dds in there. Seems to work.rbodleyscott wrote:It's orientated according to the orientation of the play map - side 0 in the west, side 1 in the east. Nothing you can do about it I am afraid except toggle it off in options. It isn't terribly useful anyway.
The other file may be the old BA one that we have forgotten to delete.
Richard Bodley Scott


Re: Compass Display...
Ah yes, of course - I've come across a couple of other bits like that.rbodleyscott wrote:The other file may be the old BA one that we have forgotten to delete.
-
- Brigadier-General - Elite Grenadier
- Posts: 2010
- Joined: Tue Dec 07, 2010 2:31 pm
- Location: Sweden
Re: Compass Display...
Not sure if this is what you are discussing, but in BA/BA2 (and in a P&S scenario I'm working on) I'm using SetCompassNorth(n); (n being 0 to 359(?)) to set what direction north is. The line is placed in FUNCTION PreBattleSetup()
RBS, you can look at this in my Gniew scenario.
Just don't forget to change the lighting if you don't want the shadows the wrong way...
RBS, you can look at this in my Gniew scenario.
Just don't forget to change the lighting if you don't want the shadows the wrong way...

Code: Select all
FUNCTION PreBattleSetup()
{
SetCompassNorth(90);
// Set multiplier for unit strength reporting
SetUniversalVar("StrengthMultiplier", 100);
// Customise units for scenarios
CustomiseUnits();
}
-
- Field of Glory 2
- Posts: 28294
- Joined: Sun Dec 04, 2005 6:25 pm
-
- Brigadier-General - Elite Grenadier
- Posts: 2010
- Joined: Tue Dec 07, 2010 2:31 pm
- Location: Sweden
Re: Compass Display...
Glad to enlighten you...
But I think a compass object would be great! I've seen it in BA and if someone could create one in the same style as other P&S objects, it would look great on the P&S maps!

But I think a compass object would be great! I've seen it in BA and if someone could create one in the same style as other P&S objects, it would look great on the P&S maps!
Re: Compass Display...
Now that is exactly what I wanted! Thank you kindlycavehobbit wrote:Not sure if this is what you are discussing, but in BA/BA2 (and in a P&S scenario I'm working on) I'm using SetCompassNorth(n); (n being 0 to 359(?)) to set what direction north is. The line is placed in FUNCTION PreBattleSetup()
RBS, you can look at this in my Gniew scenario.
Just don't forget to change the lighting if you don't want the shadows the wrong way...![]()
Code: Select all
FUNCTION PreBattleSetup() { SetCompassNorth(90); // Set multiplier for unit strength reporting SetUniversalVar("StrengthMultiplier", 100); // Customise units for scenarios CustomiseUnits(); }
Re: Compass Display...
Unfortunately, SetCompassNorth appeared to have no effect when I used it....
I've reverted to using my flipped texture.
Code: Select all
FUNCTION PreBattleSetup()
{
// Set multiplier for unit strength reporting
SetUniversalVar("StrengthMultiplier", 60);
// Customise units for scenarios
CustomiseUnits();
// Set whether standard deployment rules apply and (if so) set standard deployment bounds.
SetUniversalVar("StandardDeployment", 1);
SetStandardDeploymentBounds();
SetCompassNorth(180);
}
-
- Brigadier-General - Elite Grenadier
- Posts: 2010
- Joined: Tue Dec 07, 2010 2:31 pm
- Location: Sweden
Re: Compass Display...
Just tried different directions (90, 180, 270) and they works fine. Could it be I place SetCompassNorth at the top of PreBattleSetup?parmenio wrote:Unfortunately, SetCompassNorth appeared to have no effect when I used it....
I've reverted to using my flipped texture.Code: Select all
FUNCTION PreBattleSetup() { // Set multiplier for unit strength reporting SetUniversalVar("StrengthMultiplier", 60); // Customise units for scenarios CustomiseUnits(); // Set whether standard deployment rules apply and (if so) set standard deployment bounds. SetUniversalVar("StandardDeployment", 1); SetStandardDeploymentBounds(); SetCompassNorth(180); }
Re: Compass Display...
I'll give that a go and try it again.cavehobbit wrote:Just tried different directions (90, 180, 270) and they works fine. Could it be I place SetCompassNorth at the top of PreBattleSetup?
Re: Compass Display...
Tried it again (and moved the call to the top of PreBattleSetup) and it worked. Seems odd that the function call position would affect.
I use a program called "JSGME - Generic Mod Enabler" to activate mods and maybe I hadn't de-activated my texture file resulting in it effectively flipping the compass by 180 degrees twice.
Anyway I'm pleased it works - thanks.
I use a program called "JSGME - Generic Mod Enabler" to activate mods and maybe I hadn't de-activated my texture file resulting in it effectively flipping the compass by 180 degrees twice.
Anyway I'm pleased it works - thanks.