Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Lumos said:
If your favourite 3D modelling application supports heightmaps, and your picture is a heightmap - yes.
Pretty nice ideaa...But it probably wont look as good as hand made...

How do i get party id if i only have party template?
More precisely i made a template spawned him set behaviour and its good but can i use party attach to party operation with party template...?
 
Beobart said:
Is there a way to make a new world map based on a 2D picture?
Thorgrim's editor supports importing heightmaps if I recall correctly.
I know that was the way I did it with my old SP mod, the results were okay. The problem was my picture was pretty lowres, which perhaps was the result of the somewhat rough look.
81lrGV4.jpg
0pGIK1d.jpg
VMlPFK5.jpg
HN2tmdL.jpg
 
DarkNord said:
How do i get party id if i only have party template?

Code:
spawn_around_party                    = 1100  # (spawn_around_party, <party_id>, <party_template_id>),
                                              # Creates a new party from a party template and puts it's <party_id> into reg0.

or loop all parties, filter by party template. Depends on what you want to do.
Code:
party_get_template_id                 = 1609  # (party_get_template_id, <destination>, <party_id>),
                                              # Retrieves what party template was used to create the party (if any). Commonly used to identify encountered party type.
 
On another note, I need help with a Multiplayer trigger if anyone knows a solution.
Basically before we had crouching in a way you'd hold C, and enter crouch mode in which you could walk in. However it was being abused because you could instantly(and very swiftly) crouch and stand back up all the time, and if you used your gun/blaster in the process(behind cover usually), you'd be shooting bolts but be unkillable yourself. This was a major issue so we added a delay to the trigger, but now it's pretty clumsy as it just creates an inconsistent delay between the player pressing the C key and his character crouching...some time later, it's never quite the same.

What would be the correct way to remake this into something that just doesn't allow you to crouch again for something like 2 seconds after you've let go of the C key and stood up?

Current code, don't mind the sprint part. The main difference(maybe the only one) is in the first line, the trigger time variables.
Code:
sw_animation_triggers = (0, 0, 0.5, [(neg|multiplayer_is_dedicated_server)],#_Sebastian_
	[
		(multiplayer_get_my_player, ":my_player"),
		(player_get_agent_id, ":agent", ":my_player"),
		(ge, ":agent", 0),
		(agent_get_animation, ":cur_anim", ":agent", 0),
		#crouching
		(try_begin),
			(game_key_is_down, gk_crouch_mode),
			(agent_get_horse, ":horse", ":agent"),
			(lt, ":horse", 0),
			(try_begin),
				(neg|is_between, ":cur_anim", "anim_stand_to_crouch_new", "anim_crouch_end"),
				#(neg|is_presentation_active, "prsnt_multiplayer_get_admin_message"), #Sherlock not needed anymore
				(agent_get_position, pos1, ":agent"),
				(copy_position, pos2, pos1),
				(position_set_z_to_ground_level, pos2),
				(get_distance_between_positions, ":distance", pos1, pos2),
				(le, ":distance", 0),
				(multiplayer_send_int_to_server,multiplayer_player_crouch_request, "anim_stand_to_crouch_new"),
			(else_try),
				(eq, ":cur_anim", "anim_crouch"),
				(game_key_is_down, gk_move_forward),
				(multiplayer_send_int_to_server,multiplayer_player_crouch_request, "anim_crouch_walk"),
			(else_try),
				(eq, ":cur_anim", "anim_crouch_walk"),
				(neg|game_key_is_down, gk_move_forward),
				(multiplayer_send_int_to_server,multiplayer_player_crouch_request, "anim_crouch"),
			(try_end),
    (else_try),
			# (player_get_agent_id, ":agent", ":my_player"),#_Sebastian_ disable
			# (ge, ":agent", 0),
			(is_between, ":cur_anim", "anim_stand_to_crouch_new", "anim_crouch_end"),
			(neq, ":cur_anim", "anim_crouch_to_stand_new"),
			(multiplayer_send_int_to_server,multiplayer_player_crouch_request, "anim_crouch_to_stand_new"),
    (try_end),
#/crouching
#sprinting
		(try_begin),
			(agent_slot_eq, ":agent", slot_agent_using_force, force_sprint),
			(neg|is_between, ":cur_anim", "anim_stand_to_crouch_new", "anim_crouch_end"),
			(store_add, ":stances_end", "anim_jedi_stance_2", 1),
			(neg|is_between, ":cur_anim", "anim_jedi_stance_1", ":stances_end"),
			(try_begin),
				(game_key_is_down, gk_move_forward),
				(agent_get_position, pos1, ":agent"),
				(copy_position, pos2, pos1),
				(position_set_z_to_ground_level, pos2),
				(get_distance_between_positions, ":distance", pos1, pos2),
				(le, ":distance", 0),
        (game_key_is_down, gk_move_forward),
				(multiplayer_send_int_to_server,multiplayer_player_crouch_request, "anim_sprint"),
			(else_try),
				(neg|game_key_is_down, gk_move_forward),
				(eq, ":cur_anim", "anim_jedi_stance_1"),
				(multiplayer_send_int_to_server,multiplayer_player_crouch_request, "anim_end_animation"),
			(try_end),
    (try_end),
	])

