Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
1. Can I disable personality clash (for a selected companion) effectively, by setting its slot_troop_personalityclash_object value to "-1" instead of trp_npcX [where X is other_companion_number] ?

so, instead of:
(troop_set_slot, "trp_npc16", slot_troop_personalityclash_object, "trp_npc15"),

something like:
(troop_set_slot, "trp_npc16", slot_troop_personalityclash_object, -1),

Or is there some kind of [for instance, hardcoded] troop object in the game with "-1" value?

2. Is it possible to change the name in the troop template before I'm gonna add another instance of that troop template into the player's party at the runtime? the troop has tf_hero flag, but I'm keeping it out of the companions_begin/end to skip the checks

for instance:
["some_hero1","Hulda","Hulda",tf_hero|tf_mounted|whatever(.....) ]

I'd like to change the name "Hulda" at a runtime (without adding another, separate template into module_troops) to something different, before I'm gonna add ANOTHER object "some_hero1" into the party.
is it possible to change the name BEFORE im gonna add him or do I need to do it afterwards?

 
I'm getting this error while executing build_module.bat
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 director
y
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 direc
tory
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 direct
ory
python: can't open file 'process_factions.py': [Errno 2] No such file or directo
ry
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 dir
ectory
python: can't open file 'process_scene_props.py': [Errno 2] No such file or dire
ctory
python: can't open file 'process_tableau_materials.py': [Errno 2] No such file o
r directory
python: can't open file 'process_presentations.py': [Errno 2] No such file or di
rectory
python: can't open file 'process_party_tmps.py': [Errno 2] No such file or direc
tory
python: can't open file 'process_parties.py': [Errno 2] No such file or director
y
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 direc
tory
python: can't open file 'process_scripts.py': [Errno 2] No such file or director
y
python: can't open file 'process_mission_tmps.py': [Errno 2] No such file or dir
ectory
python: can't open file 'process_game_menus.py': [Errno 2] No such file or direc
tory
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 director
y
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

No se pudo encontrar C:\Windows\system32\*.pyc

I've already tried changing the Module folder to my desktop and, of course, I've changed the script in moduleinfo. But I keep getting the same error.
 
deathnoise said:
is it possible to change the name BEFORE im gonna add him or do I need to do it afterwards?
All valid references in the game are positive natural numbers. You can use troop_set_name at any point, but I don't see why you need to re-add the same troop.
 
Somebody said:
deathnoise said:
is it possible to change the name BEFORE im gonna add him or do I need to do it afterwards?
All valid references in the game are positive natural numbers. You can use troop_set_name at any point, but I don't see why you need to re-add the same troop.
I'd like to expand the (current) last tier in the troop tree with an additional one, except this time it would be tf_hero instead of "regular" troop.

I've already written a script that generates names, randomly with required length.

So, I'd like to have an option: "Upgrade to Captain [pre-generated, current name in the template]"

And then - when I upgrade, I would like to pre-generate a new name and replace the old one in the template so it could be ready whenever another troop is going to be ready for an upgrade
 
I've been working on a similar system, except it's for "champion" troops that have customizable equipment selected from an upgrade of the root troop's item pool. With the new operations you can also do nifty things like "Inspiration Aura" whereby troops of the same type gain extra damage when close to the hero troop, or gain regeneration, etc. Also, make sure you have tf_randomize_face so they don't always look the same, or even tf_allways_fall_dead if you want the player to be extra careful with them.
Code:
######################################
# GENERIC MEMBER CHAT
######################################

  [anyone,"member_chat", [], "Your orders {sir/madam}?", "regular_member_talk",[]],

  [anyone|plyr,"regular_member_talk", [
  #do pre-requisites here - faction/home center relation, renown, rtr, honour, etc.
  #also check if you actually have enough non-wounded troops of this type
  ], "Show me ya moves, Captain.", "promotion_requested",[]],
  [anyone,"promotion_requested", [], "Yes!!", "do_regular_member_view_char",[
  (party_remove_members, "p_main_party", "$g_talk_troop", 1),
  (troop_get_slot, ":promotion_troop", "$g_talk_troop", slot_troop_promotion_troop),
  (party_add_members, "p_main_party", ":promotion_troop", 1),
  (agent_play_animation, "$g_talk_agent", 442), #cheer
  #call your script here to change the name
]],

  [anyone|plyr,"regular_member_talk", [], "Tell me about yourself", "view_regular_char_requested",[]],
  [anyone,"view_regular_char_requested", [], "Aye {sir/madam}. Let me tell you all there is to know about me.", "do_regular_member_view_char",[[change_screen_view_character]]],

