Modding Q&A [For Quick Questions and Answers]

正在查看此主题的用户

状态
不接受进一步回复。
kalarhan 说:
BeefBacon 说:
Didn't help. Same errors.

it fixed one mistake, now to the next  :grin:

copy and post your entire console log (from the terminal), use CODE tag

Sorry for the delay, took the dogs out for a walk.

插入代码块:
Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_scripts.py", line 19840, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
Traceback (most recent call last):
  File "process_global_variables.py", line 6, in <module>
    from module_dialogs import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_dialogs.py", line 10745, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/skins.txt'
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_scripts.py", line 19840, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/factions.txt'
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_scripts.py", line 19840, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_scripts.py", line 19840, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/particle_systems.txt'
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_scripts.py", line 19840, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_scripts.py", line 19840, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
Traceback (most recent call last):
  File "process_presentations.py", line 4, in <module>
    from module_presentations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_presentations.py", line 8614, in <module>
    (party_set_marshall, ":old_marshall", 0),
NameError: name 'party_set_marshall' is not defined
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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/party_templates.txt'
Traceback (most recent call last):
  File "process_parties.py", line 4, in <module>
    from module_game_menus import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_game_menus.py", line 13565, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/info_pages.txt'
Traceback (most recent call last):
  File "process_scripts.py", line 4, in <module>
    from module_scripts import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_scripts.py", line 19840, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_scripts.py", line 19840, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
Traceback (most recent call last):
  File "process_game_menus.py", line 5, in <module>
    from module_game_menus import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_game_menus.py", line 13565, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_scripts.py", line 19840, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
Traceback (most recent call last):
  File "process_dialogs.py", line 6, in <module>
    from module_dialogs import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_dialogs.py", line 10745, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\process_operations.py", line 20, in <module>
    from module_scripts import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.165\module_scripts.py", line 19840, in <module>
    (party_set_marshall, ":old_marshall_party", 0),
NameError: name 'party_set_marshall' is not defined
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:/Steam/SteamApps/common/MountBlade_Warband/Modules/Sons of Skyrim/postfx.txt'

______________________________

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

With Run as Administrator:

插入代码块:
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. . .
 
BeefBacon 说:
Sorry for the delay, took the dogs out for a walk.

