Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
is there any way to make an interactive menu on the main menu? i know that there is the presentation "game_start", but if I use it, the entire background become black, and i can't see the main menu buttons. if i create a mesh, the mesh will be "on top" of the entire screen, so i still can't make the buttons appeare..any solutions?
 
Michadr said:
A small question,
Where can i find the mercenary costs? Meaning when joining a faction the player gets a set number of denars based of the amount and quality of the troops. I would like to raise this cost, but i have been unable to find where I can change it...
Code:
  [anyone,"lord_propose_mercenary", [(call_script, "script_party_calculate_strength", "p_main_party", 0),
                                     (assign, ":offer_value", reg0),
                                     (val_add, ":offer_value", 100),
                                     (call_script, "script_round_value", ":offer_value"),
                                     (assign, ":offer_value", reg0),

######################## edit begin ###################################
                                     (val_mul, ":offer_value", 2), # for example, it can be multiplied by 2
######################## edit end ####################################

                                     (assign, "$temp", ":offer_value"),
                                     (faction_get_slot, ":faction_leader", "$g_talk_troop_faction", slot_faction_leader),
                                     (neq, ":faction_leader", "$g_talk_troop"),
                                     (str_store_faction_name, s9, "$g_talk_troop_faction"),
                                     (str_store_troop_name, s10, ":faction_leader"),

									 (troop_get_type, ":is_female", "trp_player"),
									 (try_begin),
										(eq, ":is_female", 3), #disabled
										(troop_slot_eq, "$g_talk_troop", slot_lord_reputation_type, lrep_martial),
									    (str_store_string, s11, "str_now_some_might_say_that_women_have_no_business_leading_mercenary_companies_but_i_suspect_that_you_would_prove_them_wrong_what_do_you_say"),
									 (else_try), 	
									    (str_store_string, s11, "@What do you say to entering the service of {s9} as a mercenary captain?\
 I have no doubt that you would be up to the task."),
									 (try_end)
									 ],
 
http://forums.taleworlds.com/index.php/topic,62230.0.html

I'm trying to use it. But never works anything. No help menus. No other anything. Copy-paste copy-paste. But no!

Why! I'm getting crazy.

Or anybody can say me a Module System code like which shows this on screen is "hello world" when I prees "P" or another free button of my keyboard in a village(or castle or battle).

I'm not so many experienced on MB modding and Pyton(only 1-2 another languages as basicly).  And my English is not %100. Please ask me when you don't understand. But theme is very simple. Thanks for reading. :smile:
 
Tüfekçi Başı said:
http://forums.taleworlds.com/index.php/topic,62230.0.html

I'm trying to use it. But never works anything. No help menus. No other anything. Copy-paste copy-paste. But no!

Why! I'm getting crazy.

It was written for the original M&B, not Warband. I haven't really looked at the code, so I don't know how easy it is to port it, but it should be possible. :smile:


I have two questions:
1) Is it possible to make a waterfall on the world map, including particle effects?
2) Is it possible to directly control the direction that individual rivers on the world map flow? I saw the river direction in module.ini, but is there a way to control individual rivers?
 
So I've got these two weird bugs that seemed to come out of nowhere, and I cannot for the life of me get rid of them.

The first one is fairly minor, but very strange. The troop tableau on the multiplayer profile screen (the screen with the host and join buttons) has messed up face keys. I haven't edited the tableau code at all, and I'm not sure when this started happening. I don't even know where to begin to try to fix it.

The other bug is much more serious. Whenever a player is killed in multiplayer, the game crashes. It doesn't seem to happen when a bot is killed; only a player. Again, I'm not sure when this started happening. I've tried commenting out every single piece of code in the mission template except for the most basic possible version of the spawning code, but nothing has worked. Even weirder is that every once in a while it'll work fine for the entire time, even after starting new scenes.

It's also worth pointing out that I've deleted pretty much everything from my module system that I don't need that doesn't serve a hardcoded purpose. It's very barebones. So it's very possible I deleted something I shouldn't have. Although, I don't remember deleting any more things from Native in between when the mod worked and when these bugs started happening. Also, I'm using Warband 1.153 and WSE 3.1.5.

