login

Author Topic: M&B Script Requests  (Read 15340 times)

Yoshiboy

  • Guest
Re: M&B Script Requests
« Reply #15 on: March 16, 2007, 11:29:22 AM »
ok.. then i see where the problem, ive been putting .dds files in the normal texture folder in mount and blade folder and in the native texture folder. Which folder should i add the textures to? and also is the code im using for the module_info.txt correct: load_mod_resource = horses ?

You should add them to a modular texture folder. If you still want to load them from the normal texture folder i guess you can set the line to load_resource and it might work.

atazk

  • Guest
Re: M&B Script Requests
« Reply #16 on: March 16, 2007, 03:52:39 PM »
i dont get too many errors now but i still dont see any changes. Maybe you could walk me through real quick, i might be mising something, thx for all your help

Yoshiboy

  • Guest
Re: M&B Script Requests
« Reply #17 on: March 17, 2007, 05:10:23 AM »
http://mbx.streetofeyes.com/index.php/topic,17.0.html

this tutorial covers the basics of setting up a mod folder with correct materials and texture references.

Smaug_the_dragon

  • Guest
Re: M&B Script Requests
« Reply #18 on: May 24, 2007, 06:57:06 PM »
I'd love a script to set up a dialoge as soon as a player has been defeated in a scripted battle (like the arena)

Scrat

  • Guest
Re: M&B Script Requests
« Reply #19 on: December 13, 2007, 05:44:57 AM »
I would like an example on how to add ambient sound while i'm in town or on the battlefield. So what part of the module system do I need and where should I put the code? (Starting the ambient sound and ending it when leaving the area.)

P.S. Could someone tell me how rain works in m&b?

Thanks

Offline Cartread

  • Craftsman
  • **
  • Posts: 110
    • View Profile
Re: M&B Script Requests
« Reply #20 on: December 13, 2007, 09:43:21 AM »
Eisenhouwer
Add sounds with module_mission_templates into whichever mts you wish.  The most prominent town mt is town_default and the most prominent battle mt is lead_charge.

So to have a sound activated in town_default, you'd use play_sound in town_default's trigger section:

    [
      (1, 0, ti_once, [], [
          (store_current_scene, ":cur_scene"),
          (scene_set_slot, ":cur_scene", slot_scene_visited, 1),
        ]),
      (ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners")]),
      (ti_inventory_key_pressed, 0, 0, [(set_trigger_result,1)], []),
      (ti_tab_pressed, 0, 0, [(set_trigger_result,1)], []),
 
      (1, 2, 3, [],[(play_sound,"snd_asants_lumber_1")]),

   ],

1 is the check interval, 2 the delay, and 3 the rearm (they can be any time you want, so for instance 0,0,60 would play the sound every minute). (note: the sound will overlap if its play time is longer than the check+delay+rearm times)

play_sound calls a sound from module_sounds
if you're using your own sound you need to add it to module sounds, the M&B/Modules/yourmod/Sounds and do 1 for scan module sounds in module.ini

-----
game_rain is a module_particle_system, but it is part of the M&B weather system which is unmoddable.

Scrat

  • Guest
Re: M&B Script Requests
« Reply #21 on: December 13, 2007, 11:34:31 AM »
Thanks for that!

Offline Cartread

  • Craftsman
  • **
  • Posts: 110
    • View Profile
Re: M&B Script Requests
« Reply #22 on: December 15, 2007, 11:00:26 AM »
Yep.

I just saw this, too, in header_operations:

(set_rain,<rain-type>,<strength>), (rain_type: 1= rain, 2=snow ; strength: 0 - 100)
(set_fog_distance, <distance_in_meters>, [fog_color]),

So these would probably override the weather system.