Page 5 of 5
Re: New scripting ideas for KaM Remake
PostPosted: 05 Feb 2013, 16:28
by pawel95
You mean a MAX. Setting ? Or what exactly?
Re: New scripting ideas for KaM Remake
PostPosted: 05 Feb 2013, 19:21
by FeyBart
You mean a MAX. Setting ? Or what exactly?
I think he means setting the maximum amount of buildings of one type?
I don't have any understanding of Object Pascal, but wouldn't that be quite easy?
Re: New scripting ideas for KaM Remake
PostPosted: 06 Feb 2013, 05:44
by Krom
That is not a task for scripting. Thats probably a mutator kind of thing.
Anyway, entrance blocking is a valid tactics and tower spam could be dealt with by other means.
Re: New scripting ideas for KaM Remake
PostPosted: 06 Feb 2013, 06:45
by Lewin
@dicsoupcan VIP is already possible with the current commands implemented, thanks for the suggestion
@pawel95: Your ideas are mostly possible too.
That is not a task for scripting. Thats probably a mutator kind of thing.
I agree, it's better suited to a mutator, that also means people can choose to play without it if they like. I don't like the idea of every map maker changing the rules of the game slightly for their map only because they think that's how the game should be. If people select a map that's included with the game they expect to get a consistent experience. For that reason I think the scripted maps like Tower Defence, King of the Hill, etc. should be under a separate category and not mixed in with the other building maps.
Limiting the number of each house that can be built is not really possible with scripting at the moment, since scripting is not really designed to change the rules of the game, but to cause certain actions to happen on certain events (hence we have Events, States and Actions).
Anyway, entrance blocking is a valid tactics and tower spam could be dealt with by other means.
I agree.
Re: New scripting ideas for KaM Remake
PostPosted: 06 Feb 2013, 18:55
by sado1
The most important scripting code for me as a mapmaker would be a setting for the amount of buildings from the same type (towers, market, fishers etc.) but I'm not sure if it's easy to create such a code. With a code like that it's possible to eliminate towerspam and maybe prevent things like blocking a bridge with markets etc.
That would be quite silly, given that farms/horsefarms/inns/barracks(...) can be used instead, good luck blocking that. Would be a nice option on some maps, indeed. Although, somehow I feel that you'd implement it on your every map if it was possible (and by the way... it's probably the 5th topic where you complain about barricades). Don't worry, it's possible I'll need to stop playing KaM for a while, you won't see me and my ultra defensive tactics soon

Re: New scripting ideas for KaM Remake
PostPosted: 07 Feb 2013, 00:34
by Leeuwgie
I said maybe, atleat it could prevent fish abuse for instance...
Re: New scripting ideas for KaM Remake
PostPosted: 07 Feb 2013, 03:49
by Lewin
I said maybe, atleat it could prevent fish abuse for instance...
What's fish abuse?
! | MODBREAK: Split off topic discussion about "abuse strategies" to here |
Re: New scripting ideas for KaM Remake
PostPosted: 07 Feb 2013, 10:47
by The Dark Lord
If anybody has other ideas for the kind of missions you'd like to make with this new scripting system, please write about them or PM them to me if you don't want to make your ideas public (TDL, I'm talking to you

). This means we can make sure we support enough script commands in the next release for your ideas to be implemented. Think about it in terms of:
1. What data do I need from the game? (e.g. get the current mission time, get the unit standing on a certain tile, number of swordsman a certain player has)
2. What actions do I need to perform? (e.g. send a message, add a unit to the school queue, order a warrior group to attack)
We appreciate your help