Or you can do an after-battle trigger if the top-tier troop has performed exceptionally in battle (you can either track damage done or use agent_get_kill_count before the mission ends), spawning a map conversation which leads to the same dialog state.
 
CharruaURU said:
I'm getting this error while executing build_module.bat
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 director
y
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 direc
tory
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 direct
ory
python: can't open file 'process_factions.py': [Errno 2] No such file or directo
ry
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 dir
ectory
python: can't open file 'process_scene_props.py': [Errno 2] No such file or dire
ctory
python: can't open file 'process_tableau_materials.py': [Errno 2] No such file o
r directory
python: can't open file 'process_presentations.py': [Errno 2] No such file or di
rectory
python: can't open file 'process_party_tmps.py': [Errno 2] No such file or direc
tory
python: can't open file 'process_parties.py': [Errno 2] No such file or director
y
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 direc
tory
python: can't open file 'process_scripts.py': [Errno 2] No such file or director
y
python: can't open file 'process_mission_tmps.py': [Errno 2] No such file or dir
ectory
python: can't open file 'process_game_menus.py': [Errno 2] No such file or direc
tory
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 director
y
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

No se pudo encontrar C:\Windows\system32\*.pyc

I've already tried changing the Module folder to my desktop and, of course, I've changed the script in moduleinfo. But I keep getting the same error.
Python can't find those. Probably build_module is not in the same folder as the process scripts. You did something silly.
 
MadVader said:
CharruaURU said:
I'm getting this error while executing build_module.bat
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 director
y
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 direc
tory
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 direct
ory
python: can't open file 'process_factions.py': [Errno 2] No such file or directo
ry
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 dir
ectory
python: can't open file 'process_scene_props.py': [Errno 2] No such file or dire
ctory
python: can't open file 'process_tableau_materials.py': [Errno 2] No such file o
r directory
python: can't open file 'process_presentations.py': [Errno 2] No such file or di
rectory
python: can't open file 'process_party_tmps.py': [Errno 2] No such file or direc
tory
python: can't open file 'process_parties.py': [Errno 2] No such file or director
y
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 direc
tory
python: can't open file 'process_scripts.py': [Errno 2] No such file or director
y
python: can't open file 'process_mission_tmps.py': [Errno 2] No such file or dir
ectory
python: can't open file 'process_game_menus.py': [Errno 2] No such file or direc
tory
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 director
y
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

No se pudo encontrar C:\Windows\system32\*.pyc

I've already tried changing the Module folder to my desktop and, of course, I've changed the script in moduleinfo. But I keep getting the same error.
Python can't find those. Probably build_module is not in the same folder as the process scripts. You did something silly.

I downloades a new copy of the module system, extracted it, changed the lines in module info (see spoiler) and still I can't modify anything!
# Point export_dir to the folder you will be keeping your module
# Make sure you use forward slashes (/) and NOT backward slashes (\)

#export_dir = "../WOTS/Modules/Native/"
export_dir = "C:/Users/Bruno/Desktop/Proyecto Mod/Native2/"
 
Well I accidentally set the python installer to open the PY files and now I cant change it to the regular python. I've tried right clicking, shift right clicking and so on. I can't find the Open with... option. Any ideas?
 
MadVader said:
Since this is kind of pointless as you are not really trying to figure it out, here's exactly what you need to do.

At the end of script_cf_reinforce_party find this:
      (try_begin),
        (gt, ":party_template", 0),
        (party_add_template, ":party_no", ":party_template"),
      (try_end),
And insert some lines:
      (try_begin),
        (gt, ":party_template", 0),
        (party_add_template, ":party_no", ":party_template"),
        (try_begin),
          (eq, ":party_type", spt_kingdom_hero_party),
          (party_stack_get_troop_id, ":leader", ":party_no"),
          (eq, ":leader", "trp_kingdom_3_lord"),
          (party_add_members, ":party_no", "trp_asshole", 2), #change number and troop
        (try_end),
      (try_end),

This will simply add 2 assholes every time that lord receives his normal reinforcements. Simple and no new party templates are needed.

While at this, what would it look like if the lord was supposed to have only one unique troop? To simulate lord companions. Was thinking the troop itself could be unkillable and un-catchable, so once the lord is defeated, he receives this same unique troop once again after he receives reinforcements.
 
        (try_begin),
          (eq, ":party_type", spt_kingdom_hero_party),
          (party_stack_get_troop_id, ":leader", ":party_no"),
          (eq, ":leader", "trp_kingdom_3_lord"),
          (party_count_companions_of_type, ":amount", ":party_no", "trp_kingdom_3_lord_lieutenant"),
          (eq, ":amount", 0),
          (party_add_members, ":party_no", "trp_kingdom_3_lord_lieutenant", 1),
        (try_end),
 
