Native LSP World Map Map Icons Pack

-R0B0-

Regular
WB
Best answers
0
Antonis said:
By their own, "variables not used" warning isn't anything to worry about. In some of my mods I have a lot of those lying around, mostly of experiments half-implemented or failed. It is a bit of lazy programming not to erase them and I know kalarhan would frown at this shoddy work.  :razz:
But it just means that you assign a variable and you don't really use it anywhere.

Now, as for the "Error: Unable to find object:pt_battlefield", that means that you forgot to add a party template named battlefield or miss-typed something. Check what you edited in party templates. As for the other errors, again probably a miss-type, you seem to reference the wrong type of variable.
Still i havent changed anything from what the tutorial is giving, this error is from something thats already in the module system.
  File "process_simple_triggers.py", line 30, in <module>
    save_simple_triggers(variables,variable_uses,simple_triggers,tag_uses,quick_strings)
  File "process_simple_triggers.py", line 20, in save_simple_triggers
    save_statement_block(file,0, 1, simple_trigger[1]  , variable_list,variable_uses,tag_uses,quick_strings)
  File "D:\Program Files\Steam\steamapps\common\MountBlade Warband\Modules\Calradian Civil War\Module_system 1.166\process_operations.py", line 459, in save_statement_block
    save_statement(ofile,opcode,no_variables,statement,variable_list,variable_uses,local_vars, local_var_uses,tag_uses,quick_strings)
  File "D:\Program Files\Steam\steamapps\common\MountBlade Warband\Modules\Calradian Civil War\Module_system 1.166\process_operations.py", line 408, in save_statement
    ofile.write("%d "%operand)
TypeError: %d format: a number is required, not list

And nothing is to be added in module_party_templates, and i don´t know how i would add it.
WARNING: Local variable never used: root_defender_party, at: game_event_battle_end
Error: Unable to find object:pt_battlefield
ERROR: Illegal Identifier:pt_battlefield
 

Janycz

Knight at Arms
WB
Best answers
0
@ᚱᛟᛒᛟ, oh, I forgot to write about party template 'battlefield'. Just create in module_party_templates.py party template 'battlefield'.
 

-R0B0-

Regular
WB
Best answers
0
Janycz said:
@ᚱᛟᛒᛟ, oh, I forgot to write about party template 'battlefield'. Just create in module_party_templates.py party template 'battlefield'.
like this? if not what specifics dose it need.
("battlefield","Battlefield",icon_battlefield_a|pf_is_static|pf_hide_defenders,0,fac_neutral,[]),
 

-R0B0-

Regular
WB
Best answers
0
i get this error for the pt_battlefield, same with the other osp but with the simple_trigger and when i try to launch the game i get an error that tell me that the module in question could't be read.
  File "process_party_tmps.py", line 52, in <module>
    save_party_templates()
  File "process_party_tmps.py", line 31, in save_party_templates
    file.write("pt_%s %s %d %d %d %d "%(convert_to_identifier(party_template[0]),replace_spaces(party_template[1]),party_template[2],party_template[3], party_template[4], party_template[5]))
TypeError: %d format: a number is required, not list
 

-R0B0-

Regular
WB
Best answers
0
have no idea what i really did but i got it working barely.... the lords and kings spawn with the same icon but seperate depending on the faction and i tried entering a battle and the battleground did not appear after the battle
 

Dj_FRedy

Duke
M&BWBNWVCWF&S
Best answers
14
Read carefully the header of each file you want to modify, there are the fields for each module. In this case you forgot to add a field to the tuple, the number 6). The game is waiting for a number 'located in header_parties', instead it gets a list [].
Don't forget to stop by the 'Documentation & Tutorials' section for more information.

Code:
file.write("pt_%s %s %d %d %d %d "%(convert_to_identifier(party_template[0]),replace_spaces(party_template[1]),party_template[2],party_template[3], party_template[4], party_template[5]))
Code:
####################################################################################################################
#  Each party template record contains the following fields:
#  1) Party-template id: used for referencing party-templates in other files.
#     The prefix pt_ is automatically added before each party-template id.
#  2) Party-template name.
#  3) Party flags. See header_parties.py for a list of available flags
#  4) Menu. ID of the menu to use when this party is met. The value 0 uses the default party encounter system.
#  5) Faction
#  6) Personality. See header_parties.py for an explanation of personality flags.
#  7) List of stacks. Each stack record is a tuple that contains the following fields:
#    7.1) Troop-id. 
#    7.2) Minimum number of troops in the stack. 
#    7.3) Maximum number of troops in the stack. 
#    7.4) Member flags(optional). Use pmf_is_prisoner to note that this member is a prisoner.
#     Note: There can be at most 6 stacks.
####################################################################################################################
 

-R0B0-

Regular
WB
Best answers
0
I dont think its something wrong with the module cus everything works except for the kings, they dont want to "equip" the kings icon but they equip the lord icon but i will read into that!

