Difference between revisions of "Engine"

From Corruption of Champions II
Jump to navigation Jump to search
(Created page with "= Engine = This page details the internal workings of the CoC 2 engine == Basic Details == Unlike [https://wiki.smutosaur.us/CoC/Main_Page Corruption of Champions], which wa...")
 
(Add more stuff)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= Engine =
+
This page details the internal workings of the CoC 2 engine
  
This page details the internal workings of the CoC 2 engine
+
__TOC__
  
 
== 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.
+
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

Character
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
Reagent Numberings
Key Reagent Name
1 Mandrake Root
2 Yew Branch
3 Soft Mud
4 Laurel Sprig
5 Tall Reed
6 Turgid Mushroom
7 Sweet Cream
8 Chestnut
9 Wild Melon
10 Juicy Peach
11 Lush Orchid
12 Musky Sap
13 Motherwort

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

Player Variables (window.PlayerParty.members[0])