Aiming reticle with a dot?

Users who are viewing this thread

You could try this. :lol:

Seriously talking now, I don't know of any simple way. Warband has 3 textures/images/(however are they called) for the three moving parts of the normal crosshair. A way of doing it would be using a presentation that draws a dot in the middle of the screen (also you need to replace the normal crosshair with a transparent one).
 
The_dragon said:
You could try this. :lol:

Seriously talking now, I don't know of any simple way. Warband has 3 textures/images/(however are they called) for the three moving parts of the normal crosshair. A way of doing it would be using a presentation that draws a dot in the middle of the screen (also you need to replace the normal crosshair with a transparent one).

Nothing funny in it. I used an arrow made of tape in Killing Floor. However, I am looking for a, you know, more scientifical decision.
 
1. Add this to "module_mission_templates.py":
Code:
dotsight = (
  ti_before_mission_start, 0, 0,
  [],
  [ (start_presentation, "prsnt_dotsight"),
    ])

2. Then, you add that trigger to every template in "module_mission_templates.py" you want to use it with, like so:
Code:
  (
    "lead_charge",mtf_battle_mode,charge,
    "You lead your men to battle.",
    [
     (1,mtef_defenders|mtef_team_0,0,aif_start_alarmed,12,[]),
     (0,mtef_defenders|mtef_team_0,0,aif_start_alarmed,0,[]),
     (4,mtef_attackers|mtef_team_1,0,aif_start_alarmed,12,[]),
     (4,mtef_attackers|mtef_team_1,0,aif_start_alarmed,0,[]),
     ],
    [
      (ti_on_agent_spawn, 0, 0, [],
       [
         (store_trigger_param_1, ":agent_no"),
         (call_script, "script_agent_reassign_team", ":agent_no"),
         ]),

      common_battle_tab_press,

      (ti_question_answered, 0, 0, [],
       [(store_trigger_param_1,":answer"),
        (eq,":answer",0),
        (assign, "$pin_player_fallen", 0),
        (try_begin),
          (store_mission_timer_a, ":elapsed_time"),
          (gt, ":elapsed_time", 20),
          (str_store_string, s5, "str_retreat"),
          (call_script, "script_simulate_retreat", 10, 20),
        (try_end),
        (call_script, "script_count_mission_casualties_from_agents"),
        (finish_mission,0),]),

      (ti_before_mission_start, 0, 0, [],
       [
         (team_set_relation, 0, 2, 1),
         (team_set_relation, 1, 3, 1),
         (call_script, "script_place_player_banner_near_inventory_bms"),
         ]),

      
      (0, 0, ti_once, [], [(assign,"$battle_won",0),
                           (assign,"$defender_reinforcement_stage",0),
                           (assign,"$attacker_reinforcement_stage",0),
                           (assign,"$g_presentation_battle_active", 0),
                           (call_script, "script_place_player_banner_near_inventory"),
                           (call_script, "script_combat_music_set_situation_with_culture"),
                           ]),

      common_music_situation_update,
      common_battle_check_friendly_kills,

      (1, 0, 5, [(lt,"$defender_reinforcement_stage",2),
                 (store_mission_timer_a,":mission_time"),
                 (ge,":mission_time",10),
                 (store_normalized_team_count,":num_defenders", 0),
                 (lt,":num_defenders",6),
#                 (assign, reg2, ":num_defenders"),
#                 (display_message,"@num_defenders = {reg2}")
                 ],
           [(add_reinforcements_to_entry,0,7),(val_add,"$defender_reinforcement_stage",1)]),
      
      (1, 0, 5, [(lt,"$attacker_reinforcement_stage",2),
                 (store_mission_timer_a,":mission_time"),
                 (ge,":mission_time",10),
                 (store_normalized_team_count,":num_attackers", 1),
                 (lt,":num_attackers",6),
#                 (assign, reg2, ":num_attackers"),
#                 (display_message,"@num_attackers = {reg2}")
                 ],
           [(add_reinforcements_to_entry,3,7),(val_add,"$attacker_reinforcement_stage",1)]),
      
      common_battle_check_victory_condition,
      common_battle_victory_display,

      (1, 4, ti_once, [(main_hero_fallen)],
          [
              (assign, "$pin_player_fallen", 1),
              (str_store_string, s5, "str_retreat"),
              (call_script, "script_simulate_retreat", 10, 20),
              (assign, "$g_battle_result", -1),
              (set_mission_result,-1),
              (call_script, "script_count_mission_casualties_from_agents"),
              (finish_mission,0)]),

      common_battle_inventory,


      #AI Tiggers
      (0, 0, ti_once, [
          (store_mission_timer_a,":mission_time"),(ge,":mission_time",2),
          ],
       [(call_script, "script_select_battle_tactic"),
        (call_script, "script_battle_tactic_init")]),
      
      (5, 0, 0, [
          (store_mission_timer_a,":mission_time"),(ge,":mission_time",3),
          (call_script, "script_battle_tactic_apply"),
          ], []),

      common_battle_order_panel,
      common_battle_order_panel_tick,

      dotsight,

    ],
  ),

3. Then, add a presentation in module_presentations.py:
Code:
("dotsight", prsntf_read_only, 0, [		#must use prsntf_read_only or you cannot attack
      (ti_on_presentation_load,		[
          (create_mesh_overlay, reg1, "mesh_dotsight"),
          (presentation_set_duration, 9999999),
          (position_set_x, pos1, -118.25),
          (position_set_y, pos1, -28.25),
          (overlay_set_position, reg1, pos1),
          ]),
      ]),

4. Now take this image, and save it as a .dds file named "dotsight.dds" in the "textures" folder of your mod:
11836722_10153148185976527_5524796366863597440_n.jpg

5. Now create the mesh, texture and materials for the image - you could easily copy "pic_prisoner_man" or another menu image from the "pictures.brf", "textures.brf", and "materials.brf", in the "commonres" folder in your game install. make sure whatever.brf file you have them in is included in "module. ini".

6. Finally, add the mesh to "module_meshes.py":
Code:
("dotsight", 0, "dotsight", 0, 0, 0, 0, 0, 0, 2.25, 1.75, 2.25),

... And that should work. NOTE: the only issue is that when you hit the backspace button, the combat overlay will replace the dotsight overlay. Not really sure how to work around this unless you find a way to pop up the dotsight presentation whenever you close the battle overlay.

Hope that helps.  :mrgreen:
 
Back
Top Bottom