Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ba6e221
[game] Make serialized identity authority explicit
Eldbury Aug 28, 2026
55af7b8
[game] Translate saved object identities at runtime
Eldbury Aug 28, 2026
8b4c84d
[game] Reconcile persistent roster object identity
Eldbury Aug 28, 2026
b2b0a76
[game] Retire creature area-runtime state
Eldbury Aug 28, 2026
579c21d
[game] Make runtime object replacement transactional
Eldbury Aug 29, 2026
4dd553c
[game] Complete saved runtime reference domains
Eldbury Aug 29, 2026
528e20b
[game] Restore explicit roster runtime bindings
Eldbury Aug 29, 2026
8ddb375
[game] Separate area departure from party repositioning
Eldbury Aug 29, 2026
6403de0
[game] Enforce runtime object liveness
Eldbury Aug 30, 2026
230513d
[game] Validate destinations before session publication
Eldbury Aug 30, 2026
2d74763
[docs] Update E loader lifecycle architecture
Eldbury Aug 30, 2026
de59b6b
[game] Correct saved-session restoration semantics
Eldbury Aug 30, 2026
c771306
[game] Preserve party state across module transitions
Eldbury Aug 30, 2026
52c3130
[game] Make item ownership transfers explicit
Eldbury Aug 30, 2026
3c81481
[game] Complete runtime object publication
Eldbury Aug 30, 2026
a18ee54
[docs] Finalize E loader lifecycle architecture
Eldbury Aug 30, 2026
4078afb
[game] Transfer area-owned items explicitly
Eldbury Aug 30, 2026
73af2a6
[game] Release area items before equipping
Eldbury Aug 30, 2026
731f341
[game] Exclude retained puppets from module snapshots
Eldbury Aug 31, 2026
05f5e8a
[game] Reconcile selected party runtime state
Eldbury Aug 31, 2026
e3aec2b
[game] Retire dead message bus listeners
Eldbury Aug 31, 2026
5556df7
[game] Implement RemoveNPCFromPartyToBase
Eldbury Aug 31, 2026
68111dc
[game] Coalesce staged item stacks
Eldbury Aug 31, 2026
d254ba7
[game] Restore derived creature vitality
Eldbury Aug 31, 2026
d7bdc2a
[game] Initialize generated character vitality
Eldbury Aug 31, 2026
a975e26
[game] Initialize new-game Pazaak state
Eldbury Aug 31, 2026
875ddb5
[legal] Complete GPL notices for runtime sources
Eldbury Aug 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
627 changes: 627 additions & 0 deletions doc/e-series-loader-lifecycle.md

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions include/reone/game/action.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#pragma once

#include "savedruntime.h"
#include "runtimeref.h"
#include "types.h"

