("init_town_walkers",
[
(try_begin),
(eq, "$town_nighttime", 0),
(try_for_range, ":walker_no", 0, num_town_walkers),
(store_add, ":troop_slot", slot_center_walker_0_troop, ":walker_no"),
(party_get_slot, ":walker_troop_id", "$current_town", ":troop_slot"),
(gt, ":walker_troop_id", 0),
(store_add, ":entry_no", town_walker_entries_start, ":walker_no"),
(set_visitors, ":entry_no", ":walker_troop_id", number), #change number and set_visitor to plural
(try_end),
(try_end),
]),
Somebody said:Code:("init_town_walkers", [ (try_begin), (eq, "$town_nighttime", 0), (try_for_range, ":walker_no", 0, num_town_walkers), (store_add, ":troop_slot", slot_center_walker_0_troop, ":walker_no"), (party_get_slot, ":walker_troop_id", "$current_town", ":troop_slot"), (gt, ":walker_troop_id", 0), (store_add, ":entry_no", town_walker_entries_start, ":walker_no"), (set_visitors, ":entry_no", ":walker_troop_id", number), #change number and set_visitor to plural (try_end), (try_end), ]),
(set_fixed_point_multiplier, 10),
(try_for_parties, ":party_no"), #Floris Get Back to Shore Check
(party_get_template_id,":template",":party_no"),
(this_or_next|eq, ":template", "pt_sea_raiders_ships"),
(this_or_next|eq, ":template", "pt_sea_raiders_ships_r"),
(eq, ":template", "pt_sea_raiders_ships_e"),
(try_begin),
(party_get_position, pos1, ":party_no"),
(position_get_y, ":value_y", pos1),
(position_get_x, ":value_x", pos1),
(val_div, ":value_y", 10),
(val_div, ":value_x", 10),
(this_or_next|gt, ":value_y", 155),
(lt, ":value_x", -180),
(assign, reg1, ":value_y"),
(assign, reg2, ":value_x"),
(display_message, "@X is {reg2} and Y is {reg1}"),
(party_set_flags, ":party_no", pf_default_behavior, 0),
(party_set_ai_behavior, ":party_no", ai_bhvr_travel_to_party),
(party_set_ai_object, ":party_no", "p_ship_raider_spawn_point_1"),
(display_message, "@Get Back to Shore"),
(else_try),
(store_distance_to_party_from_party, ":distance", ":party_no", "p_ship_raider_spawn_point_1"),
(lt, ":distance", 4),
(party_set_flags, ":party_no", pf_default_behavior, 1),
(party_set_ai_behavior, ":party_no", ai_bhvr_patrol_party),
(party_set_ai_object, ":party_no", "p_ship_raider_spawn_point_1"),
(party_set_aggressiveness, ":party_no" , 150),
(display_message, "@Now get back to sea"),
(try_end),
(try_end),
It sounds like I don't need to write anything about bonus on ti_on_init_item, I just need to set global variable, basing on comparison agent_id with -1.dunde said:How about do some tricks with ti_on_init_item? Returning the troop_id if the agent_id is not -1 to write to troop's slot about skill bonus?
Possibly troubles :
- Need to check for multiple agents with same troop id. May be 1 slot for each special item with the bonus will simplify it.
- Need more check if agent unequipt the item in scene.
I think you're missing party_set_ai_patrol_radius - also, party_set_aggressiveness should only go up to 15. Look in module_simple_triggers for the bandit lair patrol code.Duh said:I have also tried to simply set the default behavior flag, but that by itself left them all sitting around the spawn point (after they were assigned to travel there). If anybody knows a way to restore default bandit behavior after a specific AI was assigned (to get them back to the shore), please share. This is the last somewhat gamebreaking thing in seafaring and i would prefer fixing it instead of letting the player escape from a ship regardless of whether he is anywhere near land or not.
You make a trigger that spawns a bunch of parties given certain conditions are fulfilled and make a hidden faction declare war on everybody else.Cozur said:How exactly do invasions work?
Belendor Torheal Artendor said:A question here. In my project i usually make the models about 600 polies for weapon&armor stuff, 1000 for scene props. Is it a bit much in case of lagging&crashes or even less more than it can already handle?
Specialist said:Well, I'm not sure Belendor. I have tons of guns in WW3 over 1k polygons, and with LOD's, it works fine for me (so far). Even spamming it on 75-100 bots.
I guess the answer would be that if you have LOD's, it should be fine
Somebody said:You can control the timing and size but not composition of reinforcements via add_reinforcements_to_entry. If you simply add_visitors or spawn_agent this leads to problems with agent_get_party and casualties.
(scene_prop_get_num_instances, ":marker_num", "spr_spawn_marker_tree"),
(try_for_range, ":cur_instance", 0, ":marker_num"),
(scene_prop_get_instance, ":instance", "spr_spawn_marker_tree", ":cur_instance"),
(prop_instance_is_valid, ":instance"),
(prop_instance_get_position, pos1, ":instance"),
(prop_instance_get_scale, pos3, ":instance"),
(position_get_scale_x, ":scale", pos3),
(store_div, ":amount", ":scale", 100),
(try_for_range, reg0, 0, ":amount"),
(init_position, pos2),
(position_copy_origin, pos2, pos1),
(store_random_in_range, ":movement", -1100, 1100),
(position_move_x, pos2, ":movement"),
(store_random_in_range, ":movement", -1100, 1100),
(position_move_y, pos2, ":movement"),
(store_random_in_range, ":movement", 0, 360),
(position_rotate_z, pos2, ":movement"),
(store_random_in_range, ":movement", -5, 5),
(position_rotate_x, pos2, ":movement"),
(store_random_in_range, ":movement", -5, 5),
(position_rotate_y, pos2, ":movement"),
(position_set_z_to_ground_level, pos2),
(store_random_in_range, ":prop_kind", "spr_tree_destructible_a", "spr_rock_destructible_ore_1"),
(set_spawn_position, pos2),
(spawn_scene_prop, ":prop_kind"),
(try_end),
(try_end),