Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Create the faction as normal but make sure you set its status flag to inactive lest it show up in places you don't want.  Then make either a really long simple trigger to set it off or a daily/weekly trigger that counts.  There's some trickery involved to make it work 100% in a way that isn't going to look like a hack but shouldn't be too difficult.  I think the SoD source is available if'n you just wanted to take a look.

Kind of an open ended question, though.  Lots of moving parts to get right.
 
How would I add a town to appear when this trigger is activated?
Code:
	(24,
	[
		(store_current_day, ":cur_day"),
		(store_random_in_range, ":village_no", "p_village_16", "P_village_67"),
		(eq, ":cur_day", 60),
                        (call_script, "script_create_kingdom_hero_party", "trp_kingdom_6_lord", ":village_no"),
			(troop_set_slot, "trp_kingdom_6_lord", slot_troop_wealth, 100000),
			(call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_6", "fac_kingdom_1", 1),
			(call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_6", "fac_kingdom_2", 1),
				(try_for_range, ":troop_no", "trp_knight_6_01", "trp_knight_6_20"),
					(troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero),
					(neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0),
					(neg|troop_slot_ge, ":troop_no", slot_troop_leaded_party, 1),
					(call_script, "script_create_kingdom_hero_party", ":troop_no", ":village_no"),
					(troop_set_slot, ":troop_no", slot_troop_wealth, 40000),
				(try_end),
				]),
 
Make the town, but give it the flag pf_disabled. Then in that trigger just remove the pf_disabled. (Is there an operation for that? I can't remember, but party_set_flags should work, right?)
 
I was about to try that, but first, I'm getting an error while building module(before I added that in).

The code is:
Code:
(24,
	[
		(store_current_day, ":cur_day"),
		(store_random_in_range, ":village_no", "p_village_16", "P_village_67"),
		(eq, ":cur_day", 365),
			(call_script, "script_create_kingdom_hero_party", "trp_kingdom_6_lord", ":village_no"),
			(troop_set_slot, "trp_kingdom_6_lord", slot_troop_wealth, 100000),
			(call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_6", "fac_kingdom_1", 1),
			(call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_6", "fac_kingdom_2", 1),
			(call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_6", "fac_kingdom_3", 1),
			(call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_6", "fac_kingdom_4", 1),
			(call_script, "script_diplomacy_start_war_between_kingdoms", "fac_kingdom_6", "fac_kingdom_5", 1),
				(try_for_range, ":troop_no", "trp_knight_6_01", "trp_knight_6_20"),
					(troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero),
					(neg|troop_slot_ge, ":troop_no", slot_troop_prisoner_of_party, 0),
					(neg|troop_slot_ge, ":troop_no", slot_troop_leaded_party, 1),
					(call_script, "script_create_kingdom_hero_party", ":troop_no", ":village_no"),
					(troop_set_slot, ":troop_no", slot_troop_wealth, 40000),
				(try_end),
				]),
And I keep getting this error:
Code:
Traceback <most recent call last>:
     File "process_global_variables.py", line 7, in <module>
                from module_simple_triggers import *
     File "K:\Program Files\Mount&Blade\Modules\TOA\ModuleSystem\module_simple_triggers.py", line 2645, in <module>
         <try_end>
TypeError: 'tuple' object is not callable
 
Simple stuff.

Add a comma at the end of the tuple above the one you just added.

So this:

...
#checking if the party is away from his original faction parties
        (assign, ":end_cond", kingdom_heroes_end),
        (try_for_range, ":enemy_troop_no", kingdom_heroes_begin, ":end_cond"),
          (troop_get_slot, ":enemy_party_no", ":enemy_troop_no", slot_troop_leaded_party),
          (gt, ":enemy_party_no", 0),
          (store_faction_of_party, ":enemy_faction_no", ":enemy_party_no"),
          (eq, ":enemy_faction_no", ":faction_no"),
          (store_distance_to_party_from_party, ":dist", ":party_no", ":enemy_party_no"),
          (lt, ":dist", 4),
          (assign, ":end_cond", 0),
        (try_end),
        (neq, ":end_cond", 0),
        (assign, ":continue", 1),
      (try_end),
      (eq, ":continue", 1),
      (call_script, "script_change_troop_faction", ":troop_no", ":new_faction_no"),
      (troop_set_slot, ":troop_no", slot_troop_change_to_faction, 0),
      (try_begin),
        (is_between, ":new_faction_no", kingdoms_begin, kingdoms_end),
        (str_store_troop_name_link, s1, ":troop_no"),
        (str_store_faction_name_link, s2, ":faction_no"),
        (str_store_faction_name_link, s3, ":new_faction_no"),
        (display_message, "@{s1} has switched from {s2} to {s3}."),
        (try_begin),
          (eq, ":faction_no", "$players_kingdom"),
          (call_script, "script_add_notification_menu", "mnu_notification_troop_left_players_faction", ":troop_no", ":new_faction_no"),
        (else_try),
          (eq, ":new_faction_no", "$players_kingdom"),
          (call_script, "script_add_notification_menu", "mnu_notification_troop_joined_players_faction", ":troop_no", ":faction_no"),
        (try_end),
      (try_end),
    (try_end),
    ]),

Instead of this:

...
#checking if the party is away from his original faction parties
        (assign, ":end_cond", kingdom_heroes_end),
        (try_for_range, ":enemy_troop_no", kingdom_heroes_begin, ":end_cond"),
          (troop_get_slot, ":enemy_party_no", ":enemy_troop_no", slot_troop_leaded_party),
          (gt, ":enemy_party_no", 0),
          (store_faction_of_party, ":enemy_faction_no", ":enemy_party_no"),
          (eq, ":enemy_faction_no", ":faction_no"),
          (store_distance_to_party_from_party, ":dist", ":party_no", ":enemy_party_no"),
          (lt, ":dist", 4),
          (assign, ":end_cond", 0),
        (try_end),
        (neq, ":end_cond", 0),
        (assign, ":continue", 1),
      (try_end),
      (eq, ":continue", 1),
      (call_script, "script_change_troop_faction", ":troop_no", ":new_faction_no"),
      (troop_set_slot, ":troop_no", slot_troop_change_to_faction, 0),
      (try_begin),
        (is_between, ":new_faction_no", kingdoms_begin, kingdoms_end),
        (str_store_troop_name_link, s1, ":troop_no"),
        (str_store_faction_name_link, s2, ":faction_no"),
        (str_store_faction_name_link, s3, ":new_faction_no"),
        (display_message, "@{s1} has switched from {s2} to {s3}."),
        (try_begin),
          (eq, ":faction_no", "$players_kingdom"),
          (call_script, "script_add_notification_menu", "mnu_notification_troop_left_players_faction", ":troop_no", ":new_faction_no"),
        (else_try),
          (eq, ":new_faction_no", "$players_kingdom"),
          (call_script, "script_add_notification_menu", "mnu_notification_troop_joined_players_faction", ":troop_no", ":faction_no"),
        (try_end),
      (try_end),
    (try_end),
    ])
 
Yoshiboy said:
Missing a |
Ah, thanks. That solved it.
__________________________________________________________________________________________________________________________________________

[Question] If I set my bow to do 20 cutting damage and my arrow to do -3 piercing damage, will them damage be 17 pierce? Or is there any other way I can accomplish the following: I want to have a hand bow doing cutting damage and the possibility of buying bodkin arrows that better pierce armour at the expense of damage. As to only use it against armoured targets.

[Question] If possible I would like the Longbow and the Handbow to use different arrows and not being able to use each-other's. Is there a way?
 
udm said:
Just out of curiosity, what's multi mesh?

Aw come on don't ignore me. I'm still learning the ropes of M&B modding, so I'd like to pick up as much knowledge as possible.
 
udm said:
udm said:
Just out of curiosity, what's multi mesh?

Aw come on don't ignore me. I'm still learning the ropes of M&B modding, so I'd like to pick up as much knowledge as possible.
A multi mesh is an item that uses more than one mesh, like the swords. The swords had one mesh for the handle and one mesh for the blade.

Multimeshes don't seem to work with the new version though. (Unless it's a scene prop.)
 
Thanks Ruthven, but I'm still a bit confused. Is it still one file with multiple surfaces, or split into different files?
 
Ruthven said:
Multimeshes don't seem to work with the new version though. (Unless it's a scene prop.)


oh - so it's not me....

I've had some annoying cases there...  More textures will be needed....  Many, many more.
 
and now a question, that some person was asking in a dreadful combination of syllables...

one makes a new map, and applies it to a module.

One goes into the module.ini file in the module directory, and sets the dimensions to +/-800 for x and y.
Still, one is unable to move outside of the original 'native' area on the new map.

Is it that M&B doesn't recognise dimensions greater than a certain size?  If so, what is the max size?
I'm pretty sure we've had 200 before, but in older versions...

Ruthven, you have had this before too, right?
 
Greatings,

I'm intrested in how to transfer one city from one faction to another in proper way by script.
Since
Code:
(call_script, "script_give_center_to_faction", "p_town_6", "fac_kingdom_4"), 
is just not enough since parties attached to the city still stays there. And it looks quite bad.

How to fix this?..
 
Ok, i've got a real tricky question i think, or maybe not...

how do i create a menu in the camp window so that i can go to the "battlefield" with no enemies, so i can make let's say a castle there in Edit mode and it stays there? and it never changes, so the castle never disappear?
 
Status
Not open for further replies.
Back
Top Bottom