does merging custom troop trees require diplomacy based code?

Users who are viewing this thread

Hi.. I am adding custom troop trees into my mod and it outputs this:

Traceback (most recent call last):
File "src/process_global_variables.py", line 6, in <module>
from module_dialogs import *
File "/Users/admin/chronicles/money-and-honour/src/module_dialogs.py", line 26515, in <module>
modmerge(var_set)
File "/Users/admin/chronicles/money-and-honour/src/modmerger.py", line 297, in modmerge
modmerge__(modcomp_name,var_dict)
File "/Users/admin/chronicles/money-and-honour/src/modmerger.py", line 239, in modmerge__
_temp.__dict__[mergefn_name](var_dict)
File "/Users/admin/chronicles/money-and-honour/src/cstm_dialogs.py", line 94, in modmerge
index = [i for i, dialog in enumerate(orig_dialogs) if dialog[1] == "dplmc_constable_recruits_and_training" and dialog[4] == "dplmc_constable_pretalk"][0]
IndexError: list index out of range

the error is caused by this line: index = [i for i, dialog in enumerate(orig_dialogs) if dialog[1] == "dplmc_constable_recruits_and_training" and dialog[4] == "dplmc_constable_pretalk"][0]. Does it mean I need to add diplomacy code too? That would cost a huge amount of time so... if yes, is there any existing modmerger packs to use?

Forgot to say: the compiling also shows a lot of 'usage of unassigned variables' and 'Global variable never used' caused by this error. But it can still get me supposedly normal compilation result.

Screenshot 2021-02-02 at 10.12.46.png
 
Solution
here is the custom troop tree moddb link: https://www.moddb.com/downloads/custom-troop-trees-03092017

---

it's all fine now because I found the author talking about this in his readme:

you might be lucky and have it work right away, or you might need to make changes to make it work. The Constable dialog options won't work for example if your mod doesn't have Diplomacy's Constable troop. You'll very likely want to edit numbers like the numbers of tiers, levels per tier and funds per level for balance purposes. Overall it will hopefully be flexible enough to work with your mod without much extra work, but there have already been examples of this definitely not happening and I'll keep working to try to improve that.

I...
here is the custom troop tree moddb link: https://www.moddb.com/downloads/custom-troop-trees-03092017

---

it's all fine now because I found the author talking about this in his readme:

you might be lucky and have it work right away, or you might need to make changes to make it work. The Constable dialog options won't work for example if your mod doesn't have Diplomacy's Constable troop. You'll very likely want to edit numbers like the numbers of tiers, levels per tier and funds per level for balance purposes. Overall it will hopefully be flexible enough to work with your mod without much extra work, but there have already been examples of this definitely not happening and I'll keep working to try to improve that.

I left once I posted this and came back just a sec ago, discovering this. So... sorry for wasting your time.
 
Upvote 0
Solution
Back
Top Bottom