• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Niocwy

Private
4 Badges
May 17, 2016
17
13
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Cossacks
  • Stellaris: Galaxy Edition
  • Tyranny - Tales from the Tiers
Hello everyone !

I tried designing a new ship, and it works fine except for 2 things :
- when in the designer, I can't see the ship. Either when designing or in the icon in list.
- the consctructed ship is waaaaaay too big.

To begin with, I'm just using the same entity as the Corvette, here's my section file :

Code:
ship_section_template = {
    key = "DEFAULT_FREIGHTER_SECTION"
    ship_size = freighter
    fits_on_slot = mid
    entity = "corvette_M1S1_entity"
    icon = "GFX_ship_part_core_mid"

    small_utility_slots = 5

    cost = 50
}

I tired creating my own in the asset file, but I had the same problem.

EDIT : more details. Here is the ship_size :
Code:
freighter = {
    max_speed = 5.25
    acceleration = 0.35
    rotation_speed = 0.1
    combat_max_speed = @civilian_ships_combat_speed
    combat_rotation_speed = 0.2
    collision_radius = @corvette_collision_radius


    max_hitpoints = 500
    size_multiplier = 0
    fleet_slot_size = 1
    section_slots = { "mid" = { locator = "part1" } }
    num_target_locators = 0
    is_space_station = no
    icon_frame = 1
    base_buildtime = 60

    enable_default_design = yes    #if yes, countries will have an auto-generated design at start

    prerequisites = { "tech_spaceport_1" }

    class = shipclass_military
    is_civilian = yes
    required_component_set = "ftl_components"
}

How it appears in the designer :
http://i.imgur.com/SyT1VCR.jpg
And in the game, near regular corvettes :
http://imgur.com/fRp54Uv

Any tips appreciated !
 
Last edited:
Ok I did that :
Code:
#FRAME
entity = {
    name = "fungoid_01_freighter_entity"
    pdxmesh = "molluscoid_01_corvette_frame_mesh"
  
    default_state = "idle"
    state = { name = "idle"     animation = "idle" animation_blend_time = 4
        start_event = { trigger_once = yes sound = { soundeffect = "amb_corvette_hum" } }
    }
    state = { name = "moving"    animation = "idle" animation_blend_time = 2
        event = { trigger_once = yes sound = { soundeffect = moving_out_corvette } }
    }
    state = { name = "death" animation = "death2" animation_blend_time = 0.0 chance = 1 looping = no
        event = { time = 3.46 node = "part1_locator" particle = "ship_explosion_particle" }
        event = { time = 6.79 node = "part1_locator" particle = "ship_explosion_particle" }
      
        event = { time = 0.5 node = "part1" particle = "ship_burn_particle" }
        event = { time = 0.5 node = "part1" particle = "ship_explosion_air_vent_particle" }
  
        event = { time = 0.0 node = "root" particle = "ship_explosion_particle" sound = { soundeffect = ship_destroyed } }
    }
    state = { name = "death" animation = "death" animation_blend_time = 0.0 chance = 1 looping = no
        event = { time = 4.46 node = "part1_locator" particle = "ship_explosion_particle" }
      
        event = { time = 0.5 node = "part1" particle = "ship_burn_particle" }
        event = { time = 0.5 node = "part1" particle = "ship_explosion_air_vent_particle" }
  
        event = { time = 0.0 node = "root" particle = "ship_explosion_particle" sound = { soundeffect = ship_destroyed } }
    }
    state = { name = "death" animation = "death3" animation_blend_time = 0.0 chance = 1 looping = no
        event = { time = 4.63 node = "ship_main" particle = "large_ship_explosion_particle" }
  
        event = { time = 0.0 node = "ship_main" particle = "ship_explosion_particle" sound = { soundeffect = ship_destroyed } }
        event = { time = 1.6 node = "ship_main" particle = "ship_explosion_particle" sound = { soundeffect = ship_destroyed } }
        event = { time = 2.83 node = "ship_main" particle = "ship_explosion_particle" sound = { soundeffect = ship_destroyed } }
        event = { time = 3.26 node = "ship_main" particle = "ship_explosion_particle" sound = { soundeffect = ship_destroyed } }
        event = { time = 3.9 node = "ship_main" particle = "ship_explosion_particle" sound = { soundeffect = ship_destroyed } }
        event = { time = 4.1 node = "ship_main" particle = "ship_explosion_particle" sound = { soundeffect = ship_destroyed } }
    }
  
    scale = 1.0
  
    game_data = {
        size = @corvette_scale
    }
}

