JS API: playerData ideas...

For AI and campaign script related discussions and questions
Post Reply
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

JS API: playerData ideas...

Post by aubergine »

Could a .isAI property be added to playerData objects? true = player is an AI, false = player is a human

For the .difficulty property on human players, could it be set based on their MP rankings?

Image = EASY

Image = MEDIUM

Image = HARD

Image = INSANE (but without the power boost)

That would give AI's some idea about what sort of humans they are up against.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: JS API: playerData ideas...

Post by Per »

Added the .isAI field. The .difficulty part for humans was a bit tricky to do (correctly), since the game stats stuff is a big mess, so I left it alone for now.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: JS API: playerData ideas...

Post by aubergine »

Yeah, I did encounter the game stats stuff on one of my expeditions in to the source code and I literally had no clue what it's suppose to do or how it even works lol. But having a .isAI property added is great news!!

Is the .isAI a 3.1 addition or will be only be in 3.2?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: JS API: playerData ideas...

Post by aubergine »

Actually, could it be changed...

Instead have a .playerType property that can be one of:

* PLAYER_HUMAN
* PLAYER_AI
* PLAYER_NONE (player slot is unused)
* PLAYER_SCAVENGER (I know scavs aren't going to be listed in playerData, I'd add them in via script myself)
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: JS API: playerData ideas...

Post by Per »

isAI is 3.2 only. I just added isHuman to complement it.
User avatar
Giani
Regular
Regular
Posts: 804
Joined: 23 Aug 2011, 22:42
Location: Argentina

Re: JS API: playerData ideas...

Post by Giani »

Isnt the grey/white medal better than the brown?
My maps: http://forums.wz2100.net/viewtopic.php?f=10&t=9501
Post Reply