• 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.

Boygor

Second Lieutenant
13 Badges
May 18, 2017
133
0
  • Stellaris: Synthetic Dawn
  • Pillars of Eternity
  • Stellaris
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Stellaris: Megacorp
  • Crusader Kings II
I'm not happy with 2.0's removal of warp travel so I'm going on a learning experience to generally mod some kind of warp back into the game. I've never created a mod or really looked into the in-game files so this'll be... interesting. I may fail or I may succeed :)

Anyways, without further ado, here are some bits and bobs relating to jumpdrives in 2.0 before I really get stuck into this.

---------------------------------------------------------------------------------------------------------------------------
MAKE JUMPDRIVES A STARTING TECH
---------------------------------------------------------------------------------------------------------------------------
Replace the jump-drive tech in the 00_phys_tech.txt file with the following to start with jumpdrives
---------------------------------------------------------------------------------------------------------------------------
********FILE = 00_phys_tech.txt********

tech_jump_drive_1 = {
cost = 0
area = physics
tier = 0
category = { field_manipulation }
start_tech = yes

# # jumpdrivestart
}

--------------------------------------------------------------------------------------------------------------------------
EDIT/ REMOVE THE JUMP-DRIVE JUMP PENALTY
---------------------------------------------------------------------------------------------------------------------------
Edit the numerical values in the cited file to suit
---------------------------------------------------------------------------------------------------------------------------
********FILE = 06_static_modifiers_apocalypse.txt********

# Jump Drive
jump_drive_cooldown = {
ship_weapon_damage = -0.0
ship_speed_reduction = 0.0
}

--------------------------------------------------------------------------------------------------------------------------
EDIT/ REMOVE THE JUMP-DRIVE COOL-DOWN PENALTY
---------------------------------------------------------------------------------------------------------------------------
Edit the "days" value in the cited file to suit
---------------------------------------------------------------------------------------------------------------------------
********FILE = on_action_events.txt********

# Jump Drive cooldown modifier
ship_event = {
id = action.89
hide_window = yes
is_triggered_only = yes

immediate = {
add_modifier = {
modifier = jump_drive_cooldown
days = 120
}
}
}

--------------------------------------------------------------------------------------------------------------------------
EDIT THE JUMP DRIVE RANGE
---------------------------------------------------------------------------------------------------------------------------
Find the line of code in the below file and edit to suit
---------------------------------------------------------------------------------------------------------------------------
********FILE = 00_defines.txt********


JUMP_DRIVE_RANGE = 100
---------------------------------------------------------------------------------------------------------------------------

Next up I'm going to look through 1.9 for the graphical assets (tech screen, icons etc) relating to the warp drive and see if I can't re-introduce some of them into 2.0. Then it's off to the modding wiki to learn how to make techs. I'll update this post as I learn things! :)
 
OK... so I've manged to get warpdrives 1,2 and 3 back into the tech tree and also be able to get selected as a drive type :)

I added the drives into the following:

The below should be added to the 00_phys-tech file...
-----------------------------------------------------------------------------
********FILE = 00_phys_tech.txt********

tech_warp_drive_1 = {
cost = 0
area = physics
tier = 0
category = { particles }
prerequisites = { "tech_basic_science_lab_1" }
start_tech = yes

is_reverse_engineerable = no

prereqfor_desc = {
component = {
title = "TECH_UNLOCK_WARPDRIVE_1_TITLE"
desc = "TECH_UNLOCK_WARPDRIVE_1_DESC"
}
}
}

tech_warp_drive_2 = {
cost = @tier2cost2
area = physics
tier = 2
category = { particles }
ai_update_type = all
is_reverse_engineerable = no
prerequisites = { "tech_warp_drive_1" }
weight = @tier2weight2

weight_modifier = {
modifier = {
factor = 1.25
has_tradition = tr_discovery_adopt
}
modifier = {
factor = 1.25
research_leader = {
area = physics
has_trait = "leader_trait_expertise_particles"
}
}
}

prereqfor_desc = {
component = {
title = "TECH_UNLOCK_WARPDRIVE_2_TITLE"
desc = "TECH_UNLOCK_WARPDRIVE_2_DESC"
}
}

ai_weight = {
factor = 4 #FTL techs are good
modifier = {
factor = 1.25
research_leader = {
area = physics
has_trait = "leader_trait_expertise_particles"
}
}
}
}

tech_warp_drive_3 = {
cost = @tier3cost3
area = physics
tier = 3
category = { particles }
ai_update_type = all
is_reverse_engineerable = no
prerequisites = { "tech_warp_drive_2" }
weight = @tier3weight3

weight_modifier = {
modifier = {
factor = 1.25
has_tradition = tr_discovery_adopt
}
modifier = {
factor = 1.25
research_leader = {
area = physics
has_trait = "leader_trait_expertise_particles"
}
}
}

prereqfor_desc = {
component = {
title = "TECH_UNLOCK_WARPDRIVE_3_TITLE"
desc = "TECH_UNLOCK_WARPDRIVE_3_DESC"
}
}

ai_weight = {
factor = 4 #FTL techs are good
modifier = {
factor = 1.25
research_leader = {
area = physics
has_trait = "leader_trait_expertise_particles"
}
}
}
}

I also dropped the following assets from the 1.9 folders into the following 2.0 folder:
C:\Program Files (x86)\Steam\SteamApps\common\Stellaris\gfx\interface\icons\ship_parts

ship_part_warp_drive_1.dds
ship_part_warp_drive_2.dds
ship_part_warp_drive_3.dds


So far so good. Next I need to do the following:

1) TECH icons need to be in the correct place. I think these are the following:

tech_warp_drive_1.dds
tech_warp_drive_2.dds
tech_warp_drive_3.dds


