Modding VC: basic tutorials and Q&A thread

Users who are viewing this thread

so i have a few questions.

1. How do i change an existing faction inclusing it's lords and towns culture?

2. is it possible to change the map?
:all i want is a walking path between frisia and the unused country between Danmark and Frisia. If it is possible, please tell me how to do the changes, as i am kinda a noob to modding.

1. VC has its own rules and extra code. You can start by learning how Warband does factions and go from there. See this tutorial. Keep in mind that is just part of the work for VC, the rest you will need to check on the code side. A example is religion definition, as Warband doesnt have that. Or how some centers have random troop culture for recruits. And so on. There is no guide for VC factions.

2. The map is a mesh (3D object) where layers define the terrain type (here is water, here is forest, here is ocean, etc). You can use any 3D mesh tool for that. Visit the Forge Tools section and you can get a few tools to help with this. I recommend Cartographer link
The file module_parties.py has the coordinates (X,Y) for the towns, bridges, etc, you see over the map.
 
Thank you for the quick respond. now the noob question. How do i open up the VC map in the cartographer?

once you download the tool you can read its tutorial/readme on how to setup the files

keep in mind the comments on that thread, as you will need to do some editing on module_parties.py for compatibility. It is explained on the later comments on that thread.
 
("training_ground", "training_ground", pf_disabled|icon_camp|pf_hide_defenders|pf_is_static|pf_always_visible,..
("training_ground", "training_ground", icon_camp|pf_disabled|pf_hide_defenders|pf_is_static|pf_always_visible,..
("training_ground", "training_ground", pf_disabled|icon_camp|pf_disabled|pf_hide_defenders|pf_is_static|pf_always_visible,..

are these lines equivalent?
 
Well, they should be. I've not really studied the VC module system, but since the party index name is the same, it's basically the same entry 3 times. Are the coordinates different?
 
this is one line written in three variations for example
I'm interested in whether they are equivalent.. this is a question about the order and duplication of flags

kalarhan left us? ?
 
Last edited:
yeap its a simple loop, just keep a eye on the limits. EP 0 and 1 are for player, 2 to 17 (16 in total) for companions, and the rest for troops to fill the area. Change it to whatever you need.

As you are adding new companions and all... don't forget to update the companion report UI ... also not made for more than 16 by default.

Cheers
Hi Kalarhan. It's been ages since I asked you about this addition of a new companion I made. I lost my old modules file so I cannot for the life of me remember how to modify show_companions on presentations.py. I have been reconstructing my add-on, and found all the notes I had for everything but this bit. I also tend to be weakest at the graphics side of the game :oops:.


I am assuming I need to add a line here? I am thinking to add the portrait of the new companion above the central display (that shows when you click a companion card) but I do not know how to find the coordinates for the array. Can I do it with z in edit mode?

Code:
        # Grid with companions using gear without a horse
        (troop_set_slot, "trp_temp_array_c", 6, 295),
        (troop_set_slot, "trp_temp_array_c", 11, 296),
        (troop_set_slot, "trp_temp_array_c", 5, 297),
        (troop_set_slot, "trp_temp_array_c", 9, 298),
        (troop_set_slot, "trp_temp_array_c", 13, 299),
        (troop_set_slot, "trp_temp_array_c", 4, 300),
        (troop_set_slot, "trp_temp_array_c", 10, 301),
        (troop_set_slot, "trp_temp_array_c", 14, 302),
        (troop_set_slot, "trp_temp_array_c", 8, 303),
        (troop_set_slot, "trp_temp_array_c", 7, 304),
        (troop_set_slot, "trp_temp_array_c", 15, 305),
        (troop_set_slot, "trp_temp_array_c", 2, 306),
        (troop_set_slot, "trp_temp_array_c", 12, 307),
        (troop_set_slot, "trp_temp_array_c", 1, 308),
        (troop_set_slot, "trp_temp_array_c", 0, 309),
        (troop_set_slot, "trp_temp_array_c", 3, 310),

And that I need to change this 16 to 17?

Code:
        (try_for_range, ":slot_no", 0, 16),
          (troop_get_slot, ":npc", "trp_temp_array_c", ":slot_no"),
          (troop_get_slot, ":companion_ocupation", ":npc", slot_troop_occupation),

I am not sure if I would need to even touch this, but perhaps a line is needed above or below to define the new companion display?

Code:
          # jump to next row after 2 companions and right side after 8
          (try_begin),
            (eq, ":counter", 2),
            (gt, ":y", 450),
            (assign, ":x", 700),
            (assign, ":y", 0),
            (assign, ":counter", 0),
          (else_try),
            (eq, ":counter", 2),
            (val_add, ":y", 157),
            (val_sub, ":x", 150*2),
            (assign, ":counter", 0),
          (try_end),
        (try_end),

Is there anything else and how could I do it please, if you have the time? Thanks ever so much! :smile:
 
you either resize the UI for companions to fit 18/etc (which means each portrait slot will be smaller) or you change it to be scrollable.

like in the third snippet, it defined a Y limit of 450 (height), you can adapt it for more lines (9x2) or more columns (6x3), etc, it really depends on your type of monitor (widescreen or not) and if you want to distribute the changes for others.

the first snippet lists all the companions in alphabetic order IIRC, instead of how they are added in module_troops.py, so keep a eye on that too.

cheers
 
you either resize the UI for companions to fit 18/etc (which means each portrait slot will be smaller) or you change it to be scrollable.

like in the third snippet, it defined a Y limit of 450 (height), you can adapt it for more lines (9x2) or more columns (6x3), etc, it really depends on your type of monitor (widescreen or not) and if you want to distribute the changes for others.

the first snippet lists all the companions in alphabetic order IIRC, instead of how they are added in module_troops.py, so keep a eye on that too.

cheers
Thank you Kalarhan. My little add-on owes so much to you and I am very grateful for your help. It looks like I have my weekend work set out for me now :LOL:
 
Hello!
I'm playing as an anglo-saxon character. I used the TWEAK_CENTERS_RECRUIT_FROM_CURRENT_FACTION tweak bacause I want to recruit Angle troops in all towns that belong to my kingdom. But it makes you recruit saxon troops instead. I tried to modify module_simple_triggers.py, specifically, I changed 'saxon' to 'angle' in the following strings:
(eq,"$nacionalidad_type",cb7_anglesaxon),
(try_begin),
(gt, "$g_faction_selected", 0),
(faction_get_slot, reg1, "$g_faction_selected", slot_faction_culture),
(faction_set_slot, "fac_player_supporters_faction", slot_faction_culture, reg1),
(faction_set_slot, "fac_player_faction", slot_faction_culture, reg1),
(else_try),
(faction_set_slot, "fac_player_supporters_faction", slot_faction_culture, "fac_culture_angle"),
(faction_set_slot, "fac_player_faction", slot_faction_culture, "fac_culture_angle"),
(try_end),
and
(eq,"$nacionalidad_type",cb7_anglesaxon),
(faction_get_slot, ":cult", "fac_player_supporters_faction", slot_faction_culture),
(try_begin),
(eq, ":cult", "fac_culture_angle"),
(faction_set_slot, "fac_player_faction", slot_faction_deserter_troop, "trp_angle_deserter"),
(faction_set_slot, "fac_player_supporters_faction", slot_faction_deserter_troop, "trp_angle_deserter"),
(faction_set_slot, "fac_player_supporters_faction", slot_faction_guard_troop, "trp_angle_level1_landed"),
(faction_set_slot, "fac_player_supporters_faction", slot_faction_messenger_troop, "trp_angle_messenger"),
(faction_set_slot, "fac_player_supporters_faction", slot_faction_prison_guard_troop, "trp_angle_prison_guard"),
(faction_set_slot, "fac_player_supporters_faction", slot_faction_castle_guard_troop, "trp_angle_castle_guard"),
(faction_set_slot, "fac_player_faction", slot_faction_guard_troop, "trp_angle_level1_landed"),
(faction_set_slot, "fac_player_faction", slot_faction_messenger_troop, "trp_angle_messenger"),
(faction_set_slot, "fac_player_faction", slot_faction_prison_guard_troop, "trp_angle_prison_guard"),
(faction_set_slot, "fac_player_faction", slot_faction_castle_guard_troop, "trp_angle_castle_guard"),
I started a new game, created my own kingdom, but the town troops (both recruits and guards) are still saxon instead of angle.
What else should I do to change my troops culture from Saxon to Angle?
 
I'm trying to figure out how the weapon breaking system works, I think that the code responsible for it is almost all found in the module mission templates file. I can see that it calls the agent_is_parrying script or something like this, but this just seems to be a script forcing the agent to use the parry animation when their weapon breaks. Is this right?
 
Custom Camera for VC

Does anyone have a working custom camera script for VC. The only ones I can find are for WB and they throw a syntax error if you use them and compile. Even if there is just a way to modify the zoom out to give a full body view that would work for me.
 
Custom Camera for VC

Does anyone have a working custom camera script for VC. The only ones I can find are for WB and they throw a syntax error if you use them and compile. Even if there is just a way to modify the zoom out to give a full body view that would work for me.
Sorry, haven't seen your message at that time. What is the syntax error which you get? Which one are you trying to implement?
 
Back
Top Bottom