Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
I would like to overhaul the graphics of my modsys mod. I have been unable to find any guides on the matter and I wonder if there is any graphics mods that are module system friendly? Or could somebody point me to a guide on graphics/colours modding?
 
Lokameister said:
I would like to overhaul the graphics of my modsys mod.

modsys doesnt have much to do with graphics (unless you are doing some trick things like tableaus for armor or special effects). Mostly what you have on the modsys is the mesh name for a 3D object, and the rest is done via OpenBRF (connects meshes with materials, textures, collision, set flags, ...) and your assets tools (like Blender).

not to forget that module.ini lists the BRF files.

So if you can be more specific about what you want to do, it would help with linking tutorials/etc.

Example: if all you want to do is replace the swords on a mod, that happens to be inside one BRF, as long you create a new BRF with the same meshes names and just replace the file... you wouldnt need to update the modsys.
 
kalarhan said:
Lokameister said:
I would like to overhaul the graphics of my modsys mod.

modsys doesnt have much to do with graphics (unless you are doing some trick things like tableaus for armor or special effects). Mostly what you have on the modsys is the mesh name for a 3D object, and the rest is done via OpenBRF (connects meshes with materials, textures, collision, set flags, ...) and your assets tools (like Blender).

not to forget that module.ini lists the BRF files.

So if you can be more specific about what you want to do, it would help with linking tutorials/etc.

Example: if all you want to do is replace the swords on a mod, that happens to be inside one BRF, as long you create a new BRF with the same meshes names and just replace the file... you wouldnt need to update the modsys.

I want to give the entire game slightly darker more realistic colours and preferably improve the graphics abit. I want it to work trough the module and not have to change my actual game files. Would I have to do this individually to all textures and items in the game?
 
Lokameister said:
I want to give the entire game slightly darker more realistic colours and preferably improve the graphics abit. I want it to work trough the module and not have to change my actual game files. Would I have to do this individually to all textures and items in the game?

you should start by checking the OSP assets to select what you want to use. Plenty of options for weapons, armor, darker themes, textures, etc, which you could use to create your collection.

when you say "improve the graphics a bit" that is not quite clear. Try to be more specific. Examples: "I want sword models with a higher poly count", "I want higher def texture for swords", etc.

a example: https://forums.taleworlds.com/index.php/topic,366048.0.html - replaces textures on weapons with a higher def version.

see the threads on https://forums.taleworlds.com/index.php/board,229.0.html

Do keep in mind the limitation of the engine and its age, plus what hardware you have. Compare the requirements to run the game for VC and Warband and you will see the improved graphics and bigger battles are not free.
 
kalarhan said:
Lokameister said:
I want to give the entire game slightly darker more realistic colours and preferably improve the graphics abit. I want it to work trough the module and not have to change my actual game files. Would I have to do this individually to all textures and items in the game?

you should start by checking the OSP assets to select what you want to use. Plenty of options for weapons, armor, darker themes, textures, etc, which you could use to create your collection.

when you say "improve the graphics a bit" that is not quite clear. Try to be more specific. Examples: "I want sword models with a higher poly count", "I want higher def texture for swords", etc.

a example: https://forums.taleworlds.com/index.php/topic,366048.0.html - replaces textures on weapons with a higher def version.

see the threads on https://forums.taleworlds.com/index.php/board,229.0.html

Do keep in mind the limitation of the engine and its age, plus what hardware you have. Compare the requirements to run the game for VC and Warband and you will see the improved graphics and bigger battles are not free.

