Map Database  •  FAQ  •  RSS  •  Login

Cooperative maps for the Remake

<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 28 Nov 2011, 14:02

Cooperative maps for the Remake

Hey guys,
With Danjb's help we now have a section of "cooperative" maps which is awesome. There only one problems: We don't HAVE any cooperative maps :D

So I'm asking anyone who knows how to script a singleplayer AI for KaM to make some coop missions, or edit one of your old missions to work cooperatively.

The requirements are:
- Two or more human players
- As many AIs as you like
- Same AI script as in singleplayer, but the AIs should be much stronger as they are facing more enemies.
- The description should say which positions are for humans and which for AI
- You can make it using my mission editor in singleplayer mode, and just leave some players as the "humans" (even though some of them must be AIs because you can only have human players)

So if you're editing an old single player mission there's not much todo, just add another human and beef up the AI a bit.

I hope to have some coop missions sent to me soon :)
Lewin.
P.S. It looks like the new Remake version will be release around 10/12/11 at the earliest, maybe later.
<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 28 Nov 2011, 15:53

Re: Cooperative maps for the Remake

- The description should say which positions are for humans and which for AI
I have a question about this. Is it possible to set the max number of players on 2 while still having a third player?
So it says it's a 2 player map, player 0 and 1 can be chosen by humans, and yet there is a third player (AI) which can't be chosen?

Edit:

I'm now working on the script, and I noticed the remake is quite picky. One little mistake caused a range check error. :P

And I have a 'problem'. The AI merges all batallions so that it has groups of 4x3 (as I wrote in TROUP_PARAM). The problem is that the soldiers leave defense positions in order to make groups of 12, while I just want 4 soldiers on each defense position. I could prevent this by adding 8 additional soldiers to every group, but that would be disastrous as I gave the enemy 52 (!) defense positions.
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 29 Nov 2011, 00:02

Re: Cooperative maps for the Remake

I have a question about this. Is it possible to set the max number of players on 2 while still having a third player?
So it says it's a 2 player map, player 0 and 1 can be chosen by humans, and yet there is a third player (AI) which can't be chosen?
No you can't do that. The AIs must just be normal positions and the players have to choose them correctly. I think eventually we'll make coop mode different so it selects the AIs automatically and forces you to play as the humans, but it's not a high priority.
I'm now working on the script, and I noticed the remake is quite picky. One little mistake caused a range check error. :P
What was the mistake? I could add a check for it so it silently ignores it if that would be better.
And I have a 'problem'. The AI merges all batallions so that it has groups of 4x3 (as I wrote in TROUP_PARAM). The problem is that the soldiers leave defense positions in order to make groups of 12, while I just want 4 soldiers on each defense position. I could prevent this by adding 8 additional soldiers to every group, but that would be disastrous as I gave the enemy 52 (!) defense positions.
This has changed in the new version, they don't split things around so much. They'll leave them where they currently are most of the time and just add new troops to them. I'll send you a new version to test it in. (and anyone else making a coop mission, I just don't want to post these unofficial builds publicly because they're often quite buggy)
Cheers,
Lewin.
<<

Danjb

Sword Fighter

Posts: 288

Joined: 14 May 2007, 22:00

Post 29 Nov 2011, 11:03

Really excited about this :D

I'd love to see the TSK campaign turned into a co-operative campaign! It shouldn't be too hard to do for some missions, i.e. level 5, where you already have an ally.

The AI would have to be more aggressive though, I think, otherwise it would be way too easy. Although actually this may not be the case, since the Remake AI seems a bit cleverer so far anyway.
<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 29 Nov 2011, 12:03

Re: Cooperative maps for the Remake

No you can't do that. The AIs must just be normal positions and the players have to choose them correctly. I think eventually we'll make coop mode different so it selects the AIs automatically and forces you to play as the humans, but it's not a high priority.
Okay, no problem.
What was the mistake? I could add a check for it so it silently ignores it if that would be better.
I wrote !SET_AI_DEFENSE A B 0 4 E F instead of A B 4 0 E F.
This has changed in the new version, they don't split things around so much. They'll leave them where they currently are most of the time and just add new troops to them. I'll send you a new version to test it in. (and anyone else making a coop mission, I just don't want to post these unofficial builds publicly because they're often quite buggy)
Ok, glad to hear. :)
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 29 Nov 2011, 13:53

I'd love to see the TSK campaign turned into a co-operative campaign! It shouldn't be too hard to do for some missions, i.e. level 5, where you already have an ally.

The AI would have to be more aggressive though, I think, otherwise it would be way too easy. Although actually this may not be the case, since the Remake AI seems a bit cleverer so far anyway.
If someone feels like converting some of the original missions for coop then please do so and send them to me :)
I wrote !SET_AI_DEFENSE A B 0 4 E F instead of A B 4 0 E F.
Hmmm so that would be an invalid AI group ID (4). Well I don't think it's worth adding checks for every parameter and reporting it to the user... most people edit the script with a mission editor anyway which wouldn't let you write something like that. There are so many parameters that would need to be checked to cover everything. I hope you managed to figure it out easily enough, I guess it wouldn't have given you any hints as to what the problem was...
<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 29 Nov 2011, 16:22

Hmmm so that would be an invalid AI group ID (4). Well I don't think it's worth adding checks for every parameter and reporting it to the user... most people edit the script with a mission editor anyway which wouldn't let you write something like that. There are so many parameters that would need to be checked to cover everything. I hope you managed to figure it out easily enough, I guess it wouldn't have given you any hints as to what the problem was...
I think you're right. Most people use a mission editor. I'm just too old-fashioned. :P
Fortunately it didn't take me long to figure it out. I noticed the error occurred after I added AI defense positions and I even made the mistake in the first of all 52 positions. :)
<<

pawel95

Castle Guard Swordsman

Posts: 1912

Joined: 03 Oct 2008, 22:00

KaM Skill Level: Skilled

Location: "Pawel95" on Youtube.com

Post 29 Nov 2011, 20:02

But one general question :D
What is a cooperative map?
Is this a map for example, who has at first 200 coal, or not?
Because I think it is the time to make a really good map now.
You aren´t a good player if you have a good PT-Army. You should be able to use it correctly!

You want cheap new Computergames? No problem, you will get them here: https://www.g2a.com/r/pawel95
<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 29 Nov 2011, 20:48

No, it means humans vs computers.

I'm still facing problems with soldiers joining each other. This prevents me from scripting an early attack because the AI first fills up defense positions. :/
<<

pawel95

Castle Guard Swordsman

Posts: 1912

Joined: 03 Oct 2008, 22:00

KaM Skill Level: Skilled

Location: "Pawel95" on Youtube.com

Post 29 Nov 2011, 21:01

Ahh ok.

Yes this is normal by the AI, but you can change from frontline to defense or other way round?!
You aren´t a good player if you have a good PT-Army. You should be able to use it correctly!

You want cheap new Computergames? No problem, you will get them here: https://www.g2a.com/r/pawel95
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 29 Nov 2011, 23:53

I'm still facing problems with soldiers joining each other. This prevents me from scripting an early attack because the AI first fills up defense positions. :/
Even in r2623? (check your email) If so I'd like to discuss with you about tweaking the AI to make them behave more like KaM. You know what they are supposed to do better than anyone.
<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 30 Nov 2011, 00:48

@Pawel
What do you mean?

@Lewin
Yes, in r2623.
My plan was to place groups of 4 soldiers on every defense position and make some additional groups that don't have a defense position and are free to attack so I can let them attack the human players any moment I want.

I'll paste a piece of my script to explain (in reality there are more defense positions but that doesn't really add anything so I left them out):
!SET_GROUP 15 174 68 0 4 4
!SET_AI_DEFENSE 174 68 0 0 60 0
!SET_GROUP 19 169 61 0 4 4
!SET_AI_DEFENSE 169 61 0 1 50 0
!SET_GROUP 17 174 65 0 4 4
!SET_AI_DEFENSE 174 65 0 2 60 0
!SET_GROUP 21 164 61 0 4 4
!SET_AI_DEFENSE 164 61 0 3 50 0

!SET_GROUP 15 148 81 6 4 4
!SET_AI_DEFENSE 148 81 6 0 20 1
!SET_GROUP 15 161 94 6 4 4
!SET_AI_DEFENSE 161 94 6 0 20 1
!SET_GROUP 15 173 12 6 4 4
!SET_AI_DEFENSE 173 12 6 0 20 1
!SET_GROUP 15 169 12 6 4 4
!SET_AI_DEFENSE 169 12 6 0 20 1
!SET_GROUP 15 177 12 6 4 4
!SET_AI_DEFENSE 177 12 6 0 20 1

!SET_GROUP 14 158 5 6 8 32
!SET_GROUP 17 167 3 6 3 9
!SET_GROUP 17 163 7 6 3 9
!SET_GROUP 15 163 3 6 3 9
As you can see, every defense position has already been taken by a group. This means the last four groups can spend their spare time with some annoying humans!
When the AI recruits soldiers, he will start 'filling' the groups with importance 0 at the top first and then move on to the ones with importance 0 below them, then the ones with importance 1, etc. If I would set the last group (!SET_GROUP 15 163 3 6 3 9, lets call it 'Group A') at the top of the script, Group A will take the first defense position (!SET_AI_DEFENSE 174 68 0 0 60 0), and the group on 174 68, which was already at the correct position, will move on to the second defense position, etcetera.

The AI in Remake hates groups that have no defense position (the last four groups as I explained) and uses them to fill up the other groups. I agree that it makes perfect sense, but especially at the start of a mission it could be useful to have some troops that aren't bound to a defense position. Apparantly, the original KaM's AI handles recruited soldiers differently than soldiers that it got from the start.
Also, the AI in Remake does not fill up the groups with importance 0 that are at the top of the script, it seems to select the closest groups.

Anyway, this interferes with my plans because obviously I also want the AI to attack when he has a certain amount of (certain) units available. But I think I'll just have to use a second player for this (although that will look pretty clumsy as the description claims you fight one enemy + the colours will be different too I guess).

I hope I clarified the situation a bit (you probably knew most of this already - if not everything).
<<

pawel95

Castle Guard Swordsman

Posts: 1912

Joined: 03 Oct 2008, 22:00

KaM Skill Level: Skilled

Location: "Pawel95" on Youtube.com

Post 30 Nov 2011, 11:29

I mean that if you set the point of the map (x/y) where for example the horses of the AI stay, you can decide, that this point is a frontline point or a defense point.

If you set it to a frontline point the AI will set his troops on this point and if the troops are dead, than the units from the Defense-postions will come to the front!
You aren´t a good player if you have a good PT-Army. You should be able to use it correctly!

You want cheap new Computergames? No problem, you will get them here: https://www.g2a.com/r/pawel95
<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 30 Nov 2011, 14:36

Yes I know that, but how is it related to what I wrote?
<<

GreatWhiteBear

Knight

Posts: 578

Joined: 13 Sep 2011, 22:00

Location: The Netherlands

Post 30 Nov 2011, 16:34

I will try to make a decent co-op out of my already existing co-op map.

Return to “Map Design”

Who is online

Users browsing this forum: No registered users and 29 guests