nw::Player
-
struct Player : public nw::Creature
Public Functions
-
Player()
-
Player(nw::MemoryResource *allocator)
-
inline virtual InternedString tag() const override
-
bool save(const std::filesystem::path &path, std::string_view format = "json")
Saves an object to the specified
path,formatcan be either ‘json’ or ‘gff’.
-
virtual void clear() override
-
virtual bool instantiate() override
-
AlignmentFlags alignment_flags() const noexcept
Gets alignment flags.
-
void update_appearance(Appearance id)
Update creatures appearance.
-
inline nw::MemoryResource *allocator() const noexcept
-
inline ObjectHandle handle() const noexcept
-
inline void set_handle(ObjectHandle handle)
-
const EffectArray &effects() const
-
EffectArray &effects()
-
inline Vector<VisualTransform> &visual_transform() noexcept
-
inline const Vector<VisualTransform> &visual_transform() const noexcept
-
void add_visual_transform(VisualTransform value)
Public Members
-
CreatureAppearance appearance
-
CombatInfo combat_info
-
LevelStats levels
-
LevelHistory history
-
CreatureScripts scripts
-
CreatureStats stats
-
String deity
-
String subrace
-
float cr = 0.0
-
int32_t cr_adjust = 0
-
uint32_t decay_time
-
int32_t walkrate = 0
-
uint32_t starting_package = 0
-
uint16_t faction_id = 0
-
int16_t hp = 0
-
int16_t hp_current = 0
-
int16_t hp_max = 0
-
int16_t hp_temp = 0
-
uint16_t soundset
-
int32_t hasted = 0
-
int32_t size = 0
-
uint8_t bodybag = 0
-
uint8_t chunk_death = 0
-
uint8_t disarmable = 0
-
uint8_t gender = 0
-
uint8_t good_evil = 50
-
uint8_t interruptable = 0
-
uint8_t immortal = 0
-
uint8_t lawful_chaotic = 50
-
uint8_t lootable = 0
-
uint8_t pc = 0
-
uint8_t perception_range = 0
-
bool plot = false
-
bool instantiated_ = false
Public Static Functions
-
static String get_name_from_file(const std::filesystem::path &path)
Public Static Attributes
-
static constexpr int json_archive_version = 1
-
static constexpr ObjectType object_type = ObjectType::player
-
static constexpr ResourceType::type restype = ResourceType::bic
-
static constexpr StringView serial_id = {"BIC"}
-
Player()