Map Database  •  FAQ  •  RSS  •  Login

Attention map authors: SET_USER_PLAYER

<<

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 01 Apr 2013, 05:00

Attention map authors: SET_USER_PLAYER

This is an announcement for map authors. In the new release of the Remake you need to tell the game which locations can be used by humans in multiplayer maps.

The latest version of the KaM Remake map editor (in the release candidate which will be out soon) will do this for you automatically, you can choose which players are usable by humans under Global Scripting -> Player Types. If you use another mission editor (such as Lewin's) or make your .dat scripts by hand, you'll need to put the command !SET_USER_PLAYER for each of the human locations in multiplayer maps. This tells the game that the location is allowed to be selected by a human in the lobby.

If you set a location as AI but not selectable by humans, then it will not appear in the lobby but an AI player will be placed there automatically. So in coop maps you should only set the human locations as usable by humans, and leave the others as AIs. Then the AIs will be added automatically when the game starts.

Maps sent to us before the release candidate I'm happy to fix for you, so don't worry about it until then. But after the release candidate is out we'd prefer it if you did this yourself, preferably by using the KaM Remake map editor (rather than Lewin's/Krom's) now that it's almost fully featured.

If in doubt, take a look at the way it's done in missions that come with the release candidate (coming soon), or ask us a question here.
<<

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 12 Apr 2013, 21:41

Re: Attention map authors: SET_USER_PLAYER

I'm not really sure how this works. I've used !SET_USER_PLAYER for the 4 human players (0-3). When I start Tower Defence with AI players on locations 2, 3 and 4 and myself on 1, no AI players are automatically added to fill locations 5-8 (players 4-7). When the game starts, those locations are empty. Is that intended?
(Also, when I closed the game after 9 seconds I got an 'Exception occured: EIntOverflow: Integer overflow.' error.)
<<

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 13 Apr 2013, 00:42

Re: Attention map authors: SET_USER_PLAYER

Make sure you've set !SET_AI_PLAYER for those AI players, otherwise the game won't add them automatically. If you open it up in the map editor and go to Global Scripting -> Player Types it should look like this:
Image
That means players 1-4 can be human or AI, but locations 5-8 are forced to always be AIs (won't show up in the lobby). Location 1 is also the default human location, but that's only used in singleplayer.

The only crash report we received from you happened when you quit, while trying to render the results. For some reason it failed to include a save or the mission/maps files. Could you email us the files for the map that caused the crash? (including the script)
<<

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 13 Apr 2013, 17:19

Re: Attention map authors: SET_USER_PLAYER

Make sure you've set !SET_AI_PLAYER for those AI players, otherwise the game won't add them automatically. If you open it up in the map editor and go to Global Scripting -> Player Types it should look like this:
Image
That means players 1-4 can be human or AI, but locations 5-8 are forced to always be AIs (won't show up in the lobby). Location 1 is also the default human location, but that's only used in singleplayer.
That's exactly what it looks like. Locations 5-8 do show up in the lobby, even though I only used !SET_AI_PLAYER for those locations. I tried using !SET_MAX_PLAYER 4 instead of 8, but then loading the map is not possible at all.
The only crash report we received from you happened when you quit, while trying to render the results. For some reason it failed to include a save or the mission/maps files. Could you email us the files for the map that caused the crash? (including the script)
The exact moment when it crashed was when I wanted to see the army graphs. It was on my Tower Defence mission, but both the 'usual' KaM script and the dynamic script have changed since then...
<<

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 14 Apr 2013, 03:15

Re: Attention map authors: SET_USER_PLAYER

Can you please send us the map folder? (.dat, .map, .script) I'll test it and let you know what's going on. We'd also like to investigate the crash, it's probably caused by something from the script not being counted correctly in the statistics, making e.g. a negative number of units.
<<

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 14 Apr 2013, 09:25

Re: Attention map authors: SET_USER_PLAYER

Ok, I sent them to you.
<<

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 14 Apr 2013, 10:24

Re: Attention map authors: SET_USER_PLAYER

Ok, there was a bug in the Remake causing it to not reset some stuff when scanning the maps. I've fixed that, but for now you can delete the .mi file which will force it to rescan everything and the issues with human/AI locations will be all sorted out. I'm looking into the issues you were having with your script, I'll write on the appropriate topic for that though.

Return to “Map Design”

Who is online

Users browsing this forum: No registered users and 16 guests