Map Database  •  FAQ  •  RSS  •  Login

The Spring Script

<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 13 Feb 2018, 22:43

The Spring Script

Hello all,

Few days ago i painted some tiles on one of my project when looked on it and got an idea. The idea was a kind of simulation of the winter. Lots of time heard about the winter is a double edge sword. The winter is good and bad if we think on it from battle point of view.
The rivers and lakes are frozen so easily can walk across them, but going to far without food an d supply is risky.
Now I've written a script to one of my already ready map which is very well ft for this idea.
I remeber when I made map Iceline that was created a kind of Spring theme map. After complete freezed it andbe The well known Cold Water.
Now the spring again visit the map via a script.

The script is simple. Only switching two different type of tiles. The frozen walkable lake tile to the not walkable water-frozen corner type and of course back.
The switching process happening randomly between 8-18 minutes. Always happening at the same time and takes approximately 30second while the whole map converting itself. (very small lag at game start and when switching process is happening, but not worse when a very far palyer or somebody else would lagging lagging :wink: )
If an unit standing on the walkable tile when that would be transitioning itself then the unit will swimm and the river'll take his body. The units can not swimmmmmm.

With this script the Cold Water Spring edition get two face:
1st the original opened map
and te 2nd where the two middle players stuck in the middle of the map face to face, the rest 4 players are in quite safe postion when the rivers are melted.

As always have fun!
ColdWater-Spring Edition.jpg

https://drive.google.com/file/d/1Sy34Rs ... rajBI/view
You do not have the required permissions to view the files attached to this post.
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 13 Feb 2018, 22:45

Re: The Spring Script

Hello all,

Few days ago i painted some tiles on one of my project when looked on it and got an idea. The idea was a kind of simulation of the winter. Lots of time heard about the winter is a double edge sword. The winter is good and bad if we think on it from battle point of view.
The rivers and lakes are frozen so easily can walk across them, but going to far without food an d supply is risky.
Now I've written a script to one of my already ready map which is very well ft for this idea.
I remeber when I made map Iceline that was created a kind of Spring theme map. After complete freezed it andbe The well known Cold Water.
Now the spring again visit the map via a script.

The script is simple. Only switching two different type of tiles. The frozen walkable lake tile to the not walkable water-frozen corner type and of course back.
The switching process happening randomly between 8-18 minutes. Always happening at the same time and takes approximately 30second while the whole map converting itself. (very small lag at game start and when switching process is happening, but not worse when a very far palyer or somebody else would lagging lagging :wink: )
If an unit standing on the walkable tile when that would be transitioning itself then the unit will swimm and the river'll take his body. The units can not swimmmmmm.

With this script the Cold Water Spring edition get two face:
1st the original opened map
and te 2nd where the two middle players stuck in the middle of the map face to face, the rest 4 players are in quite safe postion when the rivers are melted.

As always have fun!
ColdWater-Spring Edition.jpg
and a short video about from the early stage of the developing..
https://youtu.be/JGFRGZ6wJP8


https://drive.google.com/file/d/1Sy34Rs ... rajBI/view
<<

Rey

User avatar

KaM Remake Developer

Posts: 217

Joined: 12 Oct 2016, 07:41

KaM Skill Level: Fair

Location: Moscow

Post 13 Feb 2018, 23:31

Re: The Spring Script

Hi, very interesting idea!
That's something new - to make a map with dynamically changed terrain (or I missed other maps with similar idea).

I took a look at your script....and I have some ideas how to optimize it. I'll write you PM
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 14 Feb 2018, 00:07

Re: The Spring Script

Hi,
Thanks Rey for helped me! Already learnt about how to use records:)

I was trying to use cycle in cycle in the ontick phrase but the problem the action unitkill on specified tile made it very laggy. Only switching tiles is not laggy if using the record. But this unitkills when a tile is occupied makes things a bit complicated:S

Tried to separate it for 8section to be not as laggy as it would be in one complete turn.

Originally had this idea for grass map but there i had problems with matching different tile types. Even was not look out very well. So first staft using only one tile switch. It can be developemuch further ecasue the idea has good potential.

Im courious about your idea. Probably i would develop this script more in the new version as i have a monster idea to this map for the new releases.
Thanks avain!
<<

grayter

Barbarian

Posts: 107

Joined: 18 Aug 2014, 12:06

KaM Skill Level: Skilled

Location: Poland

Post 14 Feb 2018, 10:22

Re: The Spring Script

Hi, I planned to use similar script in one of mission in my newest campaign which is currently excluded because of some missing stuff. If you would like to cooperate with this script please send me PM.
<<

thunder

User avatar

Moorbach's Guard

Posts: 1044

Joined: 15 Apr 2012, 12:11

KaM Skill Level: Fair

Location: In the Market

Post 14 Feb 2018, 12:31

Re: The Spring Script

Hi, I planned to use similar script in one of mission in my newest campaign which is currently excluded because of some missing stuff. If you would like to cooperate with this script please send me PM.
Hi grayter!
Glad to inviting, but I'm not a great scripter as you can see from the code also. Now Rey is my master ;)
Today spent a bit more time on this script and now I could make it lag free. Maybe still not as professional but I could reduce the numbers of the lines of it too. I will share it soon.
Of course we can discuss about possibilities. I had ideas to switching other type of tiles, it is just a starting of it. (original idea: grass+ water(walkable one) tile switching to simple water tile.)
I have a simple coop project from long time ago in freezed status, probably I will continue to work on it because this kind of script also was planned for it.
Let's talk about your project. I'm courious. :wink:
<<

grayter

Barbarian

Posts: 107

Joined: 18 Aug 2014, 12:06

KaM Skill Level: Skilled

Location: Poland

Post 14 Feb 2018, 13:33

Re: The Spring Script

Let's talk about your project. I'm courious. :wink:
I shared with campaign, it is available in newest beta and here: viewtopic.php?f=5&t=3637
This is not regular campaign, there is some terrain surprises f.e. generating map from scratch by script only. Tutorial you can find here: https://github.com/reyandme/kam_remake/ ... g-Tutorial

Current excluded mission I was talking about is very ambitius project but it is impossible to do right now due some terrain limitations. But I develop some code for kam and maybe in future I will add those missing features.

Return to “Map Design”

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests