Player (scripting): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
JYWLuca8269 (talk | contribs) m (Updated look.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:<span style="position: absolute; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px);">{{FULLPAGENAME}}</span>}} | |||
{{HeaderTemplate | |||
|welcome=Player (scripting) | |||
}} | |||
To do much of anything, you'll need to define '''players''' in the XML file for your scenario. This is done with individual <Player> tags that enable or disable their AI, sets faction, team, and color, etc. | To do much of anything, you'll need to define '''players''' in the XML file for your scenario. This is done with individual <Player> tags that enable or disable their AI, sets faction, team, and color, etc. | ||
Line 4: | Line 9: | ||
You'll likely refer to these players later in the script by number, where 0 is the first player defined, 1 is the next, and so on. | You'll likely refer to these players later in the script by number, where 0 is the first player defined, 1 is the next, and so on. | ||
== Arguments = | {{SectionTemplate | ||
|h=h3 | |||
|title=Arguments | |||
|content=}} | |||
*'''Name''' - Name of the player | *'''Name''' - Name of the player | ||
*'''Faction''' - Faction the player belongs to [ PHC | SS ] | *'''Faction''' - Faction the player belongs to [ PHC | SS ] | ||
Line 12: | Line 19: | ||
*'''AIType''' - Set to “Player” if this is player controlled. "On" for AI control, "Off" for passive [ On | Off | Player ] | *'''AIType''' - Set to “Player” if this is player controlled. "On" for AI control, "Off" for passive [ On | Off | Player ] | ||
*'''AIDifficulty''' - What setting this AI player is on [ Beginner | Novice | Easy | Intermediate | Normal | Challenging | Tough | Painful | Insane ] | *'''AIDifficulty''' - What setting this AI player is on [ Beginner | Novice | Easy | Intermediate | Normal | Challenging | Tough | Painful | Insane ] | ||
*'''AIPersonality''' - What Personality the AI player is. [options in DefaultPlayerAI.xml, random when not set] | |||
*'''NoSeed''' - Set this to 1 to disable a Nexus for the player. ''Note: Doing this will mean you need to manually set victory/loss triggers, as the generic Seed Victory condition won't trigger.'' | *'''NoSeed''' - Set this to 1 to disable a Nexus for the player. ''Note: Doing this will mean you need to manually set victory/loss triggers, as the generic Seed Victory condition won't trigger.'' | ||
*'''NoEngineer''' - Set this to 1 if the player isn’t going to start with an Engineer. | *'''NoEngineer''' - Set this to 1 if the player isn’t going to start with an Engineer. | ||
*'''StartLocation''' - Which start location the player uses. Corresponds with what you see in the skirmish lobby. | *'''StartLocation''' - Which start location the player uses. Corresponds with what you see in the skirmish lobby. | ||
{{SectionTemplate | |||
|h=h3 | |||
|title=Example | |||
|content=}} | |||
<Player Name="You" Faction="PHC" AIType="Player" Team="1" Color="7" /> | <Player Name="You" Faction="PHC" AIType="Player" Team="1" Color="7" /> | ||
<Player Name="Mac" Faction="PHC" AIType="On" Team="1" Color="1" /> | <Player Name="Mac" Faction="PHC" AIType="On" Team="1" Color="1" /> | ||
Line 28: | Line 39: | ||
The Splinter has its AI turned off, either to create passive guardians or script-controlled incoming waves, or some such thing where you don't want an AI messing with your scenario. | The Splinter has its AI turned off, either to create passive guardians or script-controlled incoming waves, or some such thing where you don't want an AI messing with your scenario. | ||
[[Category:Modding]] |
Latest revision as of 15:37, 24 November 2020
You'll likely refer to these players later in the script by number, where 0 is the first player defined, 1 is the next, and so on. Arguments
Example<Player Name="You" Faction="PHC" AIType="Player" Team="1" Color="7" /> <Player Name="Mac" Faction="PHC" AIType="On" Team="1" Color="1" /> <Player Name="Haalee" Faction="SS" AIType="On" Team="2" Color="2" /> <Player Name="Splinter" Faction="PHC" AIType="Off" Team="3" Color="4" NoSeed="1" NoEngineer="1" /> In this example, the player is index 0, Mac 1, Haalee 2, and Splinter 3. The player and Mac are on a team together, while Haalee and the Splinter are each on their own teams. The Splinter has its AI turned off, either to create passive guardians or script-controlled incoming waves, or some such thing where you don't want an AI messing with your scenario. |