User Info
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 02, 2010, 08:13:51 PM

Login with username, password and session length
Search:     Advanced search
News Box
New M&B Version

1.010 is out, and so is the module system. Get modding!

Key Stats
51617 Posts in 2003 Topics by 4425 Members
Latest Member: lovely13
Home Help Search Login Register
M&B Mod Community  |  About Modding  |  User Tutorials  |  How to resolve problem with silent troops
Pages: [1] Print
Author Topic: How to resolve problem with silent troops  (Read 1499 times)
nema
Journeyman
***
Offline Offline

Posts: 271



View Profile WWW Email
« on: April 04, 2007, 01:23:08 PM »

In header_skins.py you can find possible events classes:

voice_die        = 0
voice_hit        = 1
voice_grunt      = 2
voice_grunt_long = 3
voice_yell       = 4
voice_warcry     = 5
voice_victory    = 6




In module_skins.py you can find declarations for events voices:

for mans:

[(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_warcry,"snd_man_warcry"),(voice_victory,"snd_man_victory")], #voice sounds

For womans:

    [(voice_die,"snd_woman_die"),(voice_hit,"snd_woman_hit")], #voice sounds

And for undeads:

[], #voice sounds


As you can see, there is no voices declarations for undeads at all and only a few for womans.

If you want that some troops use mens sounds you can simply copy declarations. You can use it for undeads for example.

But for womans you can’t use mens voices. You must create new classes, for example:

[(voice_die,"snd_woman_die"),(voice_hit,"snd_woman_hit"),(voice_grunt,"snd_woman_grunt"),(voice_grunt_long,"snd_woman_grunt_long"),(voice_yell,"snd_woman_yell"),(voice_warcry,"snd_woman_warcry"),(voice_victory,"snd_woman_victory")], #voice sounds

To create them all at once is maybe better than leave this work for second time. There is no need to use them all. They can wait.



Next step is in module_sounds.py

For each class which you want to use, you must prepare such code line.

("woman_victory",sf_priority_5|sf_vol_10, ["woman_victory_3.ogg","woman_victory_4.ogg","woman_victory_5.ogg","woman_victory_8.ogg","woman_victory_15.ogg","woman_victory_49.ogg","woman_victory_52.ogg","woman_victory_54.ogg","woman_victory_57.ogg","woman_victory_71.ogg"]),

Where

"man_victory"
is name of the class

sf_vol_(number 1-10)
relative volume of each sound class

sf_priority_(number 1-10)
Sounds are limited by their number, and if you want that one sound plays in any case, you must give to it higher priority i.e. 10.

["man_victory_3.ogg","man_victory_4.ogg",…..
Here you will put names of sounds that will play randomly. You can use small .ogg or .mp3, rather then bigest .waw files.



Of course you must put such named files in your SOUND directory


and change in your  module.ini file:


scan_module_sounds = 0  to scan_module_sounds = 1





At the end, you must compile your Python scripts.

In this case are important only sounds.txt and skins.txt file.

But of course, you can change sound.txt and skins.txt only and ignore thousands reasons why not to do this.
« Last Edit: April 11, 2007, 06:24:28 AM by nema » Logged

KON_Air
Craftsman
**
Offline Offline

Posts: 110


View Profile Email
« Reply #1 on: April 05, 2007, 12:15:45 AM »

sf_looping does not work at all. However there will be both looping (which will loop untill player leaves the scene if it is a on_init/on_attack triggers for props and items) and stop looping (if triggered via anything else) at some point in future.
Logged
Winter
I am Tek Jansen!
Administrator
*****
Offline Offline

Posts: 448


MBX Forum owner


View Profile WWW Email
« Reply #2 on: April 05, 2007, 01:31:43 AM »

Did you have prior permission from the author when you posted this?
Logged


STREET: Losing your mind has never been so much fun . . .
Pages: [1] Print 
Jump to:  

Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Arcane Magic based on BlackDay by TechnoDragon.net | Buttons by Andrea