Learning to add Terrain to the game
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
-
- Posts: 40
- Joined: August 25th, 2013, 12:50 pm
Re: Learning to add Terrain to the game
I added icehills now to the game, most transitions work now, but i have a small problem and some questions.
in the terrain_graphics.cfg from mainline i can find
TRANSITION_COMPLETE_L and TRANSITION_COMPLETE_L F
what is the difference here and when do you use L and when LF
some terrain-strings are in () and some not, why is this so??
The problem has to do with the water transition.
For me it looks like the ice-to-water-transition uses two images:
for example
first the ice-n.png
and then the ice-to-water-n.png over ice-n.png to add a special "ice-to-water"-effect
is that so and when yes, how can i do this with my own icehills-graphics?
i would like to use my own ice-n.png (renamed in icehills-n) and then the ice-to-water-n.png from mainline
in the terrain_graphics.cfg from mainline i can find
TRANSITION_COMPLETE_L and TRANSITION_COMPLETE_L F
what is the difference here and when do you use L and when LF
some terrain-strings are in () and some not, why is this so??
The problem has to do with the water transition.
For me it looks like the ice-to-water-transition uses two images:
for example
first the ice-n.png
and then the ice-to-water-n.png over ice-n.png to add a special "ice-to-water"-effect
is that so and when yes, how can i do this with my own icehills-graphics?
i would like to use my own ice-n.png (renamed in icehills-n) and then the ice-to-water-n.png from mainline
- Alarantalara
- Art Contributor
- Posts: 787
- Joined: April 23rd, 2010, 8:17 pm
- Location: Canada
Re: Learning to add Terrain to the game
I've actually been trying to keep it up to date with syntax changes. As I recall, it covers everything up to 1.11.1, though I haven't checked for anything new since then.8680 wrote:Alarantalara’s Custom Terrain Tutorial may be helpful, though it’s a bit old.
You use L when you want to use the default flag (which interacts with mainline terrain) and LF when you want to not interact with mainline transitions as much or have some other reason not to use the default. Because a flag prevents any other terrain image that uses the same flag fom being drawn, the LF is used in mainline when the terrain has multiple images to make the entire appearance. Thus you see it with water to land transitions, as well as swamp ( to avoid interfering wit overlay terrains).rubberduck wrote:I added icehills now to the game, most transitions work now, but i have a small problem and some questions.
in the terrain_graphics.cfg from mainline i can find
TRANSITION_COMPLETE_L and TRANSITION_COMPLETE_L F
what is the difference here and when do you use L and when LF
Readability. In some macros it actually matters, but terrain tends not to use problematic characters, so it doesn't really matter.some terrain-strings are in () and some not, why is this so??
Use both. As long as you use two different flags, one for each macro, you should be fine. You will probably find it works better if you match the two flags used by mainline.The problem has to do with the water transition.
For me it looks like the ice-to-water-transition uses two images:
for example
first the ice-n.png
and then the ice-to-water-n.png over ice-n.png to add a special "ice-to-water"-effect
is that so and when yes, how can i do this with my own icehills-graphics?
i would like to use my own ice-n.png (renamed in icehills-n) and then the ice-to-water-n.png from mainline
Also, if you're doing custom hills, I really hope your terrain string looks something like Hay. You may find you'll get free correct transitions without having to do anything if it wasn't.
-
- Posts: 40
- Joined: August 25th, 2013, 12:50 pm
Re: Learning to add Terrain to the game
it works now how i want it, the transition is now like the transition from ice to water
to make this work i had to change the code a bit
my code now looks like this (here i copied the original code from mainline)
{TRANSITION_COMPLETE_LF Aa,Ha,Ms,Ai (W*,S*) -485 non_submerged frozen/ice}
{TRANSITION_COMPLETE_LF Aa,Ha,Ms,Ai (W*,S*) -505 submerged frozen/ice-to-water}
before non_submerged and submerged were missing and i used L and not LF, but the frozen/ice-to-water graphics were missing
then i read about non_submerged and submerged and i tried it but i got an error when starting the editor.
Then i changed the L to LF (like in mainline) and it worked.
Now i want to add some more terrains
to make this work i had to change the code a bit
my code now looks like this (here i copied the original code from mainline)
{TRANSITION_COMPLETE_LF Aa,Ha,Ms,Ai (W*,S*) -485 non_submerged frozen/ice}
{TRANSITION_COMPLETE_LF Aa,Ha,Ms,Ai (W*,S*) -505 submerged frozen/ice-to-water}
before non_submerged and submerged were missing and i used L and not LF, but the frozen/ice-to-water graphics were missing
then i read about non_submerged and submerged and i tried it but i got an error when starting the editor.
Then i changed the L to LF (like in mainline) and it worked.
Now i want to add some more terrains
-
- Posts: 40
- Joined: August 25th, 2013, 12:50 pm
Re: Learning to add Terrain to the game
i have a problem now with adding the ice-chasm terrain.
the icechasm has an extra chasm-wall
i called the terrain code "Qxa"
so it is affected by this code (you get "regular-snow"-transitions to ice or snow-hexes)
i want to disable this transition for my chasm-version, i want to use the standard transition used by icechasm
the icechasm has an extra chasm-wall
i called the terrain code "Qxa"
so it is affected by this code (you get "regular-snow"-transitions to ice or snow-hexes)
Code: Select all
{WALL_TRANSITION_LF Qx* (Ai*,Aa*,Ha*,Ms*,) -90 ground chasm/regular-snow}
i want to disable this transition for my chasm-version, i want to use the standard transition used by icechasm
- Alarantalara
- Art Contributor
- Posts: 787
- Joined: April 23rd, 2010, 8:17 pm
- Location: Canada
Re: Learning to add Terrain to the game
There isn't enough information here. At the absolute minimum, what is the "standard transition"?rubberduck wrote:i have a problem now with adding the ice-chasm terrain.
the icechasm has an extra chasm-wall
i called the terrain code "Qxa"
so it is affected by this code (you get "regular-snow"-transitions to ice or snow-hexes)Code: Select all
{WALL_TRANSITION_LF Qx* (Ai*,Aa*,Ha*,Ms*,) -90 ground chasm/regular-snow}
i want to disable this transition for my chasm-version, i want to use the standard transition used by icechasm
-
- Posts: 40
- Joined: August 25th, 2013, 12:50 pm
Re: Learning to add Terrain to the game
on the top of the image you can see my chasm-terrain.
on the bottom there are two kinds of chasm: normal and lava-chasm
every chasm has a kind of transition to non-frozen terrain (here a transtition with grass)
then a added different kinds of frozen terrain to the chasm
the normal stone-chasm has a snowy transition to frozen terrain, while lava-chasm has not this kind of transition.
my chasm terrain uses a bluish ice-like transition to normal terrain.
when my chasm is next to frozen terrain, it uses the same transition like the normal chasm.
i want that my chasm uses the same bluish ice-like terrain next to frozen terrain.
on the bottom there are two kinds of chasm: normal and lava-chasm
every chasm has a kind of transition to non-frozen terrain (here a transtition with grass)
then a added different kinds of frozen terrain to the chasm
the normal stone-chasm has a snowy transition to frozen terrain, while lava-chasm has not this kind of transition.
my chasm terrain uses a bluish ice-like transition to normal terrain.
when my chasm is next to frozen terrain, it uses the same transition like the normal chasm.
i want that my chasm uses the same bluish ice-like terrain next to frozen terrain.
-
- Posts: 40
- Joined: August 25th, 2013, 12:50 pm
Re: Learning to add Terrain to the game
i solved the problem now