Modding VC: basic tutorials and Q&A thread

Users who are viewing this thread

kwbudirt said:
I have been trying to download the module system for two days and the server keeps timing out. Can anyone help me obtain the Viking conquest module system?

Coincidentally, we have just put this up:

source link:
wanted to create my own banner, but dont want to overwrite existing lords banner.  noticed there is an "" and "" 

are these player only?


PS. if anyone has a blank banner texture lying around, id really appreciate it  :grin:
I seem to remember that those extra ones are used when you make companions into lords. But the one you've chosen won't be used I think, so you should be fine to edit them.

I don't remember seeing a blank banner file, there could b e one floating around somewhere though.
kraggrim said:
I seem to remember that those extra ones are used when you make companions into lords. But the one you've chosen won't be used I think, so you should be fine to edit them.

I don't remember seeing a blank banner file, there could b e one floating around somewhere though.

thanks for the quick response. I'll start playing around with them.  Looking forward to your tweaks update.  you do fantastic work.
if anyone wants a clean image

yep its black, but with some photoshop is easy to change color
crazyjayp said:
if anyone wants a clean image

yep its black, but with some photoshop is easy to change color

white one (even tho not the same texture as yours):

Tordiato said:
crazyjayp said:
if anyone wants a clean image

yep its black, but with some photoshop is easy to change color

white one (even tho not the same texture as yours):


yea, thats the one from warband.  mine is cleaned up from VC.  I wish i would have saved the white version to share before i changed to black, but it is what it is.
HI. Hope someone can help me. I am trying to add voiced dialog to my character's wife. I have searched every combination of key words of which I can think and nothing doing. Is it possible to add sounds to dialog? Can someone post a link to a guide or give the steps. Thanks very much.

Edit: I have studied the dog dialogs as that is probably the way to go but can't figure out: $player_dog_agent_no
  [anyone|plyr, "dog_talk_2",[],"Go, {s1}, go!", "close_window",[(assign, "$dog_order", 0),(agent_play_sound, "$player_dog_agent_no", "snd_dog_bark"),]],

a search of the source files listed "player_dog_agent_no" only occurs in variables.txt

