Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Does anybody know what the correlation between shield's mesh and shield's size in the game is? For example in Native round shield has size 100, in the source 47, while mesh diameter is 62-69 (few items).
 
EmielRegis said:
Syke said:
I was wanting to implement a very basic magic system in my game. I activated one of the reserve skill slots to implement a new governing skill. I was then hoping to input items that used this skill as their 'difficulty' check. Is there any way to do this? Can I create a new item type? Ideally, I'd like to have some 'thrown' spells and some 'self' spells (probably just using the victory animation). Is this feasible? Any advice would be much appreciated.

Its perfectly possible with existing item types. There are some fantasy mods with spells. Usually spell is just heavly modifed throwing weapon or simmilar.

How would one modify a throwing weapon to require an additional skill (in this case, the custom Magic skill I've implemented) to use? And is it possible to have a weapon that utilized the 'victory animation' rather than a standard attack motion? Thanks!
 
k0nr@d said:
Does anybody know what the correlation between shield's mesh and shield's size in the game is?

you have two variables/functions, use width only for round shields, and combine with height for rectangular shaped shields (kite, tower, square, etc). Unless you wanted a shield having a invisible defensive area you should keep the mesh/area similar.

Code:
def shield_width(x):  #actually radius or half-width
  return weapon_length(x)
 
def shield_height(x):
  return shoot_speed(x)
note the half-width = radius comment



Syke said:
How would one modify a throwing weapon to require an additional skill
there are many ways to do this, considering it is a hack (non standard) code. For a magic skill I would add a new shortcut to equip a special item (your throwable weapon that looks like a fire ball or something), and the trigger for that shortcut would test your skill level.

You don't need to have a item equipped - on your troop - with that ability if you don't want to (you can add flavour text for a spell book), just give it to your agent.

or you can equip a item but only allow use of special magic if you have enough skill (replace basic item with magic item when mission starts, etc). Example: a fire staff that works as a quarterstaff if you don't have magic.
 
hi there moders so i have tried so many way to add more race but the result is not what i expect :sad:
http://imgur.com/a/crUlw

i have added new skin in my module and added tf_german in the header_troop and in my troops  but the character still short ?

Code:
  (
    "german", 0,
    "man_body", "man_calf_l", "m_handL",
    "male_head", german_face_keys,
["pricha_akuratnaya_a","pricha_akuratnaya_short_a","pricha_zachesanaya_a","man_hair_y12","man_hair_y10","man_hair_y9","man_hair_r","man_hair_y8","man_hair_y2","man_hair_y","man_hair_y4","man_hair_y5","man_hair_n","man_hair_o","man_hair_q","man_hair_s","kozak_chub1","kozak_chub2","kozak_chub3","kozak_chub4","man_hair_y3","pricha_gorshok_a","man_hair_m","man_hair_y12","man_hair_y11","man_hair_y10","man_hair_y4","man_hair_y2","man_hair_u","h_simplest","h_bbeards","h_buckli","h_smalltail","a_la_garde","a_la_garde_v2","a_la_hussard","a_la_hussard_v2","a_la_russe","a_la_russian_grenadier","a_la_sans_culotte","a_la_sans_culotte_v2"], #shved,moskow,kozak,pol,ttr
    ["ewropa_vusa_a","beard_u","beard_a","beard_s","beard_h","beard_p","beard_o","beard_i","beard_g","beard_n","beard_j","beard_z","beard_y","beard_v","beard_u","beard_t","beard_q","beard_e","beard_d","beard_c","beard_b","beard_m","ewropa_vusa_a","beard_r","beard_b","beard_f","beard_k","beard_l","accessory_glasses_simple","accessory_monocle","accessory_cigar_simple","accessory_pipe_simple","accessory_pipe_russian","accessory_eyepatch_simple","accessory_grashalm_simple","accessory_flower_daisy","accessory_Rich_german_pipe_3"], #beard meshes ,"beard_q", #shved,moskow,kozak,pol,ttr
    ["hair_blonde", "hair_red", "hair_brunette", "hair_black", "hair_white"], #hair textures
    ["beard_blonde","beard_red","beard_brunette","beard_black","beard_white"], #beard_materials
    [("manface_young_2",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff502a19]),
     ("manface_midage",0xffdfefe1,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]),
     ("manface_young",0xffd0e0e0,["hair_blonde"],[0xff83301a, 0xff502a19, 0xff19100c, 0xff0c0d19]),     
#     ("manface_old",0xffd0d0d0,["hair_white","hair_brunette","hair_red","hair_blonde"],[0xffffcded, 0xffbbcded, 0xff99eebb]),
     ("manface_young_3",0xffdceded,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]),
     ("manface_7",0xffc0c8c8,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("manface_midage_2",0xfde4c8d8,["hair_blonde"],[0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("manface_rugged",0xffb0aab5,["hair_blonde"],[0xff171313, 0xff007080c]),
#     ("manface_young_4",0xffe0e8e8,["hair_blonde"],[0xff2f180e, 0xff171313, 0xff007080c]),
     ("manface_asian1",0xffe3e8e1,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("manface_asian2",0xffe3e8e1,["hair_blonde"],[0xff171313, 0xff007080c]),
	 ("manface_asian3",0xffbbb6ae,["hair_blonde"],[0xff171313, 0xff007080c]),
	 ("manface_mideast1",0xffaeb0a6,["hair_blonde"],[0xff171313, 0xff007080c]),
	 ("manface_mideast2",0xffd0c8c1,["hair_blonde"],[0xff171313, 0xff007080c]),
	 ("manface_mideast3",0xffe0e8e8,["hair_blonde"],[0xff171313, 0xff007080c]),
     ("manface_black1",0xff87655c,["hair_blonde"],[0xff171313, 0xff007080c]),
	 ("manface_black2",0xff5a342d,["hair_blonde"],[0xff171313, 0xff007080c]),
	 ("manface_black3",0xff634d3e,["hair_blonde"],[0xff171313, 0xff007080c]),
	 ("manface_white1",0xffe0e8e8,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c]),
	 ("manface_white2",0xffe0e8e8,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]),
	 ("manface_white3",0xffe0e8e8,["hair_blonde"],[0xff83301a, 0xff502a19, 0xff19100c, 0xff0c0d19]),
     ("manface_african",0xff807c8a,["hair_blonde"],[0xff120808, 0xff007080c]),     
#     ("manface_old_2",0xffd5d5c5,["hair_white"],[0xffffcded, 0xffbbcded, 0xff99eebb]),
     ], #man_face_textures,
    [(voice_die,"snd_man_die"),(voice_hit,"snd_man_hit"),(voice_grunt,"snd_man_grunt"),(voice_grunt_long,"snd_man_grunt_long"),(voice_yell,"snd_man_yell2"),(voice_stun,"snd_man_stun"),(voice_victory,"snd_man_victory")], #voice sounds
    "skel_human", 1.0,
    psys_game_blood,psys_game_blood_2,
	[[1.6, comp_greater_than, (1.0,eye_to_eye_dist), (1.0,temple_width)], #constraints: ex: 1.7 > (face_width + temple_width)
     [0.6, comp_less_than, (1.0,eye_to_eye_dist), (1.0,temple_width)],  
	 [1.5, comp_greater_than, (1.0,face_ratio), (1.0,mouth_width)],  # face ratio and mouth to nose distance
	 [0.6, comp_greater_than, (-1.0,nose_width), (1.0,mouth_width)],  # nose height and mouth to nose distance
	 [-1.0, comp_less_than, (-1.0,nose_width), (1.0,mouth_width)],  # nose height and mouth to nose distance
     ]
  ), 

