You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.
keyword_mapskeyword_maxPlayerskeyword_scavengerresolution_fixedtype_bug | by aubergine
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)?
Issue migrated from trac:3123 at 2022-04-16 08:51:18 -0700
The text was updated successfully, but these errors were encountered:
Example of this issue affecting enumDroid() function...
SCRIPT_ASSERT(context, player < MAX_PLAYERS && player >= 0, "Target player index out of range: %d", player);
SCRIPT_ASSERT(context, looking < MAX_PLAYERS && looking >= -1, "Looking player index out of range: %d", looking);
keyword_maps
keyword_maxPlayers
keyword_scavenger
resolution_fixed
type_bug
| by aubergineExample scenario:
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)?
Issue migrated from trac:3123 at 2022-04-16 08:51:18 -0700
The text was updated successfully, but these errors were encountered: