Difference between revisions of "Engine"
Jump to navigation
Jump to search
Player Party (
Player Variables (
(Add more stuff) |
|||
Line 5: | Line 5: | ||
== Basic Details == | == Basic Details == | ||
Unlike [https://wiki.smutosaur.us/CoC/Main_Page Corruption of Champions], which was written in [[wikipedia:ActionScript#ActionScript 3.0 | Action Script 3.0]], [[Main Page | Corruption of Champions 2]] is written in [[wikipedia:Javascript | Javascript]], allowing for easier cross-platform support. The engine itself pulls heavily from the original Corruption of Champions, with data structures remaining almost identical. The functionality has been rewritten for Javascript. | Unlike [https://wiki.smutosaur.us/CoC/Main_Page Corruption of Champions], which was written in [[wikipedia:ActionScript#ActionScript 3.0 | Action Script 3.0]], [[Main Page | Corruption of Champions 2]] is written in [[wikipedia:Javascript | Javascript]], allowing for easier cross-platform support. The engine itself pulls heavily from the original Corruption of Champions, with data structures remaining almost identical. The functionality has been rewritten for Javascript. | ||
+ | |||
+ | == Data Structures == | ||
+ | |||
+ | {|class="wikitable" | ||
+ | |+ Character | ||
+ | ! Property !! Type !! Description !! Notes | ||
+ | |- | ||
+ | | <code>name</code> || <code>string</code> || Character name|| | ||
+ | |- | ||
+ | | <code>cName</code> || <code>string?</code> || Unknown || | ||
+ | |- | ||
+ | | <code>soloCombatPrefix</code> || <code>string</code> || Used in combat somewhere, presumably prefixing some element of combat text || | ||
+ | |- | ||
+ | | <code>reagents</code> || <code>Object<number, number></code> || [[Reagents]] (ingredients) currently held by the character || | ||
+ | {|class="wikitable" | ||
+ | |+ Reagent Numberings | ||
+ | ! Key !! Reagent Name | ||
+ | |- | ||
+ | | 1 || [[Reagents#Mandrake Root | Mandrake Root]] | ||
+ | |- | ||
+ | | 2 || [[Reagents#Yew Branch | Yew Branch]] | ||
+ | |- | ||
+ | | 3 || [[Reagents#Soft Mud | Soft Mud]] | ||
+ | |- | ||
+ | | 4 || [[Reagents#Laurel Sprig | Laurel Sprig]] | ||
+ | |- | ||
+ | | 5 || [[Reagents#Tall Reed | Tall Reed]] | ||
+ | |- | ||
+ | | 6 || [[Reagents#Turgid Mushroom | Turgid Mushroom]] | ||
+ | |- | ||
+ | | 7 || [[Reagents#Sweet Cream | Sweet Cream]] | ||
+ | |- | ||
+ | | 8 || [[Reagents#Chestnut | Chestnut ]] | ||
+ | |- | ||
+ | | 9 || [[Reagents#Wild Melon | Wild Melon]] | ||
+ | |- | ||
+ | | 10 || [[Reagents#Juicy Peach | Juicy Peach]] | ||
+ | |- | ||
+ | | 11 || [[Reagents#Lush Orchid | Lush Orchid]] | ||
+ | |- | ||
+ | | 12 || [[Reagents#Musky Sap | Musky Sap]] | ||
+ | |- | ||
+ | | 13 || [[Reagents#Motherwort | Motherwort]] | ||
+ | |} | ||
+ | |} | ||
+ | == Variables == | ||
+ | Below are important variables. | ||
+ | |||
+ | === Player Party (<code>window.PlayerParty</code>) === | ||
+ | |||
+ | {|class="wikitable" | ||
+ | ! Javascript Variable Name !! Type !! Description !! Notes | ||
+ | |- | ||
+ | | <code>PlayerParty.members</code> || Array || Array of characters in the players party. Player Character is stored at index <code>0</code> || | ||
+ | |} | ||
+ | |||
+ | === Player Variables (<code>window.PlayerParty.members[0]</code>) === |
Latest revision as of 08:28, 22 September 2018
This page details the internal workings of the CoC 2 engine
Basic Details
Unlike Corruption of Champions, which was written in Action Script 3.0, Corruption of Champions 2 is written in Javascript, allowing for easier cross-platform support. The engine itself pulls heavily from the original Corruption of Champions, with data structures remaining almost identical. The functionality has been rewritten for Javascript.
Data Structures
Property | Type | Description | Notes | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
string |
Character name | |||||||||||||||||||||||||||||
cName |
string? |
Unknown | |||||||||||||||||||||||||||||
soloCombatPrefix |
string |
Used in combat somewhere, presumably prefixing some element of combat text | |||||||||||||||||||||||||||||
reagents |
Object<number, number> |
Reagents (ingredients) currently held by the character |
|
Variables
Below are important variables.
Player Party (window.PlayerParty
)
Javascript Variable Name | Type | Description | Notes |
---|---|---|---|
PlayerParty.members |
Array | Array of characters in the players party. Player Character is stored at index 0 |