
https://earendil_ardamire.gitlab.io/modding-guide/Subpages/Documentation_Module_System/Module_Parties.html#Party_SpeedHi mate! Could you please shed some light on how party speed is calculated by the engine?
Everytime I remember this feature I want to ask, is it possible for this to be added as a hard coded presentation? I would love to be able to hook into it and use it to inspect specific slots or other agent information by adding overlays.Mission debug window
Enable edit mode and use CTRL + R in mission. Click ai agent with right mouse button to check debug info. Click P for pause/unpause.
Thanks for the info on party speed! Could you please explain how set_party_creation_random_limits interacts with party templates? I don't quite get what the formula is or what the real limits are
case set_party_creation_random_limits:
{
int minPartyCreationRandomValue = rglClampInclusive(intValues[0], 0, 101);
int maxPartyCreationRandomValue = rglClampInclusive(intValues[1], 0, 101);
if (minPartyCreationRandomValue <= maxPartyCreationRandomValue)
{
g_game->m_minPartyCreationRandomValue = minPartyCreationRandomValue;
g_game->m_maxPartyCreationRandomValue = maxPartyCreationRandomValue;
}
}
int mbGame::getScaledNumTroopsForStackTemplate(int partyTemplateNo, int stackNo)
{
mbPartyStackTemplate *partyStackTemplate = &g_partyTemplates[partyTemplateNo].m_stacks[stackNo];
return partyStackTemplate->m_min + rglRound((partyStackTemplate->m_max - partyStackTemplate->m_min) * rglRandf((float)m_minPartyCreationRandomValue, (float)m_maxPartyCreationRandomValue) * 0.01f);
}
void mbGame::addTemplateToParty(int partyNo, int partyTemplateNo, bool reversePrisoners)
{
mbPartyTemplate *partyTemplate = &g_partyTemplates[partyTemplateNo];
mbParty *party = getParty(partyNo);
for (int i = 0; i < MB_MAX_NUM_PARTY_TEMPLATE_STACKS; ++i)
{
mbPartyStackTemplate *partyStackTemplate = &partyTemplate->m_stacks[i];
if (partyStackTemplate->m_troopNo >= 0)
{
int numTroops = getScaledNumTroopsForStackTemplate(partyTemplateNo, i);
if (numTroops > 0)
{
unsigned int flags;
if (partyStackTemplate->m_flags & pmf_is_prisoner)
flags = reversePrisoners ? 0 : pmf_is_prisoner;
else
flags = reversePrisoners ? pmf_is_prisoner : 0;
party->addTroops(partyStackTemplate->m_troopNo, numTroops, flags, 0, false);
}
}
}
}
You can use ai_mesh_face_group_show_hide for enable and disable ai mesh when destroying or rebuilding a wall, for example.Is it possible to implement a dynamic AI navigation mesh function similar to the NavMeshObstacle component of Unity? This could facilitate AI pathfinding for handling dynamic game scenes props, such as castle gates, suspension bridges, siege ladders, city wall destruction, etc.

Thanks, I will look into their usage.You can use ai_mesh_face_group_show_hide for enable and disable ai mesh when destroying or rebuilding a wall, for example.
Also possible implement operation for moving ai mesh, check Carribean module system
ai_mesh_face_group_translate = 2550 # (ai_mesh_face_group_translate, <group_no>, <position>), #translates the group by distance given in position.