Modding VC: basic tutorials and Q&A thread

Users who are viewing this thread

Can anyone explain to me in great detail the purpose of "no swing" weapons? They weren't present in the Native so I want to know what their purpose is. I'm thinking about re-balancing Viking Conquest for myself but I don't want to begin until I know for certain if it's necessary to change the "no swing" weapons in addition to regular, in-game weapons. I'd also like to know if it's necessary to make new "no swing" weapons when I add new weapons that have a thrusting attack like the Long Knobbed & Spiked Maces I'm thinking about importing from Native.
 
Templar_Maluxul said:
Can anyone explain to me in great detail the purpose of "no swing" weapons?

VC has a custom Formations and Combat AI. The code is available on the modsys, while Native code is done (mostly) inside the engine.

In certain situations the new code can decide to change the weapon utility for soldiers, forcing them to do thrust attacks instead of swing. To do that the modsys creates a clone of those weapons that can only stab, and replaces the agent weapon with the clone variety.

normal weapon found on module_items.py
Code:
["spatha", "Sword", [("Sword02",0),("Scabbard02", ixmesh_carry)], itp_merchandise|itp_type_one_handed_wpn|itp_primary|itp_no_blur, itc_longsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn,
 2790 , weight(1.15)|abundance(10)|difficulty(6)|spd_rtng(92) | weapon_length(81)|swing_damage(23 , cut) | thrust_damage(18 ,  pierce),imodbits_sword,
  [], [fac_kingdom_5, fac_kingdom_6, fac_kingdom_7, fac_kingdom_8]],
this "Sword" had two types of attack: swing (23 cut damage) and thrust (18 pierce damage).

The clone would only have the thrust part.

You can see the function on header_items.py. And you can use a tool like Morgh's to examine the items_kind.txt clones if you are not comfortable with Python.

Cheers
 
Here's two questions and a minor (re)quest at the end for anyone interested.

1. How did the developers make the Seaxes appear on the back? I know that they're placed under "carry_quiver_back_right" but how did they manage to make the actually appear where they should be? I have looked at the Seax's scabbard with OpenBRF and I've noticed that it's positioned significantly differently than Axes and Spears which are always in a default, horizontal position. I understand that the Seax scabbard needs to be rotated and adjusted because the "carry_quiver_back_right" was made for arrow quivers but I want to know HOW the developers did it. So the actual question here is: How did they know how much to rotate/move the scabbard? Can they somehow attach it to a 3D model and rotate/move it until it's in the place that they want to be? Can that be done in OpenBRF or do I need something else for that?

2. How can I return the Trainer skill to it's original state? Currently the Trainer skill only has 5 levels instead of the original 10 and I want to change that. I would like to do the same for the Sea-King to make those Snekkja and Karvi ships more desirable for troop transportation. They'd still be terrible for large naval battles because your troops would be all over the place but you'd consider using them to transport a 200+ army if you could have 10 of them. Right now I just sell all the ships I manage to capture because I can only command 4.
__________________________________________________________________________________________________________________________

You're looking for a quest? I've got something you could take care of...

Could someone do a little editing of the troops.txt file? For me, non-Python user, it's just a bundle of numbers. For a Python user, it's a wall of properly written text. And that person can do what I can't - quickly alter certain things.

So here's what I want you to do: remove the item modifiers which WILL BE present in the troops.txt file. I know that because I've been using Morpgh's Editor to fiddle around with troops and I've noticed that an error pops on certain troops. The reason this error appears is because those troops have items with predetermined item modifiers on them (ex. Rusty Sword, Cracked Spear, Battered Shield). One of those troops is Reginhard. You'll see in-game that he spawns with ragged clothes, bent javelins and a cracked light long spear. This was not the case in Native. None of the troops had predetermined modifiers thus this error was never encountered in Morgh's Editor. Brunhild for example has no items with predetermined modifiers so you can edit her just fine with Morgh's Editor.

I assume that these item modifiers can be quickly found and deleted with Ctrl+F function so that's why I'm making this request. If I'm correct then this will be a few minutes work for the one who decides to do it. The words to look for should be: cracked, rusty, bent, chipped, battered, tattered, ragged, crude, heavy, balanced, tempered, sturdy, thick, hardened, reinforced. I believe that "positive" modifiers will likely not be present on any of the troops but I listed them anyway, just in case.
I can offer you only my gratitude if you do this and I'm certain you'll earn a bit of renown and honor as well.

That is all.  :grin:
 
Templar_Maluxul said:
1. How did the developers make the Seaxes appear on the back?

