player_party - MSUTeam/MSU GitHub Wiki
A number of functions were added that allow modders to modify the movement speed of a party based on some property of the player, such as items or retinue.
This refers to the 105 movement speed that player parties have by default.
getPlayerPartyMovementSpeedMult()
{
return 1.05;
}
getRosterMovementSpeedMult()
{
local mult = 1.0;
local roster = ::World.getPlayerRoster().getAll();
foreach (bro in roster)
{
if ("getMovementSpeedMult" in bro)
{
mult *= brgetMovementSpeedMult();
}
}
return mult;
}
getStashMovementSpeedMult()
{
local mult = 1.0;
local inventory = ::World.Assets.getStash();
foreach (item in inventory.getItems())
{
if ("getMovementSpeedMult" in item)
{
mult *= item.getMovementSpeedMult();
}
}
return mult;
}
getOriginMovementSpeedMult()
{
local mult = 1.0;
local origin = ::World.Assets.getOrigin();
if ("getMovementSpeedMult" in origin)
{
mult *= origin.getMovementSpeedMult();
}
return mult;
}
getRetinueMovementSpeedMult()
{
local mult = 1.0;
local retinue = ::World.Retinue;
foreach (follower in retinue.m.Followers)
{
if ("getMovementSpeedMult" in follower)
{
mult *= follower.getMovementSpeedMult();
}
}
return mult;
}
- Calls
resetBaseMovementSpeed()
to set thethis.m.BaseMovementSpeed
to 100.. CallssetVanillaBaseMovementSpeed(105)
to record the vanilla player party base movement speed of 105. - Pushes the MovementSpeedMult functions to the this.m.MovementSpeedMultFunctions array.