群星Stellaris自建星系(自定义星系)教程 |
您所在的位置:网站首页 › 洋桔梗英语缩写 › 群星Stellaris自建星系(自定义星系)教程 |
本来教程应该在52写的,但是很多小伙伴可能进不去52,于是写在了这里。本人是52pcgame论坛的jackunxu,绝非虚假转载,真原创。 欢迎喜欢写mod的人加入,希望大街和谐友善;资源宝贵,不要起争执。废话不多说,直接上教程!记住,修改应以mod形式修改,不要直接修改游戏本体!!!不要直接修改游戏本体!!!不要直接修改游戏本体!!! 1.认识群星星系设定文件solar_system_initializers,位于common中; solar_system_initializers内部就是各种星系定义文件了,主要定义星系内部各种星体及关系; 2.认识群星星系事件文件events; events这部分主要定义星系如何诞生,诞生在哪里(坐标位置); 3-1.开始创建基础星系,这里我创建名为xzk_distant_stars_initializers于mod中; xzk_distant_stars_initializers3-2.于此文件创建基本信息: distantstars_init_xzk_01 = { ####星系名,要不重复 class = "rl_standard_stars" ####星系类型,指默认星系内中心体类型,定义在common\star_classes\00_star_classes.txt中 name = "NAME_Xzkun_Starts"####星系游戏内显示名称,定义在localisation中 asteroid_belt = { ####是否存在小行星带,没有就整段删除 type = rocky_asteroid_belt ####小行星带类型,定义在common\asteroid_belts\00_asteroid_belts.txt中 radius = 190 ####距中心星体半径 } flags = { empire_home_system xzklcluster1 }####标志,一般指会被哪种脚本或事件触发,定义在common\scripted_triggers\00_scripted_triggers.txt中 planet = {###星系内星体 name = "NAME_Xzkun_Starts"####同上 count = 1####数量 class = star####类型,定义在common\star_classes\00_star_classes.txt中 orbit_distance = 0####轨道距离 orbit_angle = 1####距中心的角度,按数学坐标系看角度; size = { min = 20 max = 30 }####大小20-30之间 has_ring = no####有环吗?没有 } change_orbit = 45####变更轨道 ### planet = { class = pc_ringworld_habitable####同上,定义在common\planet_classes orbit_angle = 0####同上 orbit_distance = 0####同上 size = 30####同上 deposit_blockers = none####障碍物 modifiers = none####附加值 init_effect = {####为实体添加 prevent_anomaly = yes####不出现异常现象 set_owner = root####此天体设定拥有者 set_controller = root####此天体设定实际控制者 add_building = building_system_capital####添加建筑 add_building = building_xzk_capital add_building = building_xzk_capital add_building = building_xzk_capital add_building = building_xzk_capital add_building = building_xzk_capital while = {####当 count = 1####数量1 create_pop = {####创建人口 species = owner_main_species####国家主流人口 } } } } planet = {####一下重复,省略 class = pc_ringworld_habitable orbit_angle = 90 orbit_distance = 0 size = 30 deposit_blockers = none modifiers = none init_effect = { prevent_anomaly = yes set_owner = root set_controller = root add_building = building_system_capital add_building = building_xzk_capital add_building = building_xzk_capital add_building = building_xzk_capital add_building = building_xzk_capital add_building = building_xzk_capital while = { count = 1 create_pop = { species = owner_main_species } } } } planet = { class = pc_ringworld_habitable orbit_angle = 180 orbit_distance = 0 size = 30 deposit_blockers = none modifiers = none init_effect = { prevent_anomaly = yes set_owner = root set_controller = root add_building = building_system_capital add_building = building_xzk_capital add_building = building_xzk_capital add_building = building_xzk_capital add_building = building_xzk_capital add_building = building_xzk_capital while = { count = 1 create_pop = { species = owner_main_species } } } } planet = { class = pc_ringworld_habitable orbit_angle = 270 orbit_distance = 0 size = 30 deposit_blockers = none modifiers = none init_effect = { prevent_anomaly = yes set_owner = root set_controller = root add_building = building_system_capital add_building = building_xzk_capital add_building = building_xzk_capital add_building = building_xzk_capital add_building = building_xzk_capital add_building = building_xzk_capital while = { count = 1 create_pop = { species = owner_main_species } } } } planet = { class = pc_ringworld_tech orbit_angle = 30 orbit_distance = 0 deposit_blockers = none modifiers = none } planet = { count = 3 class = pc_ringworld_tech orbit_angle = 90 orbit_distance = 0 deposit_blockers = none modifiers = none } planet = { class = pc_ringworld_seam orbit_angle = 30 orbit_distance = 0 deposit_blockers = none modifiers = none } planet = { count = 3 class = pc_ringworld_seam orbit_angle = 90 orbit_distance = 0 deposit_blockers = none modifiers = none } ### ### init_effect = {####星系内创建其他实体 spawn_megastructure = {####创建巨构 type = gateway_final ###星门 orbit_angle = 225####角度 orbit_distance = 240####距中心距离 } create_starbase = {####创建星港 size = "starbase_citadel"####擎天堡 #owner = event_target:caravaneer_home_country####由事件触发 module = "shipyard"####六大格 module = "shipyard" module = "shipyard" module = "shipyard" module = "shipyard" module = "shipyard" #effect = { # set_starbase_module = {星港内建筑####六小格 # slot = 1####数量 # module = trading_hub####都有啥 # } #} } } } distantstars_init_xzk_02 = {####第二个星系,我一共在此星团里创建了4个星系,所以一下忽略 class = "rl_standard_stars" name = "NAME_Xzkun_StartsA" asteroid_belt = { type = rocky_asteroid_belt radius = 125 } asteroid_belt = { type = icy_asteroid_belt radius = 240 } usage = misc_system_init usage_odds = 0 flags = { empire_home_system xzklcluster2 } planet = { count = 1 class = star orbit_distance = 0 orbit_angle = 1 size = { min = 20 max = 30 } has_ring = no } init_effect = { create_starbase = { size = "starbase_citadel" #owner = event_target:caravaneer_home_country module = "shipyard" module = "shipyard" module = "shipyard" module = "shipyard" module = "shipyard" module = "shipyard" } } change_orbit = 30 } distantstars_init_xzk_03 = { class = "rl_standard_stars" name = "NAME_Xzkun_StartsB" usage = misc_system_init usage_odds = 0 flags = { empire_home_system xzklcluster3 } planet = { count = 1 class = star orbit_distance = 0 orbit_angle = 1 size = { min = 20 max = 30 } has_ring = no } init_effect = { create_starbase = { size = "starbase_citadel" #owner = event_target:caravaneer_home_country module = "shipyard" module = "shipyard" module = "shipyard" module = "shipyard" module = "shipyard" module = "shipyard" } } change_orbit = 70 } distantstars_init_xzk_04 = { class = "rl_standard_stars" name = "NAME_Xzkun_StartsC" asteroid_belt = { type = rocky_asteroid_belt radius = 120 } usage = misc_system_init usage_odds = 0 flags = { empire_home_system xzklcluster4 } planet = { count = 1 class = star orbit_distance = 0 orbit_angle = 1 size = { min = 20 max = 30 } has_ring = no } init_effect = { create_starbase = { size = "starbase_citadel" #owner = event_target:caravaneer_home_country module = "shipyard" module = "shipyard" module = "shipyard" module = "shipyard" module = "shipyard" module = "shipyard" } } change_orbit = 120 } 4.进入下一步,事件定义星系,包含坐标位置以及触发条件,我同样新建了一个xzk_spawn_starts_events.txt,内容如下: xzk_spawn_starts_events.txtnamespace = xzkspawn####事件类 country_event = {####定义为事件 id = xzkspawn.1####事件名 hide_window = yes####隐藏窗口为是 is_triggered_only = yes####只能被触发,不能自主出现 trigger = {####触发对象 is_ai = no####不允许AI触发 } fire_only_once = yes####只触发一次,这个一定要有,不然触发两次以上就刷新星系 immediate = {####立刻触发 set_spawn_system_batch = begin####触发批次,开始游戏就存在,翻译如下,大致意思就是锁定星系路径,别总刷新变,想琢磨的自己琢磨就行,重点在后面 # batch-processes the spawn_system effects between "begin" and "end", # so caches are recalculated only once rather than for every system spawned # can also be used when removing and adding hyperlanes no_scope = {####以下为重点了 # makes system positions originate from galactic core spawn_system = {####创建星系了,这个味主星系,以下是坐标 min_distance >= 600####距离银河系黑洞的最小距离,可以是固定值= max_distance = 29####这个就是距离我们创建的星团的距离了,不是银河系中心了 max_distance = 29 max_distance = 30 max_distance |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |