feat: Implement all Action* script routines

This commit is contained in:
Vsevolod Kremianskii 2020-12-15 16:27:34 +07:00
parent 996a0ab425
commit c3558f4437
6 changed files with 582 additions and 71 deletions

View file

@ -23,13 +23,33 @@ namespace game {
enum class ActionType {
MoveToPoint = 0,
PickUpItem = 1,
DropItem = 2,
AttackObject = 3,
CastSpell = 4,
OpenDoor = 5,
CloseDoor = 6,
DialogObject = 7,
DisableTrap = 8,
RecoverTrap = 9,
FlagTrap = 10,
ExamineTrap = 11,
SetTrap = 12,
OpenLock = 13,
Lock = 14,
UseObject = 15,
AnimalEmpathy = 16,
Rest = 17,
Taunt = 18,
ItemCastSpell = 19,
CounterSpell = 31,
Heal = 33,
PickPocket = 34,
Follow = 35,
Wait = 36,
Sit = 37,
FollowLeader = 38,
QueueEmpty = 65534,
FollowOwner = 43,
DoCommand = 0x1000,
StartConversation = 0x1001,
@ -38,7 +58,39 @@ enum class ActionType {
MoveToObject = 0x1004,
OpenContainer = 0x1005,
JumpToObject = 0x1006,
JumpToLocation = 0x1007
JumpToLocation = 0x1007,
RandomWalk = 0x1008,
MoveToLocation = 0x1009,
MoveAwayFromObject = 0x100a,
EquipItem = 0x100b,
UnequipItem = 0x100c,
SpeakString = 0x100d,
PlayAnimation = 0x100e,
CastSpellAtObject = 0x100f,
GiveItem = 0x1010,
TakeItem = 0x1011,
ForceFollowObject = 0x1012,
CastSpellAtLocation = 0x1013,
SpeakStringByStrRef = 0x1014,
UseFeat = 0x1015,
UseSkill = 0x1016,
UseTalentOnObject = 0x1017,
UseTalentAtLocation = 0x1018,
InteractObject = 0x1019,
MoveAwayFromLocation = 0x101a,
SurrenderToEnemies = 0x101b,
EquipMostDamagingMelee = 0x101c,
EquipMostDamagingRanged = 0x101d,
EquipMostEffectiveArmor = 0x101e,
UnlockObject = 0x101f,
LockObject = 0x1020,
CastFakeSpellAtObject = 0x1021,
CastFakeSpellAtLocation = 0x1022,
BarkString = 0x1023,
SwitchWeapons = 0x1024,
Invalid = 0xffff,
QueueEmpty = 0xfffe
};
class Action {

View file

@ -100,6 +100,10 @@ shared_ptr<SpatialObject> Routines::getCallerAsSpatial(ExecutionContext &ctx) co
return dynamic_pointer_cast<SpatialObject>(ctx.caller);
}
shared_ptr<Creature> Routines::getCallerAsCreature(ExecutionContext &ctx) const {
return dynamic_pointer_cast<Creature>(ctx.caller);
}
shared_ptr<Object> Routines::getTriggerrer(ExecutionContext &ctx) const {
return static_pointer_cast<Object>(ctx.triggerer);
}

View file

@ -89,11 +89,12 @@ private:
std::shared_ptr<Item> getItem(const VariablesList &args, int index) const;
std::shared_ptr<Location> getLocationEngineType(const VariablesList &args, int index) const;
std::shared_ptr<Object> getCaller(script::ExecutionContext &ctx) const;
std::shared_ptr<SpatialObject> getCallerAsSpatial(script::ExecutionContext &ctx) const;
std::shared_ptr<Creature> getCallerAsCreature(script::ExecutionContext &ctx) const;
std::shared_ptr<Object> getObject(const VariablesList &args, int index) const;
std::shared_ptr<Object> getObjectOrCaller(const VariablesList &args, int index, script::ExecutionContext &ctx) const;
std::shared_ptr<Object> getTriggerrer(script::ExecutionContext &ctx) const;
std::shared_ptr<Sound> getSound(const VariablesList &args, int index) const;
std::shared_ptr<SpatialObject> getCallerAsSpatial(script::ExecutionContext &ctx) const;
std::shared_ptr<SpatialObject> getSpatialObject(const VariablesList &args, int index) const;
std::shared_ptr<SpatialObject> getSpatialObjectOrCaller(const VariablesList &args, int index, script::ExecutionContext &ctx) const;
std::string getString(const VariablesList &args, int index, std::string defValue = "") const;
@ -248,17 +249,52 @@ private:
// Actions
script::Variable actionAttack(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionBarkString(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionCastFakeSpellAtLocation(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionCastFakeSpellAtObject(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionCastSpellAtLocation(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionCastSpellAtObject(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionCloseDoor(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionDoCommand(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionEquipItem(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionEquipMostDamagingMelee(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionEquipMostDamagingRanged(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionEquipMostEffectiveArmor(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionFollowLeader(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionFollowOwner(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionForceFollowObject(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionForceMoveToLocation(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionForceMoveToObject(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionGiveItem(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionInteractObject(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionJumpToLocation(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionJumpToObject(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionLockObject(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionMoveAwayFromLocation(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionMoveAwayFromObject(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionMoveToLocation(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionMoveToObject(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionOpenDoor(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionPauseConversation(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionPickUpItem(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionPlayAnimation(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionPutDownItem(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionRandomWalk(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionResumeConversation(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionSpeakString(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionSpeakStringByStrRef(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionStartConversation(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionSurrenderToEnemies(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionSwitchWeapons(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionTakeItem(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionUnequipItem(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionUnlockObject(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionUseFeat(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionUseSkill(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionUseTalentAtLocation(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionUseTalentOnObject(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable actionWait(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable assignCommand(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable clearAllActions(const VariablesList &args, script::ExecutionContext &ctx);
script::Variable delayCommand(const VariablesList &args, script::ExecutionContext &ctx);

View file

@ -240,6 +240,425 @@ Variable Routines::jumpToLocation(const VariablesList &args, ExecutionContext &c
return Variable();
}
Variable Routines::actionRandomWalk(const VariablesList &args, ExecutionContext &ctx) {
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::RandomWalk);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionRandomWalk: caller is invalid");
}
return Variable();
}
Variable Routines::actionMoveToLocation(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::MoveToLocation);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionMoveToLocation: caller is invalid");
}
return Variable();
}
Variable Routines::actionMoveAwayFromObject(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::MoveAwayFromObject);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionMoveAwayFromObject: caller is invalid");
}
return Variable();
}
Variable Routines::actionEquipItem(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::EquipItem);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionEquipItem: caller is invalid");
}
return Variable();
}
Variable Routines::actionUnequipItem(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::UnequipItem);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionUnequipItem: caller is invalid");
}
return Variable();
}
Variable Routines::actionPickUpItem(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::PickUpItem);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionPickUpItem: caller is invalid");
}
return Variable();
}
Variable Routines::actionPutDownItem(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::DropItem);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionPutDownItem: caller is invalid");
}
return Variable();
}
Variable Routines::actionAttack(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::AttackObject);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionAttack: caller is invalid");
}
return Variable();
}
Variable Routines::actionSpeakString(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::SpeakString);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionSpeakString: caller is invalid");
}
return Variable();
}
Variable Routines::actionPlayAnimation(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::PlayAnimation);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionPlayAnimation: caller is invalid");
}
return Variable();
}
Variable Routines::actionCastSpellAtObject(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::CastSpellAtObject);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionCastSpellAtObject: caller is invalid");
}
return Variable();
}
Variable Routines::actionGiveItem(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::GiveItem);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionGiveItem: caller is invalid");
}
return Variable();
}
Variable Routines::actionTakeItem(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::TakeItem);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionTakeItem: caller is invalid");
}
return Variable();
}
Variable Routines::actionForceFollowObject(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::ForceFollowObject);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionForceFollowObject: caller is invalid");
}
return Variable();
}
Variable Routines::actionWait(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::Wait);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionWait: caller is invalid");
}
return Variable();
}
Variable Routines::actionCastSpellAtLocation(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::CastSpellAtLocation);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionCastSpellAtLocation: caller is invalid");
}
return Variable();
}
Variable Routines::actionSpeakStringByStrRef(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::SpeakStringByStrRef);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionSpeakStringByStrRef: caller is invalid");
}
return Variable();
}
Variable Routines::actionUseFeat(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::UseFeat);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionUseFeat: caller is invalid");
}
return Variable();
}
Variable Routines::actionUseSkill(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::UseSkill);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionUseSkill: caller is invalid");
}
return Variable();
}
Variable Routines::actionUseTalentOnObject(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::UseTalentOnObject);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionUseSkill: caller is invalid");
}
return Variable();
}
Variable Routines::actionUseTalentAtLocation(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::UseTalentAtLocation);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionUseTalentAtLocation: caller is invalid");
}
return Variable();
}
Variable Routines::actionInteractObject(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::InteractObject);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionInteractObject: caller is invalid");
}
return Variable();
}
Variable Routines::actionMoveAwayFromLocation(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::MoveAwayFromLocation);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionMoveAwayFromLocation: caller is invalid");
}
return Variable();
}
Variable Routines::actionSurrenderToEnemies(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::SurrenderToEnemies);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionSurrenderToEnemies: caller is invalid");
}
return Variable();
}
Variable Routines::actionEquipMostDamagingMelee(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::EquipMostDamagingMelee);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionEquipMostDamagingMelee: caller is invalid");
}
return Variable();
}
Variable Routines::actionEquipMostDamagingRanged(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::EquipMostDamagingRanged);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionEquipMostDamagingRanged: caller is invalid");
}
return Variable();
}
Variable Routines::actionEquipMostEffectiveArmor(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::EquipMostEffectiveArmor);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionEquipMostEffectiveArmor: caller is invalid");
}
return Variable();
}
Variable Routines::actionUnlockObject(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::UnlockObject);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionUnlockObject: caller is invalid");
}
return Variable();
}
Variable Routines::actionLockObject(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::LockObject);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionLockObject: caller is invalid");
}
return Variable();
}
Variable Routines::actionCastFakeSpellAtObject(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::CastFakeSpellAtObject);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionCastFakeSpellAtObject: caller is invalid");
}
return Variable();
}
Variable Routines::actionCastFakeSpellAtLocation(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::CastFakeSpellAtLocation);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionCastFakeSpellAtLocation: caller is invalid");
}
return Variable();
}
Variable Routines::actionBarkString(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::BarkString);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionBarkString: caller is invalid");
}
return Variable();
}
Variable Routines::actionFollowLeader(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::FollowLeader);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionFollowLeader: caller is invalid");
}
return Variable();
}
Variable Routines::actionFollowOwner(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::FollowOwner);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionFollowOwner: caller is invalid");
}
return Variable();
}
Variable Routines::actionSwitchWeapons(const VariablesList &args, ExecutionContext &ctx) {
// TODO: handle arguments
auto caller = getCallerAsCreature(ctx);
if (caller) {
auto action = make_unique<Action>(ActionType::SwitchWeapons);
caller->actionQueue().add(move(action));
} else {
warn("Routines: actionSwitchWeapons: caller is invalid");
}
return Variable();
}
} // namespace game
} // namespace reone

