Skrypty open source 8243 7

O temacie

Autor Leinnan

Zaczęty 6.01.2011 roku

Wyświetleń 8243

Odpowiedzi 7

Leinnan

Leinnan

Administrator
torsonic polarity syndrome
posty2671
Propsy3600
ProfesjaProgramista
  • Administrator
  • torsonic polarity syndrome

Leinnan
Administrator

Skrypty open source
2011-01-06, 15:13(Ostatnia zmiana: 2011-01-06, 16:31)
Tutaj będą umieszczane skrypty open source. Działa to na tym samym patencie co Targowisko tzn możesz umieścić to w swoim modzie pod warunkim że umieścisz autora skrytpu w creditsach.

Dzisiaj umieszcze skrypt kontynuacji bitwy po padnieciu bohatera z kamera wedrujacą za wybrana przez nas jednostką.
Jeżeli chcecie dam wam objaśnienie jak zrobić tworzenie własnych bannerów.

Jeżeli przydał ci się jakiś skrypt to daj mi za niego propsa.
 
Mit der Dummheit kämpfen die Götter selbst vergebens

steam | slavic castles |  last.fm | moddb.com | Stary, najlepszy lider Sclavinii

Leinnan

Leinnan

Administrator
torsonic polarity syndrome
posty2671
Propsy3600
ProfesjaProgramista
  • Administrator
  • torsonic polarity syndrome

Leinnan
Administrator

Skrypty open source
#1 2011-01-06, 15:32(Ostatnia zmiana: 2011-01-06, 16:30)
Kontynuacja bitwy po ogłuszeniu bohatera by MartinF
 
Otwieramy module scripts i przed ostatnim nawiasem dajemy to:
# script_dmod_cycle_forwards  # Output: New $dmod_current_agent
  # Used to cycle forwards through valid agents
  ("dmod_cycle_forwards",[

            (assign, ":agent_moved", 0),
            (assign, ":first_agent", -1),
            (get_player_agent_no, ":player_agent"),
  (agent_get_team, ":player_team", ":player_agent"),
   
            (try_for_agents, ":agent_no"),
                (neq, ":agent_moved", 1),
                (neq, ":agent_no", ":player_agent"),
                (agent_is_human, ":agent_no"),
                (agent_is_alive, ":agent_no"),
            (agent_get_team, ":cur_team", ":agent_no"),
            (eq, ":cur_team", ":player_team"),
#                (agent_get_troop_id, ":agent_troop", ":agent_no"),
                (try_begin),
                    (lt, ":first_agent", 0),
                    (assign, ":first_agent", ":agent_no"),
                (try_end),
                (gt, ":agent_no", "$dmod_current_agent"),
                (assign, "$dmod_current_agent", ":agent_no"),
                (assign, ":agent_moved", 1),
            (try_end),

            (try_begin),
                (eq, ":agent_moved", 0),
                (neq, ":first_agent", -1),
                (assign, "$dmod_current_agent", ":first_agent"),
                (assign, ":agent_moved", 1),
            (else_try),
                (eq, ":agent_moved", 0),
                (eq, ":first_agent", -1),
                (display_message, "@No Troops Left."),
            (try_end),
   
            (try_begin),
                (eq, ":agent_moved", 1),
                (str_store_agent_name, 1, "$dmod_current_agent"),
                (display_message, "@Selected Troop: {s1}"),
            (try_end),
      (assign, "$dmod_move_camera", 1),
    ]),
   
  # script_dmod_cycle_backwards
  # Output: New $dmod_current_agent
  # Used to cycle backwards through valid agents
  ("dmod_cycle_backwards",[

            (assign, ":new_agent", -1),
            (assign, ":last_agent", -1),
            (get_player_agent_no, ":player_agent"),
  (agent_get_team, ":player_team", ":player_agent"),
   
            (try_for_agents, ":agent_no"),
                (neq, ":agent_no", ":player_agent"),
                (agent_is_human, ":agent_no"),
                (agent_is_alive, ":agent_no"),
            (agent_get_team, ":cur_team", ":agent_no"),
            (eq, ":cur_team", ":player_team"),
 #   (agent_get_troop_id, ":agent_troop", ":agent_no"),
                (assign, ":last_agent", ":agent_no"),
                (lt, ":agent_no", "$dmod_current_agent"),
                (assign, ":new_agent", ":agent_no"),
            (try_end),

            (try_begin),
                (eq, ":new_agent", -1),
                (neq, ":last_agent", -1),
                (assign, ":new_agent", ":last_agent"),  
            (else_try),
                (eq, ":new_agent", -1),
                (eq, ":last_agent", -1),
                (display_message, "@No Troops Left."),
            (try_end),

            (try_begin),
                (neq, ":new_agent", -1),
                (assign, "$dmod_current_agent", ":new_agent"),
                (str_store_agent_name, 1, "$dmod_current_agent"),
                (display_message, "@Selected Troop: {s1}"),
            (try_end),
      (assign, "$dmod_move_camera", 1),

   ]),
[/size]
 
