Page 2 of 9

Re: I need to understand these things to make a scenario...

Posted: Sat Nov 22, 2014 3:59 pm
by fogman
Created a quick scenario called 'Test scenario' and it can be found in:

\My Games\PIKEANDSHOT\MULTIPLAYER\FOGMAN\SCENARIOS

but i can't find in the game when i go to 'historical'.

Re: I need to understand these things to make a scenario...

Posted: Sat Nov 22, 2014 4:23 pm
by rbodleyscott
fogman wrote:Created a quick scenario called 'Test scenario' and it can be found in:

\My Games\PIKEANDSHOT\MULTIPLAYER\FOGMAN\SCENARIOS

but i can't find in the game when i go to 'historical'.
That is because it is multiplayer and the Historical button only shows SP campaign folders. You need to use the Multiplayer button. You also need to have a Campaign.txt file in your FOGMAN folder, containing the line

[nameofscenario]

(replace nameofscenario with whatever the name is)

Re: I need to understand these things to make a scenario...

Posted: Sat Nov 22, 2014 4:39 pm
by fogman
when i wrote
[Test scenario]
there's an error:
invalid chunk header on line 1 in...

when i wrote
Test scenario
there's no error but i can't find it when i click on new challenge

Re: I need to understand these things to make a scenario...

Posted: Sat Nov 22, 2014 5:34 pm
by rbodleyscott
fogman wrote:when i wrote
[Test scenario]
there's an error:
invalid chunk header on line 1 in...

when i wrote
Test scenario
there's no error but i can't find it when i click on new challenge
You can't have spaces in a chunk header.

You need to rename the scenario as TestScenario.BAM

and write

[TestScenario]

Re: I need to understand these things to make a scenario...

Posted: Sat Nov 22, 2014 11:38 pm
by fogman
how is elevation done on the map?

Re: I need to understand these things to make a scenario...

Posted: Sun Nov 23, 2014 12:18 am
by rbodleyscott
fogman wrote:how is elevation done on the map?
With tile placement selected, CTRL-L click to raise a tile, CTRL R-click to lower it.

Re: I need to understand these things to make a scenario...

Posted: Tue Nov 25, 2014 4:22 am
by fogman
1. where in the editor do you get to specify the % of losses to earn a win for either sides?

2. how do victory/objective points relate to 1. ?

3. i can only get a stream to go straight; the 'stream bend' only bends one way.

Re: I need to understand these things to make a scenario...

Posted: Tue Nov 25, 2014 7:24 am
by Adebar
fogman wrote:3. i can only get a stream to go straight; the 'stream bend' only bends one way.
Like the objects, you can turn all tiles by using the "R" button.

Re: I need to understand these things to make a scenario...

Posted: Tue Nov 25, 2014 8:24 am
by rbodleyscott
fogman wrote:1. where in the editor do you get to specify the % of losses to earn a win for either sides?
You cannot do that in the editor, you have to do that in a scenario script. See SCENARIOTEMPLATE.BSF in the main game directory. Copy that to your campaign /scenarios directory and rename it to match your scenario name.

You can then control the % losses for victory by altering the parameters of StandardVictoryConditions(60, 40, 60, 40, 2, 0) in VictoryConditions().
2. how do victory/objective points relate to 1. ?
We have not made use of the Slitherine victory points plugin - so I am not familiar with how it works - you would need to refer to the BA2 boards for an explanation of that.

I cannot vouch for whether it will work correctly together with StandardVictoryConditions().

Some trial and error and script rewriting may be required.

Nordlingen.BSF is an example of how we implemented an objective (not using the Slitherine victory points plugin).
3. i can only get a stream to go straight; the 'stream bend' only bends one way.
You can rotate it using the R key.

Re: I need to understand these things to make a scenario...

Posted: Tue Nov 25, 2014 9:00 pm
by fogman
are there ways to have units exiting (on purpose) the battlefield?

if not, how do you make an impassible tile (beside water)? or is there a way to have a water tile but which doesn't look like water?

Re: I need to understand these things to make a scenario...