Edit: Oh, I should also mention that the face keys on the profile screen do change based on the face keys of the character. They just don't get set to the right thing. And the faces look fine in-game.

Here's what it says in my WSE crash log:

> Info
Time: 10/11/2013 13:27:05
Type: EXCEPTION_ACCESS_VIOLATION (0xC0000005, 0x00000000, 0x3869F314)
> Stack trace
0x005379E3 mb_warband.exe+0x1379E3 (??+0x0)
0x005379E3 mb_warband.exe+0x1379E3 (??+0x0)
> Scripting context
Statement block: Mission Template [6] mst_cantina Trigger [10] Consequences
Statement: 9
Opcode: 1755
>
Opcode 1755 is remove_agent, which is due to a little script I made to kill myself faster so I could test this faster.

Edit 2: Oh, never mind about the profile face key bug. It was caused by having accidentally deleted the tf_hero flag from the profile troops. :razz:

Edit 3: Well, I seem to have fixed the crashing by moving around some random bits of code. Still don't know how or why that bug existed, but I'm glad that it's fixed for now.
 
The Dark Robin said:
Tüfekçi Başı said:
http://forums.taleworlds.com/index.php/topic,62230.0.html

I'm trying to use it. But never works anything. No help menus. No other anything. Copy-paste copy-paste. But no!

Why! I'm getting crazy.

It was written for the original M&B, not Warband. I haven't really looked at the code, so I don't know how easy it is to port it, but it should be possible. :smile:


I have two questions:
1) Is it possible to make a waterfall on the world map, including particle effects?
2) Is it possible to directly control the direction that individual rivers on the world map flow? I saw the river direction in module.ini, but is there a way to control individual rivers?

Thanks for warning.

It's possible of course and It's original all of my MB serie.

Nobody helps?
 
La Grandmaster said:
Cozur said:
Making a Game of Thrones modification, I'd love to have some "custom" faces, as in taking the face of, say, Peter Dinklage and making it a face texture.

But obviously I don't necessarily want the player to be able to use Peter Dinklages face.

So it is possible to add a facecode/skin that is not accesable to the player, but can still be used on NPC's?

The easiest way would be to simply create a new race - which is identical to the normal man race, but in this race define all your custom face textures. The player could not access this race or any of these face textures.

The only thing is there may be a problem with gender stuff ( I remember that along time ago the game automatically counted any race other then the normal male one as female but this may of been fixed I cannot remember) -  I am not sure you would have to test it.

You could also simply create head covering "helmets" which featured the face meshes and anything else they are wearing on their heads. There are problems with this also though.

Anyone else got any ideas?
 
Cozur said:
Anyone else got any ideas?
Tyrion is a dwarf, so you could make it a new race which should be inaccessible to players. On the other hand, adding one helmet is far easier than making a new facecode/material/race. Just make sure it doesn't get overwritten by the mission templates.
 
For some reason whenever I visit a village now it no longer brings up the standard village menu - instead it appears as if I have encountered a group of 50 farmers on the map - I can battle them and everything. If I defeat these "farmers" and I then go back to the world map and encounter the village again, it brings up a dialogue option with a copy of myself - where I can choose to duel myself and everything - I have not a got a clue what I have done  :???:

Any help would be much appreciated as I am clueless, this does not happen for towns or castles, just villages  :???:
 
Most likely a slot initialisation failure. Have you fiddled with game_start? Make sure your slots never get overwritten in any unwanted way. If this doesn't help, make sure that script_game_event_party_encounter is in proper shape and handles the event correctly. (But I'm counting on slots being screwed up.)

@Somebody: Thanks, I'll check it out. If I call it for ti_once it will probably disable the prop forever, and I'm likely to be able to overwrite it with "enable after one second" when I meet my conditions.
 
