Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
try this one (mine)
Code:
@echo off
path C:\Python27;%PATH%
python process_init.py
python process_global_variables.py
python process_strings.py
python process_skills.py
python process_music.py
python process_animations.py
python process_meshes.py
python process_sounds.py
python process_skins.py
python process_map_icons.py
python process_factions.py
python process_items.py
python process_scenes.py
python process_troops.py
python process_particle_sys.py
python process_scene_props.py
python process_tableau_materials.py
python process_presentations.py
python process_party_tmps.py
python process_parties.py
python process_quests.py
python process_info_pages.py
python process_scripts.py
python process_mission_tmps.py
python process_game_menus.py
python process_simple_triggers.py
python process_dialogs.py
python process_global_variables_unused.py
python process_postfx.py
@del *.pyc
echo.
echo ______________________________
echo.
echo Script processing has ended.
echo Press any key to exit. . .
pause>nul

maybe  :neutral:
 
fladin said:
try this one (mine)
Code:
@echo off
path C:\Python27;%PATH%
python process_init.py
python process_global_variables.py
python process_strings.py
python process_skills.py
python process_music.py
python process_animations.py
python process_meshes.py
python process_sounds.py
python process_skins.py
python process_map_icons.py
python process_factions.py
python process_items.py
python process_scenes.py
python process_troops.py
python process_particle_sys.py
python process_scene_props.py
python process_tableau_materials.py
python process_presentations.py
python process_party_tmps.py
python process_parties.py
python process_quests.py
python process_info_pages.py
python process_scripts.py
python process_mission_tmps.py
python process_game_menus.py
python process_simple_triggers.py
python process_dialogs.py
python process_global_variables_unused.py
python process_postfx.py
@del *.pyc
echo.
echo ______________________________
echo.
echo Script processing has ended.
echo Press any key to exit. . .
pause>nul

maybe  :neutral:

I keep getting the exact same error log... but nonetheless thank you for the help.

Also, just for reference I'm on Windows 10 and this is what my environment variables setup looks like. If there is anything wrong down there please let me know.

http://imgur.com/7yKVvnX
 
I tried merging some frames to make the vertex animation for a scabbard. I did the usual truck of shrinking the scabbard down and hiding it inside the scabbard, and the faces for the mouth of the scabbard were already present and textured, so all the vertexes and faces are present and accounted for.

But this is the result:
Y5yuSyN.jpg

Is this something you folks have seen before? Do you know where I went wrong?
 
I'm trying to get this trigger to work at module_triggers, but it fails at compile time:

Here is the code:

Code:
#####Patch Emoticons OSP
        (3,
        [
        (eq, "$g_disable_emoticons", 1),
        (eq, "$g_emoticons_hidden", 0),
	 (call_script, "script_hide_emoticons"),
	 (assign, "$g_emoticons_hidden", 1),
        ]),
#####End Patch OSP

What am I doing wrong?
 
troycall said:
I'm trying to get this trigger to work at module_triggers, but it fails at compile time

SenpaiHinds said:
That's a simple_trigger and should go on that file rather than the triggers file.

A simple trigger, as the name suggests, is very "simple". No condition block. No re-arm timer. Just a "do this every xxx ingame hours".

A trigger, in the other hand, has special timers, you can control when it should fire (condition block), etc. This is the type used also on mission templates, items, props, ...

Remember to read the comments on each module_XXXX.py file, right at the first lines. They explain how to use each "entity"... how to build a dialog, a trigger, a script, etc

And check your header_triggers.py for a list of special codes to use for triggers.
 
Bluehawk said:
I tried merging some frames to make the vertex animation for a scabbard. I did the usual truck of shrinking the scabbard down and hiding it inside the scabbard, and the faces for the mouth of the scabbard were already present and textured, so all the vertexes and faces are present and accounted for.

But this is the result:
Y5yuSyN.jpg

Is this something you folks have seen before? Do you know where I went wrong?

