Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
kalarhan said:
Druidic said:
set them before the "Unused Animations"

its not before or after. You replace them (the Unused ones) with your new stuff (delete 1, add 1, delete 1, add 1).

Alright, I fixed it. I did as you showed, but there must've been an animation or something missing with the file itself earlier on, since the line numbers between a fresh animations.py file and the modded one didn't match up even after I removed the Tavern Animations. So, the horses are now fixed and working as they should. No CTDs, and no error messages. Thanks again.
 
Can someone explain me module_skins tuple?
More precisely that face texture part as it uses a lot of hexodecimal code for which i dont see use and by testing i found that part is responsible for my ctds so can someone explain what they do on what to set them etc...
 
DarkNord said:
Can someone explain me module_skins tuple?
More precisely that face texture part as it uses a lot of hexodecimal code for which i dont see use and by testing i found that part is responsible for my ctds so can someone explain what they do on what to set them etc...

By chance, I'm currently working on that.

("manface_young_2",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]),

First argument is the name of the face material
Second is an hexadecimal of the color multiplied on top of man_body8.dds to match texture. 0xff you ignore, cbe0e0 here is your color. So to get that value right, you need to open photoshop/gimp, put man_body8.dds and your face texture side by side, then put a colored shape layer on top of the body, put its fusion mode as "multiply" and play a bit with the color until the face and the body more or less match. For example, for a very pale face, you'll end up with a very light blue which will tone down the orangeness of the body texture.
Third argument is hair texture.
Fourth argument is a list of color for hair (multiplied on top of hair texture). Natively, hair texture is blond, so white hexa code will give you blond. In the example is a good color palette.
 
Thank you snouz  :grin:
and now
1,why would hair texture be there?
After i deleted all beards ( i copy/pasted male skin and step by step started adding my skin.and ofc renamed male to something new) i get a ctd in game so what should i do?
 
DarkNord said:
Thank you snouz  :grin:
and now
1,why would hair texture be there?
After i deleted all beards ( i copy/pasted male skin and step by step started adding my skin.and ofc renamed male to something new) i get a ctd in game so what should i do?

Could be anything. Always keep various versions of your module system and the rest so you can check differences later with winmerge in case of problem. Change things one by one to see the problem.

Here is our man skin for reference

Code:
  (
    "man", 0,
    "man_body", "man_calf_l", "m_handL",
    "male_head_new", man_face_keys, #snouz 3.8 male_head 
    ["man_hair_s","man_hair_m","man_hair_n","man_hair_o", "man_hair_y10", "man_hair_y12","man_hair_p","man_hair_r","man_hair_q","man_hair_v","man_hair_t","man_hair_y6","man_hair_y3","man_hair_y7","man_hair_y9","man_hair_y11","man_hair_u","man_hair_y","man_hair_y2","man_hair_y4"], #man_hair_meshes ,"man_hair_y5","man_hair_y8",
    ["beard_e","beard_d","beard_k","beard_l","beard_i","beard_j","beard_z","beard_m","beard_n","beard_y","beard_p","beard_o",   "beard_v", "beard_f", "beard_b", "beard_c","beard_t","beard_u","beard_r","beard_s","beard_a","beard_h","beard_g",], #beard meshes ,"beard_q"
    ["hair_blonde", "hair_red", "hair_brunette", "hair_black", "hair_white"], #hair textures
    ["beard_blonde","beard_red","beard_brunette","beard_black","beard_white"], #beard_materials
    [("manface_young_2",0xffcbe0e0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xffcbe0e0
     ("manface_midage",0xffdbe6d6,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xffdfefe1
     ("manface_young",0xffd3dddd,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xffd0e0e0
     ("manface_young_3",0xffcfe5e2,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xffdceded
     ("manface_7",0xffd3e8e4,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xffc0c8c8
     ("manface_midage_2",0xffe8e8f0,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xfde4c8d8
     ("manface_rugged",0xffe1eee4,["hair_blonde"],[0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xffb0aab5
      ("manface_new_2", 0xFFb0b6bd, ["hair_blonde"], [0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xffdfefe1
      ("manface_new_1", 0xFFc2c7c2, ["hair_blonde"], [0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xffdfefe1
      ("manface_new_4", 0xFFb8c4c4, ["hair_blonde"], [0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xffcbe0e0
      ("manface_new_3", 0xFFe2efe4, ["hair_blonde"], [0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xFFE0E8E8
      ("manface_white2", 0xFFd7dada, ["hair_blonde"], [0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xFFE0E8E8
      ("manface_mideast3", 0xFFbfc6c6, ["hair_blonde"], [0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xFFE0E8E8
      ("manface_mideast2", 0xFFbdb8b4, ["hair_blonde"], [0xffffffff, 0xffb04717, 0xff632e18, 0xff502a19, 0xff19100c, 0xff0c0d19]), #0xFFD0C8C1
      ("manface_mideast1", 0xFFa8a295, ["hair_blonde"], [0xff171313, 0xff007080c]), #0xFFAEB0A6
      ("manface_black1", 0xFF876c5c, ["hair_blonde"], [0xff171313, 0xff007080c]), #0xFF87655C
      ("manface_black3", 0xFF9f7f6a, ["hair_blonde"], [0xff171313, 0xff007080c]), #0xFF634D3E
      ("manface_african", 0xFF8f7868, ["hair_blonde"], [0xff120808, 0xff007080c]),  #0xFF807C8A
     ], #man_face_textures,
    [(voice_die,"snd_man_die"),(voice_hit,"snd_man_hit"),(voice_grunt,"snd_man_grunt"),(voice_grunt_long,"snd_man_grunt_long"),(voice_yell,"snd_man_yell"),(voice_stun,"snd_man_stun"),(voice_victory,"snd_man_victory")], #voice sounds
    "skel_human", 1.0,
    psys_game_blood,psys_game_blood_2,
    [[1.6, comp_greater_than, (1.0,eye_to_eye_dist), (1.0,temple_width)], #constraints: ex: 1.7 > (face_width + temple_width)
     [0.6, comp_less_than, (1.0,eye_to_eye_dist), (1.0,temple_width)],  
	 [1.5, comp_greater_than, (1.0,face_ratio), (1.0,mouth_width)],  # face ratio and mouth to nose distance
	 [0.6, comp_greater_than, (-1.0,nose_width), (1.0,mouth_width)],  # nose height and mouth to nose distance
	 [-1.0, comp_less_than, (-1.0,nose_width), (1.0,mouth_width)],  # nose height and mouth to nose distance
     ]
  ),
 
Hello everyone, I am very new to scripting, I just started 3 days ago. Anyways I was looking around for something that would always gurantee polearm weapons for soldiers when it is placed in their inventory. I found the script for it, I put it in module_scripts, and put a trigger in module_mission_templates, and everything worked. The problem is that I wanted to gurantee polearm weapons for Sands of Faith (and hopefully other mods). The module system only has the native files, and there is no ModSys for Sands of Faith. I asked on ModMB, and a person named rebelmarineha told me I should get WinMerge and compare the Native txt file, and my test mod (the one the ModSys and script went into), copy what's different, and paste it in the SoF txt folder. It worked for the scripts.txt, I found the code and copy/pasted it in the SoF scripts folder, however the mission_templates.txt has too many differences and I don't know which code in the txt file Im looking for. What can I do?

The module_mission_templates trigger is (call_script, "script_force_weapon", ":agent_no"),
How it looks combined with the other triggers in the file

common_battle_init_banner = (
  ti_on_agent_spawn, 0, 0, [],
  [
    (store_trigger_param_1, ":agent_no"),
    (call_script, "script_force_weapon", ":agent_no"),
    (agent_get_troop_id, ":troop_no", ":agent_no"),
    (call_script, "script_troop_agent_set_banner", "tableau_game_troop_label_banner", ":agent_no", ":troop_no"),
  ])
 
basedwontonsoup said:
always gurantee polearm

the script you are using is outdated now. The current version (1.170) of the engine has a flag for this. Add this to your header_troops.py

Code:
tf_guarantee_polearm          = 0x08000000

and you can use it on any troop just like the other guarantee flags.

--> its one of the updates added by the VC DLC and that can be used in any Warband mod. You should download modsys for 1.170 and check the new stuff

 
To kalarhan,

Thank you, I just downloaded the mod sys 1.171, however I still have a problem. I use Morgh's editor to edit/add troops and items and there isnt an updated version for it yet (since the update came out like a few days ago anyway), so if I want all my troops to have this 100% guaranteed, what would I need to do? Is there a code like the code that is next to the tf_guarantee_polearm that will have it 100% guaranteed?
 
Somebody said:
Morgh's editor doesn't need to be updated, you just copy your work work from the module system and merge your new troops with 1.171 as the base.

Im sorry if I come off as an idiot, I'm not the brightest person. What do you mean copy the work? How would I merge the new troops?

 
basedwontonsoup said:
How would I merge the new troops?

WinMerge or any other merging tool/app helps. Main files you need to update are the header_XXX.py files, as they have the updates for the engine. Rest depends on if you want MP or SP only on your mod, and what your base is (Native 1.153, Floris, ....)

http://winmerge.org/

remember to update your .py files, not the .txt files, as those are replaced when you compile your code (build_module.bat or similar)
 
Im still confused, sorry it's late and again, Im not very bright. What would be ideal is if the tf_guarantee_polearm          = 0x08000000 code could be changed to a code that guarantees it 100%.

Do you mean copy the tf_guarantee_polearm          = 0x08000000 code and apply it to my troops? It would come out as something different in the txt file, then I copy that code and place it in my Sands of Faith troops.txt folder for that soldier? Then what do I do if I want that to be applied to all the troops, I'd have to copy and paste the code for all the soldiers?
 
My base is MB Warband 1.170, I downloaded the new mod sys v.1.171 so the .py files are updated, I saw the polearms code already in there in the header_troops.py file.
 
hello everyone this is my first time asking here so bear with me XD

i have few questions i wanna ask :
  • is there a limit on how many villages a town or a castle can have like a castle will have 2 or 3 villages rather then 1 the same with towns 5 or so rather then max(if there is a max here) of 3
  • i'm not that perfect with coding but i'm not that useless as well so i was wondering how can i make custom events that pop up in a chosen date and will have results (like a new faction emerging as well as a faction leader death "of course using the osp here")
  • lol i might sound stupid here but how can i change the pic that is displayed when checking a faction or a town or a character in the notes menu i want to see other things then the once that are displayed like a picture or something for each town character and....etc)
  • how can i upgrade the version of my mod to work with newer versions of warband
  • i saw once i think a turkish guy made it i don't remember a cinematic short movie of texts that shows up when you are done creating your character i was wondering if maybe i can tweak it some how to play a short movie of maybe 3 mins rather then texts and if i can't do that  can i maybe play some kind of music in the background while the texts are showing up
  • how to allow the player to use certain animations like the ai(if that's the correct word) for example the tavern osp the townsmen are sitting how can i make the player use some kind of a key board key like "L" or something so when he is near a chair he can sit by clicking "L"and so on
  • the teleportation script i heard of it once but i can't find it can someone link me to it but to the question is there anyway i can use taverns in villages like maybe walking around the village reaching a door entering then the teleportation script is triggered and you get teleported to a tavern scene in one of the towns and when you get out you are in the village is this possible
  • do you think its too difficult to allow many options in one place for example in a fort captured by a player from bandits you can have options to build market which will allow the option to speak with a trader there and buy and sell stuff from him as well as building a castle "Upgrading that small fort to a castle" with huge amount of money and when you do you will get the options to upgrade the levels of the castle with diff scenes and new options and so on !
  • i saw in ACOK that you can make the Ai use some kind of animations like acrobatics stuff or so how can i do that cuz what i want to do is when you enter a huge town you will find some speaking there and some fighting  over something the guards walking (i found a really cheap trick to do that lol)
  • how can i use animations for a certain object like rowing animations for a ship and so on
  • what is the limit of polys for an object added to a scene to avoid lags and crashes
  • how to add items to the cheat menu for testing
  • how can i add living animals to a scene like horses not dead (objects)but alive they move and so on and how can i add more animals to the game
  • my most important question is how can i make the game use textures that i have rather then the ones using in the textures files so for example the terrain forest that we use for the campaign map i want to change it but how can i make the game read the changed texture from my mod will load_mod will do the trick replacing the native ones

i still have many questions but oh let's leave it for another time and work on these i don't care if they are hard or takes too much time to do as long as i can do them i'll do them so help tips and advices will be welcomed thank you all and i hope u can help me out thanks and cya!
 
imado552 said:
hello everyone this is my first time asking here so bear with me XD

i have few questions i wanna ask :
  • is there a limit on how many villages a town or a castle can have like a castle will have 2 or 3 villages rather then 1 the same with towns 5 or so rather then max(if there is a max here) of 3
  • i'm not that perfect with coding but i'm not that useless as well so i was wondering how can i make custom events that pop up in a chosen date and will have results (like a new faction emerging as well as a faction leader death "of course using the osp here")
  • lol i might sound stupid here but how can i change the pic that is displayed when checking a faction or a town or a character in the notes menu i want to see other things then the once that are displayed like a picture or something for each town character and....etc)


  • how can i upgrade the version of my mod to work with newer versions of warband
  • i saw once i think a turkish guy made it i don't remember a cinematic short movie of texts that shows up when you are done creating your character i was wondering if maybe i can tweak it some how to play a short movie of maybe 3 mins rather then texts and if i can't do that  can i maybe play some kind of music in the background while the texts are showing up
  • how to allow the player to use certain animations like the ai(if that's the correct word) for example the tavern osp the townsmen are sitting how can i make the player use some kind of a key board key like "L" or something so when he is near a chair he can sit by clicking "L"and so on
  • the teleportation script i heard of it once but i can't find it can someone link me to it but to the question is there anyway i can use taverns in villages like maybe walking around the village reaching a door entering then the teleportation script is triggered and you get teleported to a tavern scene in one of the towns and when you get out you are in the village is this possible
  • do you think its too difficult to allow many options in one place for example in a fort captured by a player from bandits you can have options to build market which will allow the option to speak with a trader there and buy and sell stuff from him as well as building a castle "Upgrading that small fort to a castle" with huge amount of money and when you do you will get the options to upgrade the levels of the castle with diff scenes and new options and so on !
  • i saw in ACOK that you can make the Ai use some kind of animations like acrobatics stuff or so how can i do that cuz what i want to do is when you enter a huge town you will find some speaking there and some fighting  over something the guards walking (i found a really cheap trick to do that lol)
  • how can i use animations for a certain object like rowing animations for a ship and so on
  • what is the limit of polys for an object added to a scene to avoid lags and crashes
  • how to add items to the cheat menu for testing
  • how can i add living animals to a scene like horses not dead (objects)but alive they move and so on and how can i add more animals to the game
  • my most important question is how can i make the game use textures that i have rather then the ones using in the textures files so for example the terrain forest that we use for the campaign map i want to change it but how can i make the game read the changed texture from my mod will load_mod will do the trick replacing the native ones

i still have many questions but oh let's leave it for another time and work on these i don't care if they are hard or takes too much time to do as long as i can do them i'll do them so help tips and advices will be welcomed thank you all and i hope u can help me out thanks and cya!

i still have many questions

:shock:

Sorry but it looks like you typed here at once everything you wanna know, without bothering to search for answers yourself. Im pretty sure answers for majority of your questions can be found in tutorial section.  Yes, its Q&A thread but...holy **** man. If you need details on some topic we are happy to help, but not gonna rewrite here wikipedia for you.
 
snouz said:
So to get that value right, you need to open photoshop/gimp, put man_body8.dds and your face texture side by side, then put a colored shape layer on top of the body, put its fusion mode as "multiply" and play a bit with the color until the face and the body more or less match.

I can add to this that instead of "playing" you could use "division" - coloring the face with the sample of body color in "division" mode (or - as I did that - filling an empty sheet with the sample of face color in normal mode and then coloring this with the sample of body color in "division" mode), and then taking the sample of the new color and using it in module_skins.
As a person who's rather clumsy and inexperienced in GIMP I found it a better alternative to opening multiple images next to each other and then "playing", comparing results by sight.

DarkNord said:
1,why would hair texture be there?
Because there can be different hair textures for different skins.
Usually only one is used - just recolored with multipliers - but different ones can also be used. Take Grim Age OSP as an example.
 
EmielRegis said:
:shock:
Sorry but it looks like you typed here at once everything you wanna know, without bothering to search for answers yourself. Im pretty sure answers for majority of your questions can be found in tutorial section.  Yes, its Q&A thread but...holy **** man. If you need details on some topic we are happy to help, but not gonna rewrite here wikipedia for you.
i did search and found answers for many of my many questions and the questions above i didn't understand the answers and solutions that were offered tried some got bugs tried others no result maybe because i'm with the latest warband game version and MS version i did found a lot of answers for many of my answers but as i said before(above) i have many questions because this was my first time asking lol and i asked everything at once
and you don't have to write a wikipidia here u can just answer one or two questions if you like that would help me either way
and i'll try searching again and try to do some stuff and see if i can work and get some of my questions answers who knows maybe i did mistakes 
PS: no need to be shocked XD
 
use bullet points instead when you have several questions. 1,2,3 makes easier to answer it lol

and please try to be direct in your questions. We don't need the history, just the facts

imado552 said:
is there a limit on how many villages a town or a castle can have
nope

custom events
see tutorial on triggers (module_triggers.py and module_simple_triggers.py), that is how we control world events

change the pic
check your textures folder or use OpenBRF to see the default ones used for UI. You can replace any of them

custom backgrounds are case by case, so you need to locate the menu/presentation and check the code

upgrade the version of my mod
download newest modsys and update your header_XXX.py files. The file header_operations.py is the most important one. Get Lav's modules for a better version.

The module_XXX.py will depend on what you need to update. If you are using Native as your base there was no change in SP since 1.153, as the last versions were dedicated to VC DLC and recently the Invasion MP mode.


short movie of texts
its a custom presentation. You can find a OSP for it on the OSP subforum.


certain animations
custom animations are handled by operations (code). You can get a OSP like the Tavern one to study the code as a example. VC DLC uses it for farmers (villagers).


teleportation script
its not a script, it is how the game connects scenes (using menus and passages). Get the tutorial PDF (see tutorial subforum) as this is covered there


too difficult to allow many options
only you can answer that. Start by doing small things, you can't get 1000 hours of modding experience in 1 week.


animations for a certain object
see module_scenes_props;py and how Native handles the siege towers

limit polys
keep it low, use Native as a reference for old machines, and newer releases (like VC) for higher requirements.

how to add items to the cheat menu for testing[
several ways, this will be easily answered once you read the basic tutorials on MBScript, events, etc. A good place is the starting menus (used to create a character), as there is already one for cheats (skip steps to start quickly)

add living animal
learn by example. VC DLC is a good source for this. Study their code, animations, textures, ...

game use textures
put them on your textures folder. Load them on BRF files and your module.ini using the proper order and settings.
 
kalarhan said:
use bullet points instead when you have several questions. 1,2,3 makes easier to answer it lol
ok i'll do that from now on!
kalarhan said:
and please try to be direct in your questions. We don't need the history, just the facts
ok i'll try my best to do that!
kalarhan said:
imado552 said:
is there a limit on how many villages a town or a castle can have
nope
thanks
kalarhan said:
see tutorial on triggers (module_triggers.py and module_simple_triggers.py), that is how we control world events
thank you i'll check them right now!
kalarhan said:
check your textures folder or use OpenBRF to see the default ones used for UI. You can replace any of them
custom backgrounds are case by case, so you need to locate the menu/presentation and check the code
roger that !
kalarhan said:
download newest modsys and update your header_XXX.py files. The file header_operations.py is the most important one. Get Lav's modules for a better version.
The module_XXX.py will depend on what you need to update. If you are using Native as your base there was no change in SP since 1.153, as the last versions were dedicated to VC DLC and recently the Invasion MP mode.
thank you ! now i'll be able to stay with the latest versions!
kalarhan said:
its a custom presentation. You can find a OSP for it on the OSP subforum.
ok i'll look for it and download it thank you!
kalarhan said:
custom animations are handled by operations (code). You can get a OSP like the Tavern one to study the code as a example. VC DLC uses it for farmers (villagers).
i will download it right now and start studying !
kalarhan said:
its not a script, it is how the game connects scenes (using menus and passages). Get the tutorial PDF (see tutorial subforum) as this is covered there
ah thank you !
kalarhan said:
only you can answer that. Start by doing small things, you can't get 1000 hours of modding experience in 1 week.
thank you for your advice i'll work using it from now on !
kalarhan said:
animations for a certain object
see module_scenes_props;py and how Native handles the siege towers
never thought of that i'll look into it!
kalarhan said:
keep it low, use Native as a reference for old machines, and newer releases (like VC) for higher requirements.
thank you that would make it easier for me to avoid lags and crashes !
kalarhan said:
several ways, this will be easily answered once you read the basic tutorials on MBScript, events, etc. A good place is the starting menus (used to create a character), as there is already one for cheats (skip steps to start quickly)
ok i'll work on it and learnt how to do it step by step!
kalarhan said:
learn by example. VC DLC is a good source for this. Study their code, animations, textures, ...
ok i'll do a lot of studies on it!
kalarhan said:
put them on your textures folder. Load them on BRF files and your module.ini using the proper order and settings.
ah i see thanks!

really thank you kalarhan that helped me a lot thank you again!!
 
Status
Not open for further replies.
Back
Top Bottom