全面战争:战锤2

全面战争:战锤2

Loreful Empires: Great Leader Bonuses (Updated For Silence and Fury)
DrunkFlamingo  [开发者] 2018 年 6 月 21 日 下午 2:49
MODDER API
I've had a few requests for other modders to integrate or take this mod. My solution to that is that I have created an API to modify the lists (and some of the settings) which this mod uses to determine how it influences the game. This will serve as the documentation for that API.

The recommended method is to create an export helper script file with the following listener.



core:add_listener(
"MYNAME_loreful_empires_additions",
"LorefulEmpiresActivated",
true,
function(context)
if not not _G.lem then
lem = _G.lem
--your changes here
--the following is an example.
lem:add_faction_to_major("wh_main_emp_stirland")
lem:set_nearby_player_restriction(false)
lem:remove_faction_from_secondary("wh2_main_vmp_vampire_coast")
--end of example
end
end,
false)


API FUNCTIONS:

--v function(self: LOREFUL_EMPIRES_MANAGER, faction_key: string)
lem:remove_faction_from_major("faction_key")

--v function(self: LOREFUL_EMPIRES_MANAGER, faction_key: string)
lem:remove_faction_from_secondary("faction_key")

--v function(self: LOREFUL_EMPIRES_MANAGER, faction_key: string)
lem:add_faction_to_major("faction_key")

--v function(self: LOREFUL_EMPIRES_MANAGER, faction_key: string)
lem:add_faction_to_secondary("faction_key")

--v function(self: LOREFUL_EMPIRES_MANAGER, option: boolean)
lem:set_defensive_battles_only(true/false)

--v function(self: LOREFUL_EMPIRES_MANAGER, option: boolean)
lem:set_nearby_player_restriction(true/false)

--v function(self: LOREFUL_EMPIRES_MANAGER, option: boolean)
lem:set_enable_script_for_allies(true/false)

These functions are heavily error checked, and should output a file yelling at you if you use them wrong.
最后由 DrunkFlamingo 编辑于; 2018 年 7 月 9 日 下午 12:04