I fixed my own problem. I was importing the frames individually as static meshes into OpenBRF when I should've been importing the modified scabbard as a "frame of a vertex animation" while the scabbard+hilt mesh was selected.
 
kalarhan said:
Nameless Warrior said:
Thanks, ok so I am doing that right but there still seems to be some times when the script fails.

Looks like you are thinking about your problem on a linear way. Game is a complex system with many moving parts, so you need to consider them all together.

Your test looks good (on a quick look), so the most likely issue (that you pointed out) is that the slot is not working. Why? Because you may have a bug/issue on your code that is not clearing the slot when the lord is defeated.

There is a cheat code test for mismatch lords:

Code:
 (2, #Error check for multiple parties on the map
	[
	(eq, "$cheat_mode", 1),
	(assign, ":debug_menu_noted", 0),
	(try_for_parties, ":party_no"),
		(gt, ":party_no", "p_spawn_points_end"),
		(party_stack_get_troop_id, ":commander", ":party_no", 0),
		(is_between, ":commander", active_npcs_begin, active_npcs_end),
		(troop_get_slot, ":commander_party", ":commander", slot_troop_leaded_party),
		(neq, ":party_no", ":commander_party"),
		(assign, reg4, ":party_no"),
		(assign, reg5, ":commander_party"),
		
		(str_store_troop_name, s3, ":commander"),
		(display_message, "@{!}{s3} commander of party #{reg4} which is not his troop_leaded party {reg5}"), 
		(str_store_string, s65, "str_party_with_commander_mismatch__check_log_for_details_"),

		(try_begin),
			(eq, ":debug_menu_noted", 0),
			(call_script, "script_add_notification_menu", "mnu_debug_alert_from_s65", 0, 0),
			(assign, ":debug_menu_noted", 1),
		(try_end),
	(try_end),
	]),

Enable cheat mode and let it run for a couple hours (ingame, so just hold space bar for a few seconds on world map).



You could, as a example, add a new test to workaround the issue (not the most elegant solution, but may help on quick fix...). Check if the ":party_id" first troop (leader) is the lord
Code:
(troop_get_slot, ":party_id", "trp_knight_1_9", slot_troop_leaded_party),
(gt, ":party_id", 0),
(party_is_active, ":party_id"),
(party_stack_get_troop_id, ":commander", ":party_id", 0),
(eq, "trp_knight_1_9", ":commander"),

Thanks, will use the test code at the weekend. That script error has plagued me for too long.
 
wildtexan said:
hey guys i was wondering if it is possible to change the name of the merchants for example making armor merchant tailor.

SenpaiHinds said:
Yes, just change the troop's name in module_troops.py.

Code:
  ["town_1_armorer","Armorer",  "{!}Armorer",  tf_hero|tf_randomize_face|          tf_is_merchant, 0, 0, fac_commoners,[itm_linen_tunic,           itm_leather_boots   ],def_attrib|level(2),wp(20),knows_inventory_management_10, mercenary_face_1, mercenary_face_2],

you can see how to define a troop on the begin of the file. For the above example you hve "Armorer" as the singular name, and "{!}Armorer" for the plural (displayed on your party if you have several units in a stack, which clearly is not the case for a merchant/unique character).

This change is not savegame compatible. If you ever need to change a name and still use old saves use this operation:
Code:
troop_set_name                           = 1501  # (troop_set_name, <troop_id>, <string_no>),
                                                 # Renames the troop, setting a new singular name for it.
 
Can I reduce the size of an already created scene or I'd have to recreate it from scratch?