what have i missed ?


 
kalarhan said:
...
Unless you wanted a shield having a invisible defensive area you should keep the mesh/area similar.
...
That is what I am actually asking about, e.g. diameter 100 in the game should corresponds to diameter 100 of actual mesh. Because in Native most of the time is not, e.g.:

shield_round_a - in game 100, actual mesh ~67
shield_round_e - in game 79, actual mesh ~62

It should be 1:1, or there is a constants/function, which translates actual mesh size to value used in the game? Or authors just simply put some semi-random, approximate numbers.
 
k0nr@d said:
That is what I am actually asking about, e.g. diameter 100 in the game should corresponds to diameter 100 of actual mesh. Because in Native most of the time is not, e.g.:
shield_round_a - in game 100, actual mesh ~67
shield_round_e - in game 79, actual mesh ~62
It should be 1:1, or there is a constants/function, which translates actual mesh size to value used in the game? Or authors just simply put some semi-random, approximate numbers.
AFAIR, the area of coverage increases with shield skill.
So the real area in-game does not match mesh size in 99.9% of situations.
Therefore shield size in module system is more like a matter of balance, rather than a ... rule.
___________________________________________________________

Does anyone know what may cause a noticeable trace of a weapon during a swing?
3KtgTmq.jpg
2 pics on the right - good weapons. The left one - the bugged one.
The only unusual thing I see about it is that it has more vertices than faces, even after recomputing normals (I've never before seen a mesh with more vertices than faces at the top position of "recompute normals"): 548 faces and 724 vertices. Other than this, seems like a normal weapon...

Oh, nvm.
The material didn't have that 720 setting.
 
Hello, recently I've found the Red Wars 1.90 module system files after re checking the page. Anyways, I got that, and built the module. Gave me a bunch of errors. Then, I remembered that I was suppose to make the path for the module_info leading to the Red Wars 1.90 mod. Silly me. Anyways, did that, but it still gave me errors for some reason. I checked all the files for the Source code and found W.R.E.C.K. files in it. Another thing was, when I changed the mod path, it remains as "Program Files(x86)/MountBlade Warband/Modules/The Red Wars", just when I first downloaded it. Did WRECK have anything to do with the problem? Or maybe is it my antivirus?

The errors given when I tried to build module was "Can't find [file]" or this error: "No such directory: C:/Program Files(x86)/MountBlade Warband/Modules/The Red Wars/[File]    (even though I changed the file path in the module_info).

Please help...thanks in advance!
 
maater66241 said:
Did WRECK have anything to do with the problem?

nope. Try to compile once on your module folder to check your permissions (as the machine admin).

Code:
export_dir = ""

if you can't compile even there... move your folder to your desktop and try again.
 
Just a quickish question here. I'm looking for the code related to your horse getting crippled in combat. Is it possible to find and edit this? I've been unable to track it down.

Alternatively, there's supposedly a mechanic that allows lame horses to heal in your inventory after a certain amount of time. Again though, I've been unable to find this code at all (or seen it in action for that matter, is this a myth?).

If someone could point me in the right direction to find either one of these in the module files I'd be most grateful.
 
Pruvan said:
Alternatively, there's supposedly a mechanic that allows lame horses to heal in your inventory after a certain amount of time.

you can create a trigger that checks your inventory for horses and imods, and "fix" them. You will need to track the original imod (like Champion) using a slot or something similar as well.

See tutorial section for how to work with triggers and modsys
 
kalarhan said:
maater66241 said:
Did WRECK have anything to do with the problem?

nope. Try to compile once on your module folder to check your permissions (as the machine admin).

Code:
export_dir = ""

if you can't compile even there... move your folder to your desktop and try again.

Well, I compiled it as the admin and this came up

"python: can't open file 'compile.py': [Errno 2] No such file or directory"

Then, I moved the mod folder to desktop. Here's what I got:
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\David\Desktop\Red Wars ModSys\source redwars 1.90\Red Wars Modsys Original\process_operations.py", line 171, in save_variables
    file = open(export_dir + "variables.txt","w")
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/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: 'C:/Program Files (x86)/Mount&Blade Warband/Modules/The Red Wars/postfx.txt'

______________________________

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

The path that I used was C:/User/(Name)/Desktop/The Red Wars 1.90

Then, when I ran as admin:
python: can't open file 'process_init.py': [Errno 2] No such file or directory
python: can't open file 'process_global_variables.py': [Errno 2] No such file or directory
python: can't open file 'process_strings.py': [Errno 2] No such file or directory
python: can't open file 'process_skills.py': [Errno 2] No such file or directory
python: can't open file 'process_music.py': [Errno 2] No such file or directory
python: can't open file 'process_animations.py': [Errno 2] No such file or directory
python: can't open file 'process_meshes.py': [Errno 2] No such file or directory
python: can't open file 'process_sounds.py': [Errno 2] No such file or directory
python: can't open file 'process_skins.py': [Errno 2] No such file or directory
python: can't open file 'process_map_icons.py': [Errno 2] No such file or directory
python: can't open file 'process_factions.py': [Errno 2] No such file or directory
python: can't open file 'process_items.py': [Errno 2] No such file or directory
python: can't open file 'process_scenes.py': [Errno 2] No such file or directory
python: can't open file 'process_troops.py': [Errno 2] No such file or directory
python: can't open file 'process_particle_sys.py': [Errno 2] No such file or directory
python: can't open file 'process_scene_props.py': [Errno 2] No such file or directory
python: can't open file 'process_tableau_materials.py': [Errno 2] No such file or directory
python: can't open file 'process_presentations.py': [Errno 2] No such file or directory
python: can't open file 'process_party_tmps.py': [Errno 2] No such file or directory
python: can't open file 'process_parties.py': [Errno 2] No such file or directory
python: can't open file 'process_quests.py': [Errno 2] No such file or directory
python: can't open file 'process_info_pages.py': [Errno 2] No such file or directory
python: can't open file 'process_scripts.py': [Errno 2] No such file or directory
python: can't open file 'process_mission_tmps.py': [Errno 2] No such file or directory
python: can't open file 'process_game_menus.py': [Errno 2] No such file or directory
python: can't open file 'process_simple_triggers.py': [Errno 2] No such file or directory
python: can't open file 'process_dialogs.py': [Errno 2] No such file or directory
python: can't open file 'process_global_variables_unused.py': [Errno 2] No such file or directory
python: can't open file 'process_postfx.py': [Errno 2] No such file or directory
Could Not Find C:\WINDOWS\system32\*.pyc

______________________________

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


I feel like I'm doing something very wrong...
 
I'm having an issue with the mod not recognizing the player's skill. I have a check in Mission Templates that will assign various results depending on the agent's skill level. I also have an item effect formula that utilizes its user's skill to determine its outcome. However, in both instances I immediately noticed that the code was not using the correct number, so I popped in a display message which confirmed this. Instead it's always either using 0 or 1, regardless of the agent's skill.

From Mission Templates:
Code:
		(store_trigger_param_1, ":player_agent"),
                (store_skill_level, ":skill_level", skl_leadership, ":player_agent"),
		(assign, reg0, ":skill_level"),
	        (display_message, "@Skill: {reg0}", 0xCCCCCC),

From Items (only the relevant portion):

Code:
(store_trigger_param_1, ":player_agent"),(store_skill_level, ":skill_level", "skl_reserved_1", ":player_agent"),
(assign, reg1, ":skill_level"),
(display_message, "@Skill: {reg1}", 0xCCCCCC)

For testing purposes, I even set it to a native skill (leadership) to ensure the issue wasn't with my custom skill that I'm desiring to use (reserved_1).

In instance one I am using ti_on_item_wielded, and in Items I am using ti_on_weapon_attack (so according to header_triggers Param 1 should correctly be agent ID for both).

An example of the full code for an item demonstrating this issue:
Code:
["test_axe", "Test Axe", [("we_nor_axe_hedmarkox_tveirhendr",0)], itp_type_two_handed_wpn|itp_merchandise| itp_two_handed|itp_primary|itp_bonus_against_shield|itp_wooden_parry, itc_nodachi|itcf_carry_axe_back,142,weight(4.5)|abundance(100)|difficulty(8)|spd_rtng(99)|weapon_length(93)|swing_damage(37,cut)|thrust_damage(0,pierce),imodbits_axe,[(ti_on_weapon_attack, [(store_trigger_param_1, ":player_agent"),(store_skill_level, ":skill_level", "skl_reserved_1", ":player_agent"),(assign, reg1, ":skill_level"),(display_message, "@Skill: {reg1}", 0xCCCCCC)])],[fac_kingdom_4,fac_player_faction]],

When used in game, with ever swing it just prints: "Skill: 1", no matter what the actual skill is.
 
If you use (agent_get_troop_id, ":troop", ":player_agent"),
                (store_skill_level, ":skill_level", skl_leadership, ":troop"),

it should work. Any skill reads draw from the troop id and not the agent. That is what I do for my battle coding and it seems to work.
 
maater66241 said:
I feel like I'm doing something very wrong...

looks like you didn't do the test

Code:
export_dir = ""



Code:
store_skill_level                        = 2170  # (store_skill_level, <destination>, <skill_id>, [troop_id]),
                                                 # Stores current value of troop skill. See header_skills.py for reference.

Nameless Warrior said:
Any skill reads draw from the troop id and not the agent.
as said above you need to read the operation documentation (header_operations.py). If you use the wrong parameter it will give you the wrong answer. See how the operation above is asking for troop_id
 
I'm trying to edit flora_kinds.py but I'm not sure how to compile it. The very brief 'STEPS' file says I need to run the .py files, which I assume means I need to run them in Python.exe. I do that but nothing happens.
 
Status
Not open for further replies.
Back
Top Bottom