Page 1 of 1
Compass Display...
Posted: Sun Jan 25, 2015 5:45 pm
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.
Re: Compass Display...
Posted: Sun Jan 25, 2015 5:53 pm
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)
Re: Compass Display...
Posted: Sun Jan 25, 2015 7:15 pm
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.
Re: Compass Display...
Posted: Sun Jan 25, 2015 7:21 pm
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.
Re: Compass Display...
Posted: Sun Jan 25, 2015 8:07 pm
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.
Re: Compass Display...
Posted: Mon Jan 26, 2015 8:02 am
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();
}
Re: Compass Display...
Posted: Mon Jan 26, 2015 8:13 am
by rbodleyscott
Ah, I wasn't aware of that built-in function. Doh.
Re: Compass Display...
Posted: Mon Jan 26, 2015 8:39 am
by cavehobbit
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!
Re: Compass Display...
Posted: Mon Jan 26, 2015 4:35 pm
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
Re: Compass Display...
Posted: Wed Jan 28, 2015 7:20 am
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.
Re: Compass Display...
Posted: Sat Jan 31, 2015 2:31 pm
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?
Re: Compass Display...
Posted: Sat Jan 31, 2015 6:09 pm
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.
Re: Compass Display...
Posted: Tue Feb 03, 2015 8:39 pm
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.