Implement autonomous AdventureBot intents and social micro actions
Add profile-driven daily schedules, semantic location import and editable catalogs, flexible intent execution and safe graph handovers. Implement coherent social scenes, native chair use and campfires, frontal conversation approaches and walking. Fix clientless near-teleport observer identity and native flight area queries. Include migrations, regression tests and implementation documentation.
This commit is contained in:
1 parent
ca656403bb
commit
119d63ed1c
36 files changed
+3221
-10
No files matched your search
@@ -2,6 +2,8 @@
|
||||
#include "ClientlessPlayerMgr.h"
|
||||
#include "ClientlessActionExecutorMgr.h"
|
||||
#include "ClientlessTravelMgr.h"
|
||||
#include "AdventureBehaviorMgr.h"
|
||||
#include "AdventureSocialActions.h"
|
||||
#include "Config.h"
|
||||
#include "Log.h"
|
||||
#include "Player.h"
|
||||
@@ -208,8 +210,16 @@ public:
|
||||
void OnPlayerOnline(Player* player) override
|
||||
{
|
||||
sClientlessLuaEngine->LoadAdventureProfile(player);
|
||||
AdventureSocialActions::Prepare(player);
|
||||
sClientlessLuaEngine->ExecuteAdventureScript(player);
|
||||
sAdventureBehaviorMgr->Online(player);
|
||||
}
|
||||
void OnIntentChanged(Player* player, ClientlessIntent const* intent) override
|
||||
{ sAdventureBehaviorMgr->IntentChanged(player, intent); }
|
||||
void Update(Player* player, uint32 diff) override
|
||||
{ sAdventureBehaviorMgr->Update(player, diff); }
|
||||
void OnPlayerLogout(Player* player) override
|
||||
{ sAdventureBehaviorMgr->Offline(player); }
|
||||
};
|
||||
}
|
||||
|
||||
@@ -379,6 +389,18 @@ bool ClientlessLuaEngine::LoadAdventureProfile(Player* player)
|
||||
profile.Personality = ReadFloatDictionary(_state, rootTable, "personality");
|
||||
profile.RegionAffinity = ReadFloatDictionary(_state, rootTable, "region_affinity");
|
||||
profile.ActivityAffinity = ReadFloatDictionary(_state, rootTable, "activity_affinity");
|
||||
profile.MicroActionAffinity = ReadFloatDictionary(_state, rootTable, "micro_action_affinity");
|
||||
lua_getfield(_state, rootTable, "behavior");
|
||||
if (lua_istable(_state, -1))
|
||||
{
|
||||
profile.AutonomousBehavior = ReadBoolField(_state, -1, "enabled", false);
|
||||
profile.DailySchedule = ReadBoolField(_state, -1, "daily_schedule", false);
|
||||
profile.InitialIntent = ReadStringField(_state, -1, "initial_intent");
|
||||
profile.InitialLocation = ReadStringField(_state, -1, "initial_location");
|
||||
profile.Locale = ReadStringField(_state, -1, "locale", "enUS");
|
||||
profile.InitialDurationSeconds = uint32(std::clamp(ReadFloatField(_state, -1, "initial_duration_seconds", 3600), 30.0f, 86400.0f));
|
||||
}
|
||||
lua_pop(_state, 1);
|
||||
|
||||
uint32 const guid = player->GetGUID().GetCounter();
|
||||
_profiles[guid] = std::move(profile);
|
||||
|
||||
Reference in new issue
Block a user