Clarifying Module System Operations

Users who are viewing this thread

Updated the file on MB Repository. Only two sections remaining until I start running code tests.

http://www.mbrepository.com/file.php?id=3478

Most likely I won't be able to do much work in the next few days, but hope to resume the work by the end of the week.

Volunteers to complete the section for multiplayer/networking operations are highly desired! I can try to fill the documentation for many operations there, but not for all, and I have never seriously done MP modding for Warband, so someone who is familiar with this would be much more preferable.
 
clear_ommited_keys will do exactly as it says, it will clear the effects of ommit_key_once
disable_party is not the best op you should use, as you'll get invalid party id's every time you use try_for_parties without party_is_active(a common practice in native)
store_troop_kind_count  (store_troop_kind_count,<destination>,<troop>), "deprecated, use party_count_members_of_type instead"
 
Ikaguia said:
disable_party is not the best op you should use, as you'll get invalid party id's every time you use try_for_parties without party_is_active(a common practice in native)
try_for_parties doesn't include an automatic/unseen party_is_active check in the same way that try_for_agents only tries for valid agent IDs?
 
Caba`drin said:
Ikaguia said:
disable_party is not the best op you should use, as you'll get invalid party id's every time you use try_for_parties without party_is_active(a common practice in native)
try_for_parties doesn't include an automatic/unseen party_is_active check in the same way that try_for_agents only tries for valid agent IDs?
It does, but that's not really the issue since disable_party just adds a flag and certainly doesn't touch party validity. Was probably a MS mistake...
 
Ok, thanks to everyone for your cooperation so far!

For the next two days or so I'll probably have very little time to continue this work, so I decided to concentrate my efforts today on completing the most boring tasks (that is, actual documentation).

Which I did. And at this stage, all sections except Multiplayer are complete. There are still many operations marked as "Not documented" or "4research", but that's for the next stage. Also I didn't include information from this thread yet - this will have to wait as well.

Version 0.4 of the header_operations file has been uploaded to MB Repository.

http://www.mbrepository.com/file.php?id=3478

That's it for now. Please, if you have time to spare, consider searching this file for markers mentioned above - maybe you know something about those operations that you could share in this thread. Every bit of information will help. Any found mistakes or inaccuracies are welcome too.

Having said that, I disappear for the next day or two. :smile:
 
Code:
prop_instance_dynamics_set_properties       = 1871  # (prop_instance_dynamics_set_properties, <scene_prop_id>, <mass_friction>),
                                                    # Allows to do some cool physics with the scene prop instance? Not documented unfortunately. 4research.
prop_instance_dynamics_set_velocity         = 1872  # (prop_instance_dynamics_set_velocity, <scene_prop_id>, <linear_velocity>),
                                                    # Allows to do some cool physics with the scene prop instance? Not documented unfortunately. 4research.
prop_instance_dynamics_set_omega            = 1873  # (prop_instance_dynamics_set_omega, <scene_prop_id>, <angular_velocity>),
                                                    # Allows to do some cool physics with the scene prop instance? Not documented unfortunately. 4research.
prop_instance_dynamics_apply_impulse        = 1874  # (prop_instance_dynamics_apply_impulse, <scene_prop_id>, <impulse_force>),
                                                    # Allows to do some cool physics with the scene prop instance? Not documented unfortunately. 4research.

cmpxchg8b said:
From the bugtracker:
Code:
("box_a_dynamic",sokf_moveable|sokf_dynamic_physics,"box_a","bo_box_a", [
	(ti_on_init_scene_prop, [
		(store_trigger_param_1, ":prop_instance_no"),
		(set_fixed_point_multiplier, 100),
		(position_set_x, pos0, 2500), #mass = 25.0
		(position_set_y, pos0, 80), #friction coefficient = 0.8
		(position_set_z, pos0, 0), #reserved variable
		(prop_instance_dynamics_set_properties, ":prop_instance_no", pos0),
		(position_set_x, pos0, 0),
		(position_set_y, pos0, 0),
		(position_set_z, pos0, 10000),
		(prop_instance_dynamics_set_omega, ":prop_instance_no", pos0), #spin around fast
		(position_set_x, pos0, 0),
		(position_set_y, pos0, 0),
		(position_set_z, pos0, 10000),
		(prop_instance_dynamics_apply_impulse, ":prop_instance_no", pos0), # and jump 
	]),
]),

(prop_instance_dynamics_set_properties, ":prop_instance_no", pos0),
pos0 - x: mass
pos0 - y: friction coefficient
pos0 - z: reserved

(prop_instance_dynamics_set_omega, ":prop_instance_no", pos0),
pos0 - x: impulse along x axis
pos0 - y: impulse along y axis
pos0 - z: impulse along z axis

(prop_instance_dynamics_set_omega, ":prop_instance_no", pos0),
pos0 - x: omega along x axis
pos0 - y: omega along y axis
pos0 - z: omega along z axis

Notes:

1) sokf_moveable|sokf_dynamic_physics flags for the scene prop
2) call prop_instance_enable_physics for the instance
3) single player only



agent_is_active is a multiplayer operation. but I'm not too sure what it's for.
 
I hope this can be useful :
Code:
troop_slot_neq                  = neg | troop_slot_eq           # (troop_slot_neq,<troop_id>,<slot_no>,<value>),
party_slot_neq                  = neg | party_slot_eq           # (party_slot_neq,<party_id>,<slot_no>,<value>),
faction_slot_neq                = neg | faction_slot_eq         # (faction_slot_neq,<faction_id>,<slot_no>,<value>),
scene_slot_neq                  = neg | scene_slot_eq           # (scene_slot_neq,<scene_id>,<slot_no>,<value>),
party_template_slot_neq         = neg | party_template_slot_eq  # (party_template_slot_neq,<party_template_id>,<slot_no>,<value>),
agent_slot_neq                  = neg | agent_slot_eq           # (agent_slot_neq,<agent_id>,<slot_no>,<value>),
quest_slot_neq                  = neg | quest_slot_eq           # (quest_slot_neq,<quest_id>,<slot_no>,<value>),
item_slot_neq                   = neg | item_slot_eq            # (item_slot_neq,<item_id>,<slot_no>,<value>),
player_slot_neq                 = neg | player_slot_eq          # (player_slot_neq,<player_id>,<slot_no>,<value>),
team_slot_neq                   = neg | team_slot_eq            # (team_slot_neq,<team_id>,<slot_no>,<value>),
scene_prop_slot_neq             = neg | scene_slot_eq           # (scene_prop_slot_neq,<scene_prop_instance_id>,<slot_no>,<value>),

troop_slot_lt                   = neg | troop_slot_ge           # (troop_slot_lt,<troop_id>,<slot_no>,<value>),
party_slot_lt                   = neg | party_slot_ge           # (party_slot_lt,<party_id>,<slot_no>,<value>),
faction_slot_lt                 = neg | faction_slot_ge         # (faction_slot_lt,<faction_id>,<slot_no>,<value>),
scene_slot_lt                   = neg | scene_slot_ge           # (scene_slot_lt,<scene_id>,<slot_no>,<value>),
party_template_slot_lt          = neg | party_template_slot_ge  # (party_template_slot_lt,<party_template_id>,<slot_no>,<value>),
agent_slot_lt                   = neg | agent_slot_ge           # (agent_slot_lt,<agent_id>,<slot_no>,<value>),
quest_slot_lt                   = neg | quest_slot_ge           # (quest_slot_lt,<quest_id>,<slot_no>,<value>),
item_slot_lt                    = neg | item_slot_ge            # (item_slot_lt,<item_id>,<slot_no>,<value>),
player_slot_lt                  = neg | player_slot_ge          # (player_slot_lt,<player_id>,<slot_no>,<value>),
team_slot_lt                    = neg | team_slot_ge            # (team_slot_lt,<team_id>,<slot_no>,<value>),
scene_prop_slot_lt              = neg | scene_slot_ge           # (scene_prop_slot_lt,<scene_prop_instance_id>,<slot_no>,<value>),
 
SonKidd said:
agent_is_active is a multiplayer operation. but I'm not too sure what it's for.
This is works just fine in Single Player, too. It ensures the agent ID is a valid agent (regardless of whether the agent in question is alive or dead). It is an unnecessary check within a try_for_agents loop, but otherwise if you are fetching an agent ID from another place, it is smart to ensure you won't throw up script errors with an invalid agent ID.
 
MadocComadrin said:
Caba`drin said:
It is an unnecessary check within a try_for_agents loop
I've had invalid agent IDs from in a loop before.
But not from the iterated variable I would imagine?