#MID

entity = {
    name = "fungoid_01_freighter_ship_entity"
    pdxmesh = "fungoid_01_corvette_M1S1_mesh"
  
    default_state = "idle"
    state = { name = "idle" state_time = 5
        event = { time = 0 node = "engine_medium_01" particle = "fungoid_01_2_9_exhaust_idle_particle" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = "engine_medium_02" particle = "fungoid_01_1_5_exhaust_oblong_particle" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = "engine_medium_03" particle = "fungoid_01_1_5_exhaust_oblong_particle" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = "engine_small_01" particle = "fungoid_01_2_5_exhaust_idle_particle" trigger_once = yes keep_particle = yes }
  
        event = { time = 0 node = "light_locator_01" particle = "ship_light_green_effect" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = "light_locator_02" particle = "ship_light_green_effect" trigger_once = yes keep_particle = yes }
    }
    state = { name = "moving" state_time = 5
        event = { time = 0 node = "engine_medium_01" particle = "fungoid_01_2_4_exhaust_moving_particle" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = "engine_medium_02" particle = "fungoid_01_1_5_exhaust_oblong_moving_particle" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = "engine_medium_03" particle = "fungoid_01_1_5_exhaust_oblong_moving_particle" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = "engine_small_01" particle = "fungoid_01_1_8_exhaust_moving_particle" trigger_once = yes keep_particle = yes }
  
        event = { time = 0 node = "light_locator_01" particle = "ship_light_green_effect" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = "light_locator_02" particle = "ship_light_green_effect" trigger_once = yes keep_particle = yes }
    }
    state = { name = "death" state_time = 5 }
    scale = 1.2
}


That's the exact same code for the corvette. Of course, I changed the names.
If I understand correctly, I need an entity for the 'frame' of the whole ship, and an entity for each section, only one in this case.

For the frame, changing scale or size change nothing in the game. Also, I noticed that it was referencing the molluscoid_01 mesh, but it doesn't matter either (I tried changing it to fungoid_01 but nothing changed).

But in the section entity, changing the scale does indeed change the size of the ship, but then I have this (with a scale of 0.3):
http://imgur.com/VamoklE
...and the ship still doesn't appear in the designer. Also, with further inspection, the weird cube is here event when not changing the scale, it's just that the ship is so big it covers it almost entirely.

What did I do wrong ? I'm starting to think I'm missing something entirely about designing new ships. I also don't understand why the new ship is so big in the first place : it's basically a copy of the corvette.
 
Ok I got it ! And it was pretty stupid.

I actually looked at the error log for the first time and I immediately saw what was wrong, e.g. this :
Code:
  combat_max_speed = @civilian_ships_combat_speed
    combat_rotation_speed = 0.2
    collision_radius = @corvette_collision_radius

the @variables were not defined in my file so they were not recognized and messed up the ship somehow. Got rid of them and everything appears perfectly !

Ninja edit : @corvette_scale in the entity file was not defined as well
 
Ok I got it ! And it was pretty stupid.

I actually looked at the error log for the first time and I immediately saw what was wrong, e.g. this :
Code:
  combat_max_speed = @civilian_ships_combat_speed
    combat_rotation_speed = 0.2
    collision_radius = @corvette_collision_radius

the @variables were not defined in my file so they were not recognized and messed up the ship somehow. Got rid of them and everything appears perfectly !

Ninja edit : @corvette_scale in the entity file was not defined as well

Can you tell me where is this error log?

I met same problem with you,my ship model dont show.(battlecruiser class)