2. How can I return the Trainer skill to it's original state?

1) use of the correct flags are you mentioned, and by working on a 3D software you can easily work on rotation angles. If you don't know how to do that you can always use the OpenBRF functions that copy the position of a template and apply to a second model. Visit the tool subforum if you need help with that.

2) Edit the module_skills.py (or skills.txt). The value of 5 is done for balance, if you increase it you will break the training of troops, but that is up to you.

If you don't want to learn how to work with modsys then visit the Tweaks thread. That is the place we talk about editing .txt files.

Cheers
 
kalarhan said:
1) use of the correct flags are you mentioned, and by working on a 3D software you can easily work on rotation angles. If you don't know how to do that you can always use the OpenBRF functions that copy the position of a template and apply to a second model.

Please tell me how to do this. I need to know how to return sword scabbards to the default position that weapons are always in so I can properly change the dimensions of those scabbards because apparently they stretch very weirdly when I try to make adjustments to them while they're angled and displaced. I didn't encounter that problem with weapons themselves tho. And of course, I'll need to return the scabbards to their weird, angled position once I'm done them.
 
Templar_Maluxul said:
Please tell me how to do this.

we don't have many 3d artists modding VC, so you will probably have more luck if you ask in the Forge (place to discuss all things related to modding), in special in the OpenBRF subforum (tool)

you can also wait to see if someone replies in here. I will not go into more details personally, as 3D work is something I only do on a amateurish way.

Cheers
 
One thing I've wanted ever since about the 3rd time in the mount and blade arena fights that I knocked out an NPC fighter and only managed to block one of his unofficial teammates lunging straight through his body to knock me out.....

I've not seen it, but has anyone ever, or is it even possible to mod "corpses" to stay solid for another second or two after being killed/unconscious?

After the hundredth time of getting taken out by the intangible strike of a man swinging straight through his comrade's body this became a dream of mine. After the three hundredth time, I tried to forget the dream and just try not to fight back when people are ready to swing behind my target, but now I have a limited stamina.
 
Need a little help for modding something of the startsituation, the VC standard sandbox play:

1) Faction stances - this i found in factions.txt, no help needed for the decimal values, has been easy to understand.

2) Faction money aka money-amount of the faction actors at the start - in which file, i could modify the startmoney of kings and lords?
2a) Is it possible overall, or solely determined by their fiefs and position?

3) Unit upkeep cost - in which file, i could modify the weekly upkeep of the culture units (fe. heavy inf norse, heavy inf angle, medium/heavy cavalry ..., etc.)?

My search in the files, as of yet, has been to no avail for no. 2)/2a) and 3).

At last, do we have a tool for these according changes? (i assume, TweakMB is not fitting for these tasks)
 
DaVincix said:
Need a little help for modding something of the startsituation, the VC standard sandbox play:

you may be able to tweak some values with the .txt files. For that visit the Tweaks thread.

for modding you will need to download the game source (modsys or .py files). A version with tweaks applied can be found on the "VC Tweaks Tool" thread for 2.025.

faction relations is random (not the values from factions.txt or module_factions.py), starting values are set on "script_game_start" and upkeep is also done via script.
 
kalarhan said:
DaVincix said:
Need a little help for modding something of the startsituation, the VC standard sandbox play:

you may be able to tweak some values with the .txt files. For that visit the Tweaks thread.

for modding you will need to download the game source (modsys or .py files). A version with tweaks applied can be found on the "VC Tweaks Tool" thread for 2.025.

faction relations is random (not the values from factions.txt or module_factions.py), starting values are set on "script_game_start" and upkeep is also done via script.

Upps. Then my whole modding plan for the startsituation, which i described in the other thread, seems to be obsolete?

Interestingly, my factions.txt changes at least changed the starting relations in comparision to all my former sandbox starts to what i did in factions.txt, not 100 %, but tendentially. Actually, starting wars were different in my current play after the changes in factions.txt, reflected to a good part my value changes.
... a little improvement for my campaign idea has been achieved already with this. I hope at least that these changed start relations in factions.txt had an impact on the start, or is it a 100 % random thing and i have been bluffed somehow?

EDIT

I play with 2.032 beta.

As already expressed, i planned only a very little effort on VC modding. The described way from you above seems to be for me too much of effort. I had already a look into the according forum parts.

If we had a complete proper GUI tool for VC, the "modding-world" for VC would look different, i guess. Edit: I remember, TweakMB for Warband was already very good for the possible changes. But it offers nothing for the startsituation and balancing it for faction (historical) outcome tendencies (lord money, faction stances, unit upkeep and such).
 