Otwieramy module_mission_templates i pod tym:
common_siege_question_answered = (
  ti_question_answered, 0, 0, [],
   [
  (store_trigger_param_1,":answer"),
  (eq,":answer",0),
  (assign, "$pin_player_fallen", 0),
  (get_player_agent_no, ":player_agent"),
  (agent_get_team, ":agent_team", ":player_agent"),
  (try_begin),
    (neq, "$attacker_team", ":agent_team"),
    (neq, "$attacker_team_2", ":agent_team"),
    (str_store_string, s5, "str_siege_continues"),
    (call_script, "script_simulate_retreat", 8, 15),
  (else_try),
    (str_store_string, s5, "str_retreat"),
    (call_script, "script_simulate_retreat", 5, 20),
  (try_end),
  (call_script, "script_count_mission_casualties_from_agents"),
  (finish_mission,0),
  ])
[/size]
 
wklejamy to:

sw_deathcam_follow_troop = (0, 0, 0,[(eq, "$dmod_move_camera", 2),
        (agent_get_position, 1, "$dmod_current_agent"),
        (get_player_agent_no, ":player_agent"),
        (agent_set_position, ":player_agent", 1)

  ],[])
sw_deathcam_valkyrie_move_camera = (0, 1, 2.1,[(eq, "$dmod_move_camera", 1),
        (agent_get_position, 2, "$dmod_current_agent"),    
        (position_move_z, 2, 300),
        (mission_cam_set_mode,1),
        (mission_cam_set_position, 2),
        (position_move_z, 2, 600),
        (mission_cam_animate_to_position, 2, 1000),
  ],[
        (mission_cam_set_mode, 0, 1000, 1),
        (assign, "$dmod_move_camera", 2),
  ])  
sw_deathcam_cycle_fowards = (0, 0, 0,[(key_clicked, key_m), (main_hero_fallen),
        (call_script, "script_dmod_cycle_forwards"),
        ], [])

sw_deathcam_cycle_backwards = (0, 0, 0,[(key_clicked, key_n), (main_hero_fallen),
        (call_script, "script_dmod_cycle_backwards"),
        ], [])


[/size][/size]Zamień to:
common_siege_check_defeat_condition = (
  1, 4, ti_once,
  [
    (main_hero_fallen)
    ],
  [
    (assign, "$pin_player_fallen", 1),
    (get_player_agent_no, ":player_agent"),
    (agent_get_team, ":agent_team", ":player_agent"),
    (try_begin),
      (neq, "$attacker_team", ":agent_team"),
      (neq, "$attacker_team_2", ":agent_team"),
      (str_store_string, s5, "str_siege_continues"),
      (call_script, "script_simulate_retreat", 8, 15),
    (else_try),
      (str_store_string, s5, "str_retreat"),
      (call_script, "script_simulate_retreat", 5, 20),
    (try_end),
    (assign, "$g_battle_result", -1),
    (set_mission_result,-1),
    (call_script, "script_count_mission_casualties_from_agents"),
    (finish_mission,0),
    ])
[/size]
 
Na to:
common_siege_check_defeat_condition = (
  1, 4, ti_once,
  [
    (main_hero_fallen)
    ],
  [
    (assign, "$pin_player_fallen", 1),
(display_message, "@You have been knocked out by the enemy. Watch your men continue the fight without you or press Tab to retreat."),
(display_message, "@If you choose to watch the fight you can use the M and N keys to change your camera view."),
    # (get_player_agent_no, ":player_agent"),
    # (agent_get_team, ":agent_team", ":player_agent"),
    # (try_begin),
      # (neq, "$attacker_team", ":agent_team"),
      # (neq, "$attacker_team_2", ":agent_team"),
      # (str_store_string, s5, "str_siege_continues"),
      # (call_script, "script_simulate_retreat", 8, 15),
    # (else_try),
      # (str_store_string, s5, "str_retreat"),
      # (call_script, "script_simulate_retreat", 5, 20),
    # (try_end),
    # (assign, "$g_battle_result", -1),
    # (set_mission_result,-1),
    # (call_script, "script_count_mission_casualties_from_agents"),
    # (finish_mission,0),
    ])
[/size]
 
W całym pliku musisz wyszukać i wykomentować każde[/size]
   (neg|main_hero_fallen, 0), [/size][/size][/size]
w ten sposób #    (neg|main_hero_fallen, 0),[/size][/size][/size]

