Skip to content
Lemonymous edited this page Nov 20, 2022 · 3 revisions

Table of Contents

 

eadyEdit.ceo

  This module can be used to add new ceos to the game, or fetch existing ones.

 

add

  • table   add(string ceo_id, string base_ceo_id)

  To add a new ceo, start by calling this function. Use a unique ceo_id for your ceo to avoid potential collisions with ceos from other mods.

  You can create a ceo with a default base by leaving base_ceo_id empty, or you can use the id of an existing ceo to get a better base to start from. Anything you change after that, will only affect your own ceo.

 

Example - ceo with a default base:

local ceo = eadyEdit.ceo:add("ceo_example")

Example - ceo based on Dewey Alms:

local ceo = eadyEdit.ceo:add("ceo_example", "dewey")

This will return a ceo object, which you can build on using table fields and methods found on this page.

 

get

  • table   get(string ceo_id)

  Returns the ceo object for an existing ceo with this ceo_id.

Vanilla Ceo id
"dewey"
"jessica"
"zenith"
"vikram"

 

ceo

fields

_id

  • string

  The unique id for this ceo.

 

CEO_Image

  • string

  Filename of the portrait for this ceo. Use setPortrait instead of setting this field directly.

 

CEO_Name

  • string

  Display name for this ceo. Use setPersonality instead of setting this field directly.

 

CEO_Personality

  • string

  The id of the personality used by this ceo. Use setPersonality instead of setting this field directly.

 

methods

 

setFinalMission

  • void   setFinalMission(string final_mission)

  Specifies the mission for the final island, when this is the ceo of the island in the bottom left corner (RST by deafault).

Example:

ceo:setFinalMission("Mission_Train")

 

setOffice

  • void   setOffice(string path_office_large, string path_office_small)

  Sets the image files used for the office of this ceo. path_office_large and path_office_small can be entered as paths relative to your mod's root directory.

Example:

ceo:setOffice("img/ceo/office.png", "img/ceo/office_small.png")

 

setPersonality

  • void   setPersonality(table personality)

  Sets the personality used to produce dialog for this ceo. First a personality has to be created, then it must be tied to the ceo using this function.

Example:

-- First create a personality table.
local personality = CreatePilotPersonality("Example CEO Id", "Example CEO Name")

-- Add dialog events to the personality table manually,
-- or with personality:AddDialogTable(path_to_dialog_file).
-- This is not included in this example.
-- See example mods for more details on this.

-- Finally add the personality table to this ceo.
ceo:setPersonality(personality)

 

setPortrait

  • void   setPortrait(string path_portrait)

  Sets the portrait used for this ceo. path_portrait can be entered as a path relative to your mod's root directory.

Example:

ceo:setPortrait("img/ceo/portrait.png")

 

Clone this wiki locally