(the battlefield works but i could't see it cus for some reason it was tiny as hell)
 

The Bowman

Count
M&BWBWF&SNWVC
Best answers
0
Hey, Janycz
I have managed to install your scripts successfully with the Diplomacy mod. Everything works, but the game gives me these errors whenever I end a battle (it does not happen with the AI battles, as far as I have noticed).

Do you have any idea on where the problem may lay, based on this screenshot?

Thanks.
 

Janycz

Knight at Arms
WB
Best answers
0
@The Bowman, I see that battle_political_consequences does not work good. Invalid party appears there too.
I think, that it is needed draw icon, using alive party from set { root_attacker_party, root_defender_party }
e. g.
Code:
(assign, ":party_to_draw", ":root_attacker_party"),
(try_begin),
(neg|party_is_active, ":root_attacker_party"),
#maybe, I should insert extra conditions here...
(assign, ":party_to_draw", ":root_defender_party"),
(try_end),
(call_script, "script_draw_battle_icon", ":party_to_draw"),
instead of
Code:
(call_script, "script_draw_battle_icon", ":root_attacker_party"),
Note: snippet is untested.
 

The Bowman

Count
M&BWBWF&SNWVC
Best answers
0
I have tested the code snippet, and I can confirm that everything works. No more error messages.

Cheers.

Bonus screenshot:
 

pan-boroda

Knight at Arms
Best answers
0
It seems to have done as it is written, it does not produce errors, but there is no division into factions. All lords on the global map are displayed identically, the icon that refers to flagbearer_a, without separation by faction. Tell me what could be the problem?

("draw_icons",
  [
    (try_for_parties, ":party"),

      (party_slot_eq, ":party", slot_party_type, spt_kingdom_hero_party),
      (party_is_active, ":party"),
      (gt, ":party", 0),
      (neg|party_is_in_any_town, ":party"),
      (store_faction_of_party, ":fac", ":party"),
      (store_party_size, ":num", ":party"),
      (party_get_icon, ":icon", ":party"),

  (party_get_slot, ":leader", ":party", slot_kingdom_party_leader),
  (assign, ":is_king", 0),
      (try_for_range, ":cur_fac", "fac_kingdom_1", "fac_kingdoms_end"),
    (faction_slot_eq, ":cur_fac", slot_faction_leader, ":leader"),
    (assign, ":is_king", 1),
      (try_end),

      (try_begin),
    (eq, ":is_king", 0),

(try_begin),
  (eq, ":fac", "fac_kingdom_3"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_ttr_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_ttr_army"),
          (else_try),
            (assign, ":icon", "icon_ttr_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_4"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_swed_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_swed_army"),
          (else_try),
            (assign, ":icon", "icon_swed_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_5"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_lit_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_lit_army"),
          (else_try),
            (assign, ":icon", "icon_lit_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_2"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_rus_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_rus_army"),
          (else_try),
            (assign, ":icon", "icon_rus_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_6"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_liv_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_liv_army"),
          (else_try),
            (assign, ":icon", "icon_liv_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_1"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_pol_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_pol_army"),
          (else_try),
            (assign, ":icon", "icon_pol_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_7"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_hun_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_hun_army"),
          (else_try),
            (assign, ":icon", "icon_hun_army"),
          (try_end),   
(else_try),
  (eq, ":fac", "fac_kingdom_8"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_mold_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_mold_army"),
          (else_try),
            (assign, ":icon", "icon_mold_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_9"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_teu_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_teu_army"),
          (else_try),
            (assign, ":icon", "icon_teu_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_10"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_turk_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_turk_army"),
          (else_try),
            (assign, ":icon", "icon_turk_army"),
          (try_end),
(try_end),

  (else_try),

    (try_begin),
  (eq, ":fac", "fac_kingdom_3"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_ttr_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_ttr_army"),
          (else_try),
            (assign, ":icon", "icon_ttr_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_4"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_swed_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_swed_army"),
          (else_try),
            (assign, ":icon", "icon_swed_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_5"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_lit_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_lit_army"),
          (else_try),
            (assign, ":icon", "icon_lit_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_2"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_rus_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_rus_army"),
          (else_try),
            (assign, ":icon", "icon_rus_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_6"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_liv_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_liv_army"),
          (else_try),
            (assign, ":icon", "icon_liv_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_1"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_pol_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_pol_army"),
          (else_try),
            (assign, ":icon", "icon_pol_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_7"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_hun_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_hun_army"),
          (else_try),
            (assign, ":icon", "icon_hun_army"),
          (try_end),   
(else_try),
  (eq, ":fac", "fac_kingdom_8"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_mold_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_mold_army"),
          (else_try),
            (assign, ":icon", "icon_mold_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_9"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_teu_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_teu_army"),
          (else_try),
            (assign, ":icon", "icon_teu_army"),
          (try_end),
(else_try),
  (eq, ":fac", "fac_kingdom_10"),
          (try_begin),
            (ge, ":num", 200),
            (assign, ":icon", "icon_turk_army"),
          (else_try),
            (ge, ":num", 100),
            (assign, ":icon", "icon_turk_army"),
          (else_try),
            (assign, ":icon", "icon_turk_army"),
          (try_end),
(try_end),

      (try_end),

      (party_set_icon, ":party", ":icon"),

    (try_end),
  ]),
 

Auhsalo

Recruit
Best answers
0
@ᚱᛟᛒᛟ, oh, I forgot to write about party template 'battlefield'. Just create in module_party_templates.py party template 'battlefield'.
Sorry, friend. I did everything and it worked very well. Party icons and etc. But I couldn't understand how to create the party template 'battlefield' :c