Znajdź to(kilka takich jest:
     common_battle_check_victory_condition,
      common_battle_victory_display,
[/size][/size][/size]
i wklej pod każdym te kilka linijek:
     sw_deathcam_follow_troop,
      sw_deathcam_valkyrie_move_camera,
      sw_deathcam_cycle_fowards,
      sw_deathcam_cycle_backwards,
[/size][/size][/size]
 
Mit der Dummheit kämpfen die Götter selbst vergebens

steam | slavic castles |  last.fm | moddb.com | Stary, najlepszy lider Sclavinii

Leinnan

Leinnan

Administrator
torsonic polarity syndrome
posty2671
Propsy3600
ProfesjaProgramista
  • Administrator
  • torsonic polarity syndrome
Troop ratio bar by  rubik

Będzie to wskaźnik stosunkusił naszych, sojuszników i wroga.


Wklejamy to przed ostatnim nawiasem w module_presentations:
[/size]####################################################### troop_ratio_bar
##################################################
  ("troop_ratio_bar",prsntf_read_only,0,[
      (ti_on_presentation_load,
       [
        (assign, "$presentation_troop_ratio_bar_active", 1),
        (set_fixed_point_multiplier, 1000),
       
        (create_mesh_overlay, "$g_presentation_obj_1", "mesh_status_troop_ratio_bar"),
        (position_set_x, pos1, 30),
        (position_set_y, pos1, 700),
        (overlay_set_position, "$g_presentation_obj_1", pos1),
       
        (position_set_x, pos1, 35),
        (position_set_y, pos1, 713),
       
        (create_mesh_overlay, "$g_presentation_obj_2", "mesh_white_plane"),
        (overlay_set_color, "$g_presentation_obj_2", 0xAA1F1F),
        (overlay_set_position, "$g_presentation_obj_2", pos1),
       
        (create_mesh_overlay, "$g_presentation_obj_3", "mesh_white_plane"),
        (overlay_set_color, "$g_presentation_obj_3", 0x1F1FAA),
        (overlay_set_position, "$g_presentation_obj_3", pos1),
     
        (create_mesh_overlay, "$g_presentation_obj_4", "mesh_white_plane"),
        (overlay_set_color, "$g_presentation_obj_4", 0x1FAA1F),
        (overlay_set_position, "$g_presentation_obj_4", pos1),
       
        (create_mesh_overlay, "$g_presentation_obj_5", "mesh_status_troop_ratio_bar_button"),
        (position_set_x, pos1, 35),
        (position_set_y, pos1, 700),
        (overlay_set_position, "$g_presentation_obj_5", pos1),
       
        (create_mesh_overlay, "$g_presentation_obj_6", "mesh_status_troop_ratio_bar_button"),
        (position_set_x, pos1, 275),
        (position_set_y, pos1, 700),
        (overlay_set_position, "$g_presentation_obj_6", pos1),

        (create_mesh_overlay, "$g_presentation_obj_7", "mesh_status_troop_ratio_bar_button"),
        (create_mesh_overlay, "$g_presentation_obj_8", "mesh_status_troop_ratio_bar_button"),
       
        (presentation_set_duration, 999999),
       ]),
      (ti_on_presentation_run,
       [
        (store_trigger_param_1, ":cur_time"),
       
        (set_fixed_point_multiplier, 1000),
        (assign, ":player_count", 0),
        (assign, ":ally_count", 0),
        (assign, ":enemy_count", 0),
        (assign, ":total_count", 0),
       
        (try_for_agents, ":cur_agent"),
          (agent_is_human, ":cur_agent"),
          (agent_is_alive, ":cur_agent"),
          (agent_get_party_id, ":agent_party", ":cur_agent"),
          (try_begin),
            (eq, ":agent_party", "p_main_party"),
            (val_add, ":player_count", 1),
          (else_try),
            (agent_is_ally, ":cur_agent"),
            (val_add, ":ally_count", 1),
          (else_try),
            (val_add, ":enemy_count", 1),
          (try_end),
        (try_end),
        (val_add, ":total_count", ":player_count"),
        (val_add, ":total_count", ":ally_count"),
        (val_add, ":total_count", ":enemy_count"),

        (position_set_x, pos1, 12000),
        (position_set_y, pos1, 300),
        (overlay_set_size, "$g_presentation_obj_2", pos1),
     
        (store_add, ":ally_percent", ":player_count", ":ally_count"),
        (val_mul, ":ally_percent", 12000),
        (val_div, ":ally_percent", ":total_count"),
        (position_set_x, pos1, ":ally_percent"),
        (position_set_y, pos1, 300),
        (overlay_set_size, "$g_presentation_obj_3", pos1),
     
        (store_mul, ":player_percent", ":player_count", 12000),
        (val_div, ":player_percent", ":total_count"),
        (position_set_x, pos1, ":player_percent"),
        (position_set_y, pos1, 300),
        (overlay_set_size, "$g_presentation_obj_4", pos1),
       
        (store_add, ":ally_percent_2", ":player_count", ":ally_count"),
        (val_mul, ":ally_percent_2", 240),
        (val_div, ":ally_percent_2", ":total_count"),
        (val_add, ":ally_percent_2", 35),
        (position_set_x, pos1, ":ally_percent_2"),
        (position_set_y, pos1, 700),
        (overlay_set_position, "$g_presentation_obj_7", pos1),
       
        (store_mul, ":player_percent_2", ":player_count", 240),
        (val_div, ":player_percent_2", ":total_count"),
        (val_add, ":player_percent_2", 35),
        (position_set_x, pos1, ":player_percent_2"),
        (position_set_y, pos1, 700),
        (overlay_set_position, "$g_presentation_obj_8", pos1),
       
        (try_begin),
          (eq, "$presentation_troop_ratio_bar_active", 1),
          (gt, ":cur_time", 200),
          (game_key_clicked, gk_view_orders),
          (assign, "$presentation_troop_ratio_bar_active", 0),
          (presentation_set_duration, 0),
          (start_presentation, "prsnt_battle"),
        (try_end),
       ]),
       
     ]),
##################################################
##### troop_ratio_bar
##################################################

[size=3]
[/size]


Wyszukujemyw tym samym pliku tego:[/size][color=#200E02][font=Verdana, Arial, Helvetica, sans-serif](assign, "$g_presentation_battle_active", 0),[/font][/color][size=2][/size]


iedytujemy tamten fragment aby wyglądał tak:
[/size]       (try_begin),          (gt, ":cur_time", 200),
          (game_key_clicked, gk_view_orders),
          (assign, "$g_presentation_battle_active", 0),
          (try_for_agents, ":cur_agent"),
            (agent_set_slot, ":cur_agent", slot_agent_map_overlay_id, 0),
          (try_end),
          (presentation_set_duration, 0),
##################################################
##### troop_ratio_bar
##################################################
          (start_presentation, "prsnt_troop_ratio_bar"),
##################################################
##### troop_ratio_bar
##################################################
        (try_end),[size=2]
[/size]
Pod koniec module_meshes wklejamy to:
[/size]####################################################### troop_ratio_bar
##################################################
  ("status_troop_ratio_bar", 0, "slider_hor", 0, 0, 0, 0, 0, 0, 1, 1, 1),
  ("status_troop_ratio_bar_button", 0, "handle_hor", 0, 0, 0, 0, 0, 0, 1, 1, 1),
##################################################
##### troop_ratio_bar

[size=2]##################################################
[/size]


W module_mission_templates wyszukujemy "common_battle_order_panel = ("

 Po edycji ma wyglądać tak:
common_battle_order_panel = (
  0, 0, 0, [],
  [
    (game_key_clicked, gk_view_orders),
    (start_presentation, "prsnt_battle"),
    (start_presentation, "prsnt_troop_ratio_bar"),
    ])
 
Mit der Dummheit kämpfen die Götter selbst vergebens

steam | slavic castles |  last.fm | moddb.com | Stary, najlepszy lider Sclavinii

Krystian2222

Krystian2222

Użytkownicy
posty175
Propsy26
  • Użytkownicy

Krystian2222

Skrypty open source
#3 2011-03-14, 17:53(Ostatnia zmiana: 2011-03-14, 20:10)
Śmierć bohatera by Kolba

Dzięki temu skryptowi nasz bohater może umrzeć w walce.
W Game Menus przed końcem wklejamy:

   ("player_is_death",0,
  "You have fallen in bloody battle. Your heart suddenly stopped beating. The black ravens are lacerating your face. A white person appears near you. It shakes hands to you.\
- Welcome to heaven {playername}!",
  "none",
  [],
   [
     ("continue", [], "Continue...",
      [
        (change_screen_quit),
       ]
      ),
     ]
 ),

Wklejamy to do mission templates do dowolnej misji:

  ("player_is_death",0,
  "You have fallen in bloody battle. Your heart suddenly stopped beating. The black ravens are lacerating your face. A white person appears near you. It shakes hands to you.\
  Welcome to heaven {playername}!",
  "none",
  [],
   [
     ("continue", [], "Continue...",
      [
        (change_screen_quit),
       ]
      ),
     ]
 ),
 

Krystian2222

Krystian2222

Użytkownicy
posty175
Propsy26
  • Użytkownicy

Krystian2222

Skrypty open source
#4 2011-03-14, 18:02(Ostatnia zmiana: 2011-03-14, 19:52)
potem powrzucam inne
 

Leinnan

Leinnan

Administrator
torsonic polarity syndrome
posty2671
Propsy3600
ProfesjaProgramista
  • Administrator
  • torsonic polarity syndrome
Tonięcie w głębszej wodzie by HokieBT


Wklejamy to pod jedną z pierwszych misji:
[/size]sw_common_battle_kill_underwater = ( # code concept from http://forums.taleworlds.net/index.php/topic,68852.0.html and http://forums.taleworlds.net/index.php/topic,58880.15.html
  5, 0, 0, [],
[
(try_for_agents,":agent"),
(agent_is_alive,":agent"),
(agent_get_position,pos1,":agent"),
(position_get_z, ":pos_z", pos1),
#(assign, reg1, ":pos_z"), #debug only
#(display_message, "@agent z-position is {reg1}"), #debug only
(try_begin),
(le, ":pos_z",-150), #agent is about 6ft underwater
(store_agent_hit_points,":hp",":agent",1),
(val_sub,":hp",7),
(try_begin),
(le, ":hp", 0),
(agent_set_hit_points,":agent",0,0),
(else_try),
(agent_set_hit_points,":agent",":hp",1),
(try_end),
(play_sound,"snd_man_grunt"),
(agent_deliver_damage_to_agent,":agent",":agent"),
(try_end),
(try_end),

[size=2] ])
[/size]



 
Mit der Dummheit kämpfen die Götter selbst vergebens

steam | slavic castles |  last.fm | moddb.com | Stary, najlepszy lider Sclavinii

Krystian2222

Krystian2222

Użytkownicy
posty175
Propsy26
  • Użytkownicy
Rekrutacja w zamkach By Thymo

Otwieramy "module_game_menus
 
szukamy :      "Town_trade",0,

pod tym bendzie to (
    "town_trade",0,
    "You head towards the marketplace.",
    "none",
    [],
    [
      ("assess_prices",[],
       "Assess the local prices.",
       [
           (jump_to_menu,"mnu_town_trade_assessment_begin"),
        ]),
      ("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),
           (change_screen_trade, ":merchant_troop"),
        ]),
      ("trade_with_armor_merchant",[(party_slot_ge, "$current_town", slot_town_armorer, 1)],
       "Trade with the armor merchant.",
       [
           (party_get_slot, ":merchant_troop", "$current_town", slot_town_armorer),
           (change_screen_trade, ":merchant_troop"),
        ]),
      ("trade_with_horse_merchant",[(party_slot_ge, "$current_town", slot_town_horse_merchant, 1)],
       "Trade with the horse merchant.",
       [
           (party_get_slot, ":merchant_troop", "$current_town", slot_town_horse_merchant),
           (change_screen_trade, ":merchant_troop"),
        ]),
      ("trade_with_goods_merchant",[(party_slot_ge, "$current_town", slot_town_merchant, 1)],
       "Trade with the goods merchant.",
       [
           (party_get_slot, ":merchant_troop", "$current_town", slot_town_merchant),
           (change_screen_trade, ":merchant_troop"),
        ]),
      ("back_to_town_menu",[],"Head back.",
       [
           (jump_to_menu,"mnu_town"),
        ]),
    ]
  ),
Wymień to na
(
    "town_trade",0,
    "You head towards the marketplace.",
    "none",
    [],
    [
      ("assess_prices",[],
       "Assess the local prices.",
       [
           (jump_to_menu,"mnu_town_trade_assessment_begin"),
        ]),
      ("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),
           (change_screen_trade, ":merchant_troop"),
        ]),
      ("trade_with_armor_merchant",[(party_slot_ge, "$current_town", slot_town_armorer, 1)],
       "Trade with the armor merchant.",
       [
           (party_get_slot, ":merchant_troop", "$current_town", slot_town_armorer),
           (change_screen_trade, ":merchant_troop"),
        ]),
      ("trade_with_horse_merchant",[(party_slot_ge, "$current_town", slot_town_horse_merchant, 1)],
       "Trade with the horse merchant.",
       [
           (party_get_slot, ":merchant_troop", "$current_town", slot_town_horse_merchant),
           (change_screen_trade, ":merchant_troop"),
        ]),
      ("trade_with_goods_merchant",[(party_slot_ge, "$current_town", slot_town_merchant, 1)],
       "Trade with the goods merchant.",
       [
           (party_get_slot, ":merchant_troop", "$current_town", slot_town_merchant),
           (change_screen_trade, ":merchant_troop"),
        ]),
      ("hire_troops",[],
       "Hire troops.",## You have added a new menu.
       [
           (jump_to_menu,"mnu_town_pre_hire_troops"),
        ]),
      ("back_to_town_menu",[],"Head back.",
       [
           (jump_to_menu,"mnu_town"),
        ]),
    ]
  ),