Code before:
Code:
sw_animation_triggers = (0, 0, 0, [(neg|multiplayer_is_dedicated_server)],#_Sebastian_
	[
		(multiplayer_get_my_player, ":my_player"),
		(player_get_agent_id, ":agent", ":my_player"),
		(ge, ":agent", 0),
		(agent_get_animation, ":cur_anim", ":agent", 0),
		#crouching
		(try_begin),
			(game_key_is_down, gk_crouch_mode),
			(agent_get_horse, ":horse", ":agent"),
			(lt, ":horse", 0),
			(try_begin),
				(neg|is_between, ":cur_anim", "anim_stand_to_crouch_new", "anim_crouch_end"),
				#(neg|is_presentation_active, "prsnt_multiplayer_get_admin_message"), #Sherlock not needed anymore
				(agent_get_position, pos1, ":agent"),
				(copy_position, pos2, pos1),
				(position_set_z_to_ground_level, pos2),
				(get_distance_between_positions, ":distance", pos1, pos2),
				(le, ":distance", 0),
				(multiplayer_send_int_to_server,multiplayer_player_crouch_request, "anim_stand_to_crouch_new"),
			(else_try),
				(eq, ":cur_anim", "anim_crouch"),
				(game_key_is_down, gk_move_forward),
				(multiplayer_send_int_to_server,multiplayer_player_crouch_request, "anim_crouch_walk"),
			(else_try),
				(eq, ":cur_anim", "anim_crouch_walk"),
				(neg|game_key_is_down, gk_move_forward),
				(multiplayer_send_int_to_server,multiplayer_player_crouch_request, "anim_crouch"),
			(try_end),
    (else_try),
			# (player_get_agent_id, ":agent", ":my_player"),#_Sebastian_ disable
			# (ge, ":agent", 0),
			(is_between, ":cur_anim", "anim_stand_to_crouch_new", "anim_crouch_end"),
			(neq, ":cur_anim", "anim_crouch_to_stand_new"),
			(multiplayer_send_int_to_server,multiplayer_player_crouch_request, "anim_crouch_to_stand_new"),
    (try_end),
#/crouching
#sprinting
		(try_begin),
			(agent_slot_eq, ":agent", slot_agent_using_force, force_sprint),
			(neg|is_between, ":cur_anim", "anim_stand_to_crouch_new", "anim_crouch_end"),
			(store_add, ":stances_end", "anim_jedi_stance_2", 1),
			(neg|is_between, ":cur_anim", "anim_jedi_stance_1", ":stances_end"),
			(try_begin),
				(game_key_is_down, gk_move_forward),
				(agent_get_position, pos1, ":agent"),
				(copy_position, pos2, pos1),
				(position_set_z_to_ground_level, pos2),
				(get_distance_between_positions, ":distance", pos1, pos2),
				(le, ":distance", 0),
        (game_key_is_down, gk_move_forward),
				(multiplayer_send_int_to_server,multiplayer_player_crouch_request, "anim_sprint"),
			(else_try),
				(neg|game_key_is_down, gk_move_forward),
				(eq, ":cur_anim", "anim_jedi_stance_1"),
				(multiplayer_send_int_to_server,multiplayer_player_crouch_request, "anim_end_animation"),
			(try_end),
    (try_end),
	])
 
