Compass Display...

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

Post Reply
parmenio
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 105
Joined: Sun Jan 10, 2010 5:41 pm

Compass Display...

Post by parmenio »

How is the display of the compass icon controlled?

Currently, having swapped the Stratton map round, the Royalists are now attacking from the East.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28294
Joined: Sun Dec 04, 2005 6:25 pm

Re: Compass Display...

Post by rbodleyscott »

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.
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.

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

Image
parmenio
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 105
Joined: Sun Jan 10, 2010 5:41 pm

Re: Compass Display...

Post by parmenio »

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.
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
Field of Glory 2
Field of Glory 2
Posts: 28294
Joined: Sun Dec 04, 2005 6:25 pm

Re: Compass Display...

Post by rbodleyscott »

parmenio wrote:
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.
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.
Cunning. You, sir, are a man of enterprise.

The other file may be the old BA one that we have forgotten to delete.
Richard Bodley Scott

Image
parmenio
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 105
Joined: Sun Jan 10, 2010 5:41 pm

Re: Compass Display...

Post by parmenio »

rbodleyscott wrote:The other file may be the old BA one that we have forgotten to delete.
Ah yes, of course - I've come across a couple of other bits like that.
cavehobbit
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2010
Joined: Tue Dec 07, 2010 2:31 pm
Location: Sweden

Re: Compass Display...

Post by cavehobbit »

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();

}
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28294
Joined: Sun Dec 04, 2005 6:25 pm

Re: Compass Display...

Post by rbodleyscott »

Ah, I wasn't aware of that built-in function. Doh.
Richard Bodley Scott

Image
cavehobbit
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2010
Joined: Tue Dec 07, 2010 2:31 pm
Location: Sweden

Re: Compass Display...

Post by cavehobbit »

Glad to enlighten you... :D

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!
parmenio
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 105
Joined: Sun Jan 10, 2010 5:41 pm

Re: Compass Display...

Post by parmenio »

cavehobbit 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();

}
Now that is exactly what I wanted! Thank you kindly
parmenio
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 105
Joined: Sun Jan 10, 2010 5:41 pm

Re: Compass Display...

Post by parmenio »

Unfortunately, SetCompassNorth appeared to have no effect when I used it....

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);
}
I've reverted to using my flipped texture.
cavehobbit
Brigadier-General - Elite Grenadier
Brigadier-General - Elite Grenadier
Posts: 2010
Joined: Tue Dec 07, 2010 2:31 pm
Location: Sweden

Re: Compass Display...

Post by cavehobbit »

parmenio wrote:Unfortunately, SetCompassNorth appeared to have no effect when I used it....

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);
}
I've reverted to using my flipped texture.
Just tried different directions (90, 180, 270) and they works fine. Could it be I place SetCompassNorth at the top of PreBattleSetup?
parmenio
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 105
Joined: Sun Jan 10, 2010 5:41 pm

Re: Compass Display...

Post by parmenio »

cavehobbit wrote:Just tried different directions (90, 180, 270) and they works fine. Could it be I place SetCompassNorth at the top of PreBattleSetup?
I'll give that a go and try it again.
parmenio
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 105
Joined: Sun Jan 10, 2010 5:41 pm

Re: Compass Display...

Post by parmenio »

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.
Post Reply

Return to “Scenario Design”