Page 1 of 2

New Terrain Sets

Posted: Mon Dec 01, 2014 10:21 pm
by jomni
What are the steps in creating a new terrain set? I want to make a Japan terrain set for my mod.

Or is it easier to overwrite an existing one in my campaign folder?

Also in the army list. What determines Northern Europe = 2? Which files are these set.
If I make Japan, can I make it 4?

Re: New Terrain Sets

Posted: Mon Dec 01, 2014 11:38 pm
by rbodleyscott
jomni wrote:What are the steps in creating a new terrain set? I want to make a Japan terrain set for my mod.

Or is it easier to overwrite an existing one in my campaign folder?
I guess it depends on whether you merely want to change the appearance of the tiles, or whether you intend to rewrite the Random Map Generator to do Japanese type terrain.

If all you want is to alter the appearance of the tiles, then you may as well just overwrite an existing folder in your campaign folder.

If you are going to mod the Slith_RandomMap plugin you could write entirely new folders.

According to the chart in

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

you would need to make the Japanese tile folders

/My Documents/My Games/PikeandShot/MyJapaneseCampaign/Tiles/Japanese_Base

and

/My Documents/My Games/PikeandShot/MyJapaneseCampaign/Tiles/Japanese_Overlay

and make your own version of the files you will find in the vanilla tile folders.
Also in the army list. What determines Northern Europe = 2? Which files are these set.
If I make Japan, can I make it 4?
Actually Central Europe = 0, Northern Europe = 1, Southern Europe = 2.

See RandomMapBuild() in MapGenerate.BSF in /Tools/Slith_RandomMap/UI

Re: New Terrain Sets

Posted: Tue Dec 02, 2014 12:44 am
by jomni
Yeah I figured out 1 was NorthernEurope.

Both methods are good for me. I think I'll base it on NorthernEurope and change the look of the buildings. I also don't need the light colored wheat tiles so I guess that means I need to change the random terrain script. If I don't want to mess with the script then I need to just copy over another tile. Where see the tiles stored?

The random map UI is in the core folder and not in the campaign folder?

Re: New Terrain Sets

Posted: Tue Dec 02, 2014 8:02 am
by rbodleyscott
jomni wrote:Yeah I figured out 1 was NorthernEurope.

Both methods are good for me. I think I'll base it on NorthernEurope and change the look of the buildings. I also don't need the light colored wheat tiles so I guess that means I need to change the random terrain script. If I don't want to mess with the script then I need to just copy over another tile. Where see the tiles stored?


You don't even need to copy over another tile, you can just make the Tile definition in the tiles.TXT file point to a different location in the Tex0.TGA file.
The random map UI is in the core folder and not in the campaign folder?
It is a Plugin, in the Tools folder - see above. I am not sure whether you can have a modded version in your custom campaign - I will ask Pip.

Re: New Terrain Sets

Posted: Tue Dec 02, 2014 4:40 pm
by rbodleyscott
rbodleyscott wrote:It is a Plugin, in the Tools folder - see above. I am not sure whether you can have a modded version in your custom campaign - I will ask Pip.
You cannot currently have customized plugins in custom campaigns. It is on the (very long) wish list.

Of course we do intend to add other typical regional map types in due course.

