#3123: maxPlayers in JS API doesn't account for scavengers
-------------------------------------+-------------------------------------
 Reporter:  aubergine                |             Owner:  Per
     Type:  bug                      |            Status:  new
 Priority:  normal                   |         Milestone:  unspecified
Component:  Engine: Scripting / AI   |           Version:  3.1_beta1
 Keywords:  scavenger, maxPlayers,   |        Blocked By:
  maps                               |  Operating System:  Mac OS 10.5
 Blocking:                           |  (intel)
-------------------------------------+-------------------------------------
 Example scenario:

 * I start a 2 player skirmish game on sk-startup T0
 * I enable scavengers

 maxPlayers = 2 and the JS API will block any attempts to access players
 outside the range 0 .. (maxPlayers-1).

 Scavengers, on a 2 player map, are player 4. (and player 7 on a 4 player
 map IIRC).

 This means that I can't enumerate scavenger droids or structures, I can't
 objFromId() any objects owned by scavanger player either.

 I'm guessing this is why most AIs don't deal very well with scavengers :)

 I assume the scavenger player slot is somehow also interlinked with map
 files - so the map author creates a scavenger base on their map and the
 map editor automatically choses either player 4 or player 7 depending on
 whether the map is 2 or 4 player.

 As maps can now have up to 10 players, 0..9, I assume there will never be
 scavs on a 10 player map. But on maps with 9 players or less, would it
 make sense to always have scav players as player n+1 where n = number of
 selectable players on the map?

 This way the JS API could limit to the range 0 .. maxPlayers (eg. 0..2 on
 a 2 player map, unless no scavengers in which case 0..1)?

-- 
Ticket URL: <http://developer.wz2100.net/ticket/3123>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to