Would be easier to just use older warband version, if you don't want to import those scripts to new module system
kalarhan said:Khamukkamu said:is there an operation that commands an agent to go in "charge mode"?
alarmed
Code:agent_set_is_alarmed = 1807 # (agent_set_is_alarmed, <agent_id>, <value>), # Sets agent's status as alarmed (value = 1) or peaceful (value = 0).
you can also set agents on special mode, disable movement speed, etc, to keep them behind.
Fire_and_Blood said:Would be easier to just use older warband version, if you don't want to import those scripts to new module system
Khamukkamu said:So for instance, I order a whole team to move + hold towards X position. Sometimes, not all team members get there in time, but when one of the agents does get there, if I set him to 'alarmed', it will override the 'hold' command and go into charge mode (i.e attack enemies wherever they may be)?
("activate_tavern_attackers",
[
(set_party_battle_mode),
(try_for_agents, ":cur_agent"),
(agent_get_troop_id, ":cur_agent_troop", ":cur_agent"),
(this_or_next|eq, ":cur_agent_troop", "trp_fugitive"),
(this_or_next|eq, ":cur_agent_troop", "trp_belligerent_drunk"),
(eq, ":cur_agent_troop", "trp_hired_assassin"),
(agent_set_team, ":cur_agent", 1),
(assign, "$g_main_attacker_agent", ":cur_agent"),
(agent_ai_set_aggressiveness, ":cur_agent", 199),
(team_give_order, 1, grc_everyone, mordr_charge),
(try_end),
]),
("deactivate_tavern_attackers",
[
(finish_party_battle_mode),
(try_for_agents, ":cur_agent"),
(agent_get_troop_id, ":cur_agent_troop", ":cur_agent"),
(this_or_next|eq, ":cur_agent_troop", "trp_fugitive"),
(this_or_next|eq, ":cur_agent_troop", "trp_belligerent_drunk"),
(eq, ":cur_agent_troop", "trp_hired_assassin"),
(agent_set_team, ":cur_agent", 0),
(agent_ai_set_aggressiveness, ":cur_agent", 0),
(try_end),
]),
Using 1.153 Warband may not be that easy, as it is possible you won`t be able to install the game depending on your serial key.dlwnsdn4 said:thank youFire_and_Blood said:Would be easier to just use older warband version, if you don't want to import those scripts to new module system
(party_set_slot, ":party_no", slot_xxx, 0),
(party_set_slot, ":party_no", slot_xxx, -1),
dlwnsdn4 said:thank youFire_and_Blood said:Would be easier to just use older warband version, if you don't want to import those scripts to new module system
Fire_and_Blood said:When I want to remove all information from a slot, do I use 0 or -1? Is there even a difference?
Code:(party_set_slot, ":party_no", slot_xxx, 0), (party_set_slot, ":party_no", slot_xxx, -1),
Somebody said:0 should be the default slot value.
-1 => not defined
0 => False
1 => True
(try_for_range, ":new_fief", "p_new_fief_1", "p_salt_mine),
(disable_party, ":new_fief"),
(party_set_note_available, ":new_fief", 0),
(try_end),
Fire_and_Blood said:I added a bunch of new settlements between village_110 and salt_mine, that are supposed to be hidden, but they are listed under Locations.
(try_for_range, ":party_no", centers_begin, centers_end),
(party_set_note_available, ":party_no", 1),
(try_end),
("trade_with_arms_merchant",[
(party_slot_ge, "$current_town", slot_town_weaponsmith, 1)],
"Trade with the arms merchant.",
[
(party_get_slot, ":merchant_troop", "$current_town", slot_town_weaponsmith),
## Companions Overview, by Jedediah Q, modified by lazeras
(assign, "$jq_current_town", "$current_town"),
(assign, "$jq_current_shop", ":merchant_troop"),
##
(change_screen_trade, ":merchant_troop"),
]),
# "script_set_town_scene"
# Description: Here we set the scenes for a new town. Might make this terrain based, as for vilages, later on.
# Input: party_id of town
# Output: none
("set_town_scene",
[
(store_script_param_1, ":town_no"),
######## Here we assign all troops required for a town
(assign, ":end_cond", mayors_end),
(try_for_range, ":free_mayor", mayors_begin, ":end_cond"),
(party_slot_eq, ":free_mayor", slot_trp_is_active, 0), # Since we assign all troops at the same time, if mayor 25 is unused, all other 25th troops should be unused as well. Should be always true. So realistically, setting trp_is_active for other troops is not required, however, just do it for safety. Though we never check for it, yet.
(store_sub, ":offset", ":free_mayor", mayors_begin),
(store_add, ":cur_object_no", "trp_town_1_mayor", ":offset"),
(party_set_slot,":town_no", slot_town_elder, ":cur_object_no"),
(party_set_slot, ":cur_object_no", slot_trp_is_active, 1),
(store_add, ":cur_object_no", "trp_town_1_tavernkeeper", ":offset"),
(party_set_slot,":town_no", slot_town_tavernkeeper, ":cur_object_no"),
(party_set_slot, ":cur_object_no", slot_trp_is_active, 1),
##############################################################
(store_add, ":cur_object_no", "trp_town_1_weaponsmith", ":offset"),
(party_set_slot,":town_no", slot_town_weaponsmith, ":cur_object_no"),
(party_set_slot, ":cur_object_no", slot_trp_is_active, 1),
##############################################################
(store_add, ":cur_object_no", "trp_town_1_armorer", ":offset"),
(party_set_slot,":town_no", slot_town_armorer, ":cur_object_no"),
(party_set_slot, ":cur_object_no", slot_trp_is_active, 1),
(store_add, ":cur_object_no", "trp_town_1_merchant", ":offset"),
(party_set_slot,":town_no", slot_town_merchant, ":cur_object_no"),
(party_set_slot, ":cur_object_no", slot_trp_is_active, 1),
(store_add, ":cur_object_no", "trp_town_1_horse_merchant", ":offset"),
(party_set_slot,":town_no", slot_town_horse_merchant, ":cur_object_no"),
(party_set_slot, ":cur_object_no", slot_trp_is_active, 1),
(store_add, ":cur_object_no", "scn_town_1_center", ":offset"),
(party_set_slot,":town_no", slot_town_center, ":cur_object_no"), #F&B Check Can we use this multiple times?
(assign, ":free_mayor", ":end_cond"), #break
(try_end),
######## Here we assign all scenes required for a town
# (try_for_range, ":random_town", _begin, _end),
(store_random_in_range, ":offset", 1, 22), #22 towns, picks random scenes for now. Gonna improve later on
(store_add, ":cur_object_no", "scn_town_1_center", ":offset"),
(party_set_slot,":town_no", slot_town_center, ":cur_object_no"),
(store_add, ":cur_object_no", "scn_town_1_castle", ":offset"),
(party_set_slot,":town_no", slot_town_castle, ":cur_object_no"),
(store_add, ":cur_object_no", "scn_town_1_prison", ":offset"),
(party_set_slot,":town_no", slot_town_prison, ":cur_object_no"),
(store_add, ":cur_object_no", "scn_town_1_walls", ":offset"),
(party_set_slot,":town_no", slot_town_walls, ":cur_object_no"),
(store_add, ":cur_object_no", "scn_town_1_tavern", ":offset"),
(party_set_slot,":town_no", slot_town_tavern, ":cur_object_no"),
(store_add, ":cur_object_no", "scn_town_1_store", ":offset"),
(party_set_slot,":town_no", slot_town_store, ":cur_object_no"),
(store_add, ":cur_object_no", "scn_town_1_arena", ":offset"),
(party_set_slot,":town_no", slot_town_arena, ":cur_object_no"),
(store_add, ":cur_object_no", "scn_town_1_alley", ":offset"),
(party_set_slot,":town_no", slot_town_alley, ":cur_object_no"),
#(try_end),
(party_set_slot,":town_no", slot_town_reinforcement_party_template, "pt_center_reinforcements"),
#Check, whether town needs to be besieged with belfry
(try_begin), #F&B check. If we messed up, we are off by 1
(this_or_next|eq, ":offset", 12),
(eq, ":offset", 15),
(party_set_slot, ":town_no", slot_center_siege_with_belfry, 1),
(try_end),
(try_for_range, ":walker_no", 0, num_town_walkers),
(call_script, "script_center_set_walker_to_type", ":town_no", ":walker_no", walkert_default),
(try_end),
]),
Fire_and_Blood said:slots issues
(party_set_slot,":town_no", slot_town_weaponsmith, ":cur_object_no"),
(try_begin), #logging
(eq, 1, 1),
(assign, reg20, ":town_no"),
(assign, reg21, ":cur_object_no"),
(str_store_party_name, s20, reg20),
(str_store_troop_name, s21, reg21),
(display_message, "@Weaponsmith: {reg21} | {s21} | Town: {reg20} | {s20}"),
(try_end),
Fire_and_Blood said:Using the Debug OSP to get slot values, how can I convert the numbers to the slot_constants? Is it just a list going from top to bottom? Or do the numbers behind the slots mean anything?
For example, some numbers are used multiple times, e.g
spai_engaging_party = 10
slot_scene_belfry_props_begin = 10
slot_troop_leaded_party = 10
So if I get a value for slot 10, how can I relate that to a certain slot?
Khamukkamu said:can I store a string in a global var?
I do believe that what you need to do is to store the variable in a register, then store the register in a string register:Khamukkamu said:If so, how do I call it when I want to use it?
[color=navy](assign, reg7, "$global_var"),
(str_store_string, s7, "@{reg7}"),[/color]