Author Topic: Useful Techniques  (Read 5680 times)

Offline Fisheye

  • Blues Brother
  • Moderator
  • *****
  • Posts: 427
  • My scalp's so bright, I gotta wear shades.
    • View Profile
Useful Techniques
« on: February 04, 2007, 09:17:47 AM »
This thread collects descriptions of various cool tricks and techniques. If you have a cool trick you want to contribute, start a new topic and then PM me to add it here.

Game Menu Pics - by maw

you can associate a menu to a brf that gives you a pic in the background. heres how, as an example. you can get as complex as you want.

PART I: the menu background
1. open a dds base for the menu background througha dds editor, like DxtBmp. i use Bg2.dds found in the common m&b Textures directory
2. send it to the editor
3. open up the picture you want to add to your menu. based on the menu choices, you only have a limited number of places you can add a pic, about the right hand third of the dds file, or, if you only have a few options, the bottom part of the menu background. it will have to be scaled properly, or the picture will run into the text making it difficult to see.
4. copy the picture you want to add to the menu background you want to use, then paste it anyway you want. you can fade it, use it full color, make it watermark, whatever.
5. save it and close, returning to the dds editor
6. save the edited dds as a dds compliant with m&b; in this example, i'll use pic_m3_sellsword.dds

PART II: into the BRF
7. open up brf edit, create a brf called mod_pictures (or whatever)
8. import from the m&b common directory CommonRes/pictures the only file in it, pic_mb_warrior_1; you'll see it in the mesh section
9. add the edited pic_m3_sellsword to both texture and materials section (mat and tex)
10. rename the pic_mb_warrior_1. in this case, keep it simple and i'll use pic_m3_sellsword.
11. assign the material pic_m3_sellsword or whatever you used in mat
12. save; it'll add it to your module.txt automatically

PART III: into the game
12. open up in the Module_system your module_game_menus.py file.
13. find the menu you want to have this picture in. you'll see something like...

**<snip>**
  (
    "simple_encounter",0,
    "A band of {s1} approaches. You look to your {reg10} troops, and weigh battle against their {reg11}...",
     "",
    [
        (str_store_party_name, 1,"$g_encountered_party"), etc etc blah blah blah
**<snip>**


now, i've made the the area of interest red. change that to:

"pic_m3_sellsword",

14. compile and play. when the menu "simple_encounter" is addressed in the game, you will have a background edited to incude your pic.

How to get shiny water on the world map - by Leprechaun

You will need:

A computer
Mount and Blade
BRF Edit
Mouse and keyboard
Eyes
Hands

Go to your Mount&Blade directory, then into CommonRes. Select materials.brf, and make a backup copy of it, stored elsewhere. Open materials.brf in BRF Edit.

Select map_ocean.dds

Change the shader from "map_ocean_shader" to "water_shader"
Change the bumpmap from "none" to "waterbump"
Change Specular to 100
Change RGB to 300 (each)
In the list of other options, select Render Order +3

Save the modified materials.brf, overwriting the original

You now have reflective water on the world map, like in battles.


To do this for a mod, simply copy materials.brf into your module's Resource folder and in module.ini, change load_resource = materials to load_module_resource = materials, before following these instructions:

Go to your Mount&Blade module, then into Resource. Select materials.brf, and make a backup copy of it, stored elsewhere. Open materials.brf in BRF Edit.

Select map_ocean.dds

Change the shader from "map_ocean_shader" to "water_shader"
Change the bumpmap from "none" to "waterbump"
Change Specular to 100
Change RGB to 300 (each)
In the list of other options, select Render Order +3

Save the modified materials.brf, overwriting the original

Renaming a skill - by Hellequin

(Giving it new statistical effects, and living with or negating its old ones, is up to you.)
Same technique can be used to rename a currency, alter hints, and so forth.

With thanks to Highlander & Fisheye.

1) Open M&B, start a game (any mod or Native). Use Alt+Enter to put M&B into windowed mode.
2) Off the toolbar, select File > New Language.
3) This creates the subdirectory "/new language" off your M&B directory.  It's got all kinds of tasty things in there, all in csv (comma-separated-value, basically a text spreadsheet) format.
4) Under your mod, create the subdirectory "MyMod/languages/en".  Anything in here will be seen by all English-language players.  Obviously you can repeat this technique for other languages, too.
5) Copy some or all of the files from "/new language" into your new English-language directory.  If renaming skills, you want (surprise, surprise) skills.csv.
6) Edit the stuff on any line after the | character to whatever you want.  Leave the stuff before the | alone. 

It can't accept variables or registers or anything, and some of them have length limits (formal or simply font-becomes-too-tiny) you'll have to be careful of, but other than that I haven't yet found any issues with any changes I've made here.

When editing, I suggest using text editors rather than spreadsheet programs, even though .csv would normally be spreadsheet fodder. 

Getting Flatter Terrain - by Highlander
nothing spectacular, but a usefull trick:
When you copy "0" from notepad or similar programmes, go to the terrain editor and press "paste", the hill height will be lower than you get it by just dragging the button. That's the only way to get absolutely NO hills; very useful in some cases.
« Last Edit: May 27, 2007, 07:36:53 AM by Fisheye »