knowing that. I:
1. placed my wifehello.wav file in  VC modded Sounds folder
2. placed wife_hello in variables.txt
3. added    ("wife_hello", sf_vol_12|sf_priority_5|sf_stream_from_hd,["wife_hello.wav"]), after the last line but above the final ] of
4. Changed this line in the spouse_talk section of

    "Yes, my husband?", "spouse_talk",[

    "Hello, {playername}?", "spouse_talk",[ (agent_play_sound, "$wife_hello", "wife_hello"),

got two errors in
unrecognized tag in object: wife_hello
illegal identifier wife_hello

any suggestions?
thanks a million.
Thanks Motomataru!! that did the trick. Voiced dialog really adds to immersion. Now to give some other npc companions some things to speak by adding sounds,
Conversations take place in scenes. Instances of troops in scenes are given an agent ID. In the case of the dog, that was set somewhere. More generally, it's "$g_talk_agent" -- set in what is now the fourth (initialization) dialog.

All sounds are prefixed by "snd_" when referenced, just as all items are prefixed by "itm_"

Finally, the compiler generates variables.txt, which one must copy back from the execution folder to preserve save game compatibility.

So, undo your change there and:

"Hello, {playername}?", "spouse_talk",[ (agent_play_sound, "$g_talk_agent", "snd_wife_hello"),
kraggrim said:
		(0, 0, ti_once, [], [
                 (party_get_slot, ":town_lord", "$current_town", slot_town_lord),  
		 (troop_get_inventory_slot, ":weapon_0", ":town_lord", ek_item_0),
		 (troop_get_inventory_slot, ":weapon_1", ":town_lord", ek_item_1),
		 (troop_get_inventory_slot, ":weapon_2", ":town_lord", ek_item_2),
		 (scene_prop_get_instance, ":weapon_rack", "spr_weapon_rack", 0),
		 (prop_instance_get_position, pos0, ":weapon_rack"),
		 (position_move_y, pos0, 5, 0),
		 (position_move_x, pos0, 50, 0),
		 (position_move_z, pos0, 80, 0),
		 (position_rotate_x, pos0, -85),
		 (set_spawn_position, pos0),
		 (spawn_item, ":weapon_0", 0, 0),
		 (prop_instance_get_position, pos1, ":weapon_rack"),
		 (position_move_y, pos1, 5, 0),
		 #(position_move_x, pos1, 50, 0),
		 (position_move_z, pos1, 80, 0),
		 (position_rotate_x, pos1, -85),
		 (set_spawn_position, pos1),
		 (spawn_item, ":weapon_1", 0, 0),
		 (prop_instance_get_position, pos2, ":weapon_rack"),
		 (position_move_y, pos2, 5, 0),
		 (position_move_x, pos2, -50, 0),
		 (position_move_z, pos2, 80, 0),
		 (position_rotate_x, pos2, -85),
		 (set_spawn_position, pos2),
		 (spawn_item, ":weapon_2", 0, 0),
My attempted lord weapon display mission trigger looks even worse in VC:
The code is the same so I'm confused as to why they're much lower down.
Uh I could be wrong Kraggim as I am far from being well versed in modding but I believe I've been told that everything in VC isn't at the same scale as it is in native and that we just don't realize it the because they look the same to our perception? Like everything could be half the size of what they normally would be and we wouldn't notice because they still look proportional when compared to everything that surrounds it?
I don't think it's that as the amount they've been moved sideways is correct. I found 2 towns in Native have this problem, they both seem to be classified as outdoors scenes rather than indoors. But all the VC castle interiors are indoors...

Edit: Tried commenting out everything else in the mission template, no change so thats not it.

Interestingly if I place the rack half way into the wall the weapons don't drop, they seem to be held up by the wall mesh:
Maybe I could spawn some kind og invisible mesh prop in the rack to stop things dropping.
for newbies like me--
1- who want to have an old good "jousting lance" in VC-reforged without adding too much item{no mod for it out there} :cry:---
1-copy weapon_meshes1.brf from CommonRes folder of warband to Resource folder of VC-RE.

2-copy all the & weapons1_*.dds{i.e.any file that has weapon and 1 ,both in it} from Textures folder of Warband to Textures folder of VC-RE.

3-Open Module.ini file{with notepad} from installation folder of VC-RE & add following command in a new line at the end of "load_mod_resource column"---
load_mod_resource =weapon_meshes1

4-Open item_kinds1.txt {with notepad} from installation folder of VC-RE & add 1 to the sum of the digits already present there below line "itemsfile version 3". ex-1264+1=1265
Copy description of Jousting Lance from item_kinds1.txt file of Modules/native folder to;at the end of item_kinds1.txt of installation folder of VC-RE.

all done(& no idea that you had everything all along) :grin:,,i take any horse from one of my troops then use lance to hunt down enemy lords.Of course,mostly get my horse killed in the process that's why the spare horse then call my horse by pressing "H" & gallop away to safety of my troop formations. :wink:
2-Let hero-companions form own warbands, name the party "Heroname's Party", and be able to give them orders (which they will always obey).
Ex.- They will also join your battles if they are nearby;patrol around your village,can rejoin you and so on.
At the end of, insert the following:

hold_personality = aggressiveness_0 | courage_15

In, after the line...

[anyone|plyr,"member_castellan_talk", [], "[Leave]", "close_window",[]],

...insert the following:

  [anyone,"start", [(is_between, "$g_talk_troop", companions_begin, companions_end),
                    (party_get_template_id, ":partytemplate", "$temp"),
                    (eq, "$talk_context", tc_party_encounter),
                    (eq, ":partytemplate", "pt_player_patrol")
   "Yes?", "memberparty_talk",[(assign, "$g_leave_encounter", 1)]],

  [anyone|plyr,"memberparty_talk",    [],"I have a task for you.", "memberparty_order_ask",[]],

  [anyone,"memberparty_order_ask",    [], "What do you wish?", "memberparty_order",[]],
  [anyone|plyr,"memberparty_order",   [],"Follow me.","memberparty_follow",[]],
  [anyone,"memberparty_follow",       [],"All right. i'll be right behind you.","close_window",[
  [anyone|plyr,"memberparty_order",   [],"Wait here.","memberparty_stay",[]],
  [anyone,"memberparty_stay",         [],"Okay, we'll hold this position.","close_window",[
                                       (party_get_position, pos1, "$temp"),
  [anyone|plyr,"memberparty_order",   [],"Patrol this area.","memberparty_patrol",[]],
  [anyone,"memberparty_patrol",       [],"All right.","close_window",[
                                       (party_get_position, pos1, "$temp"),
  [anyone|plyr,"memberparty_order",   [],"Go to...", "memberparty_order_details_ask",[(assign, "$temp_1", spai_holding_center),]],
  [anyone|plyr,"memberparty_order",   [],"Patrol around...", "memberparty_order_details_ask",[(assign, "$temp_1", spai_patrolling_around_center),]],
  [anyone|plyr,"memberparty_order",   [],"Forget it.", "memberparty_pre_talk",[]],

  [anyone,"memberparty_order_details_ask", [], "Where?", "memberparty_order_details",[]],

  [anyone|plyr|repeat_for_parties, "memberparty_order_details",
     (store_repeat_object, ":party_no"),
     (assign, ":continue", 0),
       (eq, "$temp_1", spai_holding_center),
         (this_or_next|party_slot_eq, ":party_no", slot_party_type, spt_castle),
         (party_slot_eq, ":party_no", slot_party_type, spt_town),
         (assign, ":continue", 1),
       (eq, "$temp_1", spai_patrolling_around_center),
         (is_between, ":party_no", centers_begin, centers_end),
         (assign, ":continue", 1),
     (eq, ":continue", 1),
     (neq, ":party_no", "$g_encountered_party"),
     (str_store_party_name, s1, ":party_no")
     "{s1}", "memberparty_order_details_done", [ (store_repeat_object, "$temp_2") ]

  [anyone,"memberparty_order_details_done", [],"All right.","close_window",[
                                               (eq,"$temp_1", spai_holding_center),
                                               (party_get_position, pos1, "$temp_2"),
                                               (map_get_land_position_around_position, pos1, pos1,1),
                                               (eq,"$temp_1", spai_patrolling_around_center),
                                               (party_set_ai_patrol_radius ,"$temp",1),

  [anyone|plyr,"memberparty_talk",   [], "I want to discuss troop-management with you.", "memberparty_troops_done", [
     (display_message, "@allowed party size {reg0}"),

  [anyone,"memberparty_troops_done", [], "Okay.", "memberparty_pre_talk",[

  [anyone,"memberparty_pre_talk",    [], "Anything else you want to discuss?", "memberparty_talk",[]],
  [anyone|plyr,"memberparty_talk",   [], "I want to you to join me again.", "memberparty_rejoin",[]],

  [anyone,"memberparty_rejoin",      [(party_can_join)], "Very well, it will be nice traveling together again.", "close_window",[(party_join)]],

  [anyone,"memberparty_rejoin",      [(neg|party_can_join)], "I'm sorry, but you currently do not have enough capacity.","memberparty_talk",[]],
  [anyone|plyr,"memberparty_talk", [], "Nevermind.", "close_window",[]],

In, after the line...

[anyone|plyr,"member_talk", [], "I'd like to ask you something.", "member_question",[]],

...insert the following:

  [anyone|plyr,"member_talk", [(is_between, "$g_talk_troop", companions_begin, companions_end)],
    "I want you to form a warband.", "member_create_party",[]],

  [anyone,"member_create_party", [], "Great, but i hope you give me some good troops.","close_window",[
                     (assign, ":party", reg(0)),
                     (party_set_ai_behavior, ":party", ai_bhvr_hold),
                     (troop_set_slot, ":member", slot_troop_leaded_party, ":party"),
                     (party_add_leader, ":party", ":member"),
                     (str_store_troop_name, s5, ":member"),
                     (party_set_name, ":party", "@{s5}'s Party")

In, search for the line...


...and in this menu item further down for the lines...

            (gt, "$g_ally_party", 0),
            (call_script, "script_party_add_party", "$g_ally_party", "p_temp_party"), #Add remaining prisoners to ally TODO: FIX it.

...immediately below this, insert the following:

            (call_script,"script_cf_fix_party_size", "$g_ally_party",0),

Just a bit below, find the lines...

            (party_get_num_attached_parties, ":num_quick_attachments", "p_main_party"),
            (gt, ":num_quick_attachments", 0),
            (party_get_attached_party_with_rank, ":helper_party", "p_main_party", 0),
            (call_script, "script_party_add_party", ":helper_party", "p_temp_party"), #Add remaining prisoners to our reinforcements

...immediatelly below those, insert the following:

            (call_script,"script_cf_fix_party_size", ":helper_party",0),

In, after the "looters" party, insert the following:


In, search for "game_event_simulate_battle". This is a long one. Locate the following lines...

               (ge, ":collective_casualties", 0),
               (party_clear, "p_temp_party"),
               (assign, "$g_move_heroes", 0), #heroes are already processed above. Skip them here.
               (call_script, "script_party_add_party_prisoners", "p_temp_party", ":collective_casualties"),
               (call_script, "script_party_prisoners_add_party_companions", "p_temp_party", ":collective_casualties"),
               (distribute_party_among_party_group, "p_temp_party", ":root_winner_party"),
               (call_script, "script_clear_party_group", ":root_defeated_party"),

...Immediately below those, insert the following:

            (call_script,"script_cf_fix_party_size", "p_temp_party",0),

In, search for "let_nearby_parties_join_current_battle". In this, locate the following lines...

          (party_quick_attach_to_current_battle, ":party_no", ":enemy_side"), #attach as enemy
          (str_store_party_name, s1, ":party_no"),
          (display_message, "str_s1_joined_battle_enemy"),

...immediately below those, insert the following:

          (eq, ":dont_add_friends", 0),
          (party_get_template_id, ":partytemplate", ":party_no"),
          (eq, ":partytemplate", "pt_player_patrol"),
          (party_quick_attach_to_current_battle, ":party_no", 0), #attach as ally
          (str_store_party_name, s1, ":party_no"),
          (display_message, "str_s1_joined_battle_friend"),

In, search for the following line...

(faction_set_name, "fac_player_supporters_faction", "@{s1} Rebels"),

...immediatelly below this, insert the following:

#---BEGIN-LYX-Player Kingdomname without "...rebels"---------
              (le, "$supported_pretender", 0),
              (faction_set_name, "fac_player_supporters_faction", "@Kingdom of {playername}"),
#---END-LYX-Player Kingdomname without "...rebels"-----------

At the end of, but before the closing ], insert the following:

#identify party as patrol
#input: party
#output: reg0
#0 yes, 1 no
         (store_script_param, ":cur_party", 1),
         (eq, ":cur_faction", "fac_player_faction"),
           (assign, reg0,1),

#find all patrols and count them
#input: none
#output: reg0
#amount of existing patrols

           (call_script, "script_cf_is_patrol",":cur_party"),

#enforce patrol party size limit
#it is assumed that the party prisoner limit equals zero
#except for npc prisoners

#input: party, mode
#mode 0: delete all troops w/o doing anything else
#mode 1: all deleted troops are being added to the player party

#output: none (it uses reg0, but the information is useless outside of this script and its recursive brother)
         (store_script_param, ":cur_party", 1),
         (store_script_param, ":mode", 2),
         (call_script, "script_cf_is_patrol",":cur_party"),

           (party_get_num_prisoner_stacks, ":num_stacks",":cur_party"),

#a while do loop for cf_fix_party_size
#don't use it outside of the previous script
   ("cf_fix_party_size_recursive", #I am not exactly happy about the recursive
         (store_script_param, ":cur_party", 1),
         (store_script_param, ":mode", 2),
           (assign, ":to_del_stack",0),
           (assign, ":checker", 100),
             (assign, ":delta", ":num_troop"),
For VC-RE 2.025,use "dont_add_friends_other_than_accompanying" in place of "dont_add_friends" in module
& delete the # in front of relevant lines{with respect to "helper_party" segment} so they are no longer "commented out" in
Add what feature you want and leave rest;not necessary to make every change.
I have already deleted quite a few things that were not according to my taste and only posted the part of code that i have used/tested i.e. "companion orders"
whole work belongs to Lyx;i only made/tested VC-RE changes .follow the link below
working so far....------------
Q.----:?:only problem is when companion's troops join me{as they are nearby} in a battle; they are not under my control so how can i act like a marshal for those troops?? which files to change  :?:
any help is appreciated.. :grin:
P.s.--do i have to make changes in code "where a party attatches as ally"??
Edit--posting here as all things above refer to VC-RE,it was hard to figure out how to put a question without reference.
Hello again,
I could really use some help inserting a music track. I would like to play a piece of medieval feast music I found. When I select the option on the town/castle menu of throwing a symbel for my men, I want the music to play.

Here's what I've done but it has not worked.

1. I added the .wav audio clip titled feast.wav to the module's music folder.
2. Inserted the following line in the file:
####banquete moral mead chief
    "Order your men to leave their weapons outside and invite them to your Great Hall, to sit at your table by rank. The nearest and dearest sit close to you.^" +
    "Some girls serve meat and mead in large quantities. You've spent a lot of money on this feast because your men deserve it.^" +
    "They are the ones who bleed with you, who have helped you conquer your domains. They are your faithful followers.^" +
    "The evening progresses. Many men, drunk as vats, shout and sing. Some run off to vomit and others are fighting like gamecocks for the attention of a girl.^" +
    "Behind you, a bard sings of your power and deeds. You act like a lord. You are a lord, a 'shepherd of men.'",
      (set_background_mesh, "mesh_festin"),
  (play_track, "track_new_symbel", 1),
      ("banquete_ok",[],"You drink, laugh and shout as they come.",

3. Inserted this line in the file:
("morrigan_song", "ballad_of_a_hero.wav", mtf_module_track|mtf_persist_until_finished, 0),

#Bud's lively music
  ("new_symbel", "feast.wav", mtf_module_track, 0),

The build_module.bat completely ran with no errors.

I verified that the music.txt file contains this line:

ballad_of_a_hero.wav 268435712 268435712
feast.wav 268435456 268435456
battle_ambient_1.wav 301989888 301989888
battle_ambient_2.wav 301989888 301989888
So please help because I am stumped. Thanks very much.
@Kaladin, I know there are mods/tweaks out there that can set the player to always be marshal with friendly troops, you could look for those and try to adapt them for this.

@kwbudirt, there's a tutorial here to do with adding music to VC, maybe have a look there and see if there's anything useful:,336984.0.html .
Thanks. I red that tutorial thoroughly but it's focus is on general background music applied as a "tweak." I'm trying to work through the module files.
kwbudirt said:
I'm trying to work through the module files.

Modding is done by following examples (like the code you find on modules from Native and VC) and try and error. Isolate your variables when things don't work

1) Start with the most basic thingy. Use your menu to play a music already used in the game. Make sure that works, so you know there is no issues with what you are trying to do
2) Insert your new music and try playing it. If it fails you know your problem is most likely on: missing flags (module_music) or invalid file (your .wave). Figure out the first by using the same ones from (1) above and see if that fixes it

Remember to visit the Forge if you need help with generic issues like music, as you will find more modders to help there.
kwbudirt said:
I could really use some help inserting a music track.
Looks good to me! In addition to the bug tracking methods kalarhan suggested, I would check the recording levels of your track. Play both it and a VC piece through your media player with the same settings. They should sound about as loud.
Top Bottom