Difference between revisions of "Characters"

From Wolfire Games Wiki
Jump to: navigation, search
(Begin documentation of character scripts)
(Wolf: Included note about fear parameters)
 
(52 intermediate revisions by 2 users not shown)
Line 1: Line 1:
''{{about|the engine feature|a list of characters in the Overgrowth universe|Characters (lore)}}''
+
''{{about|the engine feature|a list of characters in the Overgrowth universe|Characters (lore)|character scripting|Character Scripting}}''<br>
 +
 
 
[[Category:Modding]]
 
[[Category:Modding]]
 
[[Category:Overgrowth]]
 
[[Category:Overgrowth]]
  
 
= Overview =
 
= Overview =
 +
Characters are a game entities that are controllable by a player or by AI. In the editor you place spawn points for characters, which look like boxes. When a level starts, each character will be created in its spawn point.
  
Characters are a game entities that are directly controllable by a player or by the AI.
+
Every character has a number of script parameters associated with it that can be used to change how its AI behaves, how fast it is, how big it is and other things like that. Read the [[Script_Parameters#Character|Script Prameters]] article for more information.
 
 
Characters have ''Rigged Objects'' attached, which support skeletal animation, rag doll animation, blends of those two, and character physics.
 
  
= Documentation =
+
= Creating a Spawn Point =
 +
In the editor, in the top menu bar, press "Load → Character" and click one in the list, then click where you want to create the spawn point.
  
== Callable functions and data available inside character scripts ==
+
If you press 8 while there is no player-controlled character in the level, the editor will create a Turner character spawn point on the camera and set it to player-controlled before entering play mode.
  
A list of functions, data, etc, is created automatically whenever you run the game, in a file on your hard drive. This lists what external code you get "for free" and can call from inside a character script.
+
You can set or unset any character as player-controlled, which is covered in the next section.
  
* '''Windows''': <code>My Documents\Wolfire\Overgrowth\aschar_docs.h</code>
+
= Set Player-Controlled Character =
* '''Mac''': <code>~/Library/Application Support/Overgrowth/aschar_docs.h</code>
+
To toggle wether a character is player-controlled or not, select exactly one spawn point and press cmd-shift-P. If the box is green it's player-controlled, if it's white it's AI controlled.
* '''Linux''': <code>~/.local/share/Overgrowth/aschar_docs.h</code>
 
  
This documentation will change with each version of the game, so keep checking back on this <code>aschar_docs.h</code> file to see the most up to date information.
+
If you want the level to be multiplayer you simply set more spawn points to player-controlled. Up to four spawn points can be player controlled.
  
There are also wiki pages which have more detailed documentation many of these functions. These pages have a danger of going out of date, but give more detailed documentation on some of the code:
+
= Races =
 +
Each race in Overgrowth has certain characteristics that make them different. Here you can read about some of the differences.
  
* [[Character Script External Code|These functions are unique to character scripts]]
+
== Cat ==
* [[Common Script External Code|These functions are shared with other script types]]
+
* Has extra quiet footsteps
 +
* Can throw weapons when controlled by AI
  
== Character instances in other scripts ==
+
== Dog ==
 +
* Cannot be strangled or held hostage, is shoulder thrown instead
 +
* Falls over when attacked with sword when unaware
 +
* Takes less damage to passive block from all other races (except wolf)
 +
* Can throw weapons when controlled by AI
  
Characters are exposed to other scripts as instances of the <code>MovementObject<code> class.
+
== Rabbit ==
 +
* Jumps high and far
 +
* Hears extra well
 +
* Can do leg cannon
  
<code>MovementObject</code> instances are like other objects in the game. They support everything that is supported by <code>Object</code>, and also have their own special set of functions, properties, etc.
+
== Rat ==
 +
* Takes more damage to passive block from all other races
  
If you have a handle to a <code>MovementObject@</code> object in angelscript, you can convert it to an <code>MovementObject@</code> by calling <code>ReadObjectFromID(movement_object.GetID());</code>.
+
== Wolf ==
 +
* Cannot be strangled or held hostage, is shoulder thrown instead
 +
* Cannot use weapons
 +
* Does tons of damage
 +
* Cannot be harmed by unarmed attacks, except from other wolves or leg cannon
 +
* Causes all other races controlled by AI except dogs to run away in terror
 +
** This is configurable in each character's parameters
 +
* Uses their KO shield as health

Latest revision as of 20:38, 12 July 2022


Overview

Characters are a game entities that are controllable by a player or by AI. In the editor you place spawn points for characters, which look like boxes. When a level starts, each character will be created in its spawn point.

Every character has a number of script parameters associated with it that can be used to change how its AI behaves, how fast it is, how big it is and other things like that. Read the Script Prameters article for more information.

Creating a Spawn Point

In the editor, in the top menu bar, press "Load → Character" and click one in the list, then click where you want to create the spawn point.

If you press 8 while there is no player-controlled character in the level, the editor will create a Turner character spawn point on the camera and set it to player-controlled before entering play mode.

You can set or unset any character as player-controlled, which is covered in the next section.

Set Player-Controlled Character

To toggle wether a character is player-controlled or not, select exactly one spawn point and press cmd-shift-P. If the box is green it's player-controlled, if it's white it's AI controlled.

If you want the level to be multiplayer you simply set more spawn points to player-controlled. Up to four spawn points can be player controlled.

Races

Each race in Overgrowth has certain characteristics that make them different. Here you can read about some of the differences.

Cat

  • Has extra quiet footsteps
  • Can throw weapons when controlled by AI

Dog

  • Cannot be strangled or held hostage, is shoulder thrown instead
  • Falls over when attacked with sword when unaware
  • Takes less damage to passive block from all other races (except wolf)
  • Can throw weapons when controlled by AI

Rabbit

  • Jumps high and far
  • Hears extra well
  • Can do leg cannon

Rat

  • Takes more damage to passive block from all other races

Wolf

  • Cannot be strangled or held hostage, is shoulder thrown instead
  • Cannot use weapons
  • Does tons of damage
  • Cannot be harmed by unarmed attacks, except from other wolves or leg cannon
  • Causes all other races controlled by AI except dogs to run away in terror
    • This is configurable in each character's parameters
  • Uses their KO shield as health