start by downloading a newer version of modsys, you are using a 1.165 bugged one, while you should be using the latest 1.171 (or Wreck, or Lav's)

then report back if there are new errors
 
kalarhan 说:
BeefBacon 说:
Sorry for the delay, took the dogs out for a walk.

start by downloading a newer version of modsys, you are using a 1.165 bugged one, while you should be using the latest 1.171 (or Wreck, or Lav's)

then report back if there are new errors

I've found WRECK v1.0.0, but I'm not really clear on what I'm supposed to be doing with it. Am I supposed to have a newer version of modsys as well? I can't seem to find a newer version than the one I have.

Wait, hold up. I think I found it, and it might be working.

Right, I've got 1.166, but I'm still getting the same errors, it seems. Is this not the latest version?
 
Hi all,

I'm playing around with a Mission Template trigger that occurs when a player gets into a certain position/area. It is not occurring, so I don't think I'm doing it right.

插入代码块:
(0, 0, 0,  [],
        [ (quest_slot_eq,"qst_find_lost_spears",slot_quest_current_state, 10),
          (try_begin),
            (str_store_troop_name, s3, "trp_dwarf_lord"),
            (get_player_agent_no, ":player_agent"),
            (agent_get_position, pos1, ":player_agent"),
            (entry_point_get_position,pos2,15),
            (get_distance_between_positions, ":cur_distance", pos1, pos2),
            (le, ":cur_distance", 20),
  	    (tutorial_message, "@You have found the Dwarven Warehouse where the Legendary Spears could be. Report what you find to {s3}",color_good_news),
            (quest_set_slot,"qst_find_lost_spears",slot_quest_current_state, 15),
          (try_end),
 ]),

Thanks in advance.
 
First of all never use a 0,0,0 trigger unless you know what you're doing (it gets called every frame). Make use of the full trigger (with the quest slot being placed in the conditions) and possibly the distance check as well, meaning you can use ti_once as the rearm interval to only show the message once for best results. Second of all I'm pretty sure the issue is get_distance_between_positions, which returns the result in centimeters meaning you have to be right on top of the entry point.
 
Yea.. i was trying to fix someone elses code and just let it be...  :oops: Thanks, Somebody.

This worked for me:

插入代码块:
(0, 0, ti_once,  
      [
        (quest_slot_eq,"qst_find_lost_spears",slot_quest_current_state, 10),
        (get_player_agent_no, ":player_agent"),
        (agent_get_position, pos1, ":player_agent"),
        (entry_point_get_position,pos2,15),
        (get_distance_between_positions, ":cur_distance", pos1, pos2),
        (le, ":cur_distance", 100)
      ],
      [
       (str_store_troop_name, s3, "trp_dwarf_lord"),
       (display_message, "@You have found the Dwarven Warehouse where the Legendary Spears could be. Report what you find to {s3}",color_good_news),
       (quest_set_slot,"qst_find_lost_spears",slot_quest_current_state, 15),
      ]),

I tried using (tutorial_message), but it didnt appear. Should I be defining the tutorial message box first before using it? It's my first time trying that operation.

插入代码块:
(tutorial_message_set_size, 17, 17),
(tutorial_message_set_position, 500, 650),
(tutorial_message_set_center_justify, 0),
 
Khamukkamu 说:
Yea.. i was trying to fix someone elses code and just let it be...

I tried using (tutorial_message), but it didnt appear.

where are the debug messages?  :sad:

you can see examples of this operation usage on VC modsys (mission template), Native, etc
 
kalarhan 说:
BeefBacon 说:
kalarhan 说:
latest 1.171 (or Wreck, or Lav's)

I've found WRECK v1.0.0...

I've got 1.166...

1.171 > 1.166, so you are not using the latest  :mrgreen:

WRECK or latest (or latest with WRECK). Wreck thread first post explains how to use that tool (alternative compiler).
For Native modsys visit the TW website https://www.taleworlds.com/en/Games/Warband/Download

Haha, yes, I was a bit unsure. I was having such difficulty finding 1.171 that I assumed you must be referring to a version that is compatible with the current version of Warband. But then I also assumed that if that were the case you would have made it fairly clear, so I was very unsure. I wasn't aware that the module system was actually an official download, so it makes sense that I wouldn't be able to find the newest versions on the forums.

1.171 still doesn't want to play ball. I feel like I must have missed a step. It doesn't seem to be able to point to itself, it just gets "no such file or directory." Running it as Administrator just makes the list of errors more concise.

EDIT

Son of a *****. I copied Native and renamed it to my mod's name, and tried compiling it. It appears to have worked. I feel like that was a very fundamental step I somehow skipped.

So what now? Can I remove items from item_kinds1 without running into problems?

I removed a few armour pieces using Morgh's in Python mode and when I compile it I get "X is not defined" is that going to be a problem?

Oh. It crashes like it did before. Do I have to remove them manually in the .py file?

Apparently not, because that causes the same error. How the hell do I remove items?
 
kalarhan 说:
Khamukkamu 说:
Yea.. i was trying to fix someone elses code and just let it be...

I tried using (tutorial_message), but it didnt appear.

where are the debug messages?  :sad:

you can see examples of this operation usage on VC modsys (mission template), Native, etc

I feel like a student being chastised by his master  :oops:  I have been putting debug messages in my other code though!  :eek:

I got it to work. My mistake was thinking (tutorial_message) optional colour was in hex (it's not).

Thanks all!
 
BeefBacon 说:
How the hell do I remove items?

until you learn how to read the error messages don't assume they are all the same. If you want us to help with a specific problem we need information, which include copying and pasting the entire log from your terminal.

you can do simple stuff like copying a item from another mod, creating a new sword, changing stats, etc. The further away you move from THAT the more you will need to learn how things work.

Why do you want to remove items? Which items? Are you willing to spend at least 2 hours reading some of the basic tutorials? If so, check this

1) https://forums.taleworlds.com/index.php/topic,142422.0.html
2) https://forums.taleworlds.com/index.php/board,12.0.html

core concepts: ID_XXX files; how to add/remove gear from a troop (module_troops.py), how ranges work with constants (module_constants.py); how to add/remove a item from the npc merchant

Maybe what you want can be solved in a quicker/simpler way, but for help on that you will need to go into more details about your design changes.
 
kalarhan 说:
BeefBacon 说:
How the hell do I remove items?

until you learn how to read the error messages don't assume they are all the same. If you want us to help with a specific problem we need information, which include copying and pasting the entire log from your terminal.

you can do simple stuff like copying a item from another mod, creating a new sword, changing stats, etc. The further away you move from THAT the more you will need to learn how things work.

Why do you want to remove items? Which items? Are you willing to spend at least 2 hours reading some of the basic tutorials? If so, check this

1) https://forums.taleworlds.com/index.php/topic,142422.0.html
2) https://forums.taleworlds.com/index.php/board,12.0.html

