SP Tutorial Module System Complete Guide to Adding Factions

Users who are viewing this thread

ZektorSK said:
This tutorial doesn't even work....
http://imgur.com/a/pdhCj

it does if you follow the instructions, use the proper slashes ("/") on your folder name, recompile the code and reload the modules/restart the game before you start a new game :wink:
 
kalarhan said:
ZektorSK said:
This tutorial doesn't even work....
http://imgur.com/a/pdhCj

it does if you follow the instructions, use the proper slashes ("/") on your folder name, recompile the code and reload the modules/restart the game before you start a new game :wink:

.................
Did you even look at those screenshots ?
 
ZektorSK said:
Did you even look at those screenshots ?

yes. Why do you think that a mistep on your end means this guide does not work?

Keep in mind this guide is about creating new factions, much more complex than "rename a existing faction"
 
fac_kingdom_8 is not defined
>>swa_kit_swadian_a              ,itm_we_swa_sword_clamshell_claymore    ,itm_we_
swa_sword_knight
                                                ],def_attrib|level(2:cool:,wp_one_ha
nded(586)|wp_two_handed(589)|wp_polearm(122)|wp_archery(63)|wp_crossbow(60)|wp_t
hrowing(40),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_power_dr
aw_1|knows_shield_10|knows_athletics_7,mercenary_man_face_middle_1,mercenary_man
_face_older_4],
NameError: name 'fac_kingdom_8' 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 "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\process_operations.py", line 14, in <module>
    from module_troops import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\module_troops.py", line 2106, in <module>
    ["custom_e_deadswordmaster","Dead Legend Swordmaster","Dead Legend Swordmast
ers",tf_guarantee_all,0,0,fac_kingdom_8,



                                [

        itm_ar_pla_t5_mailsurcoat_a
                                ,itm_bo_pla_t5_highlander
                                                        ,itm_he_pla_t5_nasal_a
                        ,itm_ga_pla_a5_iron                            ,itm_sh_
swa_kit_swadian_a              ,itm_we_swa_sword_clamshell_claymore    ,itm_we_
swa_sword_knight
                                                ],def_attrib|level(2:cool:,wp_one_ha
nded(586)|wp_two_handed(589)|wp_polearm(122)|wp_archery(63)|wp_crossbow(60)|wp_t
hrowing(40),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_power_dr
aw_1|knows_shield_10|knows_athletics_7,mercenary_man_face_middle_1,mercenary_man
_face_older_4],
NameError: name 'fac_kingdom_8' is not defined
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\process_operations.py", line 14, in <module>
    from module_troops import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\module_troops.py", line 2106, in <module>
    ["custom_e_deadswordmaster","Dead Legend Swordmaster","Dead Legend Swordmast
ers",tf_guarantee_all,0,0,fac_kingdom_8,



                                [

        itm_ar_pla_t5_mailsurcoat_a
                                ,itm_bo_pla_t5_highlander
                                                        ,itm_he_pla_t5_nasal_a
                        ,itm_ga_pla_a5_iron                            ,itm_sh_
swa_kit_swadian_a              ,itm_we_swa_sword_clamshell_claymore    ,itm_we_
swa_sword_knight
                                                ],def_attrib|level(2:cool:,wp_one_ha
nded(586)|wp_two_handed(589)|wp_polearm(122)|wp_archery(63)|wp_crossbow(60)|wp_t
hrowing(40),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_power_dr
aw_1|knows_shield_10|knows_athletics_7,mercenary_man_face_middle_1,mercenary_man
_face_older_4],
NameError: name 'fac_kingdom_8' is not defined
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\process_operations.py", line 14, in <module>
    from module_troops import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\module_troops.py", line 2106, in <module>
    ["custom_e_deadswordmaster","Dead Legend Swordmaster","Dead Legend Swordmast
ers",tf_guarantee_all,0,0,fac_kingdom_8,



                                [

        itm_ar_pla_t5_mailsurcoat_a
                                ,itm_bo_pla_t5_highlander
                                                        ,itm_he_pla_t5_nasal_a
                        ,itm_ga_pla_a5_iron                            ,itm_sh_
swa_kit_swadian_a              ,itm_we_swa_sword_clamshell_claymore    ,itm_we_
swa_sword_knight
                                                ],def_attrib|level(2:cool:,wp_one_ha
nded(586)|wp_two_handed(589)|wp_polearm(122)|wp_archery(63)|wp_crossbow(60)|wp_t
hrowing(40),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_power_dr
aw_1|knows_shield_10|knows_athletics_7,mercenary_man_face_middle_1,mercenary_man
_face_older_4],
NameError: name 'fac_kingdom_8' is not defined
Traceback (most recent call last):
  File "process_party_tmps.py", line 2, in <module>
    from module_party_templates import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\module_party_templates.py", line 324, in <module>
    ("kingdom_8_reinforcements_a_e"    ,"{!}kingdom_8_reinforcements_a"
        ,0

                                                ,0              ,fac_commoners
        ,0                                                              ,[(trp_c
ustom_e_deadswordmaster,0,5),(trp_custom_e_deadspearmaster,5,13),(trp_custom_e_d
eadknight,1,3),(trp_custom_e_deadhorse_archer,1,3),(trp_custom_e_deadexpert_arch
er,0,2),(trp_custom_e_deadfrontline_skirmisher,0,2)]),
NameError: name 'trp_custom_e_deadswordmaster' is not defined
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\process_operations.py", line 14, in <module>
    from module_troops import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\module_troops.py", line 2106, in <module>
    ["custom_e_deadswordmaster","Dead Legend Swordmaster","Dead Legend Swordmast
ers",tf_guarantee_all,0,0,fac_kingdom_8,



                                [

        itm_ar_pla_t5_mailsurcoat_a
                                ,itm_bo_pla_t5_highlander
                                                        ,itm_he_pla_t5_nasal_a
                        ,itm_ga_pla_a5_iron                            ,itm_sh_
swa_kit_swadian_a              ,itm_we_swa_sword_clamshell_claymore    ,itm_we_
swa_sword_knight
                                                ],def_attrib|level(2:cool:,wp_one_ha
nded(586)|wp_two_handed(589)|wp_polearm(122)|wp_archery(63)|wp_crossbow(60)|wp_t
hrowing(40),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_power_dr
aw_1|knows_shield_10|knows_athletics_7,mercenary_man_face_middle_1,mercenary_man
_face_older_4],
NameError: name 'fac_kingdom_8' is not defined
Exporting quest data...
Exporting info_page data...
Traceback (most recent call last):
  File "process_scripts.py", line 4, in <module>
    from module_scripts import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\module_scripts.py", line 16, in <module>
    from module_factions import dplmc_factions_begin, dplmc_factions_end, dplmc_
non_generic_factions_begin
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\module_factions.py", line 53
    ("kingdom_8",  "Dead Legends",  0, 0.9, [("player_faction",-0.15),("commoner
s",-0.15),("outlaws",-0.15),("peasant_rebels", -0.15),("deserters", -0.15)], [],
0x0xFFFFFF),


          ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\process_operations.py", line 14, in <module>
    from module_troops import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\module_troops.py", line 2106, in <module>
    ["custom_e_deadswordmaster","Dead Legend Swordmaster","Dead Legend Swordmast
ers",tf_guarantee_all,0,0,fac_kingdom_8,



                                [

        itm_ar_pla_t5_mailsurcoat_a
                                ,itm_bo_pla_t5_highlander
                                                        ,itm_he_pla_t5_nasal_a
                        ,itm_ga_pla_a5_iron                            ,itm_sh_
swa_kit_swadian_a              ,itm_we_swa_sword_clamshell_claymore    ,itm_we_
swa_sword_knight
                                                ],def_attrib|level(2:cool:,wp_one_ha
nded(586)|wp_two_handed(589)|wp_polearm(122)|wp_archery(63)|wp_crossbow(60)|wp_t
hrowing(40),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_power_dr
aw_1|knows_shield_10|knows_athletics_7,mercenary_man_face_middle_1,mercenary_man
_face_older_4],
NameError: name 'fac_kingdom_8' is not defined
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\process_operations.py", line 14, in <module>
    from module_troops import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\module_troops.py", line 2106, in <module>
    ["custom_e_deadswordmaster","Dead Legend Swordmaster","Dead Legend Swordmast
ers",tf_guarantee_all,0,0,fac_kingdom_8,



                                [

        itm_ar_pla_t5_mailsurcoat_a
                                ,itm_bo_pla_t5_highlander
                                                        ,itm_he_pla_t5_nasal_a
                        ,itm_ga_pla_a5_iron                            ,itm_sh_
swa_kit_swadian_a              ,itm_we_swa_sword_clamshell_claymore    ,itm_we_
swa_sword_knight
                                                ],def_attrib|level(2:cool:,wp_one_ha
nded(586)|wp_two_handed(589)|wp_polearm(122)|wp_archery(63)|wp_crossbow(60)|wp_t
hrowing(40),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_power_dr
aw_1|knows_shield_10|knows_athletics_7,mercenary_man_face_middle_1,mercenary_man
_face_older_4],
NameError: name 'fac_kingdom_8' is not defined
Traceback (most recent call last):
  File "process_simple_triggers.py", line 2, in <module>
    from module_simple_triggers import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\module_simple_triggers.py", line 11, in <module>
    from module_factions import dplmc_factions_end
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\module_factions.py", line 53
    ("kingdom_8",  "Dead Legends",  0, 0.9, [("player_faction",-0.15),("commoner
s",-0.15),("outlaws",-0.15),("peasant_rebels", -0.15),("deserters", -0.15)], [],
0x0xFFFFFF),


          ^
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\process_operations.py", line 14, in <module>
    from module_troops import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\module_troops.py", line 2106, in <module>
    ["custom_e_deadswordmaster","Dead Legend Swordmaster","Dead Legend Swordmast
ers",tf_guarantee_all,0,0,fac_kingdom_8,



                                [

        itm_ar_pla_t5_mailsurcoat_a
                                ,itm_bo_pla_t5_highlander
                                                        ,itm_he_pla_t5_nasal_a
                        ,itm_ga_pla_a5_iron                            ,itm_sh_
swa_kit_swadian_a              ,itm_we_swa_sword_clamshell_claymore    ,itm_we_
swa_sword_knight
                                                ],def_attrib|level(2:cool:,wp_one_ha
nded(586)|wp_two_handed(589)|wp_polearm(122)|wp_archery(63)|wp_crossbow(60)|wp_t
hrowing(40),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_power_dr
aw_1|knows_shield_10|knows_athletics_7,mercenary_man_face_middle_1,mercenary_man
_face_older_4],
NameError: name 'fac_kingdom_8' is not defined
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\process_operations.py", line 14, in <module>
    from module_troops import *
  File "D:\SteamGameLibrary\steamapps\common\MountBlade Warband\Floris Dev Suite
2.55\module_troops.py", line 2106, in <module>
    ["custom_e_deadswordmaster","Dead Legend Swordmaster","Dead Legend Swordmast
ers",tf_guarantee_all,0,0,fac_kingdom_8,



                                [

        itm_ar_pla_t5_mailsurcoat_a
                                ,itm_bo_pla_t5_highlander
                                                        ,itm_he_pla_t5_nasal_a
                        ,itm_ga_pla_a5_iron                            ,itm_sh_
swa_kit_swadian_a              ,itm_we_swa_sword_clamshell_claymore    ,itm_we_
swa_sword_knight
                                                ],def_attrib|level(2:cool:,wp_one_ha
nded(586)|wp_two_handed(589)|wp_polearm(122)|wp_archery(63)|wp_crossbow(60)|wp_t
hrowing(40),knows_common|knows_ironflesh_10|knows_power_strike_10|knows_power_dr
aw_1|knows_shield_10|knows_athletics_7,mercenary_man_face_middle_1,mercenary_man
_face_older_4],
NameError: name 'fac_kingdom_8' is not defined
Exporting postfx_params...
Exporting flora data...
Exporting ground_spec data...
Exporting skyboxes...

______________________________

Copying source files to internal directory...
Traceback (most recent call last):
  File "other_files_custom.py", line 12, in <module>
    shutil.copy("./conversation.txt",intern_dir_expanded_custom + "./conversatio
n.txt")
  File "C:\Python27\lib\shutil.py", line 119, in copy
    copyfile(src, dst)
  File "C:\Python27\lib\shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: './conversation.txt'
        1 file(s) moved.

______________________________

All Finished ...
Cleaning up...
______________________________

Script processing has ended.
Press any key to exit. . .
 
nuvasek said:
fac_kingdom_8 is not defined

include your new faction on module_factions.py
run build_module.bat
use the faction on other files. Do not use it until you have compiled the code
--> if you forgot to do it... open file ID_factions.py and include it there manually (this once). Increase the number (ID), it must be a increment of 1 in each line
Code:
fac_player_supporters_faction = 14
fac_kingdom_1 = 15
fac_kingdom_2 = 16
fac_kingdom_3 = 17
fac_kingdom_4 = 18
fac_kingdom_5 = 19
fac_kingdom_6 = 20

# your new factions should be here!!!!!!!!

fac_kingdoms_end = 21
 
kalarhan said:
nuvasek said:
fac_kingdom_8 is not defined

include your new faction on module_factions.py
run build_module.bat
use the faction on other files. Do not use it until you have compiled the code
--> if you forgot to do it... open file ID_factions.py and include it there manually (this once). Increase the number (ID), it must be a increment of 1 in each line
Code:
fac_player_supporters_faction = 14
fac_kingdom_1 = 15
fac_kingdom_2 = 16
fac_kingdom_3 = 17
fac_kingdom_4 = 18
fac_kingdom_5 = 19
fac_kingdom_6 = 20

# your new factions should be here!!!!!!!!

fac_kingdoms_end = 21
thank you
 
can i ask why is the custom faction always getting swadians? the reinforcement a,b,c have been changed to custom troops yet the custom faction keeps getting swadian troops
EDIT: lords are hiring swadians, villager volunteers are swadians... wtf? i followed the steps but idk
nvm figured it out
 
1. By the way thanks for replying so quickly
2. there are no arms_e1, arms_e3- arms_f21

use OpenBRF

Yes I have no idea what the arms are

I did everything else that the tutorial says, and im stuck with a wierd error. the lords all have the veagir flag, and their heraldry is pitch black.

EDIT: fixed the veigir flag issue, but the heraldry problem remains. I also found a random lord with the king ragnar's flag... hmmm
 
How would I go about using this to create a culture without a faction attached? I am basically talking about something you can change into during gameplay but that no faction starts out with.
 
PPQ_Purple said:
How would I go about using this to create a culture without a faction attached? I am basically talking about something you can change into during gameplay but that no faction starts out with.

culture and factions are different things. Warband puts them under the same umbrella (module_factions.py), but that is a mistake on the conceptual level for MBScript.

For example: VC has nationalities (anglo-saxon, norse, etc), religions (Christian, pagan) and kingdoms (the actual factions described in the guide). So a NPC has a kingdom, a religion and a origin. And kingdom and religion can change along the campaign. Origin and religion are stored on slots, while the kingdom uses the operations for factions.

So think of this guide as "how to add a new kingdom 101", that may help clarify things.

With that said: you need to explain further what you meant and what you want to do. That way we will know if you should visit the Q&A thread (your question is unrelated to the guide and this thread), or if is something already part of the guide, and so on.
 
kalarhan said:
So think of this guide as "how to add a new kingdom 101", that may help clarify things.
In that case I'll just fiddle with it my own way. The title completely confused me into thinking the two were somehow linked and my way of making it work was an ugly hack.
 
Back
Top Bottom