I should have been more clear: my understanding, through statements primarily by cmp, is that the agent ID stored in the destination of
(try_for_agents, <destination>)
is guaranteed to be a valid agent ID and will thus must pass agent_is_active. Other agent ID references within the loop, or any modifications to the iterated <destination> agent ID could still produce an invalid ID within the loop.
 
There's an operation agent_is_routed which checks the agent for that status. For that check to success, there must be an agent in the first place. So my guess is that agent_is_active should return true for routed agents as well. Only a guess at this moment, but I think it's a justified one.
 
Caba`drin said:
MadocComadrin said:
Caba`drin said:
It is an unnecessary check within a try_for_agents loop
I've had invalid agent IDs from in a loop before.
But not from the iterated variable I would imagine?
Seeing as how it was the only agent being referenced, yes, but rarely. I do think that is technically right though. It may be that poor memory management doesn't guarantee they stay active.

I believe faded agents are still active for a slight period of time.
 
I've run some tests. Will post updated header_operations file in a while.

I also encountered a very strange issue with party_is_in_town/party_is_in_any_town. It has been reported earlier in this thread, that what these operations actually check is party AI behavior and object. So I ran checks for all 4 possible situations (default AI and not attached to any town, default AI and attached, town AI and not attached, town AI and attached). Both functions failed on all runs. However these functions are successfully used in Native code. So apparently I'm still missing something here.