@Sherlock Holmes
You canged the re-arm interval, not the delay interval.
Make sure that you know which tulpe means what.
Code:
1) Check interval: How frequently this trigger will be checked.
2) Delay interval: How long to wait before applying the consequences of the trigger after its conditions block has succeeded.
3) Re-arm interval: How much time must pass after applying the consequences of the trigger for the trigger to become active again.
However the re-arm interval is still the way to go, just set it to 2.
 
You could add timer your self you know like in conditions put
Code:
(eq,"$crouch_timer",0),
and in consequence
Code:
(assign,"$crouch_timer",1),
and just make another trigger that will after 0.5 seconds return crouch timer back to 0...
Ofc first try sebastians suggestion
 
I see mod like TLD have items restriction for certain race, how they did that??
I've seen their module system and can't find the script(s), please anyone help me.

Sorry if this question already asked/answered before, i searched entire forum and no luck,  :facepalm:.
and read this entire ,1.637 pages, topic is a pain.
 
The Carpenter said:
I see mod like TLD have items restriction for certain race, how they did that??
I've seen their module system and can't find the script(s), please anyone help me.

How does this restriction manifest?

Edit: in module_tableau_materials.py there's this bit:
Code:
("game_inventory_window", 0, "tableau_with_transparency", 1024, 1024, 0, 0, 180, 270,
   [(store_script_param, ":troop_no", 1),

	(try_begin), # TLD equipment appropriateness check
		(eq, "$tld_option_crossdressing", 0),
		(this_or_next|eq, ":troop_no", "trp_player"),
		(is_between, ":troop_no", companions_begin, companions_end),
		(call_script, "script_check_equipped_items", ":troop_no"),
	(try_end),
 
When a lord join the fac_player_supporter_faction, he must recruit fac_kingdom_11 culture troops.So, I added this trigger for this, but it is not working.What is the wrong?
(0, 0, 24, [], [
  #(is_between, ":lord", active_npcs_begin, active_npcs_end),
#(troop_slot_eq, ":lord", slot_troop_occupation, slto_kingdom_hero),
(store_faction_of_troop, ":lord_faction", active_npcs_begin, active_npcs_end),
(eq, ":lord_faction", "fac_player_supporters_faction"),
(troop_set_slot, ":lord_faction", slot_troop_original_faction, "fac_kingdom_11"), #player kingdom troops-custom troops
]),
 
DarkNord said:
@Frozen painter i dont see any way how can this work as i see you just put that lord in slot...

well he studied part of the code used on recruiting troops (triggers and scripts) and noticed that particular slot is a important part of it  :mrgreen:

he just needs to debug the code and see what went wrong. The idea is solid.

frozenpainter said:
(0, 0, 24, [], [

if you want another suggestion: replace your timed trigger with a simple trigger "ti_on_switch_to_map". Won't affect performance.
 
@Emogma
Not really sure what you want but if you think on prsentation when you press backspace you could just in MT put trigger that will do something else on backspace press or not do anything like when you hit tab and get message "Can't leave now".

For meshes part if i understand you you should look in common res...not sure is it core_ui_materials but you just locate texture and edit it as you want (if using Photoshop i think you should save as DXT 5 altrough not sure...)
 
Status
Not open for further replies.
Back
Top Bottom