core concepts: ID_XXX files; how to add/remove gear from a troop (module_troops.py), how ranges work with constants (module_constants.py); how to add/remove a item from the npc merchant

Maybe what you want can be solved in a quicker/simpler way, but for help on that you will need to go into more details about your design changes.

Wow, I am not good at navigating these forums. These are very helpful, thankyou.

I'll probably post more details tomorrow - or possibly later tonight but that's unlikely.

Essentially all I want to do is remove items in item_kinds1. Not all the items, mind, I want to keep the books, food, and a few pieces of vanilla equipment that I feel would suit the theme of my mod - but everything else I want stripped out.

I know how to add items - I managed to model and implement some armour and some boots - I'm currently working on a helmet, and then I'll try some gauntlets. Got them working fine in-game. I expect I can figure out weapons and such.

But yes, I'm trying to cut out as much of the original game as I can so I can build up from there, so I can effectively make Native but with my mod's assets, map, music and so on. Then I'll think about new features, if I get to that point.

If nothing else I'm learning a lot about 3D modelling. Before a couple of days ago I just had Blender sitting on my computer, but I had no idea how to use it. I'm hardly an expert at it now by any means, but each new model I make is better than the last. UV mapping can get a bit painful, though. I'm using an After Effects plugin to view my 3D models with textures. I can't help but think there's a better way to do that... though one thing I've noticed is that models in OpenBRF look different than they do in-game. They seem darker and more defined. Is there a way to get a truer representation of how they look in-game without having to actually boot the game up?

EDIT

Scratch that, it only takes a second, I'll post the log now:

插入代码块:
Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Traceback (most recent call last):
  File "process_global_variables.py", line 12, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Exporting faction data...
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Traceback (most recent call last):
  File "process_troops.py", line 4, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Exporting particle data...
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Exporting party_template data...
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Exporting quest data...
Exporting info_page data...
Traceback (most recent call last):
  File "process_scripts.py", line 7, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1782, in <module>
    ["bonus_chest_1","{!}Bonus Chest","{!}Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_neutral,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
NameError: name 'itm_strange_armor' is not defined
Exporting postfx_params...

______________________________

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

Okay, so deleted items are in the bonus chest. I've deleted the items in the bonus chest (found in troops) and get new errors pertaining to syntax. Odd since all I did was remove items in the inventory - I've done that before without a problem. I've not touched the troop tree besides that.

插入代码块:
Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_global_variables.py", line 12, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Exporting faction data...
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_troops.py", line 4, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Exporting particle data...
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Exporting party_template data...
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Exporting quest data...
Exporting info_page data...
Traceback (most recent call last):
  File "process_scripts.py", line 7, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "E:\Steam\SteamApps\common\MountBlade Warband\Modules\EDITOR\module\Module_system 1.171\module_troops.py", line 1774
    upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
                                             ^
SyntaxError: invalid syntax
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .
 
Go to that line, split up the two upgrade lines (they need to be on different lines). I'm not sure how you managed to merge those.
 
BeefBacon 说:
stuff on adding / removing items

to create a clean module you will need to study those tutorials as described on my earlier post. As you do things will get more clear why it is not a simple action to remove items as you intend. Is it possible? Yes. Is it hard? Nope, but requires more know-how (from tutorials and experience)

about your troop: seems you made a mistake while removing the items. Syntax are strict rules, you can't break them. A missing comma ",", a missing "[" or "]", wrong number of parameters in a list, etc, will stop compilation until you fix that. Review the troops you changed and verify the syntax for them. Did you use Morgh's or did you do the edit yourself? In doubt post the code for those troops (including a couple before it, and a couple after them), also post the code from the end of the file

Somebody 说:
Go to that line, split up the two upgrade lines (they need to be on different lines). I'm not sure how you managed to merge those.
Nin'ja  :grin:
 
kalarhan 说:
BeefBacon 说:
stuff on adding / removing items

to create a clean module you will need to study those tutorials as described on my earlier post. As you do things will get more clear why it is not a simple action to remove items as you intend. Is it possible? Yes. Is it hard? Nope, but requires more know-how (from tutorials and experience)

about your troop: seems you made a mistake while removing the items. Syntax are strict rules, you can't break them. A missing comma ",", a missing "[" or "]", wrong number of parameters in a list, etc, will stop compilation until you fix that. Review the troops you changed and verify the syntax for them. Did you use Morgh's or did you do the edit yourself? In doubt post the code for those troops (including a couple before it, and a couple after them), also post the code from the end of the file

Somebody 说:
Go to that line, split up the two upgrade lines (they need to be on different lines). I'm not sure how you managed to merge those.
Nin'ja  :grin:
Somebody 说:
Go to that line, split up the two upgrade lines (they need to be on different lines). I'm not sure how you managed to merge those.

I used Morgh's but in Python mode. All I did was remove items. I suppose it's possible that I misclicked somewhere. I'll try again and see what happens.

Here's the code from troops.py - the line in question (1774) is the second one.

插入代码块:
["coop_faction_troop_templates_end","{!}multiplayer_end","{!}multiplayer_end",0,0,0,fac_kingdom_5,[],0,0,0,0,0],
upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
upgrade(troops,"mercenary_horseman","mercenary_cavalry")

upgrade(troops,"swadian_recruit","swadian_militia")

upgrade2(troops,"swadian_militia","swadian_footman","swadian_skirmisher")
upgrade2(troops,"swadian_footman","swadian_man_at_arms","swadian_infantry")
upgrade(troops,"swadian_infantry","swadian_sergeant")
upgrade(troops,"swadian_skirmisher","swadian_crossbowman")

Edited to:

插入代码块:
["coop_faction_troop_templates_end","{!}multiplayer_end","{!}multiplayer_end",0,0,0,fac_kingdom_5,[],0,0,0,0,0],
upgrade(troops,"farmer","watchman")
upgrade(troops,"townsman","watchman")
upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")
upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")
upgrade(troops,"mercenary_swordsman","hired_blade")
upgrade(troops,"mercenary_horseman","mercenary_cavalry")

upgrade(troops,"swadian_recruit","swadian_militia")

It's fine with the first upgrade line, but takes issue with the next one. I don't see a difference.
 
Somebody 说:
You need to close the list of troops with a ] before the upgrades are defined

