Module System Download

Users who are viewing this thread

For those of you who play on SteamOS/linux (It might work on Mac OS X, but I don't have a mac to test it), the way to compile the module system is as follows (Please get the OP to link to this if anyone finds it useful):

[list type=decimal]
[*]make sure python2 (some distribution may have it as python27 or python2.7 as the package name, consult the documentation for your OS for details) is installed.  It should be available in official repository of your OS distribution.
[*]All other adjustments (such as the path in module_info.py) should be the same as if you are running in windows (your mount/blade path should have a default of ~/.steam/steam/SteamApps/common/MountBlade Warband/Modules/<module name> if you happen to use steam.  If you are using a terminal/terminal emulator/bash remember to use quotes for the absolute paths, use \ to escape spaces or to use tab completion to make sure the space will not be misinterpreted.)
[*]Use the following code snipplet instead of the batch file the same way as if you would if you are doing it like windows (i.e. the same folder as your module_*.py .)
[*]Run the shell script.  Remember the ./ if you are running inside a terminal within the directory where you put the script.
[/list]



Here is the build_module.sh I am using
Code:
#!/bin/bash

python2 process_init.py
python2 process_global_variables.py
python2 process_strings.py
python2 process_skills.py
python2 process_music.py
python2 process_animations.py
python2 process_meshes.py
python2 process_sounds.py
python2 process_skins.py
python2 process_map_icons.py
python2 process_factions.py
python2 process_items.py
python2 process_scenes.py
python2 process_troops.py
python2 process_particle_sys.py
python2 process_scene_props.py
python2 process_tableau_materials.py
python2 process_presentations.py
python2 process_party_tmps.py
python2 process_parties.py
python2 process_quests.py
python2 process_info_pages.py
python2 process_scripts.py
python2 process_mission_tmps.py
python2 process_simple_triggers.py
python2 process_game_menus.py
python2 process_dialogs.py
python2 process_global_variables_unused.py
python2 process_postfx.py
rm *.pyc
echo ______________________________
echo Script processing done.

Remember to make the shell script executable by the following command:

Code:
$  chmod +x build_module.sh


 
Tengu haiku bonsai!

And there's lots of new stuff, cool.

Hehe, some comments from my expanded header_operations.py file made their way into the official version. :lol: :lol: :lol:

UPDATE: found a few bugs in new Module System already, including one which makes it impossible to compile without a few fixes first.
 
Just edit header_operations.py and replace "party_set_marshal" operation name with "party_set_marshall".

Apparently some grammar nazi infiltrated Taleworlds and "fixed" operation name without considering the consequences. :smile:

Or maybe this "fix" somehow filtered from VC module system.
 
Lav said:
Just edit header_operations.py and replace "party_set_marshal" operation name with "party_set_marshall".

Apparently some grammar nazi infiltrated Taleworlds and "fixed" operation name without considering the consequences. :smile:

Or maybe this "fix" somehow filtered from VC module system.

Well that was easy. Thanks.
 
"party_set_marshall" is the operation that's been used in all Warband versions, DLCs (except maybe VC) and mods out there.

"party_set_marshal" is in 1.165 header_operations file, but all module_* files still use "party_set_marshall" everywhere.

UPDATE.

I have released the 1.0.0 version of expanded header_operations.py file. It also includes the compiler fix to correctly handle newly added try_for_ operations.
 
I'm having a few difficulties to porting Phantasy Calradia to 1.165

By the way, Lav, you seem to have missed the

agent_set_ranged_damage_modifier      = 2099  # (agent_set_ranged_damage_modifier, <agent_id>, <value>), # value is in percentage, 100 is default

operation in your file.

I don't know if it's the only operation that is missing from 1.158, but you might want to check them again.

EDIT: just added that one operation and, at least, the mod compiled... I'll see if it works normally.
 
guspav said:
I'm having a few difficulties to porting Phantasy Calradia to 1.165

By the way, Lav, you seem to have missed the

agent_set_ranged_damage_modifier      = 2099  # (agent_set_ranged_damage_modifier, <agent_id>, <value>), # value is in percentage, 100 is default

operation in your file.

I don't know if it's the only operation that is missing from 1.158, but you might want to check them again.

EDIT: just added that one operation and, at least, the mod compiled... I'll see if it works normally.
Whoops... And apparently I missed it long ago. Thanks!

Uploaded the fixed version.

UPDATE: ran the automated test to see if I have missed any other operations. Everything seems fine.

Code:
Warband Module System v. 1.113:
	NEW: game_get_reduce_campaign_ai
	NEW: scene_allows_mounted_units

Warband Module System v. 1.123:
	NEW: prop_instance_dynamics_set_properties
	NEW: agent_set_ammo
	NEW: show_object_details_overlay
	NEW: prop_instance_dynamics_apply_impulse
	NEW: mission_cam_set_animation
	NEW: prop_instance_dynamics_set_omega
	NEW: multiplayer_find_spawn_point
	NEW: set_spawn_effector_scene_prop_kind
	NEW: prop_instance_dynamics_set_velocity
	NEW: set_spawn_effector_scene_prop_id

Warband Module System v. 1.124:

Warband Module System v. 1.125:
	NEW: send_message_to_url
	NEW: player_get_unique_id

Warband Module System v. 1.126:
	NEW: display_debug_message

Warband Module System v. 1.127:
	NEW: agent_is_alarmed
	NEW: agent_clear_relations_with_agents
	NEW: position_has_line_of_sight_to_position
	NEW: agent_add_relation_with_agent
	NEW: get_angle_between_positions
	NEW: mission_set_duel_mode
	NEW: agent_check_offer_from_agent
	NEW: prop_instance_intersects_with_prop_instance
	NEW: agent_add_offer_with_timeout
	NEW: agent_set_is_alarmed

Warband Module System v. 1.130:
	NEW: unlock_achievement
	NEW: get_achievement_stat
	NEW: set_river_shader_to_mud
	NEW: set_achievement_stat
	NEW: overlay_obtain_focus
	NEW: agent_equip_item

Warband Module System v. 1.131:

Warband Module System v. 1.132:

Warband Module System v. 1.134:
	NEW: prop_instance_receive_damage
	NEW: str_encode_url
	NEW: troop_set_class
	NEW: agent_set_attached_scene_prop_y
	NEW: agent_stop_sound
	NEW: player_get_gender
	NEW: store_asin
	NEW: position_set_scale_x
	NEW: position_set_scale_y
	NEW: agent_set_division
	NEW: agent_get_item_slot
	NEW: play_sound_at_position
	NEW: player_set_is_admin
	NEW: class_set_name
	NEW: store_acos
	NEW: store_atan
	NEW: prop_instance_set_scale
	NEW: position_set_scale_z
	NEW: position_get_rotation_around_x
	NEW: position_get_rotation_around_y
	NEW: store_atan2
	NEW: prop_instance_is_valid
	NEW: agent_get_speed
	NEW: replace_prop_instance
	NEW: agent_refill_wielded_shield_hit_points

Warband Module System v. 1.142:
	NEW: options_get_combat_ai
	NEW: scene_prop_set_prune_time
	NEW: options_get_damage_to_player
	NEW: options_set_damage_to_friends
	NEW: val_rshift
	NEW: options_get_combat_speed
	NEW: options_set_combat_speed
	NEW: options_set_campaign_ai
	NEW: party_set_extra_icon
	NEW: options_set_damage_to_player
	NEW: show_item_details_with_modifier
	NEW: agent_get_ammo_for_slot
	NEW: options_get_campaign_ai
	NEW: options_set_combat_ai
	NEW: val_lshift
	NEW: overlay_set_container_overlay
	NEW: options_get_damage_to_friends

Warband Module System v. 1.143:

Warband Module System v. 1.151:
	NEW: set_cheer_at_no_enemy
	NEW: overlay_set_additional_render_height
	NEW: agent_set_accuracy_modifier
	NEW: is_edit_mode_enabled
	NEW: spawn_item_without_refill
	NEW: team_get_gap_distance
	NEW: store_zoom_amount
	NEW: store_trigger_param
	NEW: set_shader_param_float4
	NEW: set_skybox
	NEW: agent_deliver_damage_to_agent_advanced
	NEW: agent_set_visibility
	NEW: rebuild_shadow_map
	NEW: agent_ai_get_look_target
	NEW: set_zoom_amount
	NEW: scene_prop_fade_in
	NEW: agent_set_speed_modifier
	NEW: prop_instance_add_particle_system
	NEW: set_startup_sun_light
	NEW: agent_set_max_hit_points
	NEW: set_shader_param_float
	NEW: prop_instance_stop_all_particle_systems
	NEW: scene_prop_set_cur_hit_points
	NEW: agent_set_reload_speed_modifier
	NEW: add_missile
	NEW: set_startup_ground_ambient_light
	NEW: show_troop_details
	NEW: agent_is_in_line_of_sight
	NEW: stop_sound_channel
	NEW: party_end_battle
	NEW: agent_set_use_speed_modifier
	NEW: agent_get_item_cur_ammo
	NEW: store_last_sound_channel
	NEW: prop_instance_play_sound
	NEW: prop_instance_stop_sound
	NEW: set_shader_param_int
	NEW: set_startup_ambient_light
	NEW: agent_set_damage_modifier
	NEW: prop_instance_clear_attached_missiles
	NEW: set_shader_param_float4x4
	NEW: particle_system_burst_no_sync
	NEW: scene_prop_fade_out
	NEW: agent_ai_get_move_target
	NEW: agent_ai_get_behavior_target

Warband Module System v. 1.152:

Warband Module System v. 1.153:
	NEW: agent_get_crouch_mode
	NEW: agent_set_crouch_mode
	NEW: agent_ai_set_can_crouch
	NEW: is_zoom_disabled

Warband Module System v. 1.157:
	NEW: agent_set_ranged_damage_modifier

Warband Module System v. 1.158:

Warband Module System v. 1.165:
	NEW: item_get_horse_maneuver
	NEW: item_has_capability
	NEW: str_store_troop_face_keys
	NEW: get_startup_sun_light
	NEW: item_get_hit_points
	NEW: prop_instance_set_material
	NEW: troop_set_face_keys
	NEW: item_get_food_quality
	NEW: item_get_value
	NEW: item_has_modifier
	NEW: get_operation_set_version
	NEW: item_get_difficulty
	NEW: item_get_leg_armor
	NEW: close_order_menu
	NEW: item_get_speed_rating
	NEW: face_keys_get_hair_color
	NEW: str_store_player_face_keys
	NEW: face_keys_set_face_texture
	NEW: item_get_body_armor
	NEW: options_get_battle_size
	NEW: agent_get_bone_position
	NEW: face_keys_get_age
	NEW: item_get_accuracy
	NEW: item_get_thrust_damage_type
	NEW: prop_instance_get_current_deform_frame
	NEW: party_set_ignore_with_player_party
	NEW: auto_save
	NEW: face_keys_get_beard
	NEW: face_keys_set_age
	NEW: try_for_players
	NEW: item_get_horse_speed
	NEW: face_keys_get_face_texture
	NEW: face_keys_set_morph_key
	NEW: face_keys_set_hair_color
	NEW: prop_instance_deform_in_cycle_loop
	NEW: prop_instance_get_current_deform_progress
	NEW: position_rotate_z_floating
	NEW: item_get_missile_speed
	NEW: item_get_horse_charge_damage
	NEW: item_get_max_ammo
	NEW: face_keys_get_skin_color
	NEW: game_key_get_mapped_key_name
	NEW: item_get_head_armor
	NEW: face_keys_set_hair
	NEW: face_keys_get_morph_key
	NEW: options_set_battle_size
	NEW: item_get_swing_damage
	NEW: face_keys_set_hair_texture
	NEW: get_startup_ground_ambient_light
	NEW: mouse_get_world_projection
	NEW: face_keys_set_skin_color
	NEW: face_keys_get_hair_texture
	NEW: item_has_faction
	NEW: item_get_shield_height
	NEW: agent_ai_get_cached_enemy
	NEW: get_startup_ambient_light
	NEW: item_has_property
	NEW: item_get_horse_scale
	NEW: agent_ai_get_num_cached_enemies
	NEW: item_get_thrust_damage
	NEW: try_for_prop_instances
	NEW: face_keys_get_hair
	NEW: item_get_swing_damage_type
	NEW: item_get_abundance
	NEW: item_get_weapon_length
	NEW: party_set_marshal
	NEW: player_set_face_keys
	NEW: prop_instance_deform_to_time
	NEW: prop_instance_deform_in_range
	NEW: cast_ray
	NEW: agent_ai_set_interact_with_player
	NEW: face_keys_set_beard
	NEW: cur_item_set_material
	NEW: item_get_weight
	NEW: overlay_set_material
	NEW: party_get_ignore_with_player_party
	NEW: cur_item_add_mesh
	REMOVE: party_set_marshall

Warband Module System v. 1.165 (Lav):
	NEW: party_set_marshall
 
Mandible said:
So now that we have the module system, what kind of fun things are available to us that weren't there in 1.158?
In addition to new operations, only this:

Code:
itp_covers_hair              = 0x0000008000000000    [color=grey]#remove hair mesh for armors only[/color]
itp_force_show_body          = 0x0000010000000000 [color=grey]# forces showing body (works on body armor items)[/color]
itp_force_show_left_hand     = 0x0000020000000000 [color=grey]# forces showing left hand (works on hand armor items)[/color]
itp_force_show_right_hand    = 0x0000040000000000 [color=grey]# forces showing right hand (works on hand armor items)[/color]

Code:
ti_on_switch_to_map                   = -75.0
ti_scene_prop_deformation_finished    = -76.0 [color=grey]#can only be used in module_scene_props triggers
# Trigger Param 1: prop instance number[/color]
ti_on_shield_hit                      = -80.0 [color=grey]# can only be used in module_items triggers
# Trigger Param 1: receiver agent no
# Trigger Param 2: dealer agent no
# Trigger Param 3: inflicted damage
# Trigger Param 4: item kind no
# Trigger Param 5: missile item kind no
# Trigger Result: if set, damage dealt to shield[/color]

All other changes are tweaks and fixes, nothing new or groundbreaking. Equipment price in multiplayer is now calculated by a script instead of operation (apparently there were some issues with it) - this might be interesting for multiplayer mod devs.
 
Lumos said:
Scene prop deformation? What's that all about?
Scene props with vertex animation or different "visual states".

Code:
prop_instance_deform_to_time                = 2610
  # (prop_instance_deform_to_time, <prop_instance_no>, <value>),
  # Version 1.161+. Deforms a vertex-animated scene prop to specified vertex time.

prop_instance_deform_in_range               = 2611
  # (prop_instance_deform_in_range, <prop_instance_no>, <start_frame>, <end_frame>, <duration-in-1/1000-seconds>),
  # Version 1.161+. Animate vertex-animated scene prop from start frame to end frame within the specified time period (in milliseconds).

prop_instance_deform_in_cycle_loop          = 2612
  # (prop_instance_deform_in_cycle_loop, <prop_instance_no>, <start_frame>, <end_frame>, <duration-in-1/1000-seconds>),
  # Version 1.161+. Performs looping animation of vertex-animated scene prop within the specified vertex frame ranges and within specified time (in milliseconds).

prop_instance_get_current_deform_progress   = 2615
  # (prop_instance_get_current_deform_progress, <destination>, <prop_instance_no>),
  # Version 1.161+. Returns a percentage value between 0 and 100 if animation is still in progress. Returns 100 otherwise.

prop_instance_get_current_deform_frame      = 2616
  # (prop_instance_get_current_deform_frame, <destination>, <prop_instance_no>),
  # Version 1.161+. Returns current frame of a vertex-animated scene prop, rounded to nearest integer value.
 
So,just a noob passing by...
I would like to use the new modsys for my already existing mod,to port it,do I have to replace all files and,if I modified the old ones,copy the stuff in there?Or are there just some new files compared to the old ones from 1.158?Only new stuff I heard of so far is from header_operations...
 
Back
Top Bottom