doomsayer
Knight
I didn't like it that crossbows and rifles are pointed from the lower right corner to the middle of the screen so here's a script I made that let's you actually aim over crossbows (and rifles) by putting the 1st person viewport to the right position.
Looks pretty nice with crossbows already, though some minor changes in animations are required to make it really good.
It should work smooth in singleplayer might get some stuttering when running around with the crossbow aimed in mp, though I'd need some testers to confirm this. With crossbows it's still a bit off vertically but that doesn't matter much due to arrow drop anyway, horizontally it's almost correct.
All it basically does is force you into an 1st person "ironsight" view whenever you aim a crossbow. There are still a view glitches, you should definately go into 1st person first to shoot crossbows or you'll see the inside of your head, which is embarassingly empty.
Here goes the code:
You just have to add this to your module_mission_templates.py after the line
And then in every mission you want it add the line below where the triggers are.
or
depending on what the mission is for ofc.
Pictures:
You are free to use and modify it however you like, I really hope some of the gunbased mods out there consider it. If you can improveme it I'd be glad to incorporate it.
Looks pretty nice with crossbows already, though some minor changes in animations are required to make it really good.
It should work smooth in singleplayer might get some stuttering when running around with the crossbow aimed in mp, though I'd need some testers to confirm this. With crossbows it's still a bit off vertically but that doesn't matter much due to arrow drop anyway, horizontally it's almost correct.
All it basically does is force you into an 1st person "ironsight" view whenever you aim a crossbow. There are still a view glitches, you should definately go into 1st person first to shoot crossbows or you'll see the inside of your head, which is embarassingly empty.
Here goes the code:
Code:
singleplayer_ironsight_mode = (
0, 0, 0, [],
[
(get_player_agent_no, ":player_agent"),
# (ge, ":player_agent", 0),
(try_begin),
(game_key_is_down, gk_view_char),
(mission_cam_set_mode, 0),
(else_try),
(agent_get_wielded_item, ":player_item", ":player_agent", 0),
(this_or_next|eq, ":player_item", "itm_tutorial_crossbow"),
(this_or_next|eq, ":player_item", "itm_practice_crossbow"),
(this_or_next|eq, ":player_item", "itm_hunting_crossbow"),
(this_or_next|eq, ":player_item", "itm_light_crossbow"),
(this_or_next|eq, ":player_item", "itm_crossbow"),
(this_or_next|eq, ":player_item", "itm_heavy_crossbow"),
(eq, ":player_item", "itm_sniper_crossbow"),
(game_key_is_down, gk_zoom),
(agent_get_look_position, pos1, ":player_agent"),
(position_move_x, pos1, 7),
(position_move_z, pos1, 40),
(init_position, pos2),
(init_position, pos3),
(position_copy_rotation, pos3, pos1),
(position_copy_rotation, pos1, pos2),
(position_move_z, pos1, 127),
(position_copy_rotation, pos1, pos3),
(mission_cam_set_mode, 1),
# whatever you do to zoom...
(mission_cam_set_position, pos1),
(mission_cam_set_aperture, 45),
(else_try),
(agent_get_wielded_item, ":player_item", ":player_agent", 0),
(this_or_next|eq, ":player_item", "itm_tutorial_crossbow"),
(this_or_next|eq, ":player_item", "itm_practice_crossbow"),
(this_or_next|eq, ":player_item", "itm_hunting_crossbow"),
(this_or_next|eq, ":player_item", "itm_light_crossbow"),
(this_or_next|eq, ":player_item", "itm_crossbow"),
(this_or_next|eq, ":player_item", "itm_heavy_crossbow"),
(eq, ":player_item", "itm_sniper_crossbow"),
(game_key_is_down, gk_attack),
(agent_get_look_position, pos1, ":player_agent"),
(position_move_x, pos1, 7),
(position_move_z, pos1, 40),
(init_position, pos2),
(init_position, pos3),
(position_copy_rotation, pos3, pos1),
(position_copy_rotation, pos1, pos2),
(position_move_z, pos1, 127),
(position_copy_rotation, pos1, pos3),
(mission_cam_set_mode, 1),
(mission_cam_set_position, pos1),
(else_try),
(mission_cam_set_mode, 0),
(try_end),
])
Code:
multiplayer_ironsight_mode = (
0, 0, 0, [],
[
(multiplayer_get_my_player, ":my_player_no"),
(player_get_agent_id, ":player_agent", ":my_player_no"),
(ge, ":player_agent", 0),
(try_begin),
(game_key_is_down, gk_view_char),
(mission_cam_set_mode, 0),
(else_try),
(agent_get_wielded_item, ":player_item", ":player_agent", 0),
(this_or_next|eq, ":player_item", "itm_crossbow"),
(this_or_next|eq, ":player_item", "itm_heavy_crossbow"),
(eq, ":player_item", "itm_sniper_crossbow"),
(game_key_is_down, gk_zoom),
(agent_get_look_position, pos1, ":player_agent"),
(position_move_x, pos1, 7),
(position_move_z, pos1, 40),
(init_position, pos2),
(init_position, pos3),
(position_copy_rotation, pos3, pos1),
(position_copy_rotation, pos1, pos2),
(position_move_z, pos1, 127),
(position_copy_rotation, pos1, pos3),
(mission_cam_set_mode, 1),
# whatever you do to zoom...
(mission_cam_set_position, pos1),
(mission_cam_set_aperture, 45),
(else_try),
(agent_get_wielded_item, ":player_item", ":player_agent", 0),
(this_or_next|eq, ":player_item", "itm_crossbow"),
(this_or_next|eq, ":player_item", "itm_heavy_crossbow"),
(eq, ":player_item", "itm_sniper_crossbow"),
(game_key_is_down, gk_attack),
(agent_get_look_position, pos1, ":player_agent"),
(position_move_x, pos1, 7),
(position_move_z, pos1, 40),
(init_position, pos2),
(init_position, pos3),
(position_copy_rotation, pos3, pos1),
(position_copy_rotation, pos1, pos2),
(position_move_z, pos1, 127),
(position_copy_rotation, pos1, pos3),
(mission_cam_set_mode, 1),
(mission_cam_set_position, pos1),
(else_try),
(mission_cam_set_mode, 0),
(try_end),
])
You just have to add this to your module_mission_templates.py after the line
Code:
pilgrim_disguise = [itm_pilgrim_hood,itm_pilgrim_disguise,itm_practice_staff, itm_throwing_daggers]
af_castle_lord = af_override_horse | af_override_weapons| af_require_civilian
And then in every mission you want it add the line below where the triggers are.
Code:
multiplayer_ironsight_mode,
or
Code:
singleplayer_ironsight_mode,
depending on what the mission is for ofc.
Pictures:
You are free to use and modify it however you like, I really hope some of the gunbased mods out there consider it. If you can improveme it I'd be glad to incorporate it.