Difference between revisions of "Characters"

From Wolfire Games Wiki
Jump to: navigation, search
m (How to add a character to the spawner menu)
(Rewrite)
(47 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)}}''<br>
+
''{{about|the engine feature|a list of characters in the Overgrowth universe|Characters (lore)|character scripting|Character Scripting}}''<br>
  
 
[[Category:Modding]]
 
[[Category:Modding]]
Line 5: Line 5:
  
 
= 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.
+
= 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.
  
'''TODO''': More in depth description, akin to that in [[Hotspots]] and [[LevelScripts]]
+
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.
  
= Documentation =
+
You can set or unset any character as player-controlled, which is covered in the next section.
  
== Callable functions and data available inside character scripts ==
+
= 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.
  
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.
+
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.
  
* '''Windows''': <code>My Documents\Wolfire\Overgrowth\aschar_docs.h</code>
+
= Races =
* '''Mac''': <code>~/Library/Application Support/Overgrowth/aschar_docs.h</code>
+
Each race in Overgrowth has certain characteristics that make them different. Here you can read about some of the differences.
* '''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.
+
== Cat ==
 +
* Has extra quiet footsteps
 +
* Can throw weapons when controlled by AI
  
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:
+
== 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
  
* [[Character Script External Code|These functions are unique to character scripts]]
+
== Rabbit ==
* [[Common Script External Code|These functions are shared with other script types]]
+
* Jumps high and far
 +
* Hears extra well
 +
* Can do leg cannon
  
== Character instances in other scripts ==
+
== Rat ==
 +
* Takes more damage to passive block from all other races
  
Characters are exposed to other scripts as instances of the <code>MovementObject</code> class.
+
== Wolf ==
 
+
* Cannot be strangled or held hostage, is shoulder thrown instead
<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.
+
* Cannot use weapons
 
+
* Does tons of damage
If you have a handle to a <code>MovementObject@</code> object in angelscript, you can convert it to an <code>Object@</code> by calling <code>ReadObjectFromID(movement_object.GetID());</code>.
+
* 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
== Working with Characters in editor ==
+
* Uses their KO shield as health
 
 
'''TODO''': How to set a character as playable in the editor.
 
 
 
'''TODO''': List of supported character parameters and how to use them. Some of these things verge more into "game" territory and not "engine" territory, so should at the very least mention that it's fully changeable in script...
 
 
 
'''TODO''': List of species specific traits? Some of these things verge more into "game" territory and not "engine" territory, so should at the very least mention that it's fully changeable in script...
 
 
 
= How to create a character =
 
 
 
== Character XML files ==
 
 
 
'''TODO''': Description of XML format
 
 
 
== File path conventions ==
 
 
 
'''TODO''': Description of where to add files in mods so they don't conflict. Ala [[Hotspots#File_path_conventions]]
 
 
 
== Modeling ==
 
 
 
'''TODO''': Links to or docs on modeling, graphics features like fur fins, various texture channels and what their components (alpha etc) mean, UVs, object space normals, etc. Also, any export info that would be necessary.
 
 
 
== Rigging ==
 
 
 
'''TODO''': Links to or docs on rigging and rig export
 
 
 
== Animations ==
 
 
 
'''TODO''': Links to or docs on animations and export, tagging, etc
 
 
 
== Attacks ==
 
 
 
'''TODO''': Links to or docs on attacks system and export, tagging, etc - related partly to animations.<br>
 
 
 
'''TODO''': Possibly also scripting attacks and animations, and character-bound input, etc - though maybe that should be in a different section?
 
 
 
= How to add a character to the spawner menu =
 
 
 
Short version:
 
 
 
You must add it in a mod.
 
 
 
You can add as many characters to the spawner menu as you want in a single mod, you just need to follow the below instructions for each, and add multiple <code><Item></code> tags to your mod.xml file.
 
 
 
In your mod.xml file, add this xml tag:
 
 
 
<pre><Item category="My Custom Mod Characters"
 
      title="Some Character To Spawn"
 
      path="Data/Objects/example_item_pack/mod_item_example.xml"
 
      thumbnail="Data/UI/example_item_pack/thumbs/mod_item_example.png" /></pre>
 
 
 
* '''<code>category</code>''' is the top level category where the character will show up, in the '''Load''' menu.
 
* '''<code>title</code>''' is the name of the character, as it will show up in the spawner menu.
 
* '''<code>path</code>''' is the path to the character XML that will get spawned. See [[#How_to_create_a_character|the '''How to create a character''' section]] for which XML file to target (either the character XML itself, or a version you saved off that has modified default parameters).  '''TODO''': Be careful to advise ''which'' character XML to add to the spawner - there are multiple character XML files!
 
* '''<code>thumbnail</code>''' is the image that will be used for a tooltip when you hover over your character in the spawner menu.
 
 
 
See '''<code>GameInstallDir/Data/ExampleMods/mod_xml_specification.txt</code>''' for full information.
 

Revision as of 13:53, 6 February 2018


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
  • Uses their KO shield as health