DaVincix said:
or is it 100 % random?

you can change anything you want with the modsys, including how the random relation system works. For sandbox it makes a dynamic game start, so each new game has different relations (wars, alliances, truces). You can disable it, change it, whatever you like.

read the first post for a general idea on modding with modsys (OP)
 
Thanks for the info and advice, very appreciated. See also my EDIT in my former post.

Anyway, i'll check once more the OP here.
Edit:
Yeah, actually i have already cross-read through all the related/linked stuff during the days since i re-entered the forums, some things i have read in detail. My result is: Good and helpful for all who plan deeper modding with investment of the required time, or simply wanna apply the tweaked version. Both these cases aren't for me. 
 
DaVincix said:
Both these cases aren't for me.

that is cool. As the game is 3 years old your chances of getting replies on the tweaks thread (.txt stuff) is low, as that was something we did before the modsys was available for download (so between game version 1.0 to 2.0). With Reforged Edition and the modsys the community moved to the "VC Tweaks Tool" (automatic tweaks), true modding (modsys) or just using the old tweaks listed.

you should visit the Tweaks thread anyway and see if some of those (~100) can help you.

and the "VC Tweaks Tool" is also available. Considering it takes about 10 minutes to learn how to use it and apply ~80 tweaks to your game, even with no modding know-how, it is not a bad resource  :mrgreen:
 
Which file/s determine the following aspects:

a) Lords faction.
Meant is to which faction a lord belongs.

b) Town/castle/village ownership.
Meant is to which faction the settlements belong.

These questions for the start setting (of sandbox play).


Background
I would like to make a mere historical setting along the title "Viking Conquest" ( not what the sandbox game balance suggests, a "Mercian Conquest" * :wink: ).
For me, this means that: (for the sake of modding/effect simplicity)
- East-Engle lords mainly belong to Danmark (except Eadmund, its king).
- East-Engle settlements belong to Danmark (except Dunwic and its villages).
These changes are my current modding goals.

* or "Angle-Saxon Conquest". I would like to do a historical play along "The Great Heathen Army".
In VC game terms, also as for modding simplicity/effect, that at least means that Norse troops are bit stronger and Norse characters are consiberably stronger (did this already with troops.txt and it has a slight effect on the faction/battle outcomes). Knowing, that the game mechanics merely don't allow a setup with such a big invading heathen army, ie. up to ca. 1500 "Northumbrians" under Halfdan and ca. same number under Danish control within East-Engle. Just at 868 AD, historically East-Engle was already mere under Danish control, so the above change is imo. due to slightly allow what the game title suggests. At 869 AD,  Eadmund of East-Engle died heroicly, and with this, East-Engle as Angle-controlled realm was no more.
Question remains for me in this regard: Has VC game engine script mechanics to let that happen, that to a certain date, a character dies? Alternatively, i hope i can provoke the quasi-distinction of East-Engle and Eadmund with the above described balance changes.
Possibly or potentially, such changes will hinder Mercia also to get an upper hand by the default game balance. Ideally, Northumbria and Danmark would remain allied during the game versus Mercia, until at least Mercia is halfed in its power aka lost half of its settlements to Northumbria and Danmark.

Btw., if a very capable VC modder is up to teamup with me to realise a "historical-play VC", please express so, that we can speak about such a modding project.
I personally am a veteran (retired) modder, but never was that in Warband (modded that years ago with TweakMB, but not more) and esp. not for VC, and have not anymore the will to go deep into coding etc., but just can make the modding design and would have fun in this role.
 
Lord's faction is set in module_troops.py, though they're refffered to as knights (and kings are 'lords') in this file. Eg:
["knight_1_1", "Jarl Sigifrid Angantyrsson", "Sigifrid Angantyrsson", tf_bajo|tf_hero, 0, reserved,  fac_kingdom_1,
[itm_common_pony,itm_carbatinae_11qs,itm_lamellar_armor2,itm_leather_gloves,itm_noble_sword,itm_tab_shield_round_09_device,itm_vikingold_elitehelm8,itm_longseax10,itm_throwing_spears,itm_trophy_b],
  lord_attrib,wp(380),knows_lord_1|knows_navigation_8,0x0000000f401046515cf671b5558dd89300000000001e38f30000000000000000],