View file

@ -58,10 +58,10 @@ void Routines::addKotorRoutines() {
add("GetTimeMinute", Int, { });
add("GetTimeSecond", Int, { });
add("GetTimeMillisecond", Int, { });
add("ActionRandomWalk", Void, { });
add("ActionMoveToLocation", Void, { Location, Int });
add("ActionRandomWalk", Void, { }, &Routines::actionRandomWalk);
add("ActionMoveToLocation", Void, { Location, Int }, &Routines::actionMoveToLocation);
add("ActionMoveToObject", Void, { Object, Int, Float }, &Routines::actionMoveToObject);
add("ActionMoveAwayFromObject", Void, { Object, Int, Float });
add("ActionMoveAwayFromObject", Void, { Object, Int, Float }, &Routines::actionMoveAwayFromObject);
add("GetArea", Object, { Object }, &Routines::getArea);
add("GetEnteringObject", Object, { }, &Routines::getEnteringObject);
add("GetExitingObject", Object, { }, &Routines::getExitingObject);
@ -70,15 +70,15 @@ void Routines::addKotorRoutines() {
add("GetItemPossessor", Object, { Object });
add("GetItemPossessedBy", Object, { Object, String });
add("CreateItemOnObject", Object, { String, Object, Int }, &Routines::createItemOnObject);
add("ActionEquipItem", Void, { Object, Int, Int });
add("ActionUnequipItem", Void, { Object, Int });
add("ActionPickUpItem", Void, { Object });
add("ActionPutDownItem", Void, { Object });
add("ActionEquipItem", Void, { Object, Int, Int }, &Routines::actionEquipItem);
add("ActionUnequipItem", Void, { Object, Int }, &Routines::actionUnequipItem);
add("ActionPickUpItem", Void, { Object }, &Routines::actionPickUpItem);
add("ActionPutDownItem", Void, { Object }, &Routines::actionPutDownItem);
add("GetLastAttacker", Object, { Object });
add("ActionAttack", Void, { Object, Int });
add("ActionAttack", Void, { Object, Int }, &Routines::actionAttack);
add("GetNearestCreature", Object, { Int, Int, Object, Int, Int, Int, Int, Int });
add("ActionSpeakString", Void, { String, Int });
add("ActionPlayAnimation", Void, { Int, Float, Float });
add("ActionSpeakString", Void, { String, Int }, &Routines::actionSpeakString);
add("ActionPlayAnimation", Void, { Int, Float, Float }, &Routines::actionPlayAnimation);
add("GetDistanceToObject", Float, { Object }, &Routines::getDistanceToObject);
add("GetIsObjectValid", Int, { Object }, &Routines::getIsObjectValid);
add("ActionOpenDoor", Void, { Object }, &Routines::actionOpenDoor);
@ -86,7 +86,7 @@ void Routines::addKotorRoutines() {
add("SetCameraFacing", Void, { Float });
add("PlaySound", Void, { String });
add("GetSpellTargetObject", Object, { });
add("ActionCastSpellAtObject", Void, { Int, Object, Int, Int, Int, Int, Int });
add("ActionCastSpellAtObject", Void, { Int, Object, Int, Int, Int, Int, Int }, &Routines::actionCastSpellAtObject);
add("GetCurrentHitPoints", Int, { Object }, &Routines::getCurrentHitPoints);
add("GetMaxHitPoints", Int, { Object }, &Routines::getMaxHitPoints);
add("EffectAssuredHit", Effect, { }, &Routines::effectAssuredHit);
@ -173,8 +173,8 @@ void Routines::addKotorRoutines() {
add("EventUserDefined", Event, { Int }, &Routines::eventUserDefined);
add("EffectDeath", Effect, { Int, Int }, &Routines::effectDeath);
add("EffectKnockdown", Effect, { }, &Routines::effectKnockdown);
add("ActionGiveItem", Void, { Object, Object });
add("ActionTakeItem", Void, { Object, Object });
add("ActionGiveItem", Void, { Object, Object }, &Routines::actionGiveItem);
add("ActionTakeItem", Void, { Object, Object }, &Routines::actionTakeItem);
add("VectorNormalize", TVector, { TVector }, &Routines::vectorNormalize);
add("GetItemStackSize", Int, { Object }, &Routines::getItemStackSize);
add("GetAbilityScore", Int, { Object, Int }, &Routines::getAbilityScore);
@ -205,7 +205,7 @@ void Routines::addKotorRoutines() {
add("EffectRegenerate", Effect, { Int, Float }, &Routines::effectRegenerate);
add("EffectMovementSpeedIncrease", Effect, { Int }, &Routines::effectMovementSpeedIncrease);
add("GetHitDice", Int, { Object }, &Routines::getHitDice);
add("ActionForceFollowObject", Void, { Object, Float });
add("ActionForceFollowObject", Void, { Object, Float }, &Routines::actionForceFollowObject);
add("GetTag", String, { Object }, &Routines::getTag);
add("ResistForce", Int, { Object, Object });
add("GetEffectType", Int, { Effect });
@ -240,7 +240,7 @@ void Routines::addKotorRoutines() {
add("EffectLinkEffects", Effect, { Effect, Effect }, &Routines::effectLinkEffects);
add("GetObjectByTag", Object, { String, Int }, &Routines::getObjectByTag);
add("AdjustAlignment", Void, { Object, Int, Int });
add("ActionWait", Void, { Float });
add("ActionWait", Void, { Float }, &Routines::actionWait);
add("SetAreaTransitionBMP", Void, { Int, String });
add("ActionStartConversation", Void, { Object, String, Int, Int, Int, String, String, String, String, String, String, Int }, &Routines::actionStartConversation);
add("ActionPauseConversation", Void, { }), &Routines::actionPauseConversation;
@ -272,13 +272,13 @@ void Routines::addKotorRoutines() {
add("FloatToInt", Int, { Float }, &Routines::floatToInt);
add("StringToInt", Int, { String }, &Routines::stringToInt);
add("StringToFloat", Float, { String }, &Routines::stringToFloat);
add("ActionCastSpellAtLocation", Void, { Int, Location, Int, Int, Int, Int });
add("ActionCastSpellAtLocation", Void, { Int, Location, Int, Int, Int, Int }, &Routines::actionCastSpellAtLocation);
add("GetIsEnemy", Int, { Object, Object }, &Routines::getIsEnemy);
add("GetIsFriend", Int, { Object, Object }, &Routines::getIsFriend);
add("GetIsNeutral", Int, { Object, Object }, &Routines::getIsNeutral);
add("GetPCSpeaker", Object, { }, &Routines::getPCSpeaker);
add("GetStringByStrRef", String, { Int }, &Routines::getStringByStrRef);
add("ActionSpeakStringByStrRef", Void, { Int, Int });
add("ActionSpeakStringByStrRef", Void, { Int, Int }, &Routines::actionSpeakStringByStrRef);
add("DestroyObject", Void, { Object, Float, Int, Float }, &Routines::destroyObject);
add("GetModule", Object, { }, &Routines::getModule);
add("CreateObject", Object, { Int, String, Location, Int });
@ -325,8 +325,8 @@ void Routines::addKotorRoutines() {
add("SetCustomToken", Void, { Int, String });
add("GetHasFeat", Int, { Int, Object });
add("GetHasSkill", Int, { Int, Object }, &Routines::getHasSkill);
add("ActionUseFeat", Void, { Int, Object });
add("ActionUseSkill", Void, { Int, Object, Int, Object });
add("ActionUseFeat", Void, { Int, Object }, &Routines::actionUseFeat);
add("ActionUseSkill", Void, { Int, Object, Int, Object }, &Routines::actionUseSkill);
add("GetObjectSeen", Int, { Object, Object });
add("GetObjectHeard", Int, { Object, Object });
add("GetLastPlayerDied", Object, { });
@ -347,8 +347,8 @@ void Routines::addKotorRoutines() {
add("GetCreatureHasTalent", Int, { Talent, Object });
add("GetCreatureTalentRandom", Talent, { Int, Object, Int });
add("GetCreatureTalentBest", Talent, { Int, Int, Object, Int, Int, Int });
add("ActionUseTalentOnObject", Void, { Talent, Object });
add("ActionUseTalentAtLocation", Void, { Talent, Location });
add("ActionUseTalentOnObject", Void, { Talent, Object }, &Routines::actionUseTalentOnObject);
add("ActionUseTalentAtLocation", Void, { Talent, Location }, &Routines::actionUseTalentAtLocation);
add("GetGoldPieceValue", Int, { Object });
add("GetIsPlayableRacialType", Int, { Object });
add("JumpToLocation", Void, { Location }, &Routines::jumpToLocation);
@ -367,7 +367,7 @@ void Routines::addKotorRoutines() {
add("GetClickingObject", Object, { });
add("SetAssociateListenPatterns", Void, { Object });
add("GetLastWeaponUsed", Object, { Object });
add("ActionInteractObject", Void, { Object });
add("ActionInteractObject", Void, { Object }, &Routines::actionInteractObject);
add("GetLastUsedBy", Object, { });
add("GetAbilityModifier", Int, { Int, Object });
add("GetIdentified", Int, { Object }, &Routines::getIdentified);
@ -398,7 +398,7 @@ void Routines::addKotorRoutines() {
add("VersusTrapEffect", Effect, { Effect });
add("GetGender", Int, { Object }, &Routines::getGender);
add("GetIsTalentValid", Int, { Talent });
add("ActionMoveAwayFromLocation", Void, { Location, Int, Float });
add("ActionMoveAwayFromLocation", Void, { Location, Int, Float }, &Routines::actionMoveAwayFromLocation);
add("GetAttemptedAttackTarget", Object, { });
add("GetTypeFromTalent", Int, { Talent });
add("GetIdFromTalent", Int, { Talent });
@ -417,7 +417,7 @@ void Routines::addKotorRoutines() {
add("GetLastOpenedBy", Object, { });
add("GetHasSpell", Int, { Int, Object });
add("OpenStore", Void, { Object, Object, Int, Int });
add("ActionSurrenderToEnemies", Void, { });
add("ActionSurrenderToEnemies", Void, { }, &Routines::actionSurrenderToEnemies);
add("GetFirstFactionMember", Object, { Object, Int });
add("GetNextFactionMember", Object, { Object, Int });
add("ActionForceMoveToLocation", Void, { Location, Int, Float }, &Routines::actionForceMoveToLocation);
@ -437,12 +437,12 @@ void Routines::addKotorRoutines() {
add("IntToHexString", String, { Int }, &Routines::intToHexString);
add("GetBaseItemType", Int, { Object });
add("GetItemHasItemProperty", Int, { Object, Int });
add("ActionEquipMostDamagingMelee", Void, { Object, Int });
add("ActionEquipMostDamagingRanged", Void, { Object });
add("ActionEquipMostDamagingMelee", Void, { Object, Int }, &Routines::actionEquipMostDamagingMelee);
add("ActionEquipMostDamagingRanged", Void, { Object }, &Routines::actionEquipMostDamagingRanged);
add("GetItemACValue", Int, { Object });
add("EffectForceResisted", Effect, { Object }, &Routines::effectForceResisted);
add("ExploreAreaForPlayer", Void, { Object, Object });
add("ActionEquipMostEffectiveArmor", Void, { });
add("ActionEquipMostEffectiveArmor", Void, { }, &Routines::actionEquipMostEffectiveArmor);
add("GetIsDay", Int, { });
add("GetIsNight", Int, { });
add("GetIsDawn", Int, { });
@ -521,8 +521,8 @@ void Routines::addKotorRoutines() {
add("AwardStealthXP", Void, { Object });
add("GetStealthXPEnabled", Int, { }, &Routines::getStealthXPEnabled);
add("SetStealthXPEnabled", Void, { Int }, &Routines::setStealthXPEnabled);
add("ActionUnlockObject", Void, { Object });
add("ActionLockObject", Void, { Object });
add("ActionUnlockObject", Void, { Object }, &Routines::actionUnlockObject);
add("ActionLockObject", Void, { Object }, &Routines::actionLockObject);
add("EffectModifyAttacks", Effect, { Int }, &Routines::effectModifyAttacks);
add("GetLastTrapDetected", Object, { Object });
add("EffectDamageShield", Effect, { Int, Int, Int }, &Routines::effectDamageShield);
@ -539,8 +539,8 @@ void Routines::addKotorRoutines() {
add("GetStealthXPDecrement", Int, { }, &Routines::getStealthXPDecrement);
add("SetStealthXPDecrement", Void, { Int }, &Routines::setStealthXPDecrement);
add("DuplicateHeadAppearance", Void, { Object, Object });
add("ActionCastFakeSpellAtObject", Void, { Int, Object, Int });
add("ActionCastFakeSpellAtLocation", Void, { Int, Location, Int });
add("ActionCastFakeSpellAtObject", Void, { Int, Object, Int }, &Routines::actionCastFakeSpellAtObject);
add("ActionCastFakeSpellAtLocation", Void, { Int, Location, Int }, &Routines::actionCastFakeSpellAtLocation);
add("CutsceneAttack", Void, { Object, Int, Int, Int });
add("SetCameraMode", Void, { Object, Int });
add("SetLockOrientationInDialog", Void, { Object, Int });
@ -746,7 +746,7 @@ void Routines::addKotorRoutines() {
add("AddAvailableNPCByTemplate", Int, { Int, String }, &Routines::addAvailableNPCByTemplate);
add("SpawnAvailableNPC", Object, { Int, Location });
add("IsNPCPartyMember", Int, { Int }, &Routines::isNPCPartyMember);
add("ActionBarkString", Void, { Int });
add("ActionBarkString", Void, { Int }, &Routines::actionBarkString);
add("GetIsConversationActive", Int, { });
add("EffectLightsaberThrow", Effect, { Object, Object, Object, Int }, &Routines::effectLightsaberThrow);
add("EffectWhirlWind", Effect, { }, &Routines::effectWhirlWind);
@ -778,7 +778,7 @@ void Routines::addKotorRoutines() {
add("GetFirstAttacker", Object, { Object });
add("GetNextAttacker", Object, { Object });
add("SetFormation", Void, { Object, Object, Int, Int });
add("ActionFollowLeader", Void, { });
add("ActionFollowLeader", Void, { }, &Routines::actionFollowLeader);
add("SetForcePowerUnsuccessful", Void, { Int, Object });
add("GetIsDebilitated", Int, { Object });
add("PlayMovie", Void, { String }, &Routines::playMovie);

View file

@ -58,10 +58,10 @@ void Routines::addTslRoutines() {
add("GetTimeMinute", Int, { });
add("GetTimeSecond", Int, { });
add("GetTimeMillisecond", Int, { });
add("ActionRandomWalk", Void, { });
add("ActionMoveToLocation", Void, { Location, Int });
add("ActionRandomWalk", Void, { }, &Routines::actionRandomWalk);
add("ActionMoveToLocation", Void, { Location, Int }, &Routines::actionMoveToLocation);
add("ActionMoveToObject", Void, { Object, Int, Float }, &Routines::actionMoveToObject);
add("ActionMoveAwayFromObject", Void, { Object, Int, Float });
add("ActionMoveAwayFromObject", Void, { Object, Int, Float }, &Routines::actionMoveAwayFromObject);
add("GetArea", Object, { Object }, &Routines::getArea);
add("GetEnteringObject", Object, { }, &Routines::getEnteringObject);
add("GetExitingObject", Object, { }, &Routines::getExitingObject);
@ -70,15 +70,15 @@ void Routines::addTslRoutines() {
add("GetItemPossessor", Object, { Object });
add("GetItemPossessedBy", Object, { Object, String });
add("CreateItemOnObject", Object, { String, Object, Int, Int }, &Routines::createItemOnObject);
add("ActionEquipItem", Void, { Object, Int, Int });
add("ActionUnequipItem", Void, { Object, Int });
add("ActionPickUpItem", Void, { Object });
add("ActionPutDownItem", Void, { Object });
add("ActionEquipItem", Void, { Object, Int, Int }, &Routines::actionEquipItem);
add("ActionUnequipItem", Void, { Object, Int }, &Routines::actionUnequipItem);
add("ActionPickUpItem", Void, { Object }, &Routines::actionPickUpItem);
add("ActionPutDownItem", Void, { Object }, &Routines::actionPutDownItem);
add("GetLastAttacker", Object, { Object });
add("ActionAttack", Void, { Object, Int });
add("ActionAttack", Void, { Object, Int }, &Routines::actionAttack);
add("GetNearestCreature", Object, { Int, Int, Object, Int, Int, Int, Int, Int });
add("ActionSpeakString", Void, { String, Int });
add("ActionPlayAnimation", Void, { Int, Float, Float });
add("ActionSpeakString", Void, { String, Int }, &Routines::actionSpeakString);
add("ActionPlayAnimation", Void, { Int, Float, Float }, &Routines::actionPlayAnimation);
add("GetDistanceToObject", Float, { Object }, &Routines::getDistanceToObject);
add("GetIsObjectValid", Int, { Object }, &Routines::getIsObjectValid);
add("ActionOpenDoor", Void, { Object }, &Routines::actionOpenDoor);
@ -86,7 +86,7 @@ void Routines::addTslRoutines() {
add("SetCameraFacing", Void, { Float });
add("PlaySound", Void, { String });
add("GetSpellTargetObject", Object, { });
add("ActionCastSpellAtObject", Void, { Int, Object, Int, Int, Int, Int, Int });
add("ActionCastSpellAtObject", Void, { Int, Object, Int, Int, Int, Int, Int }, &Routines::actionCastSpellAtObject);
add("GetCurrentHitPoints", Int, { Object }, &Routines::getCurrentHitPoints);
add("GetMaxHitPoints", Int, { Object }, &Routines::getMaxHitPoints);
add("EffectAssuredHit", Effect, { }, &Routines::effectAssuredHit);
@ -173,8 +173,8 @@ void Routines::addTslRoutines() {
add("EventUserDefined", Event, { Int }, &Routines::eventUserDefined);
add("EffectDeath", Effect, { Int, Int, Int }, &Routines::effectDeath);
add("EffectKnockdown", Effect, { }, &Routines::effectKnockdown);
add("ActionGiveItem", Void, { Object, Object });
add("ActionTakeItem", Void, { Object, Object });
add("ActionGiveItem", Void, { Object, Object }, &Routines::actionGiveItem);
add("ActionTakeItem", Void, { Object, Object }, &Routines::actionTakeItem);
add("VectorNormalize", TVector, { TVector }, &Routines::vectorNormalize);
add("GetItemStackSize", Int, { Object }, &Routines::getItemStackSize);
add("GetAbilityScore", Int, { Object, Int }, &Routines::getAbilityScore);
@ -205,7 +205,7 @@ void Routines::addTslRoutines() {
add("EffectRegenerate", Effect, { Int, Float }, &Routines::effectRegenerate);
add("EffectMovementSpeedIncrease", Effect, { Int }, &Routines::effectMovementSpeedIncrease);
add("GetHitDice", Int, { Object }, &Routines::getHitDice);
add("ActionForceFollowObject", Void, { Object, Float });
add("ActionForceFollowObject", Void, { Object, Float }, &Routines::actionForceFollowObject);
add("GetTag", String, { Object }, &Routines::getTag);
add("ResistForce", Int, { Object, Object });
add("GetEffectType", Int, { Effect });
@ -240,7 +240,7 @@ void Routines::addTslRoutines() {
add("EffectLinkEffects", Effect, { Effect, Effect }, &Routines::effectLinkEffects);
add("GetObjectByTag", Object, { String, Int }, &Routines::getObjectByTag);
add("AdjustAlignment", Void, { Object, Int, Int, Int });
add("ActionWait", Void, { Float });
add("ActionWait", Void, { Float }, &Routines::actionWait);
add("SetAreaTransitionBMP", Void, { Int, String });
add("ActionStartConversation", Void, { Object, String, Int, Int, Int, String, String, String, String, String, String, Int, Int, Int, Int }, &Routines::actionStartConversation);
add("ActionPauseConversation", Void, { }, &Routines::actionPauseConversation);
@ -272,13 +272,13 @@ void Routines::addTslRoutines() {
add("FloatToInt", Int, { Float }, &Routines::floatToInt);
add("StringToInt", Int, { String }, &Routines::stringToInt);
add("StringToFloat", Float, { String }, &Routines::stringToFloat);
add("ActionCastSpellAtLocation", Void, { Int, Location, Int, Int, Int, Int });
add("ActionCastSpellAtLocation", Void, { Int, Location, Int, Int, Int, Int }, &Routines::actionCastSpellAtLocation);
add("GetIsEnemy", Int, { Object, Object }, &Routines::getIsEnemy);
add("GetIsFriend", Int, { Object, Object }, &Routines::getIsFriend);
add("GetIsNeutral", Int, { Object, Object }, &Routines::getIsNeutral);
add("GetPCSpeaker", Object, { }, &Routines::getPCSpeaker);
add("GetStringByStrRef", String, { Int }, &Routines::getStringByStrRef);
add("ActionSpeakStringByStrRef", Void, { Int, Int });
add("ActionSpeakStringByStrRef", Void, { Int, Int }, &Routines::actionSpeakStringByStrRef);
add("DestroyObject", Void, { Object, Float, Int, Float, Int }, &Routines::destroyObject);
add("GetModule", Object, { }, &Routines::getModule);
add("CreateObject", Object, { Int, String, Location, Int });
@ -325,8 +325,8 @@ void Routines::addTslRoutines() {
add("SetCustomToken", Void, { Int, String });
add("GetHasFeat", Int, { Int, Object });
add("GetHasSkill", Int, { Int, Object }, &Routines::getHasSkill);
add("ActionUseFeat", Void, { Int, Object });
add("ActionUseSkill", Void, { Int, Object, Int, Object });
add("ActionUseFeat", Void, { Int, Object }, &Routines::actionUseFeat);
add("ActionUseSkill", Void, { Int, Object, Int, Object }, &Routines::actionUseSkill);
add("GetObjectSeen", Int, { Object, Object });
add("GetObjectHeard", Int, { Object, Object });
add("GetLastPlayerDied", Object, { });
@ -347,8 +347,8 @@ void Routines::addTslRoutines() {
add("GetCreatureHasTalent", Int, { Talent, Object });
add("GetCreatureTalentRandom", Talent, { Int, Object, Int });
add("GetCreatureTalentBest", Talent, { Int, Int, Object, Int, Int, Int });
add("ActionUseTalentOnObject", Void, { Talent, Object });
add("ActionUseTalentAtLocation", Void, { Talent, Location });
add("ActionUseTalentOnObject", Void, { Talent, Object }, &Routines::actionUseTalentOnObject);
add("ActionUseTalentAtLocation", Void, { Talent, Location }, &Routines::actionUseTalentAtLocation);
add("GetGoldPieceValue", Int, { Object });
add("GetIsPlayableRacialType", Int, { Object });
add("JumpToLocation", Void, { Location }, &Routines::jumpToLocation);
@ -367,7 +367,7 @@ void Routines::addTslRoutines() {
add("GetClickingObject", Object, { });
add("SetAssociateListenPatterns", Void, { Object });
add("GetLastWeaponUsed", Object, { Object });
add("ActionInteractObject", Void, { Object });
add("ActionInteractObject", Void, { Object }, &Routines::actionInteractObject);
add("GetLastUsedBy", Object, { });
add("GetAbilityModifier", Int, { Int, Object });
add("GetIdentified", Int, { Object }, &Routines::getIdentified);
@ -398,7 +398,7 @@ void Routines::addTslRoutines() {
add("VersusTrapEffect", Effect, { Effect });
add("GetGender", Int, { Object }, &Routines::getGender);
add("GetIsTalentValid", Int, { Talent });
add("ActionMoveAwayFromLocation", Void, { Location, Int, Float });
add("ActionMoveAwayFromLocation", Void, { Location, Int, Float }, &Routines::actionMoveAwayFromLocation);
add("GetAttemptedAttackTarget", Object, { });
add("GetTypeFromTalent", Int, { Talent });
add("GetIdFromTalent", Int, { Talent });
@ -417,7 +417,7 @@ void Routines::addTslRoutines() {
add("GetLastOpenedBy", Object, { });
add("GetHasSpell", Int, { Int, Object });
add("OpenStore", Void, { Object, Object, Int, Int });
add("ActionSurrenderToEnemies", Void, { });
add("ActionSurrenderToEnemies", Void, { }, &Routines::actionSurrenderToEnemies);
add("GetFirstFactionMember", Object, { Object, Int });
add("GetNextFactionMember", Object, { Object, Int });
add("ActionForceMoveToLocation", Void, { Location, Int, Float }, &Routines::actionForceMoveToLocation);
@ -437,12 +437,12 @@ void Routines::addTslRoutines() {
add("IntToHexString", String, { Int }, &Routines::intToHexString);
add("GetBaseItemType", Int, { Object });
add("GetItemHasItemProperty", Int, { Object, Int });
add("ActionEquipMostDamagingMelee", Void, { Object, Int });
add("ActionEquipMostDamagingRanged", Void, { Object });
add("ActionEquipMostDamagingMelee", Void, { Object, Int }, &Routines::actionEquipMostDamagingMelee);
add("ActionEquipMostDamagingRanged", Void, { Object }, &Routines::actionEquipMostDamagingRanged);
add("GetItemACValue", Int, { Object });
add("EffectForceResisted", Effect, { Object }, &Routines::effectForceResisted);
add("ExploreAreaForPlayer", Void, { Object, Object });
add("ActionEquipMostEffectiveArmor", Void, { });
add("ActionEquipMostEffectiveArmor", Void, { }, &Routines::actionEquipMostEffectiveArmor);
add("GetIsDay", Int, { });
add("GetIsNight", Int, { });
add("GetIsDawn", Int, { });
@ -521,8 +521,8 @@ void Routines::addTslRoutines() {
add("AwardStealthXP", Void, { Object });
add("GetStealthXPEnabled", Int, { }, &Routines::getStealthXPEnabled);
add("SetStealthXPEnabled", Void, { Int }, &Routines::setStealthXPEnabled);
add("ActionUnlockObject", Void, { Object });
add("ActionLockObject", Void, { Object });
add("ActionUnlockObject", Void, { Object }, &Routines::actionUnlockObject);
add("ActionLockObject", Void, { Object }, &Routines::actionLockObject);
add("EffectModifyAttacks", Effect, { Int }, &Routines::effectModifyAttacks);
add("GetLastTrapDetected", Object, { Object });
add("EffectDamageShield", Effect, { Int, Int, Int }, &Routines::effectDamageShield);
@ -539,8 +539,8 @@ void Routines::addTslRoutines() {
add("GetStealthXPDecrement", Int, { }, &Routines::getStealthXPDecrement);
add("SetStealthXPDecrement", Void, { Int }, &Routines::setStealthXPDecrement);
add("DuplicateHeadAppearance", Void, { Object, Object });
add("ActionCastFakeSpellAtObject", Void, { Int, Object, Int });
add("ActionCastFakeSpellAtLocation", Void, { Int, Location, Int });
add("ActionCastFakeSpellAtObject", Void, { Int, Object, Int }, &Routines::actionCastFakeSpellAtObject);
add("ActionCastFakeSpellAtLocation", Void, { Int, Location, Int }, &Routines::actionCastFakeSpellAtLocation);
add("CutsceneAttack", Void, { Object, Int, Int, Int });
add("SetCameraMode", Void, { Object, Int });
add("SetLockOrientationInDialog", Void, { Object, Int });
@ -744,7 +744,7 @@ void Routines::addTslRoutines() {
add("AddAvailableNPCByTemplate", Int, { Int, String }, &Routines::addAvailableNPCByTemplate);
add("SpawnAvailableNPC", Object, { Int, Location });
add("IsNPCPartyMember", Int, { Int }, &Routines::isNPCPartyMember);
add("ActionBarkString", Void, { Int });
add("ActionBarkString", Void, { Int }, &Routines::actionBarkString);
add("GetIsConversationActive", Int, { });
add("EffectLightsaberThrow", Effect, { Object, Object, Object, Int }, &Routines::effectLightsaberThrow);
add("EffectWhirlWind", Effect, { }, &Routines::effectWhirlWind);
@ -776,7 +776,7 @@ void Routines::addTslRoutines() {
add("GetFirstAttacker", Object, { Object });
add("GetNextAttacker", Object, { Object });
add("SetFormation", Void, { Object, Object, Int, Int });
add("ActionFollowLeader", Void, { });
add("ActionFollowLeader", Void, { }, &Routines::actionFollowLeader);
add("SetForcePowerUnsuccessful", Void, { Int, Object });
add("GetIsDebilitated", Int, { Object });
add("PlayMovie", Void, { String, Int });
@ -899,7 +899,7 @@ void Routines::addTslRoutines() {
add("AddPartyPuppet", Int, { Int, Object });
add("GetPUPOwner", Object, { Object });
add("GetIsPuppet", Int, { Object });
add("ActionFollowOwner", Void, { Float });
add("ActionFollowOwner", Void, { Float }, &Routines::actionFollowOwner);
add("GetIsPartyLeader", Int, { Object });
add("GetPartyLeader", Object, { });
add("RemoveNPCFromPartyToBase", Int, { Int });
@ -909,7 +909,7 @@ void Routines::addTslRoutines() {
add("ChangeObjectAppearance", Void, { Object, Int });
add("GetIsXBox", Int, { });
add("EffectDroidScramble", Effect, { }, &Routines::effectDroidScramble);
add("ActionSwitchWeapons", Void, { });
add("ActionSwitchWeapons", Void, { }, &Routines::actionSwitchWeapons);
add("PlayOverlayAnimation", Void, { Object, Int });
add("UnlockAllSongs", Void, { });
add("DisableMap", Void, { Int });