In the meantime you would need to use the standard vanilla random map generator for the CentralEurope (Germany) or SouthernEurope (Italy) regions with customised tiles and object sets. The NorthernEurope (England) generator has hedges, which would perhaps be unhistorical in Japan (though I don't know). The CentralEurope generator adds more Woods than the SouthernEurope generator. So it depends how woody Japan was in the 16th century as to which of those would be best to use.

Re: New Terrain Sets

Posted: Tue Dec 02, 2014 10:22 pm
by jomni
Thanks for telling me about the hedges. I'll use CentralEurope then. More woods are fine. I've been using Southern Europe in my screenshots and don't think it looks right with all they bright and dry looking stuff.
Of course, I'll have to change the look of the villages and objects.

Re: New Terrain Sets

Posted: Wed Dec 03, 2014 1:54 pm
by jomni
Hi

What am I doing wrong here? In the editor, I have two CentralEurope sets.
I select the object with my new skins but it goes back to normal when I place it.
Also, in quick battle, my new skins aren't used.

Image

I copied over CentralEurope into My Games\PIKEANDSHOT\CAMPAIGNS\SengokuJidai\OBJECTS\CentralEurope
I then painted Texture@.dds but not yet Texture_M.dds. What is Texture_M?

Edit: I figured out that I need to also do Texture_M as well but what is it's purpose?

Re: New Terrain Sets

Posted: Wed Dec 03, 2014 2:26 pm
by rbodleyscott
jomni wrote:Edit: I figured out that I need to also do Texture_M as well but what is it's purpose?
It's the textures for areas not currently visible to the player.

Re: New Terrain Sets

Posted: Wed Dec 03, 2014 2:27 pm
by rbodleyscott
jomni wrote:Hi

What am I doing wrong here? In the editor, I have two CentralEurope sets.
I select the object with my new skins but it goes back to normal when I place it.
Also, in quick battle, my new skins aren't used.

I copied over CentralEurope into My Games\PIKEANDSHOT\CAMPAIGNS\SengokuJidai\OBJECTS\CentralEurope
I will have to ask Pip.

Re: New Terrain Sets

Posted: Wed Dec 03, 2014 2:41 pm
by rbodleyscott
If I had to guess, I would assume that the Editor is defaulting to displaying the object from the default CentralEurope set rather than the one in your campaign, and the same with the Skirmish generator. It probably shouldn't do that when you are in a custom campaign.

For editor created scenarios the simple solution would be to name your terrain set Japan or somesuch then it should work. That won't make it work in skirmishes of course.

As I say, I will talk to Pip.

Re: New Terrain Sets

Posted: Wed Dec 03, 2014 2:48 pm
by jomni
Well it now works in the editor (see my Japanese mod thread) because I changed both texture and texture_M.
But skirmish will still take the original CentralEurope map objects. :(

Re: New Terrain Sets

Posted: Wed Dec 03, 2014 3:14 pm
by rbodleyscott
Jomni, I think I can see a solution. I will send you a PM.

Re: New Terrain Sets

Posted: Wed Dec 03, 2014 8:06 pm
by rbodleyscott
jomni wrote:But skirmish will still take the original CentralEurope map objects. :(
If you could send me a link from which I could download your current Japanese tile and object sets, I will see if I can make them work with a minor tweak to the random map generator code. Please call them Japan rather than CentralEurope.

If I get it to work as I think I can, I can include a Japan region hook in the code for the next patch. I won't put your terrain/tiles in the main game, but the change I envisage will hopefully allow you to use them in your custom campaign by specifying a different region number in your Japanese ArmyList.txt file.

I will have to get the program to use one of the 3 existing regions for the actual terrain generation, but I think I can get it to use your Japanese textures. Are you sure that you want to use the German map generator rather than the Italian? (Don't worry about the colour, that is determined by the textures you use. The only difference, as far as I can recall, is that the German region generator adds more woods).

Please reply by email - my email address is in the PM I sent you.

Please note that the window of opportunity for this is less than 24 hours, otherwise the patch will be finalised and I won't be able to do this.

Re: New Terrain Sets

Posted: Thu Dec 04, 2014 12:41 am
by jomni
A rice paddy tile would be cool. How do I go about editing adding tiles? Where are they stored in the main and mod folders. The tiles folder don't have much.

Also if I can make them partial water, it would look cool.

Re: New Terrain Sets

Posted: Thu Dec 04, 2014 9:25 am
by rbodleyscott
jomni wrote:A rice paddy tile would be cool. How do I go about editing adding tiles? Where are they stored in the main and mod folders. The tiles folder don't have much.

Also if I can make them partial water, it would look cool.
To get the water effect to appear you need to use the Water base tile. (Turn autoedge off when placing these). Then you can make a Paddy overlay tile.

The tile overlay textures are all held in Tex1.TGA and Tex1_M.TGA.

The Tiles.txt definition tells the program which x,y locus on the texture to use for the tile. Several tiles can share the same texture but be defined differently.

For example you could use the existing Marsh overlay texture for Paddy fields, but change the terrain type, by adding the following to the Overlay Tiles.Txt

[Tile69]
LAYER 1
TERRAIN_0_0 Paddy
TEXX_0_0 5
TEXY_0_0 5
TEXTURE_0_0 1
GROUP Paddy
AUTOROTATE YES

Then you would need to define the effects of the Terrain type [Paddy] in the Terrain.txt file. (In the main installation, this is in /Data), The terrain definitions for the existing terrain types are fairly self-explanatory. The number after each troop type is the AP cost to enter that square orthogonally. The rest is commented. The bogging down thing currently has no effect in Pike & Shot.

Re: New Terrain Sets

Posted: Thu Dec 04, 2014 1:28 pm
by jomni
Thanks.

Re: New Terrain Sets

Posted: Thu Mar 12, 2015 5:42 pm
by Sabratha
rbodleyscott wrote:
rbodleyscott wrote:It is a Plugin, in the Tools folder - see above. I am not sure whether you can have a modded version in your custom campaign - I will ask Pip.
You cannot currently have customized plugins in custom campaigns. It is on the (very long) wish list.

Of course we do intend to add other typical regional map types in due course.

In the meantime you would need to use the standard vanilla random map generator for the CentralEurope (Germany) or SouthernEurope (Italy) regions with customised tiles and object sets. The NorthernEurope (England) generator has hedges, which would perhaps be unhistorical in Japan (though I don't know). The CentralEurope generator adds more Woods than the SouthernEurope generator. So it depends how woody Japan was in the 16th century as to which of those would be best to use.
Well, was thinking of a middle east terrain set and /or a steppe set. Thing is, with a steppe set I'd need less farms and less forests than in south europe, but perhaps a "high grass" terrain instead which would allow infantry to cover in it.

Re: New Terrain Sets

Posted: Thu Mar 12, 2015 5:58 pm
by rbodleyscott
Sabratha wrote:
rbodleyscott wrote:
rbodleyscott wrote:It is a Plugin, in the Tools folder - see above. I am not sure whether you can have a modded version in your custom campaign - I will ask Pip.
You cannot currently have customized plugins in custom campaigns. It is on the (very long) wish list.

Of course we do intend to add other typical regional map types in due course.

In the meantime you would need to use the standard vanilla random map generator for the CentralEurope (Germany) or SouthernEurope (Italy) regions with customised tiles and object sets. The NorthernEurope (England) generator has hedges, which would perhaps be unhistorical in Japan (though I don't know). The CentralEurope generator adds more Woods than the SouthernEurope generator. So it depends how woody Japan was in the 16th century as to which of those would be best to use.
Well, was thinking of a middle east terrain set and /or a steppe set. Thing is, with a steppe set I'd need less farms and less forests than in south europe, but perhaps a "high grass" terrain instead which would allow infantry to cover in it.
Since the last update (1.0.3) you can now mod the Random Map plugin scripts because they have been moved to the main build - only shells have been left in the plugin (TOOLS) folder and the actual code has been moved to scripts in the /Data/Battle/Scripts folder. (Slith_RandomMap2.BSF, MapGenerate2.BSF, MapGenerateBattle2.BSF).

This means that if you put modded versions of the above files in your campaign, they will automatically over-write the vanilla versions.

The actual map generation code is in MapGenerateBattle2.BSF so that is mainly what you would have to Mod to change the terrain generation.

Re: New Terrain Sets

Posted: Thu Mar 12, 2015 6:05 pm
by Sabratha
rbodleyscott wrote:Since the last update (1.0.3) you can now mod the Random Map plugin scripts because they have been moved to the main build - only shells have been left in the plugin (TOOLS) folder and the actual code has been moved to scripts in the /Data/Battle/Scripts folder. (Slith_RandomMap2.BSF, MapGenerate2.BSF, MapGenerateBattle2.BSF).

This means that if you put modded versions of the above files in your campaign, they will automatically over-write the vanilla versions.

The actual map generation code is in MapGenerateBattle2.BSF so that is mainly what you would have to Mod to change the terrain generation.
Great to hear, all I needed to know. Will come back if I have issues with modding this, but I hope i'll manage.

Re: New Terrain Sets

Posted: Thu Mar 12, 2015 10:49 pm
by jomni
Yes. Thanks to Sabratha's tiles, I will also be moding the map generation code for Japan. Less cities villages and farms, use rice paddies, etc. Will get back if I have questions.