Center factions are set in script_game_start in module_scripts.py:
#Give centers to factions first, to ensure more equal distributions
        #chief da ciudades
        (call_script, "script_give_center_to_faction_aux", "p_town_1", "fac_kingdom_5"),
        (call_script, "script_give_center_to_faction_aux", "p_town_2", "fac_kingdom_5"),
        (call_script, "script_give_center_to_faction_aux", "p_town_3", "fac_kingdom_8"),
        (call_script, "script_give_center_to_faction_aux", "p_town_4", "fac_kingdom_1"),


I'm not sure about the other stuff.
 
kraggrim ?️ said:
Lord's faction is set in module_troops.py, though they're refffered to as knights (and kings are 'lords') in this file. Eg:
["knight_1_1", "Jarl Sigifrid Angantyrsson", "Sigifrid Angantyrsson", tf_bajo|tf_hero, 0, reserved,  fac_kingdom_1,
[itm_common_pony,itm_carbatinae_11qs,itm_lamellar_armor2,itm_leather_gloves,itm_noble_sword,itm_tab_shield_round_09_device,itm_vikingold_elitehelm8,itm_longseax10,itm_throwing_spears,itm_trophy_b],
  lord_attrib,wp(380),knows_lord_1|knows_navigation_8,0x0000000f401046515cf671b5558dd89300000000001e38f30000000000000000],

Center factions are set in script_game_start in module_scripts.py:
#Give centers to factions first, to ensure more equal distributions
        #chief da ciudades
        (call_script, "script_give_center_to_faction_aux", "p_town_1", "fac_kingdom_5"),
        (call_script, "script_give_center_to_faction_aux", "p_town_2", "fac_kingdom_5"),
        (call_script, "script_give_center_to_faction_aux", "p_town_3", "fac_kingdom_8"),
        (call_script, "script_give_center_to_faction_aux", "p_town_4", "fac_kingdom_1"),


I'm not sure about the other stuff.

Thanks a lot for a quick answer!

And fac_kingdom_number and p_town_number, in which files i can find the real names (faction and location)?

See also my editing, personally i have not much fun with learning and coding in game engines which i don't know, anymore.
Thus, would you be able to make the following changes, perhaps in a quick manner, and make the files available for dl?
- East-Engle lords mainly belong to Danmark (except Eadmund, its king).
- East-Engle settlements belong to Danmark (except Dunwic and its villages).

I would be infinitly thankful :smile:

EDIT

Guess, nobody will volunteer for the above changes.

Questions remain:
- Watched in the source, i can't find a real-name list for kingdoms and settlements, what do i miss? Is there thread somewhere which defines the numbers with real-names?
- The dl'ed VC source is for VC 2.028, will such changes work for VC 2.032 beta, i guess yes, because no changes since 2.028 in the according files? Correct?
- And how exactly is the path to get these .py files working (as i can't find .py files in the default file setup)? Btw., i'm using a named module folder, "VC Modtesting", based on 2.032 beta. 
 
DaVincix said:
And fac_kingdom_number and p_town_number, in which files i can find the real names (faction and location)?
Module_factions.py and module_parties.py.

See also my editing, personally i have not much fun with learning and coding in game engines which i don't know, anymore.
Thus, would you be able to make the following changes, perhaps in a quick manner, and make the files available for dl?
- East-Engle lords mainly belong to Danmark (except Eadmund, its king).
- East-Engle settlements belong to Danmark (except Dunwic and its villages).
I would be infinitly thankful :smile:
I've got other modding stuff to focus on I'm afraid. But you should be able to work it out using the info I've provided, and read kalarhan's helpful posts and guides at the beginning of this thread.
 
You're welcome. and good luck!





I have my own question for the thread. Does anyone know where the spread of snow on the world map is determined? I'm guessing it's mbsrc.fx, but I've not been able to find that particular part (it's seemingly in a different coding language and is quite difficult to interpret.
 
DaVincix said:
- The dl'ed VC source is for VC 2.028, will such changes work for VC 2.032 beta, i guess yes, because no changes since 2.028 in the according files? Correct?
- And how exactly is the path to get these .py files working (as i can't find .py files in the default file setup)? Btw., i'm using a named module folder, "VC Modtesting", based on 2.032 beta.

Download source and assets https://forums.taleworlds.com/index.php/topic,349080.0.html or https://www.taleworlds.com/en/Games/VikingConquest/Download.

Once devs release 2.032 they will also update the downloads.

You can use source from 2.028 with assets (textures, meshs, world map, sounds, ...) of 2.032, but any bugfixes/etc done in the code will of course not be present until you get your hands on source 2.032
 
Back
Top Bottom