Modding VC: basic tutorials and Q&A thread

Users who are viewing this thread

How can I change some of the companions from Christian to Pagan? I want to edit some existing companions for an all-norse playthrough, and I want the edited ones to be pagan once I give them a fief. Related question, where can I add companions to the existing in-game companions menu?
 
Romuva said:
How can I change some of the companions from Christian to Pagan?
religion is defined on a slot

Code:
slot_troop_religion	= 16
1 for cristian, 0 for pagan

where can I add companions to the existing in-game companions menu?
which one? Screenshot or more details to help identify it.
 
which one? Screenshot or more details to help identify it.

It's this one, from the character screen-companions-view companions.
CDQqmv0.jpg
 
Romuva said:
It's this one, from the character screen-companions-view companions.

this screen is a presentation (so module_presentation.py), not a menu (module_game_menus.py). Presentations are custom built (you decide what goes where).

it was created for the specific number of companions in the game, so you will need to do some coding to expand it for more. You can either add a scroll-able component, a page turner or reduce the portraits to fit more than 16 in 1 screen. Up to you.

Code:
  # "prstn_show_companions"
  # VC-2380 Companions Presentations: companions are displayed as
  # cards on a deck, with a central portrait that shows extra info
  # if you select (click) on one of them
  # check module_constants for the configuration variables
  ("show_companions", 0, 0, [

module_constants.py has some settings for it
Code:
# Companions presentation: deck of companions (each is a card) with central portrait and info
companions_prsnt_debug = 0 # 0: OFF, 1: show extra info
companions_prsnt_show_members_not_in_party = 0 # 0: black card, 1: grey out card, no name, 2: grey out card, show name
companions_prsnt_show_lords = 0 # 0: won't show companions that are now lords, 1: shows
companions_prsnt_show_storyline_mode = 0 # 0:disable for storyline, 1: enable this
 
NPC99 said:
Look at the banners. There's little overlap between banner_briton214 & banner_anglosaxon21. They can be quickly combined & only need a little tidy up with a clone tool.

Cheers, friend. Here's how it turned out - quite well, I'd say.

GbKm44O.png

WguieDS.png
 
kalarhan said:
TK eden said:
How can I change armor of the soldier

see file module_troops.py, that is where you create the soldiers and add their gear (weapons, armor, horses, ...).

trp_saxon_elite Bodyguard_(Hearthweru) Bodyguards_(Hearthwerus) 0 133169152 0 0 8 0 0
  170 0 209 0 898 0 780 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0
  16 8 12 12 29
140 90 170 90 80 150 0
0 327680 0 37718 619584 0
  16173244419 3952873730080618203 1947355 0 68534964552 3952873730080618203 1947355 0

this one?

 
TK eden said:
kalarhan said:
TK eden said:
How can I change armor of the soldier

see file module_troops.py, that is where you create the soldiers and add their gear (weapons, armor, horses, ...).

trp_saxon_elite Bodyguard_(Hearthweru) Bodyguards_(Hearthwerus) 0 133169152 0 0 8 0 0
  170 0 209 0 898 0 780 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0
  16 8 12 12 29
140 90 170 90 80 150 0
0 327680 0 37718 619584 0
  16173244419 3952873730080618203 1947355 0 68534964552 3952873730080618203 1947355 0

this one?

I've changed the code , :cry: but it did not work
 
TK eden said:
this one?

module_XXX.py are found on the modsys. See initial posts for links to tutorials and guides on how to work with modding and coding.

you may be able to use Morgh's with the troops.txt if that is your preference. Visit Forge > Tools section for more info.
 
I go into scene editing mode and adjust the weather parameter values that I like for this weather and time of year to get the right lighting..
for example..
Ambient: myR, myG, myB
SunLight: myR, myG, myB

Where in the code do I need to make changes to get my myRGB in the scenes?

for example..
season: summer
time of day: noon
weather conditions: overcast
Code:
  ("calculate_season_light",
    [(set_fixed_point_multiplier, 100),
      (position_get_x, reg1, pos1), # r
      (position_get_y, reg2, pos1), # g
      (position_get_z, reg3, pos1), # b
      ...
        (eq, "$shader_season", shader_summer),
        (val_mul, reg1, 145),
        (val_mul, reg2, 145),
        (val_mul, reg3, 130),
_______________________________________
      # light
      (set_fixed_point_multiplier, 100),
      (try_begin),
        (store_time_of_day, ":day_time"),
        (is_between, ":day_time", 4, 20),

        (get_startup_sun_light, pos1),
        (call_script, "script_calculate_season_light"),
        (set_startup_sun_light, reg1, reg2, reg3),
 
        (get_startup_ambient_light, pos1),
        (call_script, "script_calculate_season_light"),
        (set_startup_ambient_light, reg1, reg2, reg3),
SunLight
R=145*100*100=1450000
G=145*100*100=1450000
B=130*100*100=1300000

Ambient
R=145*100*100=1450000
G=145*100*100=1450000
B=130*100*100=1300000

Code:
I didn't find the modifier..

Code:
            (eq,":scene","scn_multi_scene_inv_5"),#cloudy, dark dusk
            (set_skybox, 6, 7),
            (set_fog_distance, 250, 0xFF928055),
            (set_fixed_point_multiplier,255),
            (set_startup_sun_light,410,330,190),
            (set_startup_ambient_light,60,40,10),
SunLight
R=410*255=104550
G=330*255=84150
B=190*255=48450

Ambient
R=60*255=15300
G=40*255=10200
B=10*255=2550

and what to do with seasonal lighting?  :???:

and..
Code:
skybox_overcast_01 268435504 180.000000 19.170000 0.000000 pfx_overcast
 0.400000 0.350000 0.310000  0.000000 0.000000 0.000000  0.196078 0.235294 0.403922  120.000000 4284510352
SunLight R=0.400000 G=0.350000 B=0.310000
Ambient R=0.196078 G=0.235294 B=0.403922
And how to translate these coefficients into real values R G B weather settings?

Code:
pfx_overcast 0 0  128.000000 1.000000 0.980400 0.000000  0.313700 2.666700 2.000000 0.000000  0.980400 0.980400 1.031400 1.000000
AmbientColorCoef = 0.980400
SunColorCoef = 0.980400

p.s. sorry for my English  :oops:
 
ha3481 said:
I go into scene editing mode and adjust the weather parameter values that I like for this weather and time of year to get the right lighting..

mission templates are modified by triggers. Start by looking at the weather triggers

Code:
vc_weather = vc_water + vc_wind + vc_seasons + thunder_storm

for effects on sea, wind, thunder, etc.
 
I added four companions to a personal mod and when I started it to test found they had replaced the kings of Northvegr, Danmark, Friese, and Laithland. Followed the tutorial by Malik Faris https://forums.taleworlds.com/index.php?topic=130815.0 why do you think this happened?
 
Ryantheskinny said:
I added four companions to a personal mod and when I started it to test found they had replaced the kings of Northvegr, Danmark, Friese, and Laithland. Followed the tutorial by Malik Faris https://forums.taleworlds.com/index.php?topic=130815.0 why do you think this happened?

when talking about code we can either start a guessing game, or see the actual code. First is unreliable, takes a lot of time and usually doesnt help much. Second is the short/quick path to solve issues.

So if you show us what is going on (screenshots, video, etc) and show us your code changes, that would be easier to understand what you are trying to say and what may be wrong with your changes.

Do remember that VC is not Native, most of the code is unique/changed, which means that Native tutorials are just a reference, they cant for most part be followed step by step.
 
Back
Top Bottom