StellarisMOD作成 忘備録03


個人メモ

新しくLoGHFlagshipクラスを追加する。
frameはtfpa_01_LoGHFlagship_Frame
ヒューベリオンはtfpa_01_LoGHFlagship01
パトロクロスはtfpa_01_LoGHFlagship02
以下の構成でtxtの変更か新規作成が必要
Ýcommon
│├\compornet_templates
││└99_LoGHFlagship_utilities_roles.txt
│├\section_templates
││└LoGHFlagship.txt
│└\ship_sizes
│ └99_LoGH_ship_sizes.txt

└\gfx
 └\models
  └\ships
   └\tfpa_01
    ├_tfpa_01_LoGHFlagship_entities.asset
    ├_tfpa_01_LoGHFlagship_animations.asset
    ├tfpa_01_LoGHFlagship_meshes.gfx
    │
    ├tfpa_01_LoGHFlagship_frame.mesh
    │
    ├tfpa_01_LoGHFlagship01.mesh
    ├tfpa_01_LoGHFlagship01_diffuse.dds
    ├tfpa_01_LoGHFlagship01_normal.dds
    ├tfpa_01_LoGHFlagship01_specular.dds
    │
    ├tfpa_01_LoGHFlagship_frame_idle.anim
    ├tfpa_01_LoGHFlagship_frame_death.anim
    ├tfpa_01_LoGHFlagship_frame_death2.anim
    └tfpa_01_LoGHFlagship_frame_death3.anim



-------------------------------------------↓\gfx↓---------------------------------------------------------------------

#-------------------------------------------------------------------------------------------------------
#tfpa_01_LoGHFlagship_meshes.gfx
#
#assetで指定されている物が具体的に何で構成されているのかをここで指定する。
#視覚的に何を表示させ、何のアニメーションをさせるのか指定するのはここ。
#-------------------------------------------------------------------------------------------------------
objectTypes = {

 #######  LoGHFlagship frame  #######

 pdxmesh = {
  name = "tfpa_01_LoGHFlagship_frame_mesh"    #enetities.assetへ引用される名称
  file = "gfx/models/ships/tfpa_01/tfpa_01_LoGHFlagship_frame.mesh"  #使用するmeshの場所
    animation = { id = "idle"   type = "tfpa_01_LoGHFlagship_frame_idle_animation" } #idはentities.assetへ引用される
    animation = { id = "death"   type = "tfpa_01_LoGHFlagship_frame_death_animation" } #typeはanimation.assetで定義されている名称
    animation = { id = "death2"   type = "tfpa_01_LoGHFlagship_frame_death2_animation" }
    animation = { id = "death3"   type = "tfpa_01_LoGHFlagship_frame_death3_animation" }
  #  animation = { id = "attack"   type = "tfpa_01_LoGHFlagship_frame_idle_animation" }  
  scale = 1.0 #船体の大きさ
  meshsettings = {
   shader = "PdxMeshShip"
  }
 }
 #######  LoGHFlagship bow sections  #######

 pdxmesh = {
  name = "tfpa_01_LoGHFlagship01_mesh"    #assetで引用されるヒューベリオンの名称
  file = "gfx/models/ships/tfpa_01/tfpa_01/tfpa_01_LoGHFlagship01.mesh" #使用するヒューベリオンのmeshの場所
  scale = 1.0 #船体の大きさ
  meshsettings = {
   shader = "PdxMeshShip"
   #Mipmap tweaking
  #texture_diffuse = "2x2.dds"
  }
 }
 
 pdxmesh = {
  name = "tfpa_01_LoGHFlagship02_mesh"    #assetで引用されるパトロクロスの名称
  file = "gfx/models/ships/tfpa_01/tfpa_01/tfpa_01_LoGHFlagship02.mesh" #使用するパトロクロスのmeshの場所
  scale = 1.0 #船体の大きさ
  meshsettings = {
   shader = "PdxMeshShip"
   #Mipmap tweaking
  #texture_diffuse = "2x2.dds"
  }
 }
 
}
#-------------------------------------------------------------------------------------------------