szukaj

  "town_trade_assessment_begin",0,

bendzie to wyglądalo mniej więcej tak (fragment z 2 części


  (
    "town_trade_assessment_begin",0,
    "You overhear several discussions about the price of trade goods across the local area.\
 You listen closely, trying to work out the best deals around.",
    "none",
    [],
    [
      ("continue",[],"Continue...",
       [
           (assign,"$auto_enter_town","$current_town"),
           (assign, "$g_town_assess_trade_goods_after_rest", 1),
           (call_script, "script_get_max_skill_of_player_party", "skl_trade"),
           (val_div, reg0, 2),
           (store_sub, ":num_hours", 6, reg0),
           (assign, "$g_last_rest_center", "$current_town"),
           (assign, "$g_last_rest_payment_until", -1),
           (rest_for_hours, ":num_hours", 5, 0), #rest while not attackable
           (change_screen_return),
        ]),
    ]
  ),

  (
    "town_trade_assessment",mnf_disable_all_keys,
    "As the party member with the highest trade skill ({reg2}), {reg3?you try to figure out:{s1} tries to figure out} the best goods to trade in. {s2}",
    "none",
    [(call_script, "script_get_max_skill_of_player_party", "skl_trade"),
     (assign, ":max_skill", reg0),
     (assign, ":max_skill_owner", reg1),

szukaj

  "town_trade_assessment_begin",0,

bendzie to wyglądalo mniej więcej tak (fragment z 2 części


(
    "town_trade_assessment_begin",0,
    "You overhear several discussions about the price of trade goods across the local area.\
 You listen closely, trying to work out the best deals around.",
    "none",
    [],
    [
      ("continue",[],"Continue...",
       [
           (assign,"$auto_enter_town","$current_town"),
           (assign, "$g_town_assess_trade_goods_after_rest", 1),
           (call_script, "script_get_max_skill_of_player_party", "skl_trade"),
           (val_div, reg0, 2),
           (store_sub, ":num_hours", 6, reg0),
           (assign, "$g_last_rest_center", "$current_town"),
           (assign, "$g_last_rest_payment_until", -1),
           (rest_for_hours, ":num_hours", 5, 0), #rest while not attackable
           (change_screen_return),
        ]),
    ]
  ),

  (
    "town_trade_assessment",mnf_disable_all_keys,
    "As the party member with the highest trade skill ({reg2}), {reg3?you try to figure out:{s1} tries to figure out} the best goods to trade in. {s2}",
    "none",
    [(call_script, "script_get_max_skill_of_player_party", "skl_trade"),
     (assign, ":max_skill", reg0),
     (assign, ":max_skill_owner", reg1),





zmień ją na
"town_trade_assessment_begin",0,
    "You overhear several discussions about the price of trade goods across the local area.\
 You listen closely, trying to work out the best deals around.",
    "none",
    [],
    [
      ("continue",[],"Continue...",
       [
           (assign,"$auto_enter_town","$current_town"),
           (assign, "$g_town_assess_trade_goods_after_rest", 1),
           (call_script, "script_get_max_skill_of_player_party", "skl_trade"),
           (val_div, reg0, 2),
           (store_sub, ":num_hours", 6, reg0),
           (assign, "$g_last_rest_center", "$current_town"),
           (assign, "$g_last_rest_payment_until", -1),
           (rest_for_hours, ":num_hours", 5, 0), #rest while not attackable
           (change_screen_return),
        ]),
     ("back_to_marketplace",[],"Back to marketplace.", ## Thymo's FIRST useful menu-edit EVER!! BOHAHAHAHAHAHA!!!
       [
           (jump_to_menu,"mnu_town_trade"),
        ]),
    ]
  ),

    (
    "town_pre_hire_troops",0,
    "You enter a building with several mercenaries, cut-throuts, poor and adventerous warriors. You ask about to gather a overview of who's available for hire.. (this takes 1 hours)",
    "none",
    [],
    [
      ("continue",[],"Ask about..",
       [
           (store_sub, ":num_hours", 1),
           (rest_for_hours, ":num_hours", 5, 0), #rest while not attackable
           (change_screen_return),
           (jump_to_menu,"mnu_town_hire_troops"),
        ]),
      ("go_back",[],"Go back..",
       [
           (jump_to_menu,"mnu_town_trade"),
        ]),
    ]
  ),

    (
    "town_hire_troops",0,
    "This is the list you've managed to scrap together:",
    "none",
    [],
    [
      ("hire_farmers",[],"Hire farmers.",
       [
           (jump_to_menu,"mnu_town_hire_farmers"),
        ]),
      ("hire_cutthroats",[],"Hire villains, cutthrroats and looters.",
       [
           (jump_to_menu,"mnu_town_hire_cutthroats"),
        ]),
      ("hire_knights",[],"Hire knights in shiny armour.",
       [
           (jump_to_menu,"mnu_town_hire_knights"),
        ]),
      ("go_back",[],"Go back..",
       [
           (jump_to_menu,"mnu_town_trade"),
        ]),
    ]
  ),

  (
    "town_hire_farmers",0,
    "Their clothing are tattered and their hats a ragged, but their braveness has no boundaries. They have been driven out of their lands by different reasons, and now their only way to make a living is to join a force. 100 denars each farmer.",
    "none",
    [],
    [
      ("farmer1",[],"1 Farmer.",
       [
           (party_add_members, "p_main_party",trp_farmer "1),
           (troop_remove_gold, "trp_player", 100),
        ]),
      ("farmer5",[],"5 Farmer.",
       [
           (party_add_members, "p_main_party", "trp_farmer", 5),
           (troop_remove_gold, "trp_player", 500),
        ]),
      ("farmer10",[],"10 Farmer.",
       [
           (party_add_members, "p_main_party", "trp_farmer", 10),
           (troop_remove_gold, "trp_player", 1000),
        ]),
      ("back_to_town_hire_troops",[],"Go back..",
       [
           (jump_to_menu,"mnu_town_hire_troops"),
        ]),
    ]
  ),

  (
    "town_hire_cutthroats",0,
    "Vile and vicious people with rotten theeth glares at you whilst you question their value and usefulness in your party. 150 for each Looter,700 for each Nord archer, 300 for each bandit and 500 for each Brigand.",
    "none",
    [],
    [
      ("looter1",[],"1 Looter.",
       [
           (party_add_members, "p_main_party", "trp_looter", 1),
           (troop_remove_gold, "trp_player", 150),
        ]),
      ("looter5",[],"5 Looters.",
       [
           (party_add_members, "p_main_party", "trp_looter", 5),
           (troop_remove_gold, "trp_player", 750),
        ]),
      ("looter10",[],"10 Looters.",
       [
           (party_add_members, "p_main_party", "trp_looter", 10),
           (troop_remove_gold, "trp_player", 1500),
        ]),
      ("bandit1",[],"1 Bandit.",
       [
           (party_add_members, "p_main_party", "trp_bandit", 1),
           (troop_remove_gold, "trp_player", 300),
        ]),
      ("bandit5",[],"5 Bandits.",
       [
           (party_add_members, "p_main_party", "trp_bandit", 5),
           (troop_remove_gold, "trp_player", 1500),
        ]),
      ("bandit10",[],"10 Bandits.",
       [
           (party_add_members, "p_main_party", "trp_bandit", 10),
           (troop_remove_gold, "trp_player", 3000),
        ]),
      ("brigand1",[],"1 Brigand.",
       [
           (party_add_members, "p_main_party", "trp_brigand", 1),
           (troop_remove_gold, "trp_player", 500),
        ]),
      ("brigand5",[],"5 Brigands.",
       [
           (party_add_members, "p_main_party", "trp_brigand", 5),
           (troop_remove_gold, "trp_player", 2500),
        ]),
      ("brigand10",[],"10 Brigands.",
       [
           (party_add_members, "p_main_party", "trp_brigand", 10),
           (troop_remove_gold, "trp_player", 5000),
        ]),
      ("nord_archer",[],"10 Nord archer",
       [
           (party_add_members, "p_main_party", "trp_nord_archer", 10),
           (troop_remove_gold, "trp_player", 7000),
        ]),
      ("back_to_town_hire_troops",[],"Go back..",
       [
           (jump_to_menu,"mnu_town_hire_troops"),
        ]),
    ]
  ),

  (
    "town_hire_knights",0,
    "Wearing shiny armour and swords ready to cut through flesh, they stand in front of you with their honour held high(as long as you pay them.).. 1000 denars each knight.",
    "none",
    [],
    [
      ("swadian_knight1",[],"1 Swadian knight.",
       [
           (party_add_members, "p_main_party", "trp_swadian_knight", 1),
           (troop_remove_gold, "trp_player", 1000),
        ]),
      ("swadian_knight5",[],"5 Swadian_knights.",
       [
           (party_add_members, "p_main_party", "trp_swadian_knight", 5),
           (troop_remove_gold, "trp_player", 5000),
        ]),
      ("swadian_knight10",[],"10 Swadian_knights.",
       [
           (party_add_members, "p_main_party", "trp_swadian_knight", 10),
           (troop_remove_gold, "trp_player", 10000),
        ]),
      ("vaegir_knight1",[],"1 Vaegir knight.",
       [
           (party_add_members, "p_main_party", "trp_Vaegir_knight", 1),
           (troop_remove_gold, "trp_player", 1000),
        ]),
      ("vaegir_knight5",[],"5 Vaegir knights.",
       [
           (party_add_members, "p_main_party", "trp_vaegir_knight", 5),
           (troop_remove_gold, "trp_player", 5000),
        ]),
      ("vaegir_knight10",[],"10 Vaegir knights.",
       [
           (party_add_members, "p_main_party", "trp_vaegir_knight", 10),
           (troop_remove_gold, "trp_player", 10000),
        ]),
      ("back_to_town_hire_troops",[],"Go back..",
       [
           (jump_to_menu,"mnu_town_hire_troops"),
        ]),
    ]
  ),

  (
    "town_trade_assessment",mnf_disable_all_keys,
    "As the party member with the highest trade skill ({reg2}), {reg3?you try to figure out:{s1} tries to figure out} the best goods to trade in. {s2}",
    "none",
    [(call_script, "script_get_max_skill_of_player_party", "skl_trade"),
     (assign, ":max_skill", reg0),
     (assign, ":max_skill_owner", reg1),



. To bardzo dużo to .. Możesz zmienić gdzie chcesz aby zobaczyć menu edycji lokalizacji "hire_troops" menu w kroku 4. ..

Można także edytować, jaki rodzaj wojsk chcesz zatrudnić, ile to kosztuje i ile chcesz zatrudnić edytując dane w kroku 7:

- Jeśli chcemy zmienić wojsko odszukujemy trp_farmer
- A potem jest 1 tu sie zmienia ile sie dostaje ludzi za kliknięcie ..
- Pod tym jest zaraz 100 tam zmieniamy za ile kupujemy wojsko w zamku.
To na tyle jutro postaram się coś innego dodać
 

Leinnan

Leinnan

Administrator
torsonic polarity syndrome
posty2671
Propsy3600
ProfesjaProgramista
  • Administrator
  • torsonic polarity syndrome
Latające czaszki by Keedo420




Do module_parties pod koniec pliku wklejamy:
[/size]  ("fire_arrows"                  ,"You shouldn't be seeing me",    pf_disabled|pf_is_static, no_menu, pt_none, fac_commoners,0,ai_bhvr_hold,0,(0., 0),[(trp_looter,15,0)]),
  ("x_coordinate"                  ,"You shouldn't be seeing me",    pf_disabled|pf_is_static, no_menu, pt_none, fac_commoners,0,ai_bhvr_hold,0,(0., 0),[(trp_looter,15,0)]),
  ("y_coordinate"                  ,"You shouldn't be seeing me",    pf_disabled|pf_is_static, no_menu, pt_none, fac_commoners,0,ai_bhvr_hold,0,(0., 0),[(trp_looter,15,0)]),
  ("z_coordinate"                  ,"You shouldn't be seeing me",    pf_disabled|pf_is_static, no_menu, pt_none, fac_commoners,0,ai_bhvr_hold,0,(0., 0),[(trp_looter,15,0)]),
  ("x_velocity"                  ,"You shouldn't be seeing me",    pf_disabled|pf_is_static, no_menu, pt_none, fac_commoners,0,ai_bhvr_hold,0,(0., 0),[(trp_looter,15,0)]),
  ("y_velocity"                  ,"You shouldn't be seeing me",    pf_disabled|pf_is_static, no_menu, pt_none, fac_commoners,0,ai_bhvr_hold,0,(0., 0),[(trp_looter,15,0)]),

[size=2]  ("z_velocity"                  ,"You shouldn't be seeing me",    pf_disabled|pf_is_static, no_menu, pt_none, fac_commoners,0,ai_bhvr_hold,0,(0., 0),[(trp_looter,15,0)]),
[/size]


Do module_items dodajemy:
[/size]["exploding_skulls", "Exploding Skulls", [("skeleton_head_throw",0)], itp_type_thrown |itp_primary|itp_bonus_against_shield,itcf_throw_stone, 230 , weight(1.5)|difficulty(0)|spd_rtng(97) | shoot_speed(60) | thrust_damage(30 ,pierce)|max_ammo(8)|accuracy(99),imodbit_large_bag, [(ti_on_weapon_attack, [
 (try_for_range,reg5,1,500),
        (assign,":chosen",-1),(assign,":mindist",99999),
        (try_for_agents,":agent"),
           (agent_get_position,pos2,":agent"),
           (get_distance_between_positions,":dist",pos1,pos2),
           (lt,":dist",":mindist"),
           (assign,":mindist",":dist"),
           (assign,":chosen",":agent"),
        (end_try),
        (gt,":chosen",-1),
        (agent_get_look_position,pos1,":chosen"),
        (position_move_z,pos1,120),
        (position_get_x,":x",pos1),
        (position_get_y,":y",pos1),
        (position_get_z,":z",pos1),
        (party_set_slot,"p_x_coordinate",":chosen",":x"),
        (party_set_slot,"p_y_coordinate",":chosen",":y"),
        (party_set_slot,"p_z_coordinate",":chosen",":z"),
        (position_move_y,pos1,110),
        (position_get_x,":xnew",pos1),
        (position_get_y,":ynew",pos1),
        (position_get_z,":znew",pos1),
        (val_sub,":xnew",":x"),
        (val_sub,":ynew",":y"),
        (val_sub,":znew",":z"),
        (party_set_slot,"p_x_velocity",":chosen",":xnew"),
        (party_set_slot,"p_y_velocity",":chosen",":ynew"),
        (party_set_slot,"p_z_velocity",":chosen",":znew"),
        (party_set_slot,"p_fire_arrows",":chosen",1),
(play_sound,"snd_pistol_shot"),
        (assign,reg5,1000),
      (end_try),

[size=2] ],)]],
[/size]


A do którejś misji w mission templates wklejamy:
[/size]      (ti_before_mission_start, 0, 0, [], [(try_for_range,":slot",0,500),
    (party_set_slot,"p_fire_arrows",":slot",-1),
(end_try),]),

      (0.005, 0, 0, [],[
(try_for_agents,":agent"),                                                
    (party_get_slot,":fire","p_fire_arrows",":agent"),
    (ge,":fire",0),
    (party_get_slot,":x","p_x_coordinate",":agent"),
    (party_get_slot,":y","p_y_coordinate",":agent"),
    (party_get_slot,":z","p_z_coordinate",":agent"),
    (party_get_slot,":xvel","p_x_velocity",":agent"),
    (party_get_slot,":yvel","p_y_velocity",":agent"),
    (party_get_slot,":zvel","p_z_velocity",":agent"),
    (val_add,":x",":xvel"),
    (val_add,":y",":yvel"),
    (val_add,":z",":zvel"),
    (position_set_x,pos1,":x"),
    (position_set_y,pos1,":y"),
    (position_set_z,pos1,":z"),
    (particle_system_burst, "psys_torch_fire", pos1, 15),
    (position_set_z_to_ground_level,pos1),
    (position_get_z,":zground",pos1),
    (try_begin),
       (le,":z",":zground"),
        (get_player_agent_no,":player_no"),
        (particle_system_burst, "psys_massive_fire", pos1, 15),
        (particle_system_burst, "psys_war_smoke_tall", pos1, 15),
        (try_for_agents,":agent"),
     (neq,":agent",":player_no"),
     (neg|agent_is_ally,":agent"),
 (agent_is_alive,":agent"),
          (agent_get_look_position, pos2, ":agent"),
          (get_distance_between_positions,":dist",pos1,pos2),
          (lt,":dist",300),
          (agent_deliver_damage_to_agent,":player_no",":agent"),
        (end_try),
        (scene_prop_get_instance,":instance", "spr_explosion", 0),
        (position_copy_origin,pos2,pos1),
        (prop_instance_set_position,":instance",pos2),
        (position_move_z,pos2,1000),
        (prop_instance_animate_to_position,":instance",pos2,200),
    (else_try),
       (party_set_slot,"p_x_coordinate",":agent",":x"),
       (party_set_slot,"p_y_coordinate",":agent",":y"),
       (party_set_slot,"p_z_coordinate",":agent",":z"),
       (val_sub,":zvel",1),
       (party_set_slot,"p_z_velocity",":agent",":zvel"),
    (end_try),

[size=2](end_try),]),
[/size]
 
Mit der Dummheit kämpfen die Götter selbst vergebens

steam | slavic castles |  last.fm | moddb.com | Stary, najlepszy lider Sclavinii


0 użytkowników i 1 Gość przegląda ten wątek.
0 użytkowników
Do góry