Yes. I have tested omit_key_once. Nice work!
case store_main_party_wounded:
{
int wounded = 0;
mbParty *mainParty = g_game->getMainParty();
for (int i = 0; i < mainParty->m_numStacks; ++i)
{
mbPartyStack *stack = mainParty->getStack(i);
if (!stack->isPrisoner())
{
mbTroop *troop = g_game->getTroop(stack->m_troopNo);
wounded += troop->isHero() ? (int)ceilf(((float)troop->getMaxHitPoints() - troop->m_hitPoints) * 0.15f) : stack->m_numWounded;
}
}
returnValue(localVariables, wounded);
}
case str_store_agent_face_keys:
if (mbCheckRegister(intValues[0]) && mbCheckAgent(intValues[1]))
{
mbAgent *agent = g_mission->getAgent(intValues[1]);
mbTroop *troop = agent->getTroop();
g_faceGenerator.load(agent->m_skinNo, agent->m_dna, troop->m_faceKeys1, troop->m_faceKeys2);
mbFaceKeys facekeys;
g_faceGenerator.fillKeys(facekeys);
g_basicGame.m_stringRegisters[intValues[0]] = facekeys.toString();
}
I am currently updating the GitLab again. Are you sure aboutUndocumented Warband operations
store_main_party_wounded = 2176 # (store_main_party_wounded,<destination>),
lhs operation
Code:case store_main_party_wounded: { int wounded = 0; mbParty *mainParty = g_game->getMainParty(); for (int i = 0; i < mainParty->m_numStacks; ++i) { mbPartyStack *stack = mainParty->getStack(i); if (!stack->isPrisoner()) { mbTroop *troop = g_game->getTroop(stack->m_troopNo); wounded += troop->isHero() ? (int)ceilf(((float)troop->getMaxHitPoints() - troop->m_hitPoints) * 0.15f) : stack->m_numWounded; } } returnValue(localVariables, wounded); }
str_store_agent_face_keys = 2749 # (str_store_agent_face_keys, <string_no>, <agent_id>),
Code:case str_store_agent_face_keys: if (mbCheckRegister(intValues[0]) && mbCheckAgent(intValues[1])) { mbAgent *agent = g_mission->getAgent(intValues[1]); mbTroop *troop = agent->getTroop(); g_faceGenerator.load(agent->m_skinNo, agent->m_dna, troop->m_faceKeys1, troop->m_faceKeys2); mbFaceKeys facekeys; g_faceGenerator.fillKeys(facekeys); g_basicGame.m_stringRegisters[intValues[0]] = facekeys.toString(); }
Their practical application is unclear, which is probably why they are not in the documentation.
store_main_party_wounded
? It would share the same OP Code as store_proficiency_level
which made me wonder (in both cases 2176).set_ally_collision_threshold
. Is that a WSE operation since I can also not find its OP Code.set_ally_collision_threshold = 3602 #(set_ally_collision_threshold, <low_boundary>, <high_boundary>), #Changes the animation progress boundaries (in percents) that determine if attacks on allies will collide (default: 45% <= x <= 60%)
Trying to set allied collision to be the same as enemies. Is (default: 45% <= x <= 60%) the default for allies or enemies? If it's for allies, what would I need to change to make it match that of an enemy?
presentation_is_active
is a WSE operation or a Native one? I just noticed that I have that operation mentioned in a comment while it is not mentioned with an own OP code and I didn't see any Module System with that operation. I would assume that it's a WSE operation, just to make things sure. Thanks!this one is used when a player presses a hotkey like TAB or ESC to check if he doesn't have any kind of presentation open, however, it works strangely and is almost always acompannied by some sort of (neg|presentation_is_active, "prst"), in nativeCode:player_is_busy_with_menus = 438 # (player_is_busy_with_menus, <player_id>),
is_presentation_active
and I simply missed that somehow, a simply spelling misstake by the others here.