#-------------------------------------------------------------------------------------------------
#_tfpa_01_LoGHFlagship_animations.asset
#
#gfxで指定されているanimationはどこの何を指しているのかはここに記述する
#-------------------------------------------------------------------------------------------------
animation = {
 name = "tfpa_01_LoGHFlagship_frame_death_animation" #meshes.gfxで引用される
 file = "tfpa_01_LoGHFlagship_frame_death.anim"  #使用するanimの場所
}
animation = {
 name = "tfpa_01_LoGHFlagship_frame_death2_animation"
 file = "tfpa_01_LoGHFlagship_frame_death2.anim"
}
animation = {
 name = "tfpa_01_LoGHFlagship_frame_death3_animation"
 file = "tfpa_01_LoGHFlagship_frame_death3.anim"
}
animation = {
 name = "tfpa_01_LoGHFlagship_frame_idle_animation"
 file = "tfpa_01_LoGHFlagship_frame_idle.anim"
}
#-------------------------------------------------------------------------------------------------

#-------------------------------------------------------------------------------------------------
#_tfpa_01_LoGHFlagship_entities.asset
#
#section_tenplateに引き渡す為の色々な定義を行う。
#commonに引き渡す変数名称は種族分けした名前を付けず抽象名にする。
#-------------------------------------------------------------------------------------------------

@LoGHFlagship_scale = 16.0      #変数を定義
##################           LoGHFlagship           ########################
# FRAME
entity = {
 name = "LoGHFlagship_entity"    #section_templateで引用される
 pdxmesh = "tfpa_01_LoGHFlagship_frame_mesh"   #_meshes.gfxで定義されている名称

 default_state = "idle"     #何も指定していない状態で、gfxで指定した"idle"のアニメーションをさせ、soundeffectの"amb_battleship_hum"の効果音を鳴らす
 state = { name = "idle" animation = "idle" animation_blend_time = 4.0
  start_event = { trigger_once = yes sound = { soundeffect = "amb_battleship_hum" } }
 }
 state = { name = "moving" animation = "idle" animation_blend_time = 4.0
  event = { trigger_once = yes sound = { soundeffect = "moving_out_battleship" } }
 }
 state = { name = "death" animation = "death" animation_blend_time = 0.0 chance = 1 looping = no
  event = { time = 9.26 node = "part1_locator" particle = "ship_explosion_air_vent_particle" }
  event = { time = 9.26 node = "part1_locator" particle = "ship_burn_particle" }
  event = { time = 9.26 node = "part1_locator" particle = "large_ship_explosion_particle" }
  event = { time = 7.63 node = "part1_locator" particle = "ship_explosion_particle" }
 
  event = { time = 10.26 node = "part2_back_locator" particle = "ship_explosion_air_vent_particle" }
  event = { time = 10.26 node = "part2_back_locator" particle = "ship_burn_particle" }
 
  event = { time = 10.26 node = "part3_locator" particle = "ship_burn_particle" }
  event = { time = 10.26 node = "part3_locator" particle = "large_ship_explosion_particle" }
 
  event = { time = 0.0 particle = "large_ship_explosion_particle" sound = { soundeffect = ship_destroyed } }
 }
 state = { name = "death" animation = "death2" animation_blend_time = 0.0 chance = 1 looping = no
  event = { time = 9.56 node = "part1_locator" particle = "ship_explosion_air_vent_particle" }
  event = { time = 9.56 node = "part1_locator" particle = "ship_burn_particle" }
  event = { time = 9.56 node = "part1_locator" particle = "large_ship_explosion_particle" }
  event = { time = 9.0 node = "part1_locator" particle = "ship_explosion_particle" }
 
  event = { time = 9.56 node = "part2_front_locator" particle = "ship_explosion_air_vent_particle" }
  event = { time = 9.56 node = "part2_front_locator" particle = "ship_burn_particle" }
  event = { time = 14.7 node = "part2_back_locator" particle = "ship_explosion_air_vent_particle" }
  event = { time = 14.7 node = "part2_back_locator" particle = "ship_burn_particle" }
 
  event = { time = 14.7 node = "part3_locator" particle = "ship_explosion_air_vent_particle" }
  event = { time = 14.7 node = "part3_locator" particle = "ship_burn_particle" }
  event = { time = 14.7 node = "part3_locator" particle = "large_ship_explosion_particle" }
 
  event = { time = 0.0 particle = "large_ship_explosion_particle" sound = { soundeffect = ship_destroyed } }
 }
 state = { name = "death" animation = "death3" animation_blend_time = 0.0 chance = 1 looping = no
  event = { time = 1.0 node = "explosion_locator1" particle = "ship_burn_particle" }
  event = { time = 1.0 node = "explosion_locator1" particle = "ship_explosion_particle" }
 
  event = { time = 1.7 node = "explosion_locator2" particle = "ship_burn_particle" }
  event = { time = 1.7 node = "explosion_locator2" particle = "ship_explosion_particle" }
 
  event = { time = 3.7 node = "explosion_locator3" particle = "ship_burn_particle" }
  event = { time = 3.7 node = "explosion_locator3" particle = "ship_explosion_particle" }
 
  event = { time = 6.0 node = "explosion_locator4" particle = "ship_burn_particle" }
  event = { time = 6.0 node = "explosion_locator4" particle = "ship_explosion_particle" }
 
  event = { time = 7.3 node = "explosion_locator5" particle = "ship_burn_particle" }
  event = { time = 7.3 node = "explosion_locator5" particle = "ship_explosion_particle" }
 
  event = { time = 0.0 particle = "large_ship_explosion_particle" sound = { soundeffect = ship_destroyed } }
 }

 scale = 1.0

 game_data = {
  size = @LoGHFlagship_scale
 }
}