Code:
            # DRY RUN
            (assign, reg0, 0),
            (try_begin),
                (party_is_in_town, "$g_research_party", "p_town_1"),
                (assign, reg20, 1),
            (else_try),
                (assign, reg20, 0),
            (try_end),
            (assign, reg30, reg0),
            (try_begin),
                (party_is_in_any_town, "$g_research_party"),
                (assign, reg21, 1),
            (else_try),
                (assign, reg21, 0),
            (try_end),
            (assign, reg31, reg0),
            (party_get_cur_town, reg10, "$g_research_party"),
            # ATTACHED BUT STANDARD AI
            (assign, reg0, 0),
            (party_attach_to_party, "$g_research_party", "p_town_1"),
            (try_begin),
                (party_is_in_town, "$g_research_party", "p_town_1"),
                (assign, reg22, 1),
            (else_try),
                (assign, reg22, 0),
            (try_end),
            (assign, reg32, reg0),
            (try_begin),
                (party_is_in_any_town, "$g_research_party"),
                (assign, reg23, 1),
            (else_try),
                (assign, reg23, 0),
            (try_end),
            (assign, reg33, reg0),
            (party_get_cur_town, reg11, "$g_research_party"),
            # DETACHED BUT AI_BHVR_IN_TOWN
            (assign, reg0, 0),
            (party_detach, "$g_research_party"),
            (party_set_ai_behavior, "$g_research_party", ai_bhvr_in_town),
            (party_set_ai_object, "$g_research_party", "p_town_1"),
            (try_begin),
                (party_is_in_town, "$g_research_party", "p_town_1"),
                (assign, reg24, 1),
            (else_try),
                (assign, reg24, 0),
            (try_end),
            (assign, reg34, reg0),
            (try_begin),
                (party_is_in_any_town, "$g_research_party"),
                (assign, reg25, 1),
            (else_try),
                (assign, reg25, 0),
            (try_end),
            (assign, reg35, reg0),
            (party_get_cur_town, reg12, "$g_research_party"),
            # ATTACHED WITH AI_BHVR_IN_TOWN
            (assign, reg0, 0),
            (party_attach_to_party, "$g_research_party", "p_town_1"),
            (try_begin),
                (party_is_in_town, "$g_research_party", "p_town_1"),
                (assign, reg26, 1),
            (else_try),
                (assign, reg26, 0),
            (try_end),
            (assign, reg36, reg0),
            (try_begin),
                (party_is_in_any_town, "$g_research_party"),
                (assign, reg27, 1),
            (else_try),
                (assign, reg27, 0),
            (try_end),
            (assign, reg37, reg0),
            (party_get_cur_town, reg13, "$g_research_party"),
            # RESETTING EVERYTHING BACK
            (party_detach, "$g_research_party"),
            (party_set_ai_behavior, "$g_research_party", ai_bhvr_hold),
            (party_set_ai_object, "$g_research_party", -1),

            (display_log_message, "@TEST party_is_in_[any_]town/party_get_cur_town."),
            (display_log_message, "@DRY: ({reg20}/{reg21}), ID {reg10}, reg0={reg30}/{reg31}. ATTACH: ({reg22}/{reg23}), ID {reg11}, reg0={reg30}/{reg31}. ONLY_AI: ({reg24}/{reg25}), ID {reg12}, reg0={reg30}/{reg31}. ATTACH+AI: ({reg26}/{reg27}), ID {reg13}, reg0={reg30}/{reg31}."),

