VoidExpanse/scope-relations

From AtomicTorchWiki


Scope relations

Used to manage reputation, relations, factions and all other social stuff.

Visibility: Global.

List of functions

CreateFaction
Arguments Returns Example
  • string: faction_id
  • string: faction_name

void

relations.CreateFaction("order", "Order of Paladins");
Description

Creates a faction.


IsCapital
Arguments Returns Example
  • int: system_id

bool

relations.IsCapital(323);
Description

Returns whether specified system is a capital of a faction.


GetFactionDispositionToShip
Arguments Returns Example
  • string: faction_id
  • int: ship_id

int: disposition

var disp = relations.GetFactionDispositionToShip("order", 25333);
Description

Returns faction disposition to specified ship.


GetFactionsRelation
Arguments Returns Example
  • string: faction_1_id
  • string: faction_2_id

int: relation

var relation = relations.GetFactionsRelation("order", "freedom");
Description

Returns relation between factions.


GetPersonalDisposition
Arguments Returns Example
  • int: ship_id_1
  • int: ship_id_2

int: disposition

var disp = relations.GetPersonalDisposition(25332, 25333);
Description

Returns disposition of ship to another ship.


GetShipFaction
Arguments Returns Example
  • int: ship_id

string: faction

var fact = relations.GetShipFaction(25332);
Description

Returns ship's current faction.


GetTotalDisposition
Arguments Returns Example
  • int: ship_id_1
  • int: ship_id_2

int: desposition

var disp = relations.GetTotalDisposition(25332, 25333);
Description

Returns ship's total disposition. Calculated in internal scrips, so it can be altered.


SetBaseFaction
Arguments Returns Example
  • int: base_id
  • string: faction_id

void

relations.SetBaseFaction(25332, "order");
Description

Sets faction of a space station.


SetFactionDispositionToShip
Arguments Returns Example
  • string: faction
  • int: ship_id
  • int: value

void

relations.SetFactionDispositionToShip("order", 25553, -1000);
Description

Sets a faction disposition towards a ship.


SetFactionDispositionToShipDelta
Arguments Returns Example
  • string: faction
  • int: ship_id
  • int: value_delta

void

relations.SetFactionDispositionToShipDelta("order", 25553, 1000);
Description

Changes a faction disposition towards a ship by specified delta.


SetFactionsRelation
Arguments Returns Example
  • string: faction_id_1
  • string: faction_id_2
  • int: value

void

relations.SetFactionsRelation("order", "freedom", -1000);
Description

Sets a relation between factions.


SetPersonalDisposition
Arguments Returns Example
  • int: ship_id_1
  • int: ship_id_2
  • int: disposition

void

relations.SetPersonalDisposition(25333, 25332, -1000);
Description

Sets personal disposition between two ships.


SetPersonalDispositionDelta
Arguments Returns Example
  • int: ship_id_1
  • int: ship_id_2
  • int: disposition_delta

void

relations.SetPersonalDispositionDelta(25333, 25332, -1000);
Description

Changes personal disposition between two ships by specified value.


SetShipFaction
Arguments Returns Example
  • int: ship_id_1
  • string: faction

void

relations.SetShipFaction(25333, "order");
Description

Set ship's faction.


SetSystemFaction
Arguments Returns Example
  • int: ship_id_1
  • string: faction

void

relations.SetSystemFaction(1, "order");
Description

Sets system's faction.


GetSystemFaction
Arguments Returns Example
  • int: ship_id_1

string: faction of a system

var faction = relations.GetSystemFaction(1);
Description


GetFactions
Arguments Returns Example

void

array: IDs of factions (strings)

var factions = relations.GetFactions();
Description

Returns IDs of all factions created with relations.CreateFaction.


GetFactionInfoByID
Arguments Returns Example
  • string: faction_id

object:

  • double capital_area_of_influence;
  • int capital_danger_level
  • int capital_tech_level
  • double distance_from_origin_max
  • double distance_from_origin_min
  • int stars_count_percent
  • int stars_count_value
var info = relations.GetFactionInfoByID("order");
Description

Returns information about specified faction.


ClearAllInfoOnSystems
Arguments Returns Example

void

void

relations.ClearAllInfoOnSystems();
Description

Clears all faction relation info on systems. Useful after failed attempts to generate factions.


GetFactionCapital
Arguments Returns Example
  • string: faction

int: ID of system, which is considered as a capital of faction

var sys_id = relations.GetFactionCapital("order");
Description


SetFactionCapital
Arguments Returns Example
  • string: faction
  • int: system_id

void

relations.SetFactionCapital("order", 15);
Description