entity = {
 name = "LoGHFlagship01_entity"  #section_templateで引用される
 pdxmesh = "tfpa_01_LoGHFlagship01_mesh" #_meshes.gfxで定義されているヒューベリオンの名称

 default_state = "idle"
 state = { name = idle state_time = 5
  event = { time = 0 node = "light_01" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
  event = { time = 0 node = "light_02" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
 }

 state = { name = moving state_time = 5
  event = { time = 0 node = "light_01" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
  event = { time = 0 node = "light_02" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
 }

 state = { name = "death" state_time = 5 }

 # XL weapon windup locator names: xl_windup_1-10
}
entity = {
 name = "LoGHFlagship02_entity"  #section_templateで引用される
 pdxmesh = "tfpa_01_LoGHFlagship02_mesh" #_meshes.gfxで定義されているパトロクロスの名称

 default_state = "idle"
 state = { name = idle state_time = 5
  event = { time = 0 node = "light_01" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
  event = { time = 0 node = "light_02" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
 }

 state = { name = moving state_time = 5
  event = { time = 0 node = "light_01" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
  event = { time = 0 node = "light_02" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
 }

 state = { name = "death" state_time = 5 }

 # XL weapon windup locator names: xl_windup_1-10
}
------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------↓\COMMON↓---------------------------------------------------

#-------------------------------------------------------------------------------------------------
#LoGHFlagship.txt
#
#ship_sizeで指定されたセクションに何が接続されているのか定義する。
#例えばBOWにはどれだけの数のBOWがあって、それぞれのBOWには何が付いていて、何のentitiesを使うのか、を定義する。
#
#-------------------------------------------------------------------------------------------------

##################################FLAGSHIP_01#####################################################
ship_section_template = {
 key = "LoGHFlagship01"    #不明?
 ship_size = LoGHFlagship    #Ship_Sizes内の変数名
 fits_on_slot = bow     #セクションの場所
 entity = "LoGHFlagship01_entity"   # \gfx内の_entities.assetの変数名
 icon = "GFX_ship_part_core_bow"   #不明?

 prerequisites = { tech_energy_lance_1 tech_energy_lance_2 tech_arc_emitter_1 tech_arc_emitter_2 tech_mass_accelerator_1 tech_mass_accelerator_2 }

 ai_weight = {
  modifier = {
   factor = 10.0
   NOT = { is_preferred_weapons = explosive }
  }
  modifier = {
   factor = 0.1
   is_preferred_weapons = explosive
  }
 }

 component_slot = {     #武器1
  name = "EXTRA_LARGE_01"
  slot_size = extra_large
  slot_type = weapon
  locatorname = "xl_gun_01"
 }
  component_slot = {    #武器2
  name = "EXTRA_LARGE_02"
  slot_size = extra_large
  slot_type = weapon
  locatorname = "xl_gun_02"
 }
 large_utility_slots = 2    #Lスロット数
 aux_utility_slots = 2     #Aスロット数

 cost = 3000   #建造費
}
##################################FLAGSHIP_02#####################################################
ship_section_template = {
ship_section_template = {
 key = "LoGHFlagship02"    #不明?
 ship_size = LoGHFlagship    #Ship_Sizes内の変数名
 fits_on_slot = bow     #セクションの場所
 entity = "LoGHFlagship02_entity"   # \gfx内の_entities.assetの変数
 icon = "GFX_ship_part_core_bow"   #不明?

 prerequisites = { tech_energy_lance_1 tech_energy_lance_2 tech_arc_emitter_1 tech_arc_emitter_2 tech_mass_accelerator_1 tech_mass_accelerator_2 }

 ai_weight = {
  modifier = {
   factor = 10.0
   NOT = { is_preferred_weapons = explosive }
  }
  modifier = {
   factor = 0.1
   is_preferred_weapons = explosive
  }
 }

 component_slot = {    #武器1
  name = "EXTRA_LARGE_01"
  slot_size = extra_large
  slot_type = weapon
  locatorname = "xl_gun_01"
 }
  component_slot = {   #武器2
  name = "EXTRA_LARGE_02"
  slot_size = extra_large
  slot_type = weapon
  locatorname = "xl_gun_02"
 }

 large_utility_slots = 2    #Lスロット数
 aux_utility_slots = 2     #Aスロット数

 cost = 3000   #建造費
}
#-------------------------------------------------------------------------------------------------------------------

#-------------------------------------------------------------------------------------------------
#99_LoGH_ship_sizes.txt
#
#艦艇の定義を行う
#
#
#-------------------------------------------------------------------------------------------------
@LoGHFlagship_combat_speed = 0.75   #戦闘速度
@LoGHFlagship_combat_rotation = 0.025  #戦闘時の回頭速度
@LoGHFlagship_collision_radius = 3   #衝突半径?
@LoGHFlagship_formation_priority = 4   #陣形位置(少ない程接敵位置に行く)
############
LoGHFlagship = {      #変数定義 この名称がship desginerに反映される。
 formation_priority = @LoGHFlagship_formation_priority
 max_speed = 3     #巡航速度
 acceleration = 0.2     #加速度
 rotation_speed = 0.15    #巡航回頭速度
 combat_max_speed = @LoGHFlagship_combat_speed
 combat_rotation_speed = @LoGHFlagship_combat_rotation
 collision_radius = @LoGHFlagship_collision_radius
 modifier = {
  ship_armor_add = 80   #装甲値
  ship_evasion_add = 5   #回避率
 }
 max_hitpoints = 2400    #船体耐久度
 size_multiplier = 8     #不明?
 fleet_slot_size = 4     #不明?
 section_slots = { "bow" = { locator = "part1" } "mid" = { locator = "part2" } "stern" = { locator = "part3" } }  #船体のセクション名の定義とロケータ名称
 num_target_locators = 4          #接続されるロケーターの数
 is_space_station = no          #yesにすると航跡が出ない。動かない(未確認)
 icon_frame = 5           #不明?
 base_buildtime = 480          #建造期間
 required_spaceport_level = 6          #建造可能な宇宙港のレベル
 can_have_federation_design = yes         #不明?
 enable_default_design = yes #if yes, countries will have an auto-generated design at start   #開始時に自動生成するかどうか

 prerequisites = { "tech_spaceport_6" }         #登場前提条件

 class = shipclass_military
 required_component_set = "ftl_components"
 required_component_set = "combat_computers"   #compornent_templateでShip_sizeごとのコンピュータを定義しないといけない。
 required_component_set = "thruster_components"
 required_component_set = "ship_sensor_components"
}

#-------------------------------------------------------------------------------------------------
#99_LoGHFlagship_utilities_roles.txt
#
#combat_computerはship_sizeごとに定義されてるので、
#新しく作ってあげないとエラーになる
#
#-------------------------------------------------------------------------------------------------

utility_component_template = {
 key = "BATTLESHIP_COMBAT_COMPUTER_1"
 size = small
 icon = "GFX_ship_part_computer_default"
 icon_frame = 1
 power = 0
 cost = 0
 class_restriction = { shipclass_military }
 size_restriction = { LoGHFlagship }    #ここをship_sizesに合わせないと相手先不明でエラーになる
 component_set = "combat_computers"
 ship_behavior = "battleship_sniper"
 upgrades_to = "BATTLESHIP_COMBAT_COMPUTER_2"

 ai_weight = {
  weight = 1
 }
}
utility_component_template = {
 key = "BATTLESHIP_COMBAT_COMPUTER_2"
 size = small
 icon = "GFX_ship_part_computer_defensive_basic"
 icon_frame = 1
 power = -5
 cost = 5
 class_restriction = { shipclass_military }
 size_restriction = { LoGHFlagship }    #ここをship_sizesに合わせないと相手先不明でエラーになる
 component_set = "combat_computers"
 ship_behavior = "battleship_sniper"
 prerequisites = { "tech_combat_computers_1" }
 upgrades_to = "BATTLESHIP_COMBAT_COMPUTER_3"

 ship_modifier = {
  ship_weapon_damage = 0.05
 }

 ai_weight = {
  weight = 2
 }
}
utility_component_template = {
 key = "BATTLESHIP_COMBAT_COMPUTER_3"
 size = small
 icon = "GFX_ship_part_computer_defensive_advanced"
 icon_frame = 1
 power = -10
 cost = 10
 class_restriction = { shipclass_military }
 size_restriction = { LoGHFlagship }    #ここをship_sizesに合わせないと相手先不明でエラーになる
 component_set = "combat_computers"
 ship_behavior = "battleship_sniper"
 prerequisites = { "tech_combat_computers_2" }
 ship_modifier = {
  ship_weapon_damage = 0.10
 }

 ai_weight = {
  weight = 3
 }
}
utility_component_template = {
 key = "BATTLESHIP_COMBAT_COMPUTER_4"
 size = small
 icon = "GFX_ship_part_computer_sentient"
 icon_frame = 1
 power = -20
 cost = 20
 class_restriction = { shipclass_military }
 size_restriction = { LoGHFlagship }   #ここをship_sizesに合わせないと相手先不明でエラーになる
 component_set = "combat_computers"
 ship_behavior = "battleship_sniper"
 prerequisites = { "tech_combat_computers_3" }
 ship_modifier = {
  ship_weapon_damage = 0.10
  ship_fire_rate_mult = 0.05
 }

 ai_weight = {
  weight = 5
 }
}
utility_component_template = {
 key = "BATTLESHIP_COMBAT_COMPUTER_PRECOG"
 size = small
 icon = "GFX_ship_part_computer_pregoc"
 icon_frame = 1
 power = -20
 cost = 20
 class_restriction = { shipclass_military }
 size_restriction = { LoGHFlagship }   #ここをship_sizesに合わせないと相手先不明でエラーになる
 component_set = "combat_computers"
 ship_behavior = "battleship_sniper"
 prerequisites = { "tech_precognition_interface" }
 ship_modifier = {
  ship_weapon_damage = 0.05
  ship_accuracy_add = 5
  ship_tracking_add = 5
 }

 ai_weight = {
  weight = 4
 }
}


コメント