Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
There are commands to do all of that, namely troop_set_name/troop_set_plural_name and troop_add_items/troop_remove_items.

Changes to troop inventories aren't stored in saved games, though. I don't know about changes to names.
 
Re-equipping troops is easy, the problem is that the inventory won't save unless you check the module.ini option to make regular troops save their inventory as well. Most mods use heroes as chest troops from which stuff can added/removed as inventory pools.
 
So, I'm trying to make a specific track play while the play goes through the backstory menu, but only the first two seconds of the song plays, then it fades out and reverts back to the main menu song.

Code:
Code:
  ("start_game_0",menu_text_color(0xFF000000)|mnf_disable_all_keys,
    "Welcome, Adventurer, to the Myth of a Legacy Mod for Mount&Blade: Warband.",
  "none",
    [],
    [
     ("continue",[],"Continue...",
       [(jump_to_menu, "mnu_start_game_1"),
	    (stop_all_sounds, 1),  
	   (play_track, "track_a_horrible_past", 2),
        ]
       ),
      ("go_back",[],"Go back",
       [
         (change_screen_quit),
       ]),
    ]
  ),

Music:
Code:
  ("mount_and_blade_title_screen", "Sovereign.ogg", mtf_module_track|mtf_sit_main_title|mtf_start_immediately, 0),

  ("a_horrible_past", "a_horrible_past.ogg", mtf_module_track, 0),

There are no errors on compiling.

Why is this happening? :sad:


Here's the video showing what happens:
Note: Yes I do have permission for that art.

 
Alright. I've got a new computer. Pythons and everything is good. Only thing is its compiling in my modules folder :shock:

My path is good. I'm using the latest diplomacy source. I tried running it as an admin, didn't work. Anybody know whats going on?
 
I'll try but I don't think so. I've already double checked it. I'll try moving it to my desktop, that might work.

Edit: Thanks. El Stupido (me) actually made one of the most textbook errors. Its been to long since I've had to set up my path directory.
 
Hello lads, Christmas question. I'm working on server-side trigger that calls ascript. Everything works fine, but i can't figure out whether this is possible or not.

Here is my code: when dropping an ammobox, it calls that script, which spawns a scene prop usable by a player. The only thing is that i'd like to make that item disappear from the ground, since as of now people are able to spawn infinite ammoboxes.  I tried using (agent_unequip_item, ":agent_no", "itm_ammobox"), or (agent_set_wielded_item, ":agent_no", -1), before calling that script, yet it didn't work. Apparently, the item isn't considered anymore to be assigned to that player. So, is there a way for making that item disappear from the ground?

Code:
multiplayer_server_on_item_dropped = (
  ti_on_item_dropped, 0, 0, [(this_or_next|multiplayer_is_server),(neg|game_in_multiplayer_mode)],
  [
    (store_trigger_param_2, ":item_id"),
	
	(try_begin),
	 (store_trigger_param_1,":agent_no"),
	 (agent_unequip_item, ":agent_no", "itm_ammobox"),
	 (eq, ":item_id", "itm_ammobox"),
	 (call_script,"script_multiplayer_server_drop_ammobox", ":agent_no"),
	(try_end),
 
Thank you very much! Got it working

Code:
multiplayer_server_on_item_dropped = (
  ti_on_item_dropped, 0, 0, [(this_or_next|multiplayer_is_server),(neg|game_in_multiplayer_mode)],
  [
    (store_trigger_param_2, ":item_id"),
	
	(try_begin),
	 (store_trigger_param_1,":agent_no"),
	# (agent_unequip_item, ":agent_no", "itm_ammobox"),
	 (eq, ":item_id", "itm_ammobox"),
	 (agent_set_wielded_item, ":agent_no", -1),
	(call_script,"script_multiplayer_server_drop_ammobox", ":agent_no"),
	  (store_trigger_param_3, ":dropped_prop"),
      (prop_instance_get_position, pos25, ":dropped_prop"),
	  (position_move_y, pos25,-500),
	  (prop_instance_set_position,":dropped_prop",pos25),
	  (scene_prop_set_prune_time, ":dropped_prop", 0), # suddenly
	(try_end),
 
The Dark Robin said:
So, I'm trying to make a specific track play while the play goes through the backstory menu, but only the first two seconds of the song plays, then it fades out and reverts back to the main menu song.

Code:
Code:
  ("start_game_0",menu_text_color(0xFF000000)|mnf_disable_all_keys,
    "Welcome, Adventurer, to the Myth of a Legacy Mod for Mount&Blade: Warband.",
  "none",
    [],
    [
     ("continue",[],"Continue...",
       [(jump_to_menu, "mnu_start_game_1"),
	    (stop_all_sounds, 1),  
	   (play_track, "track_a_horrible_past", 2),
        ]
       ),
      ("go_back",[],"Go back",
       [
         (change_screen_quit),
       ]),
    ]
  ),

Music:
Code:
  ("mount_and_blade_title_screen", "Sovereign.ogg", mtf_module_track|mtf_sit_main_title|mtf_start_immediately, 0),

  ("a_horrible_past", "a_horrible_past.ogg", mtf_module_track, 0),

There are no errors on compiling.

Why is this happening? :sad:


Here's the video showing what happens:
Note: Yes I do have permission for that art.



Anyone? :smile:
 
The problem with that is after the "a horrible past" song, I want it to play a different song once you click through all the menus and go into the battle. I'll try it, though, and see how it works out. :smile:

Edit: It works out ok, the next song plays directly after. It's good enough for a temporary fix.
 
How can I make a new character show up in the game's Characters list (you know where all the lords and companions you got are)?
 
Status
Not open for further replies.
Back
Top Bottom