2) Then I need to possibly redesign civilian ships so that they default to warp 1 (jump) drives and are not stuck on hyperdrives... Given what Wiz said in another thread this might be a sticking point as you can no longer design civilian ships so sticking on a "warp 1" FTL type as standard might not work.

3) Then I need to find out how to makes the different jump drives, well, different. Range is obvious factor but can play with the cooldown effect too.

Fun fun fun :)
 
Last edited:
OK, got the science and civilian ships with warp drives now thanks to a post that Wiz made on the main forum :)

Edit the 00_ships_sizes.txt file to make the civilian ships designable. Simply change the code on the is_designable = no line for each vessel to is_designable = yes and we can swap out the hyperdrives in the shipyard for warp drives :)

Here is an example;

constructor = {
#max_speed = 3.75
max_speed = @speed_slow
acceleration = 0.3
rotation_speed = 0.2
max_hitpoints = 300
modifier = {
ship_evasion_add = 15
}
size_multiplier = 1
fleet_slot_size = 1
section_slots = { "mid" = { locator = "part1" } }
num_target_locators = 0
is_space_station = no
icon_frame = 9
base_buildtime = 60
cost = 100

combat_disengage_chance = 1.0

enable_default_design = yes #if yes, countries will have an auto-generated design at start
prerequisites = { "tech_space_construction" }
is_civilian = yes
is_designable = yes
components_add_to_cost = no
class = shipclass_constructor
construction_type = spaceport
required_component_set = "power_core"
required_component_set = "ftl_components"
required_component_set = "thruster_components"
required_component_set = "sensor_components"
valid_target_aggressive_stance = no
auto_upgrade = yes

upkeep_override = {
energy = 1
minerals = 0
}
}
 
OK I got the warp tech icons to behave themselves.

Just pop the following files into the following folder:

tech_warp_drive_1.dds
tech_warp_drive_2.dds
tech_warp_drive_3.dds

C:\Program Files (x86)\Steam\SteamApps\common\Stellaris\gfx\interface\icons\technologies
 
One minor problem I've noticed now is how the science ships try to run from danger. Hyperlanes. Gah I hate these things :) Likely unavoidable.

OK, that appears to be the basics done. All warp techs back in the game and functional. Now the harder part... how to assign different jump-drive penalties/ ranges to each of the warp types to make them distinct...
 
OK.... first part of the "distinction" puzzle....

Create distinct warp cooldown events in the on_action_events.txt file:

# Warp Drive 1 cooldown modifier
ship_event = {
id = action.920
hide_window = yes
is_triggered_only = yes

immediate = {
add_modifier = {
modifier = jump_drive_cooldown
days = 30
}
}
}

# Warp Drive 2 cooldown modifier
ship_event = {
id = action.921
hide_window = yes
is_triggered_only = yes

immediate = {
add_modifier = {
modifier = jump_drive_cooldown
days = 20
}
}
}


# Warp Drive 3 cooldown modifier
ship_event = {
id = action.922
hide_window = yes
is_triggered_only = yes

immediate = {
add_modifier = {
modifier = jump_drive_cooldown
days = 15
}
}
}

Now... to figure out how to mess around with the 00_on_actions.txt file to allow the various warp types to trigger different cool down effects:

on_jump_drive = {
events = {
action.89
}
}

Likely need to add something to the above but it's time to go digging for a precedent....
 
OK.. almost there...

on_jump_drive = {
If ={
owner ={
has_technology = "tech_warp_drive_1"
}
}
events = {
action.920

}
}

Need to get a "not" in there to ensure that the correct cooldown is applied depending on tech level... at the moment warp drive 1 is OK but warp drive 2 has the same cooldown (which is not desirable) :)
 
OK this works for warp 1...

# THIS = Fleet
on_jump_drive = {
If ={
owner ={
has_technology = "tech_warp_drive_1"
}
}

Not ={
owner = {
has_technology = "tech_warp_drive_2"
}
}

Not ={
owner = {
has_technology = "tech_warp_drive_3"
}
}

Not ={
owner = {
has_technology = "tech_jump_drive_1"
}
}
events = {
action.920

}
}


As it gives me a 30 day cooldown in conjunction with this event in the on_actions_events.txt file:

# Warp Drive 1 cooldown modifier
ship_event = {
id = action.920
hide_window = yes
is_triggered_only = yes

immediate = {
add_modifier = {
modifier = jump_drive_cooldown
days = 30
}
}
}

But I think it's somewhat faulty as if I use warp 3 using similar logic:

# THIS = Fleet
on_jump_drive = {
If ={
owner ={
has_technology = "tech_warp_drive_3"
}
}
Not ={
owner = {
has_technology = "tech_jump_drive_1"
}
}
events = {
action.922

}
}

it still gives me 30 day cooldown... have to think about this and see if I can't amalgamate the logic into a single on_action with multiple outcomes. But I'm going to bed just now as I've got work in the morning :)

Someone will have possibly cracked this nut by morning anyways but I couldn't just sit around doing nothing. Got a partial solution thus far with more to do!
 
A bit offtop, but did you find a way to edit space terrain effects(for example disable shield debuff from neutron stars) and add ability to design starbases?
And thank you for your work with warp, man!
 
I have next to no experience with modding, but know that there is a demand for this kind of work. Keep it up and don’t let the hyperlane echo chamber drown you out.
 
uff friend I will need ot buy you at least 40 large beers for you. You are great. Btw do you think it is possible to bring old Jump Drive back ? As this was my favourite FTL type in pre 2.0. I do not want to click ontaht stupid icon ( that I have problems to find sometimes ) to use Jump drive but would love to have old Jump Drive back as it was. Thank you
 
This still going? I had gone back to 1.9 and tried out the warp system for the first time and instantly regretted it because I'm gonna miss it playing updated games.