幕府将军2全面战争 修改脚本内置代码 scripting。lua

更新时间:2024-05-26 19:23:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

------------------------------------------------------------------------------- ------------------------------ SCRIPT SETUP ----------------------------------- ------------------------------------------------------------------------------- local core = require \local advice = require \local scripting = require \local camera_pan = 0 local new_game = false local panning = false

local becoming_shogun_advice = false

EpisodicScripting = scripting

scripting.SetCampaign(\out.ting(\

local function OnNewCampaignStarted(context) new_game = true becoming_shogun_advice = true scripting.game_interface:add_restricted_building_level_record(\e_Port\ scripting.game_interface:add_restricted_unit_record(\ scripting.game_interface:add_restricted_unit_record(\ -- Unlock the nanban port for the Otomo and Shimazu (just in case they lose it) scripting.game_interface:remove_restricted_building_level_record_for_faction(\3_Nanban_Trade_Port\ scripting.game_interface:remove_restricted_building_level_record_for_faction(\3_Nanban_Trade_Port\ end

local function OnUICreated(context) if scripting.IsOnCampaignMap() then if new_game and not CampaignUI.IsMultiplayer() then -- Add black screen cover, hide pop-in CampaignUI.ToggleScreenCover(true) CampaignUI.ToggleCinematicBorders(true) if conditions.FactionKeyIsLocal(\ scripting.game_interface:register_movies(\

out.ting(\scripting.game_interface:take_shroud_snapshot()

scripting.game_interface:make_neighbouring_regions_visible_in_shroud() scripting.game_interface:override_ui(\scripting.game_interface:override_ui(\scripting.game_interface:steal_user_input(true)

scripting.game_interface:set_zoom_limit(1.19, 0.676) CampaignUI.SetCameraZoom(0.676) CampaignUI.SetCameraHeading(-0.98)

CampaignUI.SetCameraTargetInstant(198.0, -34.0) new_game = false

elseif conditions.FactionKeyIsLocal(\ scripting.game_interface:register_movies(\ out.ting(\ scripting.game_interface:take_shroud_snapshot() scripting.game_interface:make_neighbouring_regions_visible_in_shroud() scripting.game_interface:override_ui(\ scripting.game_interface:override_ui(\ scripting.game_interface:steal_user_input(true) scripting.game_interface:set_zoom_limit(1.19, 0.676) CampaignUI.SetCameraHeading(0.02) CampaignUI.SetCameraTargetInstant(-155.0, -112.0) new_game = false elseif conditions.FactionKeyIsLocal(\ scripting.game_interface:register_movies(\ out.ting(\ scripting.game_interface:take_shroud_snapshot() scripting.game_interface:make_neighbouring_regions_visible_in_shroud() scripting.game_interface:override_ui(\ scripting.game_interface:override_ui(\ scripting.game_interface:steal_user_input(true) scripting.game_interface:set_zoom_limit(1.19, 0.676) CampaignUI.SetCameraZoom(0.68) CampaignUI.SetCameraHeading(0.5) CampaignUI.SetCameraTargetInstant(-142.0, -152.0) new_game = false elseif conditions.FactionKeyIsLocal(\ scripting.game_interface:register_movies(\ out.ting(\ scripting.game_interface:take_shroud_snapshot() scripting.game_interface:make_neighbouring_regions_visible_in_shroud()

scripting.game_interface:override_ui(\scripting.game_interface:override_ui(\scripting.game_interface:steal_user_input(true)

scripting.game_interface:set_zoom_limit(1.19, 0.676) CampaignUI.SetCameraZoom(1.0) CampaignUI.SetCameraHeading(-0.87)

CampaignUI.SetCameraTargetInstant(-248.0, -162.0) new_game = false

elseif conditions.FactionKeyIsLocal(\ scripting.game_interface:register_movies(\ out.ting(\ scripting.game_interface:take_shroud_snapshot() scripting.game_interface:make_neighbouring_regions_visible_in_shroud() scripting.game_interface:override_ui(\ scripting.game_interface:override_ui(\ scripting.game_interface:steal_user_input(true) scripting.game_interface:set_zoom_limit(1.19, 0.676) CampaignUI.SetCameraZoom(0.68) CampaignUI.SetCameraHeading(0.69) CampaignUI.SetCameraTargetInstant(-23.0, -156.0) new_game = false

elseif conditions.FactionKeyIsLocal(\ scripting.game_interface:register_movies(\ out.ting(\ scripting.game_interface:take_shroud_snapshot() scripting.game_interface:make_neighbouring_regions_visible_in_shroud() scripting.game_interface:override_ui(\ scripting.game_interface:override_ui(\ scripting.game_interface:steal_user_input(true) scripting.game_interface:set_zoom_limit(1.19, 0.676) CampaignUI.SetCameraZoom(0.8) CampaignUI.SetCameraHeading(0.26) CampaignUI.SetCameraTargetInstant(39.0, -157.0) new_game = false elseif conditions.FactionKeyIsLocal(\ scripting.game_interface:register_movies(\ out.ting(\ scripting.game_interface:take_shroud_snapshot() scripting.game_interface:make_neighbouring_regions_visible_in_shroud() scripting.game_interface:override_ui(\

scripting.game_interface:override_ui(\scripting.game_interface:steal_user_input(true)

scripting.game_interface:set_zoom_limit(1.19, 0.676) CampaignUI.SetCameraZoom(0.88) CampaignUI.SetCameraHeading(-0.49)

CampaignUI.SetCameraTargetInstant(4.0, -160.0) new_game = false

elseif conditions.FactionKeyIsLocal(\ scripting.game_interface:register_movies(\ out.ting(\ scripting.game_interface:take_shroud_snapshot() scripting.game_interface:make_neighbouring_regions_visible_in_shroud() scripting.game_interface:override_ui(\ scripting.game_interface:override_ui(\ scripting.game_interface:steal_user_input(true) scripting.game_interface:set_zoom_limit(1.19, 0.676) CampaignUI.SetCameraZoom(0.676) CampaignUI.SetCameraHeading(0.19) CampaignUI.SetCameraTargetInstant(-41.0, -158.0) new_game = false elseif conditions.FactionKeyIsLocal(\ scripting.game_interface:register_movies(\ out.ting(\ scripting.game_interface:take_shroud_snapshot() scripting.game_interface:make_neighbouring_regions_visible_in_shroud() scripting.game_interface:override_ui(\ scripting.game_interface:override_ui(\ scripting.game_interface:steal_user_input(true) scripting.game_interface:set_zoom_limit(1.19, 0.676) CampaignUI.SetCameraZoom(0.7) CampaignUI.SetCameraHeading(-0.36) CampaignUI.SetCameraTargetInstant(57.0, -165.0) new_game = false elseif conditions.FactionKeyIsLocal(\ scripting.game_interface:register_movies(\ out.ting(\ scripting.game_interface:take_shroud_snapshot() scripting.game_interface:make_neighbouring_regions_visible_in_shroud() scripting.game_interface:override_ui(\ scripting.game_interface:override_ui(\ scripting.game_interface:steal_user_input(true)

scripting.game_interface:set_zoom_limit(1.19, 0.676) CampaignUI.SetCameraZoom(0.92) CampaignUI.SetCameraHeading(0.047) CampaignUI.SetCameraTargetInstant(76.4, -106.0) new_game = false else CampaignUI.ToggleCinematicBorders(false) CampaignUI.ToggleScreenCover(false) end elseif new_game and CampaignUI.IsMultiplayer() then scripting.game_interface:set_zoom_limit(1.1, 0.8) CampaignUI.SetCameraZoom(0.95) end end end

-------------------------------------------------------------------------------------------------------------------------

-- 稰谅 twcenter (http://www.twcenter.net/forums/forumdisplay.php?f=1572)  husserlTW, deathblow

-- 稰谅 笴栏膀  roygbiv -- Τ好拜 叫笴栏膀癚阶跋ず祇拜 http://www.gamebase.com.tw/forum/1838/thread/ALL

-------------------------------------------------------------------------------------------------------------------------

events.FactionTurnStart[#events.FactionTurnStart+1] = function(context) -- 簿埃瓜癵铭 --scripting.game_interface:show_shroud(false) -- 闽超玵瓁 scripting.game_interface:disable_rebellions_and_revolutions_worldwide(true) if CampaignUI.IsPlayersTurn() == true and conditions.TurnNumber(context) == 1 then -- 糤戈 effect.adjust_treasury(999999, context) if conditions.FactionName(\context) and conditions.FactionIsHuman(\ -- ﹙и场產壁 scripting.game_interface:apply_effect_bundle(\ scripting.game_interface:apply_effect_bundle(\ scripting.game_interface:apply_effect_bundle(\ scripting.game_interface:apply_effect_bundle(\ scripting.game_interface:apply_effect_bundle(\

本文来源:https://www.bwwdw.com/article/osp7.html

Top