Most of my ideas aren't really complicated and could probably be done already (and most of them are for single player anyway). I've looked at the MissionScripts page and so far the thing I'm missing is an action to reveal an ally (I think allies should not automatically be revealed in single player, that's not always desirable. And otherwise there should be an action which makes someone an ally but doesn't reveal him, maybe a 4th parameter in AllianceChange?).
An action to center the screen at a certain location would be nice too.
I have a question as well. I've noticed the AddHousePlan actions; won't these interfere with the building that an AI player carries out automatically? Is it possible to postpone the 'automatic town building', e.g. first build two towers using AddHousePlan, then let the AI build the rest of the town?
If I come up with more I'll let you know.

Re: New scripting ideas for KaM Remake
PostPosted: 07 Feb 2013, 12:11
by Krom
@TDL: It's possible to instruct autobuild AI to make specific houses at specific places, but only if these places are not occupied by anything else. The thing is you dont gonna need it because at the time player discoveres AI base he does not cares how it was build, by script or by AI or was there from the start. Scripts should be used to add quest elements to the map, not to enhance the AI.
Re: New scripting ideas for KaM Remake
PostPosted: 07 Feb 2013, 12:18
by The Dark Lord
@TDL: It's possible to instruct autobuild AI to make specific houses at specific places, but only if these places are not occupied by anything else. The thing is you dont gonna need it because at the time player discoveres AI base he does not cares how it was build, by script or by AI or was there from the start. Scripts should be used to add quest elements to the map, not to enhance the AI.
I will surely need it, AI players can be allies too so then you can see how they build.
@Thunder, builder rush can be done with roads too so making that many fields is almost useless. And please stay on topic from now on.
Re: New scripting ideas for KaM Remake
PostPosted: 07 Feb 2013, 14:45
by Lewin
@TDL:
Having allies not always revealed is something Krom and I have discussed. In my opinion it is useful for allies to not always share fog of war vision, for example with your map Race Against the Clock in the Remake you can see the king's force which is meant to be still on the way. Of course you could use the GiveGroup commands in the script, but there are lots of other cases where you don't want allies to be revealed (for example in a quest where you are walking along a road and discover some farmers who offer to help you). Maybe we can have a script command that turns on/off sharing of fog of war between players. There could also be a .dat script command like !DISABLE_FOW_SHARING <player index> or something.
Once the AI is more complete we can add script commands to control him, maybe that could include instructing the city builder so for example an ally in a quest mission builds the buildings in his village that you want him to. For now you can set the AI to be non-auto build and give exact commands for how to build his village (e.g. when you get the event that he build the school, you call Add***Plan multiple tiles to add the road/inn). Of course if something blocks where you planned for him to build it won't work... but human players are probably the only unpredictable way that could happen.
Re: New scripting ideas for KaM Remake
PostPosted: 24 Feb 2013, 20:45
by The Dark Lord
Something Krom already came up with some time ago: cutscenes. Script commands to lock the screen on a certain location, an option to show a special message, etc.
Re: New scripting ideas for KaM Remake
PostPosted: 25 Feb 2013, 05:30
by Krom
@TDL: Your reminder gave me an idea - what if we add RXX packages to each mission, so that in script you could call PaintSprite(X,Y,Id,Owner) that would render said sprite in game. For example that could be a speech balloon, or a kings crown in arms of militia you must transport, or cutscene background and actors.
Locking the game has few undesired side-effects. If we don't freeze the timer, the game keeps on going and things keep on happening, e.g. player could be defeated or one of actors dies from hunger, etc. On the other hand, if we freeze the time, we can't move units around because of interaction logic. Solving any of these options is a complicated task which we probably won't be able to do in upcoming release.
Re: New scripting ideas for KaM Remake
PostPosted: 26 Feb 2013, 11:01
by pawel95
@TDL: Your reminder gave me an idea - what if we add RXX packages to each mission, so that in script you could call PaintSprite(X,Y,Id,Owner) that would render said sprite in game. For example that could be a speech balloon, or a kings crown in arms of militia you must transport, or cutscene background and actors.
This is really nice idea, than my king (knight with crown) and these other 100 ideas for scripting could be implemented
better and more beautiful.