Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Cozur said:
Is there a way to prevent the sun from going through the flora? Is there a different shader that's usable?

https://imgur.com/a/qO6yf
It's related to a material flag.
Uncheck "Don't block light" on the "Material flags" window (OpenBRF) in order to get rid of it.
 
Do the skills of troops in a non-lord party have an effect?

For example, we have a scout party composed of X,Y,Z. The troops in that party have a pathfinding skill of A,B,C. Will it contribute to the speed of that party or will only the skills of the leader of that party have an effect?



Another unrelated question: When a number of parties are in battle (bunch of lords attacking each other), how can I get lord # 3, 4, 5? I only see $g_encountered_party_2. Does the game store those other parties?
 
Code:
Initializing...
variables.txt not found. Creating new variables.txt file
Compiling all global variables...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Traceback (most recent call last):
  File "process_global_variables.py", line 106, in <module>
    save_variables(export_dir, variables,variable_uses)
  File "C:\Users\User\Desktop\Module_system 1.17111\process_operations.py", line
 171, in save_variables
    file = open(export_dir + "variables.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/variables.txt'
Exporting strings...
Traceback (most recent call last):
  File "process_strings.py", line 26, in <module>
    save_strings(strings)
  File "process_strings.py", line 9, in save_strings
    ofile = open(export_dir + "strings.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/strings.txt'
Exporting skills...
Traceback (most recent call last):
  File "process_skills.py", line 32, in <module>
    save_skills()
  File "process_skills.py", line 15, in save_skills
    ofile = open(export_dir + "skills.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/skills.txt'
Exporting tracks...
Traceback (most recent call last):
  File "process_music.py", line 23, in <module>
    save_tracks()
  File "process_music.py", line 15, in save_tracks
    file = open(export_dir + "music.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/music.txt'
Exporting animations...
Traceback (most recent call last):
  File "process_animations.py", line 61, in <module>
    write_actions(animations,len(action_codes),action_codes,"actions.txt")
  File "process_animations.py", line 24, in write_actions
    file = open(export_dir + file_name,"w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/actions.txt'
Exporting meshes...
Traceback (most recent call last):
  File "process_meshes.py", line 25, in <module>
    save_meshes()
  File "process_meshes.py", line 9, in save_meshes
    ofile = open(export_dir + "meshes.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/meshes.txt'
Exporting sounds...
Traceback (most recent call last):
  File "process_sounds.py", line 51, in <module>
    write_sounds(sound_samples, sounds)
  File "process_sounds.py", line 13, in write_sounds
    ofile = open(export_dir + "sounds.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/sounds.txt'
Exporting skins...
Traceback (most recent call last):
  File "process_skins.py", line 105, in <module>
    export_skins(skins)
  File "process_skins.py", line 45, in export_skins
    ofile = open(export_dir + "skins.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/skins.txt'
Exporting map icons...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_map_icons.py", line 38, in <module>
    save_map_icons(variables,variable_uses,tag_uses,quick_strings)
  File "process_map_icons.py", line 9, in save_map_icons
    ofile = open(export_dir + "map_icons.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/map_icons.txt'
Exporting faction data...
Traceback (most recent call last):
  File "process_factions.py", line 70, in <module>
    save_factions(relations)
  File "process_factions.py", line 34, in save_factions
    file = open(export_dir + "factions.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/factions.txt'
Exporting item data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_items.py", line 72, in <module>
    write_items(variables,variable_uses,tag_uses,quick_strings)
  File "process_items.py", line 19, in write_items
    ofile = open(itemkinds_file_name,"w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/item_kinds1.txt'
Exporting scene data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_scenes.py", line 77, in <module>
    save_scenes(variables,variable_uses,tag_uses)
  File "process_scenes.py", line 46, in save_scenes
    ofile = open(export_dir + "scenes.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/scenes.txt'
Exporting troops data
Traceback (most recent call last):
  File "process_troops.py", line 107, in <module>
    save_troops()
  File "process_troops.py", line 13, in save_troops
    file = open(export_dir + "troops.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/troops.txt'
Exporting particle data...
Traceback (most recent call last):
  File "process_particle_sys.py", line 61, in <module>
    save_particle_systems()
  File "process_particle_sys.py", line 29, in save_particle_systems
    ofile = open(export_dir + "particle_systems.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/particle_systems.txt'
Exporting scene props...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_scene_props.py", line 32, in <module>
    save_scene_props(variables,variable_uses,tag_uses,quick_strings)
  File "process_scene_props.py", line 10, in save_scene_props
    ofile = open(export_dir + "scene_props.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/scene_props.txt'
Exporting tableau materials data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_tableau_materials.py", line 31, in <module>
    save_tableau_materials(variables,variable_uses,tag_uses,quick_strings)
  File "process_tableau_materials.py", line 11, in save_tableau_materials
    ofile = open(export_dir + "tableau_materials.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/tableau_materials.txt'
Exporting presentations...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_presentations.py", line 33, in <module>
    save_presentations(variables,variable_uses,tag_uses,quick_strings)
  File "process_presentations.py", line 11, in save_presentations
    ofile = open(export_dir + "presentations.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/presentations.txt'
Exporting party_template data...
Traceback (most recent call last):
  File "process_party_tmps.py", line 46, in <module>
    save_party_templates()
  File "process_party_tmps.py", line 20, in save_party_templates
    file = open(export_dir + "party_templates.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/party_templates.txt'
Exporting parties
Creating new tag_uses.txt file...
Traceback (most recent call last):
  File "process_parties.py", line 69, in <module>
    save_parties(parties)
  File "process_parties.py", line 12, in save_parties
    file = open(export_dir + "parties.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/parties.txt'
Exporting quest data...
Traceback (most recent call last):
  File "process_quests.py", line 30, in <module>
    save_quests()
  File "process_quests.py", line 9, in save_quests
    ofile = open(export_dir + "quests.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/quests.txt'
Exporting info_page data...
Traceback (most recent call last):
  File "process_info_pages.py", line 26, in <module>
    save_info_pages()
  File "process_info_pages.py", line 9, in save_info_pages
    ofile = open(export_dir + "info_pages.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/info_pages.txt'
Exporting scripts...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_scripts.py", line 40, in <module>
    save_scripts(variables,variable_uses,scripts,tag_uses,quick_strings)
  File "process_scripts.py", line 10, in save_scripts
    file = open(export_dir + "scripts.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/scripts.txt'
Exporting mission_template data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_mission_tmps.py", line 64, in <module>
    save_mission_templates(variables,variable_uses,tag_uses,quick_strings)
  File "process_mission_tmps.py", line 38, in save_mission_templates
    file = open(export_dir + "mission_templates.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/mission_templates.txt'
Exporting game menus data...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_game_menus.py", line 47, in <module>
    save_game_menus(variables,variable_uses,tag_uses,quick_strings)
  File "process_game_menus.py", line 22, in save_game_menus
    ofile = open(export_dir + "menus.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/menus.txt'
exporting simple triggers...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_simple_triggers.py", line 24, in <module>
    save_simple_triggers(variables,variable_uses,simple_triggers,tag_uses,quick_
strings)
  File "process_simple_triggers.py", line 8, in save_simple_triggers
    file = open(export_dir + "simple_triggers.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/simple_triggers.txt'
exporting triggers...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Traceback (most recent call last):
  File "process_dialogs.py", line 199, in <module>
    save_triggers(variables,variable_uses,triggers,tag_uses,quick_strings)
  File "process_dialogs.py", line 47, in save_triggers
    file = open(export_dir + "triggers.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/triggers.txt'
Checking global variable usages...
variables.txt not found. Creating new variables.txt file
variable_uses.txt not found. Creating new variable_uses.txt file
Exporting postfx_params...
Traceback (most recent call last):
  File "process_postfx.py", line 27, in <module>
    write_postfx_params(postfx_params)
  File "process_postfx.py", line 13, in write_postfx_params
    ofile = open(export_dir + "postfx.txt","w")
IOError: [Errno 2] No such file or directory: 'E:/Games/Mount&Blade - Warband/Mo
dules/The Last Calradia 2/postfx.txt'

______________________________

Script processing has ended.
Press any key to exit. . .
[code]
what is wrong&
 
KnightV said:
what is wrong

module_info.py



Khamukkamu said:
When a number of parties are in battle
"p_collective_ally"
"p_collective_enemy"
Code:
party_collect_attachments_to_party    = 1662  # (party_collect_attachments_to_party, <source_party_id>, <collected_party_id>),
                                              # Mostly used in various battle and AI calculations. Will create an aggregate party from all parties attached to the source party.
party_get_attached_to                 = 1694  # (party_get_attached_to, <destination>, <party_id>),
                                              # Retrieves the party that the referenced party is attached to, if any.
party_get_num_attached_parties        = 1695  # (party_get_num_attached_parties, <destination>, <party_id>),
                                              # Retrieves total number of parties attached to referenced party.
party_get_attached_party_with_rank    = 1696  # (party_get_attached_party_with_rank, <destination>, <party_id>, <attached_party_index>),
                                              # Extract party_id of a specified party among attached.
 
Is there a fast-tracking code to integrate into my MS so it gives me a debug message for when each script is fired? Did any of you write such code maybe? I want to have a better understanding when each script is fired. Otherwise, have to add it manually one by one.
 
kalarhan said:
The way to solve it is by studying the code, figure out what is it trying to do, identify the mistake (bug) and fix the code.

Old or new code is not the point. It is also a way to improve your coding skills.

If you have trouble understanding some part of it you can also ask here.

Ok, thanks. I will read the code and his function. Edit: The problem its solved. I look the next part of the script, and I see the line (store_faction_of_party, ":enemy_faction", "$g_enemy_party"), in other part where its used the variable :enemy_faction. I only paste that line in the "try block" of the bugged line.
Edit2: Now I check in the download of the Diplomacy 1.172 MS (Files are always updated) and I see the same change.



And what about the other problem? (That one which appears when I remove the [ ], in dedal_tavern_animations, in module_mission_templates)


Edit3: I see the mission_templates from the download link, I copy the "town_default", paste it in my file and do the changes needed for the tavern animations, compile the module and no errors.
Thanks for the previous help kalarhan.
 
In siege battle, defend troops move to entry point 10, Defend troops reinforcement move to enty 10, I want to defend troops move to entry no 10, 62 and 63.
Anyone help me?
common_siege_ai_trigger_init_2 = (
  0, 0, ti_once,
  [
    (set_show_messages, 0),
    (entry_point_get_position, pos10, 10),
    (try_for_range, ":cur_group", 0, grc_everyone),
      (neq, ":cur_group", grc_archers),
  (neq, ":cur_group", grc_cavalry),
      (team_give_order, "$defender_team", ":cur_group", mordr_hold),
      (team_give_order, "$defender_team", ":cur_group", mordr_stand_closer),
      (team_give_order, "$defender_team", ":cur_group", mordr_stand_closer),
      (team_give_order, "$defender_team_2", ":cur_group", mordr_hold),
      (team_give_order, "$defender_team_2", ":cur_group", mordr_stand_closer),
      (team_give_order, "$defender_team_2", ":cur_group", mordr_stand_closer),
    (try_end),
    (team_give_order, "$defender_team", grc_archers, mordr_stand_ground),
    (team_set_order_position, "$defender_team", grc_everyone, pos10),
    (team_give_order, "$defender_team_2", grc_archers, mordr_stand_ground),
    (team_set_order_position, "$defender_team_2", grc_everyone, pos10),
(team_give_order, "$defender_team", grc_cavalry, mordr_stand_ground),
(team_give_order, "$defender_team", grc_cavalry, mordr_stand_ground),
    (team_set_order_position, "$defender_team", grc_everyone, pos10),
    (team_give_order, "$defender_team_2", grc_cavalry, mordr_stand_ground),
    (team_set_order_position, "$defender_team_2", grc_everyone, pos10),
    (set_show_messages, 1),
    ], [])

Another question,
In siege battle attacker troops spawned at enty no 0, I want to attacker reinforcement troops spawned entry no 0, 60, 61.
My mission template
(
    "castle_attack_walls_ladder",mtf_battle_mode|mtf_synch_inventory,-1,
    "You attack the walls of the castle...",
    [
    (0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,4,[]),
   

    (0,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,0,[]),
    (10,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,0,[]),
    (11,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,2,[]),
    (15,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,0,[]),

    (40,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (41,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (42,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (43,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (44,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (45,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (46,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
(47,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
    (48,mtef_defenders|mtef_team_0|mtef_archers_first,af_override_horse,aif_start_alarmed,1,[]),
(60,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,2,[]),#attacker
    (61,mtef_attackers|mtef_team_1,af_override_horse,aif_start_alarmed,2,[]),#attacker
(62,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,5,[]),#defender
(63,mtef_defenders|mtef_team_0,af_override_horse,aif_start_alarmed,5,[]),#defender
    ],
 
Men, i have added new classes of troops in multiplayer but they do not show in game. I see only old classes which i have replaced with new. In ID_troops they are there. I write factions too. What is wrong . i do not understand from where game takes codes with old classes. It looks like a mistary.........helpppppppppppp
 
KnightV said:
Men, i have added new classes of troops in multiplayer but they do not show in game.

review your ranges on module_constants.py
Code:
multiplayer_ai_troops_begin = "trp_swadian_crossbowman_multiplayer_ai"
multiplayer_ai_troops_end = multiplayer_troops_begin
among others
 
Code:
Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
Error: Unable to find object:p_castle_9
ERROR: Illegal Identifier:p_castle_9
Error: Unable to find object:p_castle_21
ERROR: Illegal Identifier:p_castle_21
Error: Unable to find object:p_castle_9
ERROR: Illegal Identifier:p_castle_9
Error: Unable to find object:p_castle_20
ERROR: Illegal Identifier:p_castle_20
Error: Unable to find object:p_castle_21
ERROR: Illegal Identifier:p_castle_21
Error: Unable to find object:p_village_109
ERROR: Illegal Identifier:p_village_109
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
Error: Unable to find object:p_village_109
ERROR: Illegal Identifier:p_village_109
exporting triggers...
exporting dialogs...
Checking global variable usages...
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .

anyone can help?
 
I have a question about module system. Can anybody tell me how to find a list of game engine scripts used in module_scripts.py that are called by call_script? For example script_give_center_to_faction_aux. I can kind of understand what it does but i don't know what it does.

When i googled it all i could find was threads about Warband Script Enhancer. I don't want to be mean and i'm certain that it's a useful thing, but i kind of don't want to ever see it again.  :mrgreen:

And i'd like to know if i can define scripts like those. Any help is appreciated.
 
Vatanperver said:
I have a question about module system. Can anybody tell me how to find a list of game engine scripts used in module_scripts.py that are called by call_script? For example script_give_center_to_faction_aux.
Is script_give_center_to_faction_aux an engine script? :???:

In Lav's module system all engine scripts have a comment
This script is called from the game engine
https://forums.taleworlds.com/index.php?topic=324874.0

whydott said:
Code:
Error: Unable to find object:p_castle_9
ERROR: Illegal Identifier:p_castle_9
Error: Unable to find object:p_castle_21
ERROR: Illegal Identifier:p_castle_21
Error: Unable to find object:p_castle_9
ERROR: Illegal Identifier:p_castle_9
Error: Unable to find object:p_castle_20
ERROR: Illegal Identifier:p_castle_20
Error: Unable to find object:p_castle_21
ERROR: Illegal Identifier:p_castle_21
Error: Unable to find object:p_village_109
ERROR: Illegal Identifier:p_village_109
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
Error: Unable to find object:p_village_109
ERROR: Illegal Identifier:p_village_109
exporting triggers...
exporting dialogs...
Checking global variable usages...
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .

anyone can help?
Obviously, you don't have a bunch of parties: castle_9, castle_21 etc.
And if you think you do, double-check the spelling.
And if the spelling is OK, it's probable that these parties were not yet registered in id_files.
Just recompile your ms again.
 
Vatanperver said:
I have a question about module system. Can anybody tell me how to find a list of game engine scripts used in module_scripts.py that are called by call_script? For example script_give_center_to_faction_aux. I can kind of understand what it does but i don't know what it does.

install a decent text editor. I like Sublime Text (free). Notepad++ with explorer plugin. Atom. Python IDE. And so on. You can use a full folder search to locate anything inside all files at the same time. A example: CTRL+SHIFT+F "call_script,"

now: I have no idea what you are trying to say here. Operation "call_script" has nothing to do with "engine scripts". The first is a utility command that you (coder) can use in any file to execute a piece of code from module_scripts.py. The second is a hardcoded system call from the engine, that expects a certain script with a certain name, to do something. Some "engine scripts" are mandatory on the modsys, while others are optional (if you delete them the engine will use a default implementation instead). Like mentioned above all "engine scripts" should be marked with a comment on Lav's modys.

"script_give_center_to_faction_aux" -> there are a bunch of configurations that need to be done to change a center (like a town) from faction A to B. Update notes. Cancel quests. Achievements. AI related decisions. Update farmers. Update the bound centers (think a town with 3 villages). The script has that logic inside it. When you need to give a center to a faction (like after it was conquered on a siege), you can simple call it (and not think about all those bunch of things you need to do to make it happen).

script_give_center_to_faction is the base script. "script_give_center_to_faction_aux" has the "aux" to indicate it is a complementary script for the first.
 
kalarhan said:
Efe Karacar said:
Is there a fast-tracking code to integrate into my MS so it gives me a debug message for when each script is fired?

inject it with your compiler (the one that process scripts for the .txt file)

Inject what though? :razz:
 
Efe Karacar said:
Inject what though?

the logging message you want to print on rgl_log.txt. Isn`t that what you are asking about?

if you don't know: use a Python console, import your scripts file, check the array (how it is handled in memory), and you will see a simple data strut with all the info you need. Add a new tuple using direct code and a quick_string, or a call of a string and normal modsys concatenation.
 
Status
Not open for further replies.
Back
Top Bottom