How to Change Time of Day for Custom Multiplayer Scene?

Users who are viewing this thread

Watchful

Recruit
I'd really like to make my snow scene night time, cause it's so bright. Any links to a guide that explains how would be good, unless it's simple enough to give a quick solution.
 
first of all, short question like this should be asked here:
https://forums.taleworlds.com/index.php/topic,6575.22425.html
second, to make a scene night time, you'd need to change the module itself for you and for everyone else who uses it.
something like this:
Code:
	#script_multiplayer_event_mission_end
	("multiplayer_event_mission_end",[
		##WEATHER CHANGES
		(try_begin),
			(multiplayer_is_server),
			(eq, ":scn", "scn_enterprise_dyeworks"),
			(assign, "$g_rain_type", "$g_menu_rain_type", 2),#Clear, Rain, Snow
			(store_random_in_range, "$g_rain_amount", 0, 100),
			(store_random_in_range, "$g_round_day_time", 0, 24),
			(store_random_in_range, "$g_fog_distance", 10, 10000),#higher distance means less fog
			(val_min, "$g_fog_distance", 999),
			(get_max_players, ":num_players"),
			(try_for_range, ":player", 1, ":num_players"),
				(player_is_active, ":player"),
				(multiplayer_send_3_int_to_player, ":player", multiplayer_event_weather, var_day_time,		"$g_round_day_time"),
				(multiplayer_send_3_int_to_player, ":player", multiplayer_event_weather, var_rain_type,		"$g_rain_type"),
				(multiplayer_send_3_int_to_player, ":player", multiplayer_event_weather, var_rain_amount,	"$g_rain_amount"),
				(multiplayer_send_3_int_to_player, ":player", multiplayer_event_weather, var_fog_dist,		"$g_fog_distance"),
			(try_end),
		(try_end),
		##WEATHER CHANGES
		]),
	#script_multiplayer_server_before_mission_start_common
	("multiplayer_server_before_mission_start_common",[
		(try_begin),
			(scene_allows_mounted_units),
			(assign, "$g_horses_are_avaliable", 1),
		(else_try),
			(assign, "$g_horses_are_avaliable", 0),
		(try_end),
		##WEATHER CHANGES
		(set_rain, "$g_rain_type", "$g_rain_amount"),
		(scene_set_day_time, "$g_round_day_time"),
		(set_fog_distance, "$g_fog_distance"),#fog colour?
		(try_begin),
			(multiplayer_is_server),
			(try_begin),
				(eq,"$g_rain_type",0),
				(str_store_string,s1,"@Clear"),
			(else_try),
				(eq,"$g_rain_type",1),
				(str_store_string,s1,"@Rainy"),
			(else_try),
				(str_store_string,s1,"@Snowy"),
			(try_end),
			(assign,reg1,"$g_rain_amount"),
			(str_store_string, s1, "@Weather set to {s1} with {reg1} strenght"),
			(assign,reg1,"$g_round_day_time"),
			(str_store_string, s2, "@Day time set to {reg1}"),
			(assign,reg1,"$g_fog_distance"),
			(str_store_string, s3, "@Fog distance set to {reg1}"),
			(server_add_message_to_log, s1),
			(server_add_message_to_log, s2),
			(server_add_message_to_log, s3),
		(try_end),
		##WEATHER CHANGES
		(assign, "$g_multiplayer_mission_end_screen", 0),
		(get_max_players, ":num_players"),
		(try_for_range, ":player_no", 0, ":num_players"),
			(player_is_active, ":player_no"),
			(call_script, "script_multiplayer_init_player_slots", ":player_no"),
			(assign, ":initial_gold", multi_initial_gold_value),
			(val_mul, ":initial_gold", "$g_multiplayer_initial_gold_multiplier"),
			(val_div, ":initial_gold", 100),
			(player_set_gold, ":player_no", ":initial_gold"),
			(player_set_slot, ":player_no", slot_player_first_spawn, 1), #not required in siege, bt, fd
		(try_end),
		]),

third thing you should know, is that any player that join the server, will either have to rejoin it to have any of those changes apply, or wait till the next map starts
 
Back
Top Bottom