Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1183 closed defect (invalid)

Add player team information to "PlayerData" for random maps

Reported by: O.Davoodi Owned by:
Priority: Should Have Milestone:
Component: Core engine Keywords: team, random, map
Cc: Patch:

Description

We need the team information if we want to place allied players near each other. Currently PlayerData only contains civ name.

Change History (3)

comment:1 by historic_bruno, 12 years ago

Hmm, not sure what you mean. I've just tested and g_MapSettings.PlayerData looks like this (tested in latium.js):

[
{Name:"Player 1", Civ:"hele", Colour:{r:80, g:80, b:200}, AI:"", Team:-1}, {Name:"Player 2", Civ:"hele", Colour:{r:150, g:20, b:20}, AI:"qbot", Team:-1}, {Name:"Player 3", Civ:"hele", Colour:{r:50, g:165, b:5}, AI:"qbot", Team:-1}, {Name:"Player 4", Civ:"hele", Colour:{r:230, g:230, b:75}, AI:"qbot", Team:-1}
]

Are you using autostart by chance, or going through menus?

Last edited 12 years ago by historic_bruno (previous) (diff)

comment:2 by O.Davoodi, 12 years ago

Resolution: invalid
Status: newclosed

I am using atlas's generator which didn't work. But the data you posted showed something interesting. "None" is considered -1. Oddly enough Atlas didn't recognize "Team" for "PlayerData" before but when I placed the function into library.js, it did. Now that I changed the function as you said, it is working. ticket closed.

comment:3 by historic_bruno, 12 years ago

Milestone: Alpha 10
Note: See TracTickets for help on using tickets.