Thank you for the answear. So as I understand I will create a collection of specific texture mods rather than there being a total overhaul for the games entire graphics. I will take a close look at what you linked and look around for more (I am going to try this out for example https://forums.taleworlds.com/index.php?topic=142127.0
 
Lokameister said:
So as I understand I will create a collection of specific texture mods rather than there being a total overhaul for the games entire graphics.

Yes and no. You can also check released mods like Floris (there are a few hundreds of them) and see if you like what they did and use that as your base for graphics. Or use assets from multiple mods (check permissions first of course). The OSP section is usually a more specific package. Finding what you want takes time and work. But much less than if you would create all that stuff yourself (think hundreds to thousands of hours of work that you can use on your own mod for free).

Example: swords from mod A, trees from mod B, UI textures from mod C, horses from OSP package XYZ, ...

not to forget that you can still customize those assets for your own taste, like changing the textures of the world map to make it darker. As long you check permissions you can combine assets and your own work to create your own design.
 
Does textures such as terrain/building textures get assigned automatically by putting them in the textures folder? I saw no further steps in the installation guide for the Improved Buildings mod im trying.

Also a question regarding textures is how do you assign textures to a item witouth morghs? I have downloaded some items and put it the resource and textures folders, aswell as put in the load_resource = (whatever the name) But how do I assign this stuff to items manually?
 
Lokameister said:
Does textures such as terrain/building textures get assigned automatically by putting them in the textures folder? I saw no further steps in the installation guide for the Improved Buildings mod im trying.

Also a question regarding textures is how do you assign textures to a item witouth morghs? I have downloaded some items and put it the resource and textures folders, aswell as put in the load_resource = (whatever the name) But how do I assign this stuff to items manually?

If you replace a tree texture file with another one, that has the exact same name, and the same general function, does the game cares ? No, the game has no idea that you changed the tree from a green thingy to a purple thingy. It just uses what is there  :razz:. You are replacing it. You are not adding extra options.

Of course you can also change the names and all that, but that implies changing the links between assets. And some stuff is hardcoded and thus cant be renamed.

OpenBRF handles the links between meshes and other stuff (like textures). Modsys (and Morgh's) only know the mesh. Install the tool and explore it to learn more.
 
So openBRF allows me to create usable ingame items from the textures and resources I downloaded? All the guides I've seen has told me to use morghs to get the items ingame. But modsys overwrites morghs :/
 
NPC99 said:
Lokameister said:
I would like to overhaul the graphics of my modsys mod. I have been unable to find any guides on the matter and I wonder if there is any graphics mods that are module system friendly? Or could somebody point me to a guide on graphics/colours modding?

https://www.youtube.com/watch?v=eD8ZbLUl01c

Thank you, I will check that out tomorow.
 
Lokameister said:
But modsys overwrites morghs :/

Morgh's is a optional tool. You can use it, or you can work directly with the modsys. There is no tech reason stopping you from working with module_items.py.

Also if you open the tool you will notice a option to choose between .txt and .py files. Try them out.
 
kalarhan said:
Lokameister said:
But modsys overwrites morghs :/

Morgh's is a optional tool. You can use it, or you can work directly with the modsys. There is no tech reason stopping you from working with module_items.py.

Also if you open the tool you will notice a option to choose between .txt and .py files. Try them out.

But when I run the module.bat file it overwrites all the changes I have made with morghs. Im gonna try the .py format in morghs more tomorow, but I noticed it lacked a bunch of important fitures that the .txt one had.
 
Lokameister said:
but when I run the module.bat file it overwrites

like I mentioned above: Morgh's is optional. You do not need to use it if it is causing you problems. Or you can learn how to use it with .py files. Or you can learn how to use it with .txt + modsys files (which is a bad idea).

in short: you need to learn how to use the tool, or simple forget about it and work directly with the modsys files. Tool is there to help you. If it is not helping, dont use it.
 
Im gonna try to be specific in what I want to accomplish. I have the resource and textures for a item or building. Now how do I use the module system to get theese items in game? Wich folder do I go to and what do I edit?
 
Lokameister said:
I have the resource and textures for a item or building.

check this recent post and discussion on 3D modelling https://forums.taleworlds.com/index.php/topic,375932.msg8958595.html#msg8958595, it should help you get closer to what you need.

check the guild first post for links on tutorials for scene working https://forums.taleworlds.com/index.php/topic,163368.0.html to learn how, as a example, you can add a new house to a city scene.

you should also visit the tutorial section as you will find guides like: "how to add a new weapon", "modelling and texturing", and so on. Link https://forums.taleworlds.com/index.php/board,171.0.html
 
kalarhan said:
Lokameister said:
I have the resource and textures for a item or building.

check this recent post and discussion on 3D modelling https://forums.taleworlds.com/index.php/topic,375932.msg8958595.html#msg8958595, it should help you get closer to what you need.

check the guild first post for links on tutorials for scene working https://forums.taleworlds.com/index.php/topic,163368.0.html to learn how, as a example, you can add a new house to a city scene.

you should also visit the tutorial section as you will find guides like: "how to add a new weapon", "modelling and texturing", and so on. Link https://forums.taleworlds.com/index.php/board,171.0.html

Thank you :smile: I will check theese links out
 
n9ImTYY.jpg


So I previously posted this code
So I got an item to randomly change colour on spawn fairly easy with this.
Code:
[(ti_on_init_item,
		[(store_random_in_range,reg1,0,7),
		(cur_item_set_material,"@shirt_a_{reg1}SR", 0,)],
This is the material setup, just change the material names to match the item and it's an easy way to add variety.
shirt_a_0SR, = Neutral
shirt_a_1SR, = light
shirt_a_2SR, = dark
shirt_a_3SR, = red
shirt_a_4SR, = yellow
shirt_a_5SR, = green
shirt_a_6SR, = blue

Now I've given the troop a number, the number is currently their plural name (which I think is redundant code)

Code:
["swadian_recruit","Swadian Recruits","3"

The item is given this code

Code:
[(ti_on_init_item, 
                [(store_trigger_param_2, ":troop_no"),
                 (str_store_troop_name_plural,s1,":troop_no"),
                 (cur_item_set_material,"@shirt_a_{s1}SR", 0,)])]],

Now the linen tunic can be worn by anyone but will change colour depending on the troop!
So Swadians wear red tunic Rhodoks wear green, Nords wear blue etc..

The next step is instead of one number you can give the troop a serial such as "3333326"
the serial chooses one of the numbers randomly (in this case 3's are more likely and 2 and 6 are rare)
this way a troop can be given multiple colours for civilians or bandits

However firstly the "number" is in a string and I wanted to know how to convert it to a register,
secondly the serial needs to choose just one number and I wondered if there is a clean way to do this?
current code for serial breakdown, reg1 is my  six digit serial
Code:
	(store_random_in_range,":picker",0,7),		   #chooses a colour
		(val_rshift,reg1, ":picker"),			   #shifts to that choice
		(assign,":reg_shift",reg1,),			   #copies the choice
		(val_rshift, ":reg_shift", 1),			   #removes the chosen number
		(val_lshift, ":reg_shift", 1),			   #replaces the chosen number with 0
		(val_sub,reg1,":reg_shift"),			   #finds the difference producing chosen number
		(cur_item_set_material,"@shir_a_{reg1}SR", 0,)
 
ShaunRemo said:
Now I've given the troop a number, the number is currently their plural name (which I think is redundant code)
Plural is used on situations where you need the plural name (duh great explanation). It is redundant for unique troops like a nobleman (hero type troops), as you only have one. Now for SP when you look at a army composition (inside a party), a stack can have 1 or multiple copies of a troop (10 archers). There may be others situations where you want the plural name (some UI) as well, etc.

1 archer
10 archers

the "archer" and "archers" are defined on the troop entry as the singular and plural name.

However firstly the "number" is in a string and I wanted to know how to convert it to a register
you can use a slot to store this information. With some Python hacking you could add this to the module_troops.py, or just apply it later via a script.

to retrieve parts of a number you can see this example from VC modsys
Code:
  # script_decode_value
  # Component: Ships and sea
  ("decode_value",
    [(store_script_param, ":value", 1),
      
      # (set_fixed_point_multiplier, 1),
      
      (store_div, reg5, ":value", 10000),	# ship cargo
      (store_div, reg4, ":value", 1000),	# ship dragon head
      (store_div, reg3, ":value", 100),		# ship paint
      (store_div, reg2, ":value", 10),		# ship sail
      (store_div, reg1, ":value", 1),		# ship wood
      
      (store_mul, ":sub", reg2, 10),
      (val_sub, reg1, ":sub"),
      (store_mul, ":sub", reg3, 10),
      (val_sub, reg2, ":sub"),
      (store_mul, ":sub", reg4, 10),
      (val_sub, reg3, ":sub"),
      (store_mul, ":sub", reg5, 10),
      (val_sub, reg4, ":sub"),
  ]),
 
Status
Not open for further replies.
Back
Top Bottom