La Grandmaster said:
Any help would be much appreciated as I am clueless, this does not happen for towns or castles, just villages  :???:
Might be the village definitions or a range problem with them being assigned a proper slot_party_type, leading to ****ty default encounters from script_game_event_party_encounter
 
Hi guys,
I've been making an invasion based on the Native Expansion code. Basically lords spawn at a certain date and attack a town. The problem is that when I test it, sometimes the lords spawn with 1 unit in their party and the rest of the times they spawn fine. When they spawn with 1 unit I get Party Template ID mismatches when running in Debug Mode. I have no idea why this is happening and I've noticed as well that the lords spawn fine if they spawn immediately after the game starts (so if I set it to day 1, it doesn't work but if I set the simple trigger to 1 hour for testing then they will spawn fine 100%).

I'll be glad for any help on this, as I have been trying to fix this error for a month to no avail. I'm think this is just one of those things that seem complicated but is actually caused by some small mistake but I'm not sure.

Not sure if needed but here is the full simple trigger that spawns them:
Code:
     (1, # 24 * 200
     [
#      (store_current_day, ":cur_day"),
#      (eq, ":cur_day", 1), # it bugs out when I set it to day 1 
      (eq,"$invaded",0),
      #(ge,"$setting_invasion_time",1),
      #(store_current_hours,":time"),
      # (ge,":time","$setting_invasion_time"),
      (assign,"$invaded",1),
      	(troop_set_slot, "trp_zann_lord", slot_troop_banner_scene_prop, "spr_banner_g10"), # giving them same banners 
      	(troop_set_slot, "trp_zann_knight_1", slot_troop_banner_scene_prop, "spr_banner_g10"),
      	(troop_set_slot, "trp_zann_knight_2", slot_troop_banner_scene_prop, "spr_banner_g10"),
      	(troop_set_slot, "trp_zann_knight_3", slot_troop_banner_scene_prop, "spr_banner_g10"),
      	(troop_set_slot, "trp_zann_knight_4", slot_troop_banner_scene_prop, "spr_banner_g10"),
      	(troop_set_slot, "trp_zann_knight_5", slot_troop_banner_scene_prop, "spr_banner_g10"),
      	(troop_set_slot, "trp_zann_knight_6", slot_troop_banner_scene_prop, "spr_banner_g10"),
      	(troop_set_slot, "trp_zann_knight_7", slot_troop_banner_scene_prop, "spr_banner_g10"),
      (display_message,"@The Zann Empire has come upon the land. None are safe!",0xff4040),
      (call_script, "script_change_troop_faction", "trp_zann_lord", "fac_zann_dynasty"),
      (call_script, "script_change_troop_faction", "trp_zann_knight_1", "fac_zann_dynasty"),
      (call_script, "script_change_troop_faction", "trp_zann_knight_2", "fac_zann_dynasty"),
      (call_script, "script_change_troop_faction", "trp_zann_knight_4", "fac_zann_dynasty"),
      (call_script, "script_change_troop_faction", "trp_zann_knight_5", "fac_zann_dynasty"),
      (call_script, "script_change_troop_faction", "trp_zann_knight_6", "fac_zann_dynasty"),
      (call_script, "script_change_troop_faction", "trp_zann_knight_7", "fac_zann_dynasty"),
      (try_begin),
      # player is head of own faction  
      (eq, "$players_kingdom", "fac_player_supporters_faction"),
      (set_relation, "fac_player_supporters_faction", "fac_zann_dynasty", -40),
      (else_try),
      # player is a vassal
      (set_relation, "fac_kingdom_1", "fac_zann_dynasty", -40), 
      (set_relation, "fac_kingdom_4", "fac_zann_dynasty", -40),
      (try_end),
      (try_begin),
            (faction_set_slot, "fac_zann_dynasty", slot_faction_state, sfs_active),
      (try_end),
      #########
      (call_script, "script_diplomacy_start_war_between_kingdoms", "fac_zann_dynasty", "fac_kingdom_4", 0),
      (call_script, "script_diplomacy_start_war_between_kingdoms", "fac_zann_dynasty", "fac_kingdom_1", 0),
#      (try_begin),
#      (neg,party_slot_eq,"p_castle_12",slot_town_lord, "trp_player"),
  #    (call_script,"script_clear_party_group","p_castle_12"),
#      (party_add_members,"p_castle_12","trp_zann_swordspearman",200),
#      (party_add_members,"p_castle_12","trp_zann_longbowman",200),
#      (party_add_members,"p_castle_12","trp_zann_veteran_spearman",200),
#      (party_add_members,"p_castle_12","trp_zann_veteran_swordsman",200),
#      (call_script, "script_give_center_to_faction_aux", "p_castle_12","fac_zann_dynasty"),
#(try_end),
#(try_begin),
#(neg,party_slot_eq,"p_castle_23",slot_town_lord,"trp_player"),
 #     (call_script,"script_clear_party_group","p_castle_23"),
 #     (call_script, "script_give_center_to_faction_aux", "p_castle_23","fac_zann_dynasty"),
      #        (troop_set_slot, "trp_zann_lord", slot_troop_cur_center, -1),
  #    (party_add_members,"p_castle_23","trp_zann_berserker",400),
#(try_end),

      (try_begin),
      # NE dk
      #                   (troop_set_slot, "trp_zann_lord", slot_troop_leaded_party, 1),
      #                   (troop_set_slot, "trp_zann_knight_1", slot_troop_leaded_party, 1),
      #                   (troop_set_slot, "trp_zann_knight_2", slot_troop_leaded_party, 1),
      #                   (troop_set_slot, "trp_zann_knight_3", slot_troop_leaded_party, 1),
      #                   (troop_set_slot, "trp_zann_knight_4", slot_troop_leaded_party, 1),
      #                   (troop_set_slot, "trp_zann_knight_5", slot_troop_leaded_party, 1),
      #                   (troop_set_slot, "trp_zann_knight_6", slot_troop_leaded_party, 1),
      #                   (troop_set_slot, "trp_zann_knight_7", slot_troop_leaded_party, 1),
      
      
      (str_store_faction_name,s2,"fac_zann_dynasty"),
      (display_log_message, "@{s2} has declared war against Maccavia."),
      (display_log_message, "@{s2} has declared war against Tolrania."),
	  (troop_set_name, "trp_zann_lord",  "@Emperor Zann The Mandate of Heaven"),
      (troop_set_slot, "trp_zann_lord",  slot_troop_original_faction, "fac_zann_dynasty"),
      (troop_set_slot, "trp_zann_lord", slot_troop_home, "p_zann_outpost"),# setting his hometown 
      (troop_set_slot, "trp_zann_lord", slot_troop_wealth, 100000),
      (troop_set_slot, "trp_zann_lord", slot_troop_age, 42),
      (assign, ":center_no", "p_town_6"),
      (call_script, "script_create_kingdom_hero_party_dk", "trp_zann_lord", ":center_no"), # creating the lords 
      
	  (troop_set_name, "trp_zann_knight_1",  "@General Tokugawa"),
	  (troop_set_slot, "trp_zann_knight_1", slot_troop_age, 37),
	  (troop_set_slot, "trp_npc2", slot_lord_reputation_type, lrep_martial),
      (troop_set_slot, "trp_zann_knight_1", slot_troop_renown, 1000),
	  (troop_set_slot, "trp_zann_knight_1", slot_troop_wealth, 10000),
      (call_script, "script_create_kingdom_hero_party_dk", "trp_zann_knight_1", ":center_no"),

	  (troop_set_name, "trp_zann_knight_2",  "@General Chingis"),
	  (troop_set_slot, "trp_zann_knight_2", slot_lord_reputation_type, lrep_upstanding),
	  (troop_set_slot, "trp_zann_knight_2", slot_troop_age, 31),
      (troop_set_slot, "trp_zann_knight_2", slot_troop_renown, 1000),
	  (troop_set_slot, "trp_zann_knight_2", slot_troop_wealth, 10000),
      (call_script, "script_create_kingdom_hero_party_dk", "trp_zann_knight_2", ":center_no"),
      
	  (troop_set_name, "trp_zann_knight_3",  "@General Qin"),
	  (troop_set_slot, "trp_zann_knight_3", slot_lord_reputation_type, lrep_martial),
	  (troop_set_slot, "trp_zann_knight_3", slot_troop_age, 30),
      (troop_set_slot, "trp_zann_knight_3", slot_troop_renown, 1000),
	  (troop_set_slot, "trp_zann_knight_3", slot_troop_wealth, 10000),
      (call_script, "script_create_kingdom_hero_party_dk", "trp_zann_knight_3", ":center_no"),
      
	  (troop_set_name, "trp_zann_knight_4",  "@General Yuan"),
	  (troop_set_slot, "trp_zann_knight_4", slot_lord_reputation_type, lrep_martial),
	  (troop_set_slot, "trp_zann_knight_4", slot_troop_age, 20),
      (troop_set_slot, "trp_zann_knight_4", slot_troop_renown, 1000),
	  (troop_set_slot, "trp_zann_knight_4", slot_troop_wealth, 10000),
      (call_script, "script_create_kingdom_hero_party_dk", "trp_zann_knight_4", ":center_no"),
      
	  (troop_set_name, "trp_zann_knight_5",  "@General Wu Song"),
	  (troop_set_slot, "trp_zann_knight_5", slot_lord_reputation_type, lrep_upstanding),
	  (troop_set_slot, "trp_zann_knight_5", slot_troop_age, 25),
	  (troop_set_slot, "trp_zann_knight_5", slot_troop_renown, 1000),
	  (troop_set_slot, "trp_zann_knight_5", slot_troop_wealth, 10000),
      (call_script, "script_create_kingdom_hero_party_dk", "trp_zann_knight_5", ":center_no"),
      
	  (troop_set_name, "trp_zann_knight_6",  "@General Hiero"),
	  (troop_set_slot, "trp_zann_knight_6", slot_lord_reputation_type, lrep_upstanding),
	  (troop_set_slot, "trp_zann_knight_6", slot_troop_age, 30),
      (troop_set_slot, "trp_zann_knight_6", slot_troop_renown, 1000),
	  (troop_set_slot, "trp_zann_knight_6", slot_troop_wealth, 10000),
      (call_script, "script_create_kingdom_hero_party_dk", "trp_zann_knight_6", ":center_no"),
      
	  (troop_set_name, "trp_zann_knight_7",  "@General Atila"),
	  (troop_set_slot, "trp_zann_knight_7", slot_lord_reputation_type, lrep_martial),
	  (troop_set_slot, "trp_zann_knight_7", slot_troop_age, 39),
      (troop_set_slot, "trp_zann_knight_7", slot_troop_renown, 1000),
	  (troop_set_slot, "trp_zann_knight_7", slot_troop_wealth, 10000),
      (call_script, "script_create_kingdom_hero_party_dk", "trp_zann_knight_7", ":center_no"),
      
	  (troop_set_note_available, "trp_zann_lord", 1),
	  (troop_set_note_available, "trp_zann_knight_1", 1),
	  (troop_set_note_available, "trp_zann_knight_2", 1),
	  (troop_set_note_available, "trp_zann_knight_3", 1),
	  (troop_set_note_available, "trp_zann_knight_4", 1),
	  (troop_set_note_available, "trp_zann_knight_5", 1),
	  (troop_set_note_available, "trp_zann_knight_6", 1),
	  (troop_set_note_available, "trp_zann_knight_7", 1),
      
      (call_script, "script_update_all_notes"),
      (faction_set_slot, "fac_zann_dynasty", slot_faction_marshall, "trp_zann_knight_1"),
      (faction_set_slot, "fac_zann_dynasty", slot_faction_ai_state, sfai_attacking_center),
      (faction_set_slot, "fac_zann_dynasty", slot_faction_ai_object, ":center_no"),
      (party_set_faction,"p_main_party","fac_player_faction"), #This is a bug fix for a bug that sometimes does and sometimes does not show up - Jinnai
      (jump_to_menu, "mnu_dk_invasion_start_warning"),
      (party_set_faction, "$onishi","fac_zann_dynasty"), # changing unique spawn factions 
      (party_set_faction, "$yachamoci","fac_zann_dynasty"),
      (set_spawn_radius, 5), # spawning 20 war parties 
      (spawn_around_party,"p_town_6","pt_zann_vanguard"), #1 
      (spawn_around_party,"p_town_6","pt_zann_vanguard"),
      (spawn_around_party,"p_town_6","pt_zann_vanguard"),
      (spawn_around_party,"p_town_6","pt_zann_vanguard"),
      (spawn_around_party,"p_town_6","pt_zann_vanguard"), #5
      (spawn_around_party,"p_town_6","pt_zann_vanguard"),
      (spawn_around_party,"p_town_6","pt_zann_vanguard"),
      (spawn_around_party,"p_town_6","pt_zann_vanguard"),
      (spawn_around_party,"p_town_6","pt_zann_vanguard"),
      (spawn_around_party,"p_town_6","pt_zann_vanguard"), #10
      (spawn_around_party,"p_town_2","pt_zann_vanguard"),
      (spawn_around_party,"p_town_2","pt_zann_vanguard"),
      (spawn_around_party,"p_town_2","pt_zann_vanguard"),
      (spawn_around_party,"p_town_2","pt_zann_vanguard"),
      (spawn_around_party,"p_town_2","pt_zann_vanguard"), #15
      (spawn_around_party,"p_town_2","pt_zann_vanguard"), 
      (spawn_around_party,"p_town_2","pt_zann_vanguard"), 
      (spawn_around_party,"p_town_2","pt_zann_vanguard"), 
      (spawn_around_party,"p_town_2","pt_zann_vanguard"), 
      (spawn_around_party,"p_town_2","pt_zann_vanguard"), #20

	  ## relations with marshall
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_lord", "trp_zann_knight_1", 99),
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_1", "trp_zann_knight_1", 99),
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_2", "trp_zann_knight_1", 99),
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_3", "trp_zann_knight_1", 99),
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_4", "trp_zann_knight_1", 99),
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_5", "trp_zann_knight_1", 99),
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_6", "trp_zann_knight_1", 99),
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_7", "trp_zann_knight_1", 99),
      ## relations with king
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_1", "trp_zann_lord", 99),
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_2", "trp_zann_lord", 99),
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_3", "trp_zann_lord", 99),
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_4", "trp_zann_lord", 99),
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_5", "trp_zann_lord", 99),
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_6", "trp_zann_lord", 99),
      	  (call_script, "script_troop_change_relation_with_troop", "trp_zann_knight_7", "trp_zann_lord", 99),
     
      ]),#############################################################################################
 
Not sure about party template id mismatches (I'm too lazy to look at the code. :razz: Check to see if the party templates ids in the simple trigger match up correctly though. Does it compile ok? :???:) but there's always the party_add_troop operation to add specific troops to the party. :smile:
 
The Dark Robin said:
Not sure about party template id mismatches (I'm too lazy to look at the code. :razz: Check to see if the party templates ids in the simple trigger match up correctly though. Does it compile ok? :???:) but there's always the party_add_troop operation to add specific troops to the party. :smile:

Well the thing is I want them to be normal lords. It compiles fine with no errors but the thing I'm confused about is why it sometimes works and sometimes doesn't :???:
 
Either module.ini or thorgrim's map editor, depending on what you are talking about. Do you mean the camera borders? If so, then edit module.ini. If not, then look in thorgrim's. (just drag the vertexes at the edge of the map)

Can someone answer this:
The Dark Robin said:
I have two questions:
1) Is it possible to make a waterfall on the world map, including particle effects?
2) Is it possible to directly control the direction that individual rivers on the world map flow? I saw the river direction in module.ini, but is there a way to control individual rivers?

Thanks. :smile:
 
Status
Not open for further replies.
Back
Top Bottom