local function OnWorldCreated()
scripting.game_interface:technology_osmosis_for_playables_enable_culture("european")
scripting.game_interface:technology_osmosis_for_playables_enable_all()
end
local function OnWorldCreated()
scripting.game_interface:technology_osmosis_for_playables_enable_culture("european")
scripting.game_interface:technology_osmosis_for_playables_enable_all()
scripting.game_interface:show_shroud(false)
end
基本条件语句
(单个条件,单个指令)=>if 条件 then 执行指令 end
(多个条件,单个指令)=>if 条件1 and 条件2 and 条件3 then 执行指令 end
(多个条件,多个指令)=>if 条件 then 执行指令
elseif 条件 then 执行指令
elseif 条件 then 执行指令 end
local function OnFactionTurnStart(context) //当回合开始
if conditions.TurnNumber(context) == 2 then //如果当前回合是2(注意,是双等号,这个不是一般数学的等式,而是逻辑数学)
scripting.game_interface:enable_auto_generated_missions(true) //自动触发小任务
end //语句结束
if conditions.FactionName("portugal", context) and conditions.FactionIsHuman("portugal", context) then //如果葡萄牙存在,并且葡萄牙是由玩家控制的国家
scripting.game_interface:grant_faction_handover("portugal", "new_spain", 6, 7, context) //葡萄牙在第7回合获得新西班牙的全部领土,新西班牙被消灭
end //语句结束
end //事件结束
路径Napoleon Total War\data\campaigns\mp_eur_napoleon下的scripting.lua 这个是反法同盟的 右键用记事本可以打开编辑 但是发现战争迷雾哪项是没的local function OnWorldCreated
国家全开是改Napoleon Total War\data\campaigns\mp_eur_napoleon下的startpos.esf