Is it as simple as changing the min-pos max-pos in module_scenes.py? (I don't think so cause I tested and it looks exactly the same)...

Thanks!
 
Khamukkamu said:
Can I reduce the size of an already created scene or I'd have to recreate it from scratch?

Best place to talk about scenes is this thread: https://forums.taleworlds.com/index.php/topic,163368.0.html
Check the OP (first post) for a list of tutorials, videos and a Q&A.

module_scenes size defines the "box area" for the player, it doesn't change the actual scene object (terrain + props). IIRC there is a website with a tool to do some magic with the terrain (add/remove rivers, resize, etc), but I don't mess with this stuff enough to know the details.
 
Hi guys, one question, please. Does anyone know of any OSP packs or 3d models with Royalty free license(usable into non-profitable projects) with trees and bushes, especially from the Mediterranean area? All the models I found were so high poly that Open Brf struggled and lagged. Thank you!  :smile:
 
Thanks kalarhan. Asked there and got an answer.

Different question:

Could I limit the amount of text reports that show up on the screen (esp during battles?) For example, instead of having a total amount of 15 appear on the screen consecutively, could I just show, like, 10?
 
Khamukkamu said:
Thanks kalarhan. Asked there and got an answer.

Different question:

Could I limit the amount of text reports that show up on the screen (esp during battles?) For example, instead of having a total amount of 15 appear on the screen consecutively, could I just show, like, 10?

You can just use module.ini new operations:
maximum_number_of_notification_messages = 4 #msg in battle. Common 10 #Maximum number of notifications, reduced to 4 to reduce map lag
 
I made a mission trigger
Code:
ark_sabre_swing_sounds_npcs = (
  0.5, 0, 0,
  [
     #none
	],
  [
         (try_for_agents, ":agent"),     
		  (agent_is_alive, ":agent"),     
		  (agent_is_human, ":agent"),     
		  (agent_get_wielded_item, ":handone", ":agent", 0),          
		  (eq, ":handone", "itm_ark_sabre_small"),     	  		  		 
		  (agent_get_combat_state, ":state", ":agent"),     
			(try_begin),       
			  (eq,":state",4), #This is the combat state for melee swing       
			  (agent_slot_eq,":agent",slot_agent_attack_sound, 0),       
			  (agent_set_slot, ":agent", slot_agent_attack_sound, 1),          
			  (agent_play_sound,":agent","snd_energy_swing"),
              (agent_get_position, pos1, ":agent"),		  
			  (particle_system_burst, "psys_shield_shimmer_1", pos1, 100),
			  (particle_system_burst, "psys_shield_shimmer_2", pos1, 100),
			(else_try),       
			  (neq,":state",4),       
			  (agent_set_slot, ":agent", slot_agent_attack_sound, 0),     
			(try_end),   
		 (try_end),   
	 
    ])

bandicam_2016_05_28_15_31_58_111.jpg


it's right below the common_battle_check_friendly_kills, in lead_charge mt with a comma beside it. no errors in MS but in games it doesnt work, oddly enough it works on a mission template of another MS, what the hell is up with this retarded module system.

bandicam_2016_05_28_15_36_36_377.jpg
 
troycall said:
Khamukkamu said:
Thanks kalarhan. Asked there and got an answer.

Different question:

Could I limit the amount of text reports that show up on the screen (esp during battles?) For example, instead of having a total amount of 15 appear on the screen consecutively, could I just show, like, 10?

You can just use module.ini new operations:
maximum_number_of_notification_messages = 4 #msg in battle. Common 10 #Maximum number of notifications, reduced to 4 to reduce map lag

Thanks troycall! I'll check out VC Module.ini for more that may be handy.
 
Khamukkamu said:
Thanks troycall! I'll check out VC Module.ini for more that may be handy.

that is the one I use on my mods:

Code:
module_name                 = VC_IRELAND_WARS
compatible_with_warband     = 1
operation_set_version       = 1168

# ---------------------------------------------------------------------------
### DEVELOPMENT FLAGS
    #You can change the following to 1 for ease in module development
    show_party_ids_instead_of_names         = 0
    disable_force_leaving_conversations     = 0 #no TAB end in conversations.

    #edit mode should be enabled
    give_performance_warnings               = 0 #turn off for production

    module_version                          = 1000 #can be used for multiplayer and single player (saved game) module versioning
    compatible_module_version               = 1000 #can be used for multiplayer module versioning
    compatible_savegame_module_version      = 1000 #can be used for single player (saved game) module versioning

# ---------------------------------------------------------------------------
### PRODUCTION FLAGS
    supports_directx_7                  = 0
    reduce_texture_loader_memory_usage  = 1
    use_case_insensitive_mesh_searches  = 1
    use_texture_degration_cache         = 0
    use_scene_unloading                 = 1

 ## HINTS/TUTORIAL
    num_hints       = 5
    has_tutorial    = 0

    auto_create_note_indices = 0 #Do not automatically search through all troops/factions/towns to check if they have note text.

 ## IRELAND MAP
    map_min_x   = -175      #-257.903931
    map_max_x   = -50       #281.758255
    map_min_y   = -65       #-281.854553
    map_max_y   = 135       #290.571899

 ## SEA/WATER EFFECTS
    map_sea_direction       = -40 #wave foam direction
    map_sea_wave_rotation   = 300 #This is where the tear artefact is visible on the sea.
    map_sea_speed_x         = 0.02
    map_sea_speed_y         = -0.02
    map_river_direction     = 140
    map_river_speed_x       = 0.01
    map_river_speed_y       = -0.01

 ## WOLRDMAP ZOOM
    map_min_elevation       = 0.2  #maximum zoom
    # map_max_elevation     = 1.0  #minimum zoom

 ## TREES: use meshes map_tree_a through map_tree_r on for map trees
    map_tree_types          = 17
    map_snow_tree_types     = 17
    map_steppe_tree_types   = 0
    map_desert_tree_types   = 0
    map_max_distance        = 175.0

 ## MAP TRAVELING
    time_multiplier                     = 1.0   # add points to travel-time speed.
                                                # 2.5 means: CTRL+SPACE -> 1 ingame day = 1 sec IRL; SPACE: 1 ingame day = 10 secs IRL
                                                # Default: 0.25
    seeing_range                        = 6.5
    track_spotting_multiplier           = 0.8
    auto_compute_party_radius           = 1 #helps space, select if mod has large icons
    disable_disband_on_terrain_type     = 0
    use_strict_pathfinding_for_ships    = 1 #keeps ships at sea for sea-to-sea routes

 ## GUNPOWER WEAPONS
    shorter_pistol_aiming           = 1 #add pistols to the exception just like in crossbow and muskets
    apply_all_ammo_damage_modifiers = 1

 ## BATTLE MESSAGES
    maximum_number_of_notification_messages = 4 #msg in battle. Common 10

 ## AI
    ai_decide_direction_according_to_damage     = 1
    consider_weapon_length_for_weapon_quality   = 1 # weapon selection
    damage_interrupt_attack_threshold           = 3.0 # damage below this will not interrupt melee attacks

 ## LEVELING SYSTEM
    skill_points_per_level              = 2
    attribute_points_per_level          = 0.195
    weapon_points_per_level             = 5
    level_boundary_multiplier           = 2.0
    attribute_required_per_skill_level  = 2

 ## HEROES HEALTH FOR BATTLE
    player_wounded_treshold         = 5
    hero_wounded_treshold           = 15

 ## SKILLS EFFECTS
    skill_prisoner_management_bonus = 5
    skill_leadership_bonus          = 3
    base_companion_limit            = 20

 ## XP FOR TROOPS
    player_xp_multiplier   = 1.0 
    hero_xp_multiplier     = 2.0
    regulars_xp_multiplier = 2.0

 ## SCENES
    far_plane_distance                      = 2000 #Default is 1250 cm
    battle_size_min                         = 150
    battle_size_max                         = 750
    display_wp_firearms                     = 1
    blood_multiplier                        = 6.0
    air_friction_arrow                      = 0.006
    air_friction_bullet                     = 0.002
    mission_object_prune_time               = 180
    disable_moveable_flag_optimization      = 1     #assign '1' for moveable physics on all scene props; no sokf_moveable flag will be needed
    can_crouch                              = 1
    crush_through_treshold                  = 2.4
    can_objects_make_sound                  = 1
    disable_zoom                            = 0
    can_run_faster_with_skills              = 1 # should agility/skill affect running speed
    can_adjust_camera_distance              = 1
    sync_ragdoll_effects                    = 0
    has_forced_particles                    = 0
    can_use_scene_props_in_single_player    = 0
    disable_high_hdr                        = 1

 ## HORSES
    meek_modifier_speed_bonus       = 2
    timid_modifier_speed_bonus      = 1
    horse_charge_damage_multiplier  = 1.0
    horses_try_running_away         = 1

 ## DAMAGE AND ARMOR PROTECTION IN COMBAT
    extra_penetration_factor_soak       = 1.0
    extra_penetration_factor_reduction  = 1.0

    # You can modify the damage system by editing the following values:
    # The first three values determine the amount which will be directly subtracted from damage due to armor.
    # The next three values determine the percentage reduction from the damage.
    armor_soak_factor_against_cut       = 0.8
    armor_soak_factor_against_pierce    = 0.65
    armor_soak_factor_against_blunt     = 0.65

    armor_reduction_factor_against_cut      = 0.95
    armor_reduction_factor_against_pierce   = 0.65
    armor_reduction_factor_against_blunt    = 0.75

    couched_lance_damage_multiplier = 0.65
    fall_damage_multiplier          = 1.0
    melee_damage_speed_power        = 1.4
     
    # missiles with damage > shield_penetration_offset + shield_penetration_factor * shield
    # will penetrate.
    shield_penetration_offset = 30.0
    shield_penetration_factor = 3.0

    # setting speed_power to 2.0 makes damage scale with the square of missile's speed.
    # you can set it to 1.0 to make it scale linearly as it was before.
    missile_damage_speed_power = 6

 ## LOADING RESOURCES (GRAPHICS/SOUNDS/ETC)
    # Change this to 1 if you want to load 
    # textures from Modules/<Module_Dir>/Textures/
    scan_module_textures    = 1
    scan_module_sounds      = 1

 ## INTERFACE
    disable_food_slot                       = 1 #change this to 0 if you want to keep the food slot in inventory window.
    limit_hair_colors                       = 1
    show_faction_color                      = 1
    show_quest_notes                        = 1
    show_troop_upgrades_button              = 1 # party screen
    dont_load_regular_troop_inventories     = 1


 ## MISC OPTIONS
    #use_explicit_couch_flag    = 1
    use_phased_reload           = 0
    has_accessories_for_female  = 0
    has_single_player           = 1
    has_multiplayer             = 0

 ## ADVANCED COMBAT OPTIONS
    use_advanced_formation          = 0 # options from WF&S
    use_crossbow_as_firearm         = 0 # if mod is using old workaround for faking firearms
    can_reload_while_moving         = 0 
    lance_pike_effect_speed         = 3.0
    no_friendly_fire_for_bots       = 0
    disable_attack_while_jumping    = 0




#-------------------------------------------------------------------------------------------
############################################################################################
# RESOURCES (BRF, TEXTURES)
#   INFO: You can also use load_mod_resource instead of load_resource
#   to make sure you are reading files from module directory.
############################################################################################

--> I remove the extra spaces for compilation (part of the build process), as I find it easier to read this way.



CutContent said:
what the hell is up with this retarded module system.

I learned many years ago, while on engineer class that required coding (Fortran, the joy!):
"The computer is stupid, it only does what you tell it to do. Remember that before you try to blame the machine for your mistakes"

Add debug messages (display_message) to make sense of what is not working/firing. And remember that lead_charge is used on some battles, not all of them.
 
Status
Not open for further replies.
Back
Top Bottom