Page 1 of 1
Editing the mission files
PostPosted: 21 Feb 2012, 20:11
by slapdash
Hi all,
I'm not entirely sure where to put this question, but I'm playing around with the .dat files for the existing missions so I can get an idea of how to do my own maps and scenarios.
I'm a little bit of a complete noob with programming but I was wondering if there's a way of using the "CLEAR_UP" command to reveal a large portion of the map without lots of lines of revealed areas with only 18 squares radius revealed?
Possibly something like:
For i=1; i=10; i++
CLEAR_UP [i*10] [i*10] 18
Does anyone have any suggestions?
Re: Editing the mission files
PostPosted: 22 Feb 2012, 01:07
by Lewin
If you are talking about KaM TSK/TPR then the maximum radius you can reveal is 16 tiles (it won't accept higher values)
If you are talking about the KaM Remake, there is no limit to the CLEAR_UP radius.
In either case, the mission script is not a proper language so there's no way to use for-loops or anything like that. Eventually we might extend it to allow for that in the KaM Remake, but it would be a lot of work for little gain at the moment. Maybe when/if I learn more about parsers and writing a fully featured script interpreter at university

Re: Editing the mission files
PostPosted: 22 Feb 2012, 13:36
by Guest
Hi Lewin,
Thanks for the reply. I've just tried it out with the maps on the remake and I'm guessing that the original campaign maps that were included were done with the old game engine as the maximum radius still seems to apply.
How easy would it be to re-do the campaign maps and missions with a mission/map editor and replace the originals?
Re: Editing the mission files
PostPosted: 22 Feb 2012, 15:23
by Lewin
Well yes, the original campaigns were designed for TPR so they don't use radii larger than 16, it uses lots of them when they want to reveal a large area. Of course we haven't bothered to go through the campaign missions and replace smaller radii with larger ones, what is the point? It wouldn't make any difference to the way it looks.
The reason we made the Remake use the same formats as KaM is so we can load original mission files with no conversion necessary.
What do you mean by re-do the campaign maps and missions? What would it improve?
Re: Editing the mission files
PostPosted: 22 Feb 2012, 15:42
by slapdash
I just rechecked and changing the radii does work, silly me.
I'm essentially trying to create a version without the "fog of war" on the game so that there's more warning of any incoming attacks, and also to avoid attacking enemy towns with a decent force only to see hundreds of troops pour out from behind the unrevealed map.
Re: Editing the mission files
PostPosted: 22 Feb 2012, 15:53
by The Dark Lord
So you're actually saying you want to reveal (almost) the whole map from the start? I can't imagine how that could be any fun.
Re: Editing the mission files
PostPosted: 23 Feb 2012, 16:27
by kocsis1david
Lua could be a good language for mission scripting. You can implement functions in Pascal and register it, so when you run the script it could be called. Settlers V uses it too.