Posted: Tue Nov 25, 2014 10:18 pm
by rbodleyscott
fogman wrote:are there ways to have units exiting (on purpose) the battlefield?
Not as such. However, it was dealt with in the StQuentin and Lostwithiel scenarios by the scripts removing from play any unit reaching the target map edge. (See the scenario scripts for those scenarios).
if not, how do you make an impassible tile (beside water)? or is there a way to have a water tile but which doesn't look like water?
There is already a Cliff terrain type which is effectively impassable, but we have not assigned it to any tiles.

If you added the following to Tiles.TXT in each base tile set, you would have an Impassable Cliff tile with the slope appearance.

[Tile66]
TERRAIN_0_0 Cliff
TEXX_0_0 6
TEXY_0_0 4
TEXTURE_0_0 0
GROUP Impassable
AUTOROTATE NO

Re: I need to understand these things to make a scenario...

Posted: Sun Nov 30, 2014 4:31 am
by fogman
i tried to make a swiss unit not keil by giving it 55% heavy weapon and 45% pikes. it's still keil. what exactly are the rules on this?

Re: I need to understand these things to make a scenario...

Posted: Sun Nov 30, 2014 8:18 am
by rbodleyscott
fogman wrote:i tried to make a swiss unit not keil by giving it 55% heavy weapon and 45% pikes. it's still keil. what exactly are the rules on this?
1) The unit must be at least 40% pikes.
2) The total number of pikes, heavy weapons and swordsmen in the unit must be a sufficient proportion of the unit that they are equivalent to more than UnitSize 500 as a proportion of the Squads file UnitSize attribute of the unit.
3) The total number of pikes, heavy weapons and swordsmen in the unit must be a sufficient proportion of the unit that they are currently (taking account of losses) equivalent to more than UnitSize 400.

Heavy Weapons count towards a keil, but not towards the 40% pikes. To make a unit like that "not a keil" it would need to be 39% pikes, 61% heavy weapon.

Here, for anyone who interested, is the code

Code: Select all

// Determines if unit has enough pikes, heavy weapon men and swordsmen left to qualify as a keil. Returns 0 if not keil, otherwise percent of men qualifying for keil POA
// No individual man should have more than one of these attribs.
FUNCTION PercentKeil(me)
{
	int percent;
	int original_block_size;
	int block_size;
	int ret;

	ret = 0;

	percent = GetAttrib(me, "Pike"); // Pikes

	if (percent >= 40)  // Unit at least 40% pikes
		{
			// Add heavy weapon men and swordsmen
			percent = percent + GetAttrib(me, "Heavy_Weapon") + GetAttrib(me,"Swordsmen");
			original_block_size = percent * GetBaseAttrib(me, "UnitSize"));
			original_block_size /= 100;
			if (original_block_size > 500) // Not >= because of 50:50 early Later Tercios
				{
					block_size = percent * GetAttrib(me, "UnitSize"));
					block_size *= GetAttrib(me, "TotalMen");
					block_size /= StartingStrength(me);
					block_size /= 100;

					if (block_size >= 400)
						{
							ret = percent;
						}
				}
		}

	return ret;
}

Re: I need to understand these things to make a scenario...

Posted: Fri Dec 05, 2014 12:28 pm
by fogman
If you added the following to Tiles.TXT in each base tile set, you would have an Impassable Cliff tile with the slope appearance.

[Tile66]
TERRAIN_0_0 Cliff
TEXX_0_0 6
TEXY_0_0 4
TEXTURE_0_0 0
GROUP Impassable
AUTOROTATE NO
where are those Tiles.TXT files? how many of them are there?

Re: I need to understand these things to make a scenario...

Posted: Fri Dec 05, 2014 12:32 pm
by rbodleyscott
fogman wrote:
If you added the following to Tiles.TXT in each base tile set, you would have an Impassable Cliff tile with the slope appearance.

[Tile66]
TERRAIN_0_0 Cliff
TEXX_0_0 6
TEXY_0_0 4
TEXTURE_0_0 0
GROUP Impassable
AUTOROTATE NO
where are those Tiles.TXT files? how many of them are there?
They are in

/Data/Tiles/CentralEurope_Base
/Data/Tiles/NorthernEurope_Base
/Data/Tiles/SouthernEurope_Base

there is one in each.

Re: I need to understand these things to make a scenario...

Posted: Sat Dec 06, 2014 1:42 pm
by fogman
are we supposed to modify game files? or am i to make a copy of all three and put them elsewhere?

Re: I need to understand these things to make a scenario...

Posted: Sat Dec 06, 2014 2:41 pm
by rbodleyscott
fogman wrote:are we supposed to modify game files? or am i to make a copy of all three and put them elsewhere?
You should not modify game files in the main installation. You should make a copy of them in your custom campaign.

You need to use the folder tree you will find near the end of the document linked below, as the relative location of the folders is not always the same as in the main installation.

http://www.slitherinebravo.net/GameWiki ... tub_engine

So, assuming your custom campaign was call FogmanCampaign they would be

Documents/My Games/PikeandShot/Campaigns/FogmanCampaign/Tiles/CentralEurope_Base/Tiles.txt
Documents/My Games/PikeandShot/Campaigns/FogmanCampaign/Tiles/NorthernEurope_Base/Tiles.txt
Documents/My Games/PikeandShot/Campaigns/FogmanCampaign/Tiles/SouthernEurope_Base/Tiles.txt

Re: I need to understand these things to make a scenario...

Posted: Sat Dec 06, 2014 3:09 pm
by fogman
there're some issues. would the 'deep water' overlay work as impassible also?

Re: I need to understand these things to make a scenario...

Posted: Sat Dec 06, 2014 3:33 pm
by rbodleyscott
fogman wrote:there're some issues. would the 'deep water' overlay work as impassible also?
Yes, but it would make more sense to add an (invisible) Impassible overlay that changes the terrain type to Impassible without altering the appearance of the tile:

Add this to the Tiles.Txt in the Overlay folders:

[Tile69]
LAYER 2
TERRAIN_0_0 Impassible
TEXX_0_0 6
TEXY_0_0 2
TEXTURE_0_0 1
Group Impassible

Then add Impassible to the terrain types in a copy of Terrain.txt (from /Data) in your campaign folder. (Documents/My Games/PikeandShot/Campaigns/FogmanCampaign/Terrain.txt)

[Impassible]
DETERMINED_FOOT 100
HEAVY_FOOT 100
MIXED_FOOT 100
MEDIUM_FOOT 100
WARRIORS 100
LIGHT_FOOT 100
DRAGOONS 100
MOB 100
BATTLE_WAGONS 100
ARTILLERY 100
LIGHT_ARTILLERY 100
GENDARMES 100
CAVALIERS 100
HORSE 100
DETERMINED_HORSE 100
LIGHT_HORSE 100
CAVALRY 100
COMMANDED_SHOT 100
CAMELRY 100
ELEPHANTS 100
TRAIN 100
BOAT 100
SHIP 100
COVERFLAGS 0 // can infantry hide in this terrain
COVERVALUE0 100 // % damage inflicted if target is stationary
COVERVALUE1 100 // % damage inflicted if target is moving
COVERVALUE2 30 // % chance of getting bogged down when starting turn in this terrain * % chance of bogging so this /6 /10 is about the right amount.
COVERVALUE3 0 // is this a fortification? 1 = light, 2 = medium, 3 = heavy
COVERVALUE4 3 // 0 = open, 1 = not open but otherwise clear, 2 = Rough, 3 = Difficult
COVERVALUE5 0 // 0 = non-road, 1 = road
COVERVALUE6 0 // 0 = non-built-up area, 1 = built-up area

Re: I need to understand these things to make a scenario...

Posted: Sat Dec 06, 2014 4:31 pm
by fogman
if the overlay was invisible, how would players know except mousing over the tile? I use impassible terrain as an overlay to create lanes to compartmentalize fighting. right now, the small issue is that the cliff graphic for impassible look exactly like the graphic for elevation.