Code:
 DRY: (0/0), ID -1, reg0=0/0. ATTACH: (0/0), ID -1, reg0=0/0. ONLY AI: (0/0), ID -1, reg0=0/0. ATTACH+AI: (0/0), ID -1, reg0=0/0.
 
All right, I have posted the updated file (current version 0.5) to MB Repository. Most issues for sections from Z01 to Z18 have been cleared, and some from remaining sections as well. I didn't yet run any tests dealing with missions or agents, as these require some extra preparatory work.

http://www.mbrepository.com/file.php?id=3478

Full list of remaining issues follows:

Code:
party_set_marshall                    = 1604  # (party_set_marshall, <party_id>, <value>),
# Sets party as a marshall party or turns it back to normal party. Value is either 1 or 0. This affects party behavior, but exact effects are not known. 4research.
cur_tableau_set_background_color                 = 1985  # (cur_tableau_set_background_color, <value>),
# Not documented. 4research.
cur_tableau_set_ambient_light                    = 1987  # (cur_tableau_set_ambient_light, <red_fixed_point>, <green_fixed_point>, <blue_fixed_point>),
# Not documented. 4research.
cur_tableau_set_camera_position                  = 1988  # (cur_tableau_set_camera_position, <position_no>),
# Not documented. 4research.
cur_tableau_set_camera_parameters                = 1989  # (cur_tableau_set_camera_parameters, <is_perspective>, <camera_width_times_1000>, <camera_height_times_1000>, <camera_near_times_1000>, <camera_far_times_1000>),
# Not documented. 4research.
cur_tableau_add_point_light                      = 1990  # (cur_tableau_add_point_light, <map_icon_id>, <position_no>, <red_fixed_point>, <green_fixed_point>, <blue_fixed_point>),
# Not documented. 4research.
cur_tableau_add_sun_light                        = 1991  # (cur_tableau_add_sun_light, <map_icon_id>, <position_no>, <red_fixed_point>, <green_fixed_point>, <blue_fixed_point>),
# Not documented. 4research.
cur_tableau_add_mesh                             = 1992  # (cur_tableau_add_mesh, <mesh_id>, <position_no>, <value_fixed_point>, <value_fixed_point>),
# First value fixed point is the scale factor, second value fixed point is alpha. use 0 for default values. 4research.
cur_tableau_add_mesh_with_vertex_color           = 1993  # (cur_tableau_add_mesh_with_vertex_color, <mesh_id>, <position_no>, <value_fixed_point>, <value_fixed_point>, <value>),
# First value fixed point is the scale factor, second value fixed point is alpha. value is vertex color. use 0 for default values. vertex_color has no default value. 4research.
cur_tableau_add_mesh_with_scale_and_vertex_color = 2000  # (cur_tableau_add_mesh_with_scale_and_vertex_color, <mesh_id>, <position_no>, <position_no>, <value_fixed_point>, <value>),
# Not documented. 4research. second position_no is x,y,z scale factors (with fixed point values). value fixed point is alpha. value is vertex color. use 0 for default values. scale and vertex_color has no default values.
change_screen_return                  = 2040  # (change_screen_return),
# Closes any current screen and returns the player to worldmap (to scene?). 4research how it behaves in missions.
change_screen_buy_mercenaries         = 2045  # (change_screen_buy_mercenaries),
# Opens the Buy Mercenaries interface. Apparently deprecated, exact effects unknown. 4research.
change_screen_training                = 2047  # (change_screen_training),
# Apparently deprecated. Exact effects unknown. 4research.
encounter_attack                      = 1302  # (encounter_attack),
# Apparently starts the standard battle with the encountered party. 4research.
end_current_battle                    = 1307  # (end_current_battle),
# Apparently ends the battle between player's party and it's opponent. Exact effects not clear. 4research.
race_completed_by_player                     = 1004  # (race_completed_by_player),
# Not documented. Not used in Native. Apparently deprecated. 4research.
scene_allows_mounted_units                   = 1834  # (scene_allows_mounted_units),
# Not documented. Used in multiplayer, but it's not clear where horses could be disallowed in the first place. 4research.
jump_to_scene                                = 1910  # (jump_to_scene, <scene_id>, [entry_no]),
# Tells the game to use the specified scene for the next mission. Usually followed by (change_screen_mission) call. Parameter entry_no is not used anywhere in Native, possibly duplicates set_jump_entry. 4research.
scene_prop_set_visibility                   = 1813  # (scene_prop_set_visibility, <scene_prop_id>, <value>),
# Shows (value = 1) or hides (value = 0) the scene prop instance. What does it do with collision? 4research.
prop_instance_rotate_to_position            = 1865  # (prop_instance_rotate_to_position, <scene_prop_id>, position, <duration-in-1/100-seconds>, <total_rotate_angle_fixed_point>),
# Imitates wheel rotational movement? 4research.
add_point_light                             = 1960  # (add_point_light, [flicker_magnitude], [flicker_interval]),
# Adds a point light source to an object with optional flickering magnitude (range 0..100) and flickering interval (in 1/100th of second). Uses position offset and color provided to previous calls to (set_position_delta) and (set_current_color). Only used in module_items - cannot be used with scene props? 4research.
add_point_light_to_entity                   = 1961  # (add_point_light_to_entity, [flicker_magnitude], [flicker_interval]), #flicker_magnitude between 0 and 100, flicker_interval is in 1/100 seconds
# Adds a point light source to an object with optional flickering magnitude (range 0..100) and flickering interval (in 1/100th of second). Uses position offset and color provided to previous calls to (set_position_delta) and (set_current_color). Only used in module_scene_props - cannot be used with items? 4research.
particle_system_emit                        = 1968  # (particle_system_emit, <par_sys_id>, <value_num_particles>, <value_period>),
# Adds a particle system in some fancy way. Uses position offset and color provided to previous calls to (set_position_delta) and (set_current_color). Can only be used in item/prop triggers. 4research.
agent_is_routed                          = 1699  # (agent_is_routed, <agent_id>),
# Checks that the agent has fled from the map. Or in fleeing mode? 4research.
agent_is_active                          = 1712  # (agent_is_active, <agent_id>),
# Checks that the agent is currently active (isn't this a duplicate of is_alive?). 4research.
agent_play_sound                         = 1750  # (agent_play_sound, <agent_id>, <sound_id>),
# Makes the agent emit the specified sound. Can it be used outside of dialogs? 4research.
agent_stop_sound                         = 1808  # (agent_stop_sound, <agent_id>),
# Not used in Native. Apparently makes agent stop whatever sound he's currently performing. 4research.
agent_get_entry_no                       = 1717  # (agent_get_entry_no, <destination>, <agent_id>),
# Retrieves the entry point number where this agent has spawned. What does this return for agents spawned with (spawn_agent)? 4research.
agent_set_horse_speed_factor             = 1734  # (agent_set_horse_speed_factor, <agent_id>, <speed_multiplier-in-1/100>),
# Multiplies agent's horse speed (and maneuverability?) by the specified percentile value (using 100 will make the horse). Note that this is called on the rider, not on the horse! Supposedly will persist even if the agent changes horses. 4research.
agent_get_time_elapsed_since_removed     = 1760  # (agent_get_time_elapsed_since_removed, <destination>, <agent_id>),
# Retrieves the number of seconds that have passed since agent's death. Native uses this only for multiplayer to track player's respawns. Can it be used in singleplayer too? 4research.
agent_equip_item                         = 1779  # (agent_equip_item, <agent_id>, <item_id>, [weapon_slot_no]),
# Adds the specified item to agent and forces him to equip it. Optional weapon_slot_no parameter is only used with weapons and will put the newly added item to that slot (range 1..4). If it is omitted with a weapon item, then the agent must have an empty weapon slot for the operation to succeed. 4research that it actually works as per this description.
agent_set_ammo                           = 1776  # (agent_set_ammo, <agent_id>, <item_id>, <value>),
# Sets current agent ammo amount to the specified value between 0 and maximum ammo. Not clear what item_id means - weapon item or ammo item? 4research.
agent_start_running_away                 = 1751  # (agent_start_running_away, <agent_id>),
# Makes the agent flee the battlefield, ignoring everything else and not attacking. If the agent reaches the edge of map in this mode, he will fade out and become routed (needs confirmation). 4research.
agent_ai_set_aggressiveness              = 1753  # (agent_ai_set_aggressiveness, <agent_id>, <value>),
# Sets the aggressiveness parameter for agent AI to use. Default value is 100. Higher values make agent more aggressive. Actual game effect are not clear. 4research.
agent_add_offer_with_timeout             = 1777  # (agent_add_offer_with_timeout, <agent_id>, <offerer_agent_id>, <duration-in-1/1000-seconds>),
# Esoteric stuff. Used in multiplayer duels. Second agent_id is offerer, 0 value for duration is an infinite offer. 4research.
agent_check_offer_from_agent             = 1778  # (agent_check_offer_from_agent, <agent_id>, <offerer_agent_id>), #second agent_id is offerer
# Esoteric stuff. Used in multiplayer duels. Second agent_id is offerer. 4research.
agent_get_division                       = 1773  # (agent_get_division , <destination>, <agent_id>),
# Retrieves the agent division (custom troop class number in 0..8 range). Apparently may be greater than 8? 4research.
store_remaining_team_no                  = 2360  # (store_remaining_team_no, <destination>),
# Retrieves the number of the last remaining team. Currently not used in Native, possibly deprecated. 4research.
store_enemy_count                        = 2380  # (store_enemy_count, <destination>),
# No longer used in Native. Apparently stores total number of active enemy agents. Possibly deprecated. 4research.
store_friend_count                       = 2381  # (store_friend_count, <destination>),
# No longer used in Native. Apparently stores total number of active friendly agents. Possibly deprecated. 4research.
store_ally_count                         = 2382  # (store_ally_count, <destination>),
# No longer used in Native. Apparently stores total number of active allied agents (how is it different from friends?). Possibly deprecated. 4research.
store_defender_count                     = 2383  # (store_defender_count, <destination>),
# No longer used in Native. Apparently stores total number of active agents on defender's side. Possibly deprecated. 4research.
store_attacker_count                     = 2384  # (store_attacker_count, <destination>),
# No longer used in Native. Apparently stores total number of active agents on attacker's side. Possibly deprecated. 4research.
start_background_presentation                     =  901  # (start_background_presentation, <presentation_id>), #can only be used in game menus
# Apparently allows you to start a presentation in background but stay in the menu. 4research.
create_listbox_overlay                            =  943  # (create_list_box_overlay, <destination>, <string>, <value>),
# Creates a listbox overlay. Individual items can be added with (overlay_add_item) and currently selected item can be set with (overlay_set_val). Returns listbox overlay_id. Importance of later two parameters unclear. 4research.
Also, for the following operations I have no choice but to ask cmpxchg8b for help:

