Difference between revisions of "Characters"

From Wolfire Games Wiki
Jump to: navigation, search
(moved Characters to Characters (lore): Making way for engine documentation)
 
(Begin documentation of character scripts)
Line 1: Line 1:
#REDIRECT [[Characters (lore)]]
+
''{{about|the engine feature|a list of characters in the Overgrowth universe|Characters (lore)}}''
 +
[[Category:Modding]]
 +
[[Category:Overgrowth]]
 +
 
 +
= Overview =
 +
 
 +
Characters are a game entities that are directly controllable by a player or by the AI.
 +
 
 +
Characters have ''Rigged Objects'' attached, which support skeletal animation, rag doll animation, blends of those two, and character physics.
 +
 
 +
= Documentation =
 +
 
 +
== Callable functions and data available inside character scripts ==
 +
 
 +
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.
 +
 
 +
* '''Windows''': <code>My Documents\Wolfire\Overgrowth\aschar_docs.h</code>
 +
* '''Mac''': <code>~/Library/Application Support/Overgrowth/aschar_docs.h</code>
 +
* '''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.
 +
 
 +
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:
 +
 
 +
* [[Character Script External Code|These functions are unique to character scripts]]
 +
* [[Common Script External Code|These functions are shared with other script types]]
 +
 
 +
== Character instances in other scripts ==
 +
 
 +
Characters are exposed to other scripts as instances of the <code>MovementObject<code> class.
 +
 
 +
<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.
 +
 
 +
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>.

Revision as of 00:16, 27 November 2017

Overview

Characters are a game entities that are directly controllable by a player or by the AI.

Characters have Rigged Objects attached, which support skeletal animation, rag doll animation, blends of those two, and character physics.

Documentation

Callable functions and data available inside character scripts

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.

  • Windows: My Documents\Wolfire\Overgrowth\aschar_docs.h
  • Mac: ~/Library/Application Support/Overgrowth/aschar_docs.h
  • Linux: ~/.local/share/Overgrowth/aschar_docs.h

This documentation will change with each version of the game, so keep checking back on this aschar_docs.h file to see the most up to date information.

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:

Character instances in other scripts

Characters are exposed to other scripts as instances of the MovementObject<code> class.

<code>MovementObject instances are like other objects in the game. They support everything that is supported by Object, and also have their own special set of functions, properties, etc.

If you have a handle to a MovementObject@ object in angelscript, you can convert it to an MovementObject@ by calling ReadObjectFromID(movement_object.GetID());.