How do I go about doing that? I tried putting ]  on its own line before the upgrades, but it didn't like that.

I don't understand why it's doing this. This is just the Native troop tree, with a minor adjustment. Why is it messing up the upgrades?
 
BeefBacon 说:
I don't understand why it's doing this. This is just the Native troop tree, with a minor adjustment. Why is it messing up the upgrades?

syntax are strict rules. Its like grammar, but for computers.

a list has this format:
插入代码块:
my_list = [   ]

if you are missing the "]" the list doesn't know where it ends. The compiler can't load the list of troops into memory, and it fails.

插入代码块:
troops = [
[troop 1 stuff here],
[troop 2 stuff here],
...
]

watch out for the rules. Read the comments on each module_XXX file for a short description. You need to follow those rules, or it won't work.
 
I want to add diplomacy 4.3 with pbod to the overhaul module system, and its really hard. I also can't find a good pbod that doesn't require WSE. I found a diplomacy 4.2 with pbod built in, is that a good choice?
 
kalarhan 说:
BeefBacon 说:
I don't understand why it's doing this. This is just the Native troop tree, with a minor adjustment. Why is it messing up the upgrades?

syntax are strict rules. Its like grammar, but for computers.

I understand that, but I don't understand why it doesn't work. It's unedited, straight from Native. I change one line, and that somehow changes the syntax of another line 500 lines later? If I'd been fiddling around with upgrades that'd make sense - I'd have accidentally deleted something I shouldn't have - but I wasn't. So why has this bracket deleted itself?

I just copied the bracket from the original totally unedited file. Still get the error.

插入代码块:
["sarranid_mamluke_multiplayer_coop_tier_4","SarranidMamluke","SarranidMamluke",tf_mounted|tf_guarantee_all,0,0,fac_kingdom_6,
[itm_arabian_sword_a,itm_lance,itm_tab_shield_small_round_c,itm_mamluke_mail,itm_sarranid_veiled_helmet,itm_scale_gauntlets,itm_sarranid_boots_d,itm_arabian_horse_a],
level(7)|str_20,wp(300),knows_power_draw_10|knows_power_throw_10|knows_riding_10,0,0],

  
]


["coop_faction_troop_templates_end","{!}multiplayer_end","{!}multiplayer_end",0,0,0,fac_kingdom_5,[],0,0,0,0,0],
upgrade(troops,"farmer","watchman")upgrade(troops,"townsman","watchman")upgrade2(troops,"watchman","caravan_guard","mercenary_crossbowman")upgrade2(troops,"caravan_guard","mercenary_swordsman","mercenary_horseman")upgrade(troops,"mercenary_swordsman","hired_blade")
upgrade(troops,"mercenary_horseman","mercenary_cavalry")
 
状态
不接受进一步回复。
后退
顶部 底部