Code:
party_is_in_town                      =  130  # (party_is_in_town, <party_id>, <town_party_id>),
# Operation failed for all test cases, however is successfully used in Native. 4research.
party_is_in_any_town                  =  131  # (party_is_in_any_town, <party_id>),
# Operation failed for all test cases, however is successfully used in Native. 4research.
party_get_cur_town                    = 1665  # (party_get_cur_town, <destination>, <party_id>),
# Operation returned -1 for all test cases. However it is successfully used in Native. 4research.
add_companion_party                   = 1233  # (add_companion_party, <troop_id_hero>),
# Creates a new empty party with specified hero as party leader and the only member. Party is spawned at the position of player's party. Does it return spawned party's ID in reg0? Does it take spawn radius into account? Does it take any extra arguments? 4research.
party_set_next_battle_simulation_time = 1667  # (party_set_next_battle_simulation_time, <party_id>, <next_simulation_time_in_hours>),
# Used in Native with -1 for next simulation time (apparently indicates NOT to simulate battle in the next hour). 4research.
mission_get_time_speed                       = 2002  # (mission_get_time_speed, <destination_fixed_point>),
# Not documented. 4research.
mission_set_time_speed                       = 2003  # (mission_set_time_speed, <value_fixed_point>) #this works only when cheat mode is enabled
# Not documented. 4research.
mission_time_speed_move_to_value             = 2004  # (mission_speed_move_to_value, <value_fixed_point>, <duration-in-1/1000-seconds>) #this works only when cheat mode is enabled
# Not documented. 4research.
team_set_order_listener                  = 1795  # (team_set_order_listener, <team_no>, <division>, <value>),
# Effects not clear. 4research. Taleworlds doc: merge with old listeners if value is non-zero #clear listeners if sub_class is less than zero
class_is_listening_order                 = 1775  # (class_is_listening_order, <team_no>, <sub_class>),
# Checks that the specified group of specified team will listen to player's orders. It's not clear how it could be different though. 4research.
agent_set_no_dynamics                    = 1762  # (agent_set_no_dynamics, <agent_id>, <value>),
# Used in Native for the wedding scene. Effects not clear. 0 = turn dynamics off, 1 = turn dynamics on. 4research.
agent_get_combat_state                   = 1739  # (agent_get_combat_state, <destination>, <agent_id>),
# Retrieves agent's current combat state. Constants returned by this operation are not documented anywhere. 4research.
show_object_details_overlay                       =  960  # (show_object_details_overlay, <value>),
# Effects not clear, but used several times during the wedding ceremony. #0 = hide, 1 = show. 4research.
 
