I think this will work:Cozur said:Looking for a piece of code that will cause set lords to defect to a set faction if a castle is captured.
Code:
(call_script, "script_change_troop_faction", "trp_", "fac_"),
I think this will work:Cozur said:Looking for a piece of code that will cause set lords to defect to a set faction if a castle is captured.
(call_script, "script_change_troop_faction", "trp_", "fac_"),
La Grandmaster said:If anyone knows why I only get two guards spawning at entry point 52 - instead of two at entry point 50 and one at entry point 51 I would appreciate it
Yes you have to add them. The entry points in scenes are not the same ones used in operations. In operations you are using index of entry in mission template, not the number of entry in scene.La Grandmaster said:- the entry points are listed in the mission template as - should I have coded in entry points 48 and 49 as well? evn though i wont use them
(47,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),
(47,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]),
(set_visitors,50,"trp_mounted_walker_aryan",2),
(set_visitor,51,"trp_mounted_walker_aryan"),
(set_visitors,48,"trp_mounted_walker_aryan",2),
(set_visitor,49,"trp_mounted_walker_aryan"),
Something unusual said:I think this will work:Cozur said:Looking for a piece of code that will cause set lords to defect to a set faction if a castle is captured.
Code:(call_script, "script_change_troop_faction", "trp_", "fac_"),
(try_begin),
(eq, "$current_town", "p_"),
(set_visitor, ":cur_entry", "trp_"),
(val_add, ":cur_entry", 1),
(try_end),
jacobhinds said:is there a way to give certain factions larger armies? for example lords from one faction might have armies up to 300 in size, while another might be limited to around 50.
Somebody said:(agent_set_no_dynamics)? It might only prevent them from moving, as the player agent can still turn when that's applied to them. Otherwise you can do stupid stuff like having them be mounted on a tiny invisible horse (if you can manage to enforce a horseback idle animation), or even having a scene prop on top of an invisible agent.Docm30 said:Is there a good way I can make an agent always face forward and not turn to face the player when approached or talked to?
Add a menu option in the default town menu, checking for whatever town this is. You then use rest_for_hours before jumping to the menu or making use of Native's auto-jump feature after resting. In the scene itself you should add a trigger to rest_for_hours inside when the player exits the scene (tab, scene limit), or toss it in the menu's second option before having it jump back to whatever city.Cozur said:Any way to make it so that the entrance to this scene:
appears in a certain town only. Say you enter the town of Whatevertowncity and you can enter this particular scene, but only in this particular town? And when you do, it takes 12 hours to enter the scene, and 12 hours to leave it.
This already happens with crossbows inside the engine itself, but you can also catch get_global_cloud_amount/get_global_haze_amount and then do agent_set_accuracy_modifier/agent_set_reload_speed_modifier inside the mission template when agents are spawned. Try not to check it inside the loop itself and experiment to see what conditions actually create fog inside the game.cucas said:How can I make AI shoot badly under foggy conditions? I want to reduce shooting range and accuracy.
("town_bank",
[(party_slot_eq, "p_town_17", slot_party_type, spt_town)],
"Visit the Iron Bank of Braavos.",
[
(assign, reg10, 0),
(start_presentation, "prsnt_bank"),
]),
Cozur said:jacobhinds said:is there a way to give certain factions larger armies? for example lords from one faction might have armies up to 300 in size, while another might be limited to around 50.
Edit the faction reinforcements in party_templates.
(try_begin),
(eq, ":center_no", "p_town_6"),
(eq, ":center_faction", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_1", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_2", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_3", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_4", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_5", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_6", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_7", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_11", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_14", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_15", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_18", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_19", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_20", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_21", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_22", "fac_kingdom_8"),
(call_script, "script_change_troop_faction", "trp_knight_1_23", "fac_kingdom_8"),
(try_end),
["krag", "Springfield M1892-99 Krag", [("krag",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed|itp_cant_reload_on_horseback|itp_next_item_as_melee ,itc_parry_polearm|itcf_shoot_musket|itcf_carry_crossbow_back,
683 , weight(4.3)|difficulty(0)|spd_rtng(18) | shoot_speed(410) | thrust_damage(200 ,pierce)|max_ammo(5)|accuracy(126),imodbits_none,
[(ti_on_weapon_attack, [(play_sound,"snd_rifle")])]],
What script? Its simply a try-end block, so what do you mean...Cozur said:Any particular reason this script wouldn't work?:
By setting "Number of Ragdolls" to unlimited in the graphics options?!Willhelm said:Is there anyway to enforce ragdolls to be enabled?
Also
What do i need to add to make the sound heard by everyone on multiplayer, because that currently only lets the player hear it.Code:["krag", "Springfield M1892-99 Krag", [("krag",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed|itp_cant_reload_on_horseback|itp_next_item_as_melee ,itc_parry_polearm|itcf_shoot_musket|itcf_carry_crossbow_back, 683 , weight(4.3)|difficulty(0)|spd_rtng(18) | shoot_speed(410) | thrust_damage(200 ,pierce)|max_ammo(5)|accuracy(126),imodbits_none, [(ti_on_weapon_attack, [(play_sound,"snd_rifle")])]],
# script_game_missile_launch
# Input: arg1 = shooter_agent_id, arg2 = weapon_item_id, pos1 = weapon_item_position
# Output: none
("game_missile_launch",
[
(store_script_param, ":shooter_agent", 1),
(store_script_param, ":item_id", 2),
...
...
]),
cucas said:Hey, so I've created a faction just for mercenaries and I've been wondering how to make it possible to hire them.
The idea is to initiate a dialog if I encounter them on the world map and make them join me if I pay up.
In theory, I think I might know how it works, but i can't make it happen in practice. Sadly, I don't even know how to make a dialog just for the mercs. Ideally, the idea is to have a few options, like this:
1. Hire them into my party (don't know how to transfer troops).
2. Hire them as a separate party. ( think I'd have to use script_change_troop_faction)
3. Bribe a party already recruited by AI at twice their price (original_faction is merc, but current party is not?)
Willhelm said:Also
What do i need to add to make the sound heard by everyone on multiplayer, because that currently only lets the player hear it.Code:["krag", "Springfield M1892-99 Krag", [("krag",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed|itp_cant_reload_on_horseback|itp_next_item_as_melee ,itc_parry_polearm|itcf_shoot_musket|itcf_carry_crossbow_back, 683 , weight(4.3)|difficulty(0)|spd_rtng(18) | shoot_speed(410) | thrust_damage(200 ,pierce)|max_ammo(5)|accuracy(126),imodbits_none, [(ti_on_weapon_attack, [(play_sound,"snd_rifle")])]],
(ti_on_weapon_attack, [
(store_trigger_param_1, ":agent_id"),
(agent_play_sound, ":agent_id", "snd_rifle"),
])
But its only synced to players within a radius of 20 meter, so you wont hear it from a further distance.The_dragon said:Willhelm said:Also
What do i need to add to make the sound heard by everyone on multiplayer, because that currently only lets the player hear it.Code:["krag", "Springfield M1892-99 Krag", [("krag",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed|itp_cant_reload_on_horseback|itp_next_item_as_melee ,itc_parry_polearm|itcf_shoot_musket|itcf_carry_crossbow_back, 683 , weight(4.3)|difficulty(0)|spd_rtng(18) | shoot_speed(410) | thrust_damage(200 ,pierce)|max_ammo(5)|accuracy(126),imodbits_none, [(ti_on_weapon_attack, [(play_sound,"snd_rifle")])]],
a very simple way of playing sound that will be heard by everyone is this method
agent_play_sound is automatically synced with the client, so it will not require a new event that will play sound in clientsCode:(ti_on_weapon_attack, [ (store_trigger_param_1, ":agent_id"), (agent_play_sound, ":agent_id", "snd_rifle"), ])
_Sebastian_ said:What script? Its simply a try-end block, so what do you mean...Cozur said:Any particular reason this script wouldn't work?:
The conditions in the block or the script it self which should be called?
Adding debug messages is allways a got method to check what works and what isn't working.
(call_script, "script_add_notification_menu", "mnu_defect_kings_landing_taken_by_dragonstone", 0, 0),