TABLE OF CONTENTS


Factions/Factions [ Packages ]

[ Top ] [ Packages ]

FUNCTION

 Provide code for factions

SOURCE

package Factions is

Factions/Factions.BaseType_Container [ Types ]

[ Top ] [ Factions ] [ Types ]

FUNCTION

 Used to store bases types data in faction

SOURCE

   package BaseType_Container is new Hashed_Maps
     (Key_Type => Tiny_String.Bounded_String, Element_Type => Positive,
      Hash => Tiny_String_Hash, Equivalent_Keys => Tiny_String."=");

Factions/Factions.Careers_Container [ Types ]

[ Top ] [ Factions ] [ Types ]

FUNCTION

 Used to store careers data in faction

SOURCE

   package Careers_Container is new Hashed_Maps
     (Key_Type => Unbounded_String, Element_Type => Career_Record,
      Hash => Ada.Strings.Unbounded.Hash, Equivalent_Keys => "=");

Factions/Factions.Names_Types [ Types ]

[ Top ] [ Factions ] [ Types ]

FUNCTION

 Types of names of members and bases factions

SOURCE

   type Names_Types is (STANDARD, ROBOTIC) with
      Default_Value => STANDARD;

Factions/Factions.Relations_Container [ Types ]

[ Top ] [ Factions ] [ Types ]

FUNCTION

 Used to store relations data in faction

SOURCE

   package Relations_Container is new Hashed_Maps
     (Key_Type => Tiny_String.Bounded_String, Element_Type => Relations_Record,
      Hash => Tiny_String_Hash, Equivalent_Keys => Tiny_String."=");

Factions/Factions.Career_Record [ Records ]

[ Top ] [ Factions ] [ Records ]

FUNCTION

 Data structure for player career in faction

SOURCE

   type Career_Record is record
      Ship_Index: Positive;
      Player_Index: Unbounded_String;
      Description: Unbounded_String;
      Name: Unbounded_String;
   end record;

PARAMETERS

 Ship_Index   - Index of proto ship which will be used as starting ship
                for player
 Player_Index - Index of mobile which will be used as starting character
                for player
 Description  - Description of career, displayed to player
 Name         - Name of career, may be different for each faction

Factions/Factions.Faction_Record [ Records ]

[ Top ] [ Factions ] [ Records ]

FUNCTION

 Data structure for faction

SOURCE

   type Faction_Record is record
      Name: Tiny_String.Bounded_String;
      Member_Name: Unbounded_String;
      Plural_Member_Name: Unbounded_String;
      Spawn_Chance: Natural := 0;
      Population: Attributes_Array;
      Names_Type: Names_Types;
      Relations: Relations_Container.Map;
      Description: Unbounded_String;
      Food_Types: TinyString_Container.Vector;
      Drinks_Types: TinyString_Container.Vector;
      Healing_Tools: Tiny_String.Bounded_String;
      Healing_Skill: SkillsData_Container.Extended_Index;
      Flags: UnboundedString_Container.Vector;
      Careers: Careers_Container.Map;
      Base_Icon: Wide_Character;
      Bases_Types: BaseType_Container.Map;
      Weapon_Skill: SkillsData_Container.Extended_Index;
   end record;

PARAMETERS

 Name               - Name of faction, displayed to player
 Member_Name        - Name of single member of faction
 Plural_Member_Name - Plural name of members of faction
 Spawn_Chance       - Chance that created at new game base will be owned by
                      this faction
 Population         - Min and max population for new bases with this
                      faction as owner
 Names_Types        - Type of names of members of faction (used in
                      generating names of ships)
 Relations          - Relations of this faction with others factions
 Description        - Description on faction, displayed to player
 Food_Types         - Types of items used as food for members of this
                      faction
 Drinks_Types       - Types of items used as drinks for members of this
                      faction
 Healing_Tools      - Name of item type used as tool in healing members of
                      this faction
 Healing_Skill      - Vector index of skill used in healing members of this
                      faction
 Flags              - Various flags for faction (no gender, etc)
 Careers            - List of possible careers for that faction
 Base_Icon          - Character used as base icon on map for this faction
 Bases_Types        - List of available base types (with chances to spawn)
                      for this faction. If it is empty then all bases types
                      are available for this faction
 Weapon_Skill       - Vector index of skill used by prefered weapon of
                      members of this faction

Factions/Factions.Relations_Record [ Records ]

[ Top ] [ Factions ] [ Records ]

FUNCTION

 Data structure for relations between factions

SOURCE

   type Relations_Record is record
      Reputation: Reputation_Range_Record;
      Friendly: Boolean;
   end record;

PARAMETERS

 Reputation - Min and max value for starting reputation in bases owned
              by target faction
 Friendly   - Did target faction is friendly or enemy to this faction

Factions/Factions.Reputation_Range_Record [ Records ]

[ Top ] [ Factions ] [ Records ]

FUNCTION

 Data structure for set reputation range between factions

SOURCE

   type Reputation_Range_Record is record
      Min: Reputation_Range := 0;
      Max: Reputation_Range := 0;
   end record;

PARAMETERS

 Min - Minimum value of reputation between selected factions
 Max - Maximum value of reputation between selected factions

HISTORY

 7.1 - Added

Factions/Factions.Default_Names_Type [ Constants ]

[ Top ] [ Factions ] [ Constants ]

FUNCTION

 Default type of names of npc

SOURCE

   Default_Names_Type: constant Names_Types := STANDARD;

HISTORY

 8.3 - Added

Factions/Factions.Empty_Carreer [ Constants ]

[ Top ] [ Factions ] [ Constants ]

FUNCTION

 Default empty career

SOURCE

   Empty_Carreer: constant Career_Record := (others => <>);

HISTORY

 8.3 - Added

Factions/Factions.Empty_Faction [ Constants ]

[ Top ] [ Factions ] [ Constants ]

FUNCTION

 Default empty faction

SOURCE

   Empty_Faction: constant Faction_Record := (others => <>);

HISTORY

 8.3 - Added

Factions/Factions.Empty_Relations_Record [ Constants ]

[ Top ] [ Factions ] [ Constants ]

FUNCTION

 Empty relations data

SOURCE

   Empty_Relations_Record: constant Relations_Record :=
     (Reputation => Empty_Reputation_Range_Record, Friendly => True);

HISTORY

 8.3 - Added

Factions/Factions.Empty_Reputation_Range_Record [ Constants ]

[ Top ] [ Factions ] [ Constants ]

FUNCTION

 Empty range for reputation range

SOURCE

   Empty_Reputation_Range_Record: constant Reputation_Range_Record :=
     (others => <>);

HISTORY

 8.3 - Added