party_is_in_town/party_is_in_any_town:
Those two are very suspicious. I remember POP3 had a problem there, and we had to change the original code to check for attachment instead of party_is_wherever, but don't remember the details. It may be that they were broken (or have changed behavior) in some of the late Warband patches, but that's just guessing.

Hope you'll get to the bottom of it.
 
team_set_order_listener                  = 1795  # (team_set_order_listener, <team_no>, <division>, <value>),
# Effects not clear. 4research. Taleworlds doc: merge with old listeners if value is non-zero #clear listeners if sub_class is less than zero

class_is_listening_order                = 1775  # (class_is_listening_order, <team_no>, <sub_class>),
# Checks that the specified group of specified team will listen to player's orders. It's not clear how it could be different though. 4research.

Single player:
Each team has 9 (I think) sub_classes. By default, only the first 3 are used - Infantry, Archery, Calvary.

class_is_listening_order checks if SUB_CLASS of TEAM_NO is being selected for formation commands.
for example, caba uses it in this script: http://forums.taleworlds.com/index.php/topic,134031.0.html

(team_set_order_listener, <team_no>, <division>, 1), => SUB_CLASS of TEAM_NO will listen to command

(team_set_order_listener, <team_no>, <division>, 0), => SUB_CLASS of TEAM_NO will not listen to command

Multiplayer:
<team_no> is replaced by player_no
each player has it's own group of troops that are split into 9 sub-classes

 
Back
Top Bottom