And multiple companions would be this?

MadVader said:
        (try_begin),
          (eq, ":party_type", spt_kingdom_hero_party),
          (party_stack_get_troop_id, ":leader", ":party_no"),
          (eq, ":leader", "trp_kingdom_3_lord"),
          (party_count_companions_of_type, ":amount", ":party_no", "trp_kingdom_3_lord_lieutenant"),
          (party_count_companions_of_type, ":amount", ":party_no", "trp_kingdom_3_lord_lieutenant_numero_duo"),
          (eq, ":amount", 0),
          (party_add_members, ":party_no", "trp_kingdom_3_lord_lieutenant", 1),
          (party_add_members, ":party_no", "trp_kingdom_3_lord_lieutenant_numero_duo", 1),
        (try_end),
 
Cozur said:
And multiple companions would be this?

MadVader said:
        (try_begin),
          (eq, ":party_type", spt_kingdom_hero_party),
          (party_stack_get_troop_id, ":leader", ":party_no"),
          (eq, ":leader", "trp_kingdom_3_lord"),
          (party_count_companions_of_type, ":amount", ":party_no", "trp_kingdom_3_lord_lieutenant"),
          (party_count_companions_of_type, ":amount", ":party_no", "trp_kingdom_3_lord_lieutenant_numero_duo"),
          (eq, ":amount", 0),
          (party_add_members, ":party_no", "trp_kingdom_3_lord_lieutenant", 1),
          (party_add_members, ":party_no", "trp_kingdom_3_lord_lieutenant_numero_duo", 1),
        (try_end),

No, that will only check to make sure that trp_kingdom_3_lord_lieutenant_numero_duo's amount is 0.  Add another (eq, ":amount", 0),
before you check trp_kingdom_3_lord_lieutenant_numero_duo's amount so that it makes sure trp_kingdom_3_lord_lieutenant's amount is 0
 
Sir_Pigsalot said:
produno said:
You could set windows to show file extensions and change that. Normally it should reset it.
How can I do that?

If you have windows 7 (and vista?  not sure about 8 ), go to control panel, default programs, associate a file type or protocol with a program, find the .py extension, and change the default program to python.exe.

If you have xp I'll hop on another comp right quick and look up how to do it if you need me to.


edit: or google it as Lumos suggests.
 
Well I've been following sphere's directions on how to fix the PY files, link: http://forums.taleworlds.com/index.php?topic=35044.180 and I'm pretty sure they are correct, but now I am confused, as I am supposed to edit something, but I don't know how to access it. You guys can take a look and see if he's wrong or what. Thanks for all of the help so far.

Also I followed your instructions and managed to put the python files back to using python.exe, thanks.
 
Sir_Pigsalot said:
Well I've been following sphere's directions on how to fix the PY files, link: http://forums.taleworlds.com/index.php?topic=35044.180 and I'm pretty sure they are correct, but now I am confused, as I am supposed to edit something, but I don't know how to access it. You guys can take a look and see if he's wrong or what. Thanks for all of the help so far.
Are you ****ing kidding me? No, seriously, are you playing at something?
I do my best to always be as helpful and polite as I can, but you're crossing the line here. That little red line that people always cross on 64-player Operation Metro. The line that converts the water in my head to steam, which comes right out of my ears like it did with the police chief in "the Last Action Hero".
I can't believe you can be pretending not to know how to right click and then either "Edit with IDLE" cause you've got Python installed even if the "Open With" is miraculously disappeared, or to read a tutorial and, having installed Notepad++, select "Edit with Notepad++". I can't imagine how difficult that would be. And having the extensions turned off... The first thing one should do when sitting on a computer for the first time should be to check the showing of extensions, cause that's pretty important.
Now tell me you've never used a computer before and that you're going to make a difficult (not extremely, but hey, difficult for you) mod for Warband. That's an oxymoron, by the way. In any case, should you say this, I'm just going to get off the chair, clap my hands and look at the wall with a "Can you believe this?!" stare, as if it's directed to an imaginary audience.

Someone with the authority should put a large "Lasciate ogni speranza, voi ch'entrate" sign somewhere on this forum. And I should really rig my computer to explode if I post after midnight again or something. I'm going to bed first. Hopefully I won't have to clap hands tomorrow morning.

EDIT: And by the way, your personal text is hilarious. Perhaps you should seek to replace "fowl" with "foul", their meanings are quite different. Or maybe not, if you dislike birds a lot.
 
Status
Not open for further replies.
Back
Top Bottom