VoidExpanse/scope-relations: Difference between revisions
(Created page with "<noinclude> Category:VoidExpanse/api_scopes </noinclude> = Scope relations = Used to manage reputation, relations, factions and all other social stuff. '''Visibility:'''...") |
No edit summary |
||
Line 18: | Line 18: | ||
}} | }} | ||
{{Scripting_api|IsCapital| | |||
* int: system_id| | |||
bool| | |||
<pre style="margin:0px;">relations.IsCapital(323);</pre> | | |||
Returns whether specified system is a capital of a faction. | |||
}} | |||
{{Scripting_api|GetFactionDispositionToShip| | {{Scripting_api|GetFactionDispositionToShip| |
Latest revision as of 08:12, 27 May 2014
Scope relations
Used to manage reputation, relations, factions and all other social stuff.
Visibility: Global.
List of functions
CreateFaction | ||
---|---|---|
Arguments | Returns | Example |
|
void |
relations.CreateFaction("order", "Order of Paladins"); |
Description | ||
Creates a faction. |
IsCapital | ||
---|---|---|
Arguments | Returns | Example |
|
bool |
relations.IsCapital(323); |
Description | ||
Returns whether specified system is a capital of a faction. |
GetFactionDispositionToShip | ||
---|---|---|
Arguments | Returns | Example |
|
int: disposition |
var disp = relations.GetFactionDispositionToShip("order", 25333); |
Description | ||
Returns faction disposition to specified ship. |
GetFactionsRelation | ||
---|---|---|
Arguments | Returns | Example |
|
int: relation |
var relation = relations.GetFactionsRelation("order", "freedom"); |
Description | ||
Returns relation between factions. |
GetPersonalDisposition | ||
---|---|---|
Arguments | Returns | Example |
|
int: disposition |
var disp = relations.GetPersonalDisposition(25332, 25333); |
Description | ||
Returns disposition of ship to another ship. |
GetShipFaction | ||
---|---|---|
Arguments | Returns | Example |
|
string: faction |
var fact = relations.GetShipFaction(25332); |
Description | ||
Returns ship's current faction. |
GetTotalDisposition | ||
---|---|---|
Arguments | Returns | Example |
|
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 |
|
void |
relations.SetBaseFaction(25332, "order"); |
Description | ||
Sets faction of a space station. |
SetFactionDispositionToShip | ||
---|---|---|
Arguments | Returns | Example |
|
void |
relations.SetFactionDispositionToShip("order", 25553, -1000); |
Description | ||
Sets a faction disposition towards a ship. |
SetFactionDispositionToShipDelta | ||
---|---|---|
Arguments | Returns | Example |
|
void |
relations.SetFactionDispositionToShipDelta("order", 25553, 1000); |
Description | ||
Changes a faction disposition towards a ship by specified delta. |
SetFactionsRelation | ||
---|---|---|
Arguments | Returns | Example |
|
void |
relations.SetFactionsRelation("order", "freedom", -1000); |
Description | ||
Sets a relation between factions. |
SetPersonalDisposition | ||
---|---|---|
Arguments | Returns | Example |
|
void |
relations.SetPersonalDisposition(25333, 25332, -1000); |
Description | ||
Sets personal disposition between two ships. |
SetPersonalDispositionDelta | ||
---|---|---|
Arguments | Returns | Example |
|
void |
relations.SetPersonalDispositionDelta(25333, 25332, -1000); |
Description | ||
Changes personal disposition between two ships by specified value. |
SetShipFaction | ||
---|---|---|
Arguments | Returns | Example |
|
void |
relations.SetShipFaction(25333, "order"); |
Description | ||
Set ship's faction. |
SetSystemFaction | ||
---|---|---|
Arguments | Returns | Example |
|
void |
relations.SetSystemFaction(1, "order"); |
Description | ||
Sets system's faction. |
GetSystemFaction | ||
---|---|---|
Arguments | Returns | Example |
|
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 |
|
object:
|
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 |
|
int: ID of system, which is considered as a capital of faction |
var sys_id = relations.GetFactionCapital("order"); |
Description | ||
SetFactionCapital | ||
---|---|---|
Arguments | Returns | Example |
|
void |
relations.SetFactionCapital("order", 15); |
Description | ||