namespace reone {
Expand Down Expand Up @@ -88,6 +89,12 @@ class Action : boost::noncopyable {
return _savedAction;
}

/**
* True while every non-owning gameplay object used by this action still
* denotes the exact live incarnation captured by the action.
*/
bool runtimeDependenciesLive() const;

protected:
const float kDefaultMaxObjectDistance = 2.0f;
const float kDistanceWalk = 4.0f;
Expand All @@ -101,6 +108,9 @@ class Action : boost::noncopyable {
bool _cancelled {false};
bool _locked {false};
std::optional<SavedActionRecord> _savedAction;
std::vector<RuntimeObjectRef<Object>> _runtimeDependencies;

void requireRuntimeObject(const std::shared_ptr<Object> &object);

Action(
Game &game,
Expand Down
4 changes: 3 additions & 1 deletion include/reone/game/action/attackobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ class AttackObjectAction : public Action {
bool passive = false) :
Action(game, services, ActionType::AttackObject),
_target(target),
_passive(passive), _services(services) {}
_passive(passive), _services(services) {
requireRuntimeObject(target);
}

static bool classof(Action *from) {
return from->type() == ActionType::AttackObject;
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/castfakespellatobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class CastFakeSpellAtObjectAction : public Action {
_spell(spell),
_target(std::move(target)),
_projectilePathType(projectilePathType) {
requireRuntimeObject(_target);
}

static bool classof(Action *from) {
Expand Down
2 changes: 2 additions & 0 deletions include/reone/game/action/closedoor.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#pragma once

#include "../action.h"
#include "../object/door.h"

namespace reone {

Expand All @@ -32,6 +33,7 @@ class CloseDoorAction : public Action {
std::shared_ptr<Door> door) :
Action(game, services, ActionType::CloseDoor),
_door(std::move(door)) {
requireRuntimeObject(_door);
}

static bool classof(Action *from) {
Expand Down
4 changes: 3 additions & 1 deletion include/reone/game/action/cutsceneattack.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ class CutsceneAttackAction : public Action {
const std::shared_ptr<Object> &target,
int animation, AttackResultType result, int damage) :
Action(game, services, ActionType::CutsceneAttack),
_target(target), _animation(animation), _result(result), _damage(damage) {}
_target(target), _animation(animation), _result(result), _damage(damage) {
requireRuntimeObject(target);
}

static bool classof(Action *from) {
return from->type() == ActionType::CutsceneAttack;
Expand Down
2 changes: 2 additions & 0 deletions include/reone/game/action/equipitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#pragma once

#include "../action.h"
#include "../object/item.h"

namespace reone {

Expand All @@ -32,6 +33,7 @@ class EquipItemAction : public Action {
_item(std::move(item)),
_inventorySlot(inventorySlot),
_instant(instant) {
requireRuntimeObject(_item);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/equipmostdamagingmelee.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class EquipMostDamagingMeleeAction : public Action {
Action(game, services, ActionType::EquipMostDamagingMelee),
_versus(std::move(versus)),
_offHand(offHand) {
requireRuntimeObject(_versus);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/equipmostdamagingranged.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class EquipMostDamagingRangedAction : public Action {
EquipMostDamagingRangedAction(Game &game, ServicesView &services, std::shared_ptr<Object> versus) :
Action(game, services, ActionType::EquipMostDamagingRanged),
_versus(std::move(versus)) {
requireRuntimeObject(_versus);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/follow.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class FollowAction : public Action {
Action(game, services, ActionType::Follow),
_follow(std::move(follow)),
_followDistance(followDistance) {
requireRuntimeObject(_follow);
}

static bool classof(Action *from) {
Expand Down
2 changes: 2 additions & 0 deletions include/reone/game/action/giveitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class GiveItemAction : public Action {
Action(game, services, ActionType::GiveItem),
_item(std::move(item)),
_giveTo(std::move(giveTo)) {
requireRuntimeObject(_item);
requireRuntimeObject(_giveTo);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/interactobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class InteractObjectAction : public Action {
InteractObjectAction(Game &game, ServicesView &services, std::shared_ptr<Placeable> placeable) :
Action(game, services, ActionType::InteractObject),
_placeable(std::move(placeable)) {
requireRuntimeObject(_placeable);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/jumptoobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class JumpToObjectAction : public Action {
Action(game, services, ActionType::JumpToObject),
_toJumpTo(std::move(toJumpTo)),
_walkStraightLine(walkStraightLine) {
requireRuntimeObject(_toJumpTo);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/lockobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class LockObjectAction : public Action {
LockObjectAction(Game &game, ServicesView &services, std::shared_ptr<Object> target) :
Action(game, services, ActionType::Lock),
_target(std::move(target)) {
requireRuntimeObject(_target);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/moveawayfromobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class MoveAwayFromObject : public Action {
_fleeFrom(std::move(fleeFrom)),
_run(run),
_moveAwayRange(moveAwayRange) {
requireRuntimeObject(_fleeFrom);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/opencontainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class OpenContainerAction : public Action {
std::shared_ptr<Object> object) :
Action(game, services, ActionType::OpenContainer),
_object(std::move(object)) {
requireRuntimeObject(_object);
}

static bool classof(Action *from) {
Expand Down
2 changes: 2 additions & 0 deletions include/reone/game/action/opendoor.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#pragma once

#include "../action.h"
#include "../object/door.h"

namespace reone {

Expand All @@ -32,6 +33,7 @@ class OpenDoorAction : public Action {
std::shared_ptr<Door> door) :
Action(game, services, ActionType::OpenDoor),
_door(std::move(door)) {
requireRuntimeObject(_door);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/openlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class OpenLockAction : public Action {
std::shared_ptr<Object> target) :
Action(game, services, ActionType::OpenLock),
_target(std::move(target)) {
requireRuntimeObject(_target);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/pickupitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class PickUpItemAction : public Action {
std::shared_ptr<Item> item) :
Action(game, services, ActionType::PickUpItem),
_item(std::move(item)) {
requireRuntimeObject(_item);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/putdownitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class PutDownItemAction : public Action {
std::shared_ptr<Item> item) :
Action(game, services, ActionType::PutDownItem),
_item(std::move(item)) {
requireRuntimeObject(_item);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/startconversation.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class StartConversationAction : public Action {
_barkX(barkX),
_barkY(barkY),
_dontClearAllActions(dontClearAllActions) {
requireRuntimeObject(_objectToConverse);
}

static bool classof(Action *from) {
Expand Down
2 changes: 2 additions & 0 deletions include/reone/game/action/takeitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class TakeItemAction : public Action {
Action(game, services, ActionType::TakeItem),
_item(std::move(item)),
_takeFrom(std::move(takeFrom)) {
requireRuntimeObject(_item);
requireRuntimeObject(_takeFrom);
}

static bool classof(Action *from) {
Expand Down
2 changes: 2 additions & 0 deletions include/reone/game/action/unequipitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#pragma once

#include "../action.h"
#include "../object/item.h"

namespace reone {

Expand All @@ -31,6 +32,7 @@ class UnequipItemAction : public Action {
Action(game, services, ActionType::UnequipItem),
_item(std::move(item)),
_instant(instant) {
requireRuntimeObject(_item);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/unlockobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class UnlockObjectAction : public Action {
UnlockObjectAction(Game &game, ServicesView &services, std::shared_ptr<Object> target) :
Action(game, services, ActionType::OpenLock),
_target(std::move(target)) {
requireRuntimeObject(_target);
}

static bool classof(Action *from) {
Expand Down
1 change: 1 addition & 0 deletions include/reone/game/action/usefeat.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class UseFeatAction : public Action {
Action(game, services, ActionType::UseFeat),
_feat(feat),
_target(std::move(target)) {
requireRuntimeObject(_target);
}

static bool classof(Action *from) {
Expand Down
2 changes: 2 additions & 0 deletions include/reone/game/action/useskill.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class UseSkillAction : public Action {
_target(std::move(target)),
_subSkill(subSkill),
_itemUsed(std::move(itemUsed)) {
requireRuntimeObject(_target);
requireRuntimeObject(_itemUsed);
}

static bool classof(Action *from) {
Expand Down
2 changes: 2 additions & 0 deletions include/reone/game/action/usetalentonobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class UseTalentOnObjectAction : public Action {
_chosenTalent(std::move(chosenTalent)),
_target(std::move(target)) {

requireRuntimeObject(_target);

dispatchToAction();
}

Expand Down
3 changes: 3 additions & 0 deletions include/reone/game/d20/attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ class CreatureAttributes {
*/
int getAggregateHitDie() const;

/** Derive permanent runtime vitality from a serialized base maximum. */
int getPermanentMaxHitPoints(int baseHitPoints) const;

ClassType getEffectiveClass() const;
int getClassLevel(ClassType clazz) const;
int getAggregateAttackBonus() const;
Expand Down
Loading
Loading