Capturing ships with Phidi race

A forum for chatting about in-development game features.
User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Capturing ships with Phidi race

Postby siyoa » Sat Apr 22, 2017 9:47 pm

so I captured battlecruiser and handed it to my scientists, was told that I managed to understand the new technology of constructing battlecruisers ... yet it is nowhere in my ship building/designing section ... I was really looking into this one, because as Phidi between super dreadnoughts and cruisers is quite a gap ... am I just missing something ... or this is not fully implemented ? thanks

phidi_battlecruiser.jpg
phidi_battlecruiser.jpg (248.67 KiB) Viewed 27287 times
How did YOU get a key? All right, go in.

User avatar
Arioch
Posts: 1403
Joined: Sun Feb 01, 2015 12:56 am
Location: San Jose, California
Contact:

Re: Capturing ships with Phidi race

Postby Arioch » Sat Apr 22, 2017 10:00 pm

I'm guessing it's a glitch having to do with the Phidi not normally having a Battlecruiser tech. I'll pass it along.

If you could upload a log of the game in which this happened (in Options menu, click "Upload Game Logs" and then post the resulting save name here so we know which one it is), it would help us to reproduce the issue.

User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: Capturing ships with Phidi race

Postby siyoa » Sat Apr 22, 2017 10:32 pm

Arioch wrote:I'm guessing it's a glitch having to do with the Phidi not normally having a Battlecruiser tech. I'll pass it along.

I was wondering if that is what is happening.

Uploaded "game_3741"

I have few things moded, nothing big, I don't think it should affect anything in that savegame for you to open it (it is mainly some weapon balancing, added slots to PD and bases, ships speed and range increase in late game techs, etc).
How did YOU get a key? All right, go in.

zolobolo
Posts: 1544
Joined: Fri Nov 25, 2016 3:49 pm

Re: Capturing ships with Phidi race

Postby zolobolo » Sun Apr 23, 2017 7:57 am

siyoa wrote:I have few things moded, nothing big, I don't think it should affect anything in that savegame for you to open it (it is mainly some weapon balancing, added slots to PD and bases, ships speed and range increase in late game techs, etc).


Hi Siyoa, sorry for hijacking the topic, but did you by chance come across the configuration of the Marauder faction during your modding (specifically: their number in the map, how much resource they get, or how they get tech)?

User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: Capturing ships with Phidi race

Postby siyoa » Mon Apr 24, 2017 3:14 am

zolobolo wrote:
siyoa wrote:I have few things moded, nothing big, I don't think it should affect anything in that savegame for you to open it (it is mainly some weapon balancing, added slots to PD and bases, ships speed and range increase in late game techs, etc).


Hi Siyoa, sorry for hijacking the topic, but did you by chance come across the configuration of the Marauder faction during your modding (specifically: their number in the map, how much resource they get, or how they get tech)?


hi, I never poked around that one yet, but your question piqued my curiosity ;) it seems quite a lot is going on (in regards to what you are looking for) in "mercenary_empires.lua" in "Lua state\Galaxy" folder
How did YOU get a key? All right, go in.

zolobolo
Posts: 1544
Joined: Fri Nov 25, 2016 3:49 pm

Re: Capturing ships with Phidi race

Postby zolobolo » Mon Apr 24, 2017 9:30 am

siyoa wrote:hi, I never poked around that one yet, but your question piqued my curiosity ;) it seems quite a lot is going on (in regards to what you are looking for) in "mercenary_empires.lua" in "Lua state\Galaxy" folder


Thanks for the hint.

So your theory is that Marauders are controlled just like Merc factions?
If that is true, one could tinker around with the below two to weaken Marauders correct?:

mercenary_empire.psuedo_hammers += round | raw_income*0.2
local supportable_value = max(5000,raw_income*15)
local total_ship_value=0
local spawn_cost_discount=0.1

I particularly eyeball the last one, as it might have something to do with the spam rate of Marauder ships
According to the descriptions, the Merc factions level up by having contact with empires and are dependent on their tech - I doubt this is the case in case of Marauders, as they seem to be getting Battleship tech earlier then any other empire (might be a bug if their tech should be identical to those of empires that they are in contact with)

The affect on Mercs is of no concern, as the AI does not yet utilize them (well unless I would be palying Phidi :))
Last edited by zolobolo on Mon Apr 24, 2017 8:32 pm, edited 1 time in total.

User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: Capturing ships with Phidi race

Postby siyoa » Mon Apr 24, 2017 8:14 pm

see, this is what you get for being hasty and lazy ... I found that "mercenary_empires.lua" file and called it a day, the Battleship issue did bug me, but I kind of ignored it due to ... (i.e. more associates, bigger chance to get the tech)

Code: Select all

  -- the gremak marauders also get 'associates' with any empire
  -- that has good relations with one of the marauder companies.


but, more I am looking at that file, more I think it only handles mercenaries

now, taking a chance, that I point you the wrong direction again, there is a file in "Lua states\Orders\" called "riders.lua" and I think 8-) that it is the right one

there is code which should tell (based on difficulty) how much advantage they get

Code: Select all

local difficulty_to_value_curve = {
  brutal= function(pop) return 800+900*pop end,
  hard= function(pop) return 400+500*pop end,
  normal= function(pop) return 200+400*pop end,
  easy= function(pop) return 300*pop end,
}

local difficulty_to_min_psudeo = {
  brutal=300,
  hard=300,
  normal=200,
  easy=100,
}

local difficulty_to_cost_mult = {
  brutal=3,
  hard=5,
  normal=10,
  easy=18,
}


also, their tech level seems to be based on number of turns

Code: Select all

local techs = {
  [50] = tech_costs.early(.5),
  [100] = tech_costs.early(1),
  [150] = tech_costs.mid(.2),
  [200] = tech_costs.mid(.7),
  [250] = tech_costs.mid(.9),
  [300] = tech_costs.late(.1),
}

function update_tech(empire)
  local thresh = techs[galaxy.year-1100]
  if thresh
    order.grant_all_techs(empire,thresh)
  end
end


I hope I got it right this time :oops:
How did YOU get a key? All right, go in.

zolobolo
Posts: 1544
Joined: Fri Nov 25, 2016 3:49 pm

Re: Capturing ships with Phidi race

Postby zolobolo » Mon Apr 24, 2017 8:31 pm

siyoa wrote:now, taking a chance, that I point you the wrong direction again, there is a file in "Lua states\Orders\" called "riders.lua" and I think 8-) that it is the right one


Thanks siyoa, your are my personal summer-santa :)

I will play around with the file and see if I can get a nice balance out of them.
In hindsight, it seems obvious that this file is the one (raiders=marauders), but was also too lazy to do a full text search on the folder :roll:

I honestly thought it will be hidden somewhere deeper, but yeah for us!

User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: Capturing ships with Phidi race

Postby siyoa » Tue Apr 25, 2017 7:07 am

zolobolo wrote:
siyoa wrote:now, taking a chance, that I point you the wrong direction again, there is a file in "Lua states\Orders\" called "riders.lua" and I think 8-) that it is the right one


Thanks siyoa, your are my personal summer-santa :)

I will play around with the file and see if I can get a nice balance out of them.
In hindsight, it seems obvious that this file is the one (raiders=marauders), but was also too lazy to do a full text search on the folder :roll:

I honestly thought it will be hidden somewhere deeper, but yeah for us!

quite often the most obvious things are hardest to spot, trust me on that one :D
How did YOU get a key? All right, go in.

User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: Capturing ships with Phidi race

Postby siyoa » Wed Apr 26, 2017 10:46 pm

back to OP :D

this seems like not easy to solve problem

each race designs their ships the way it suites them the best, right ? hence we have different specs (amount of slots, etc.) for each class of ships, even if the class name is the same between races, internals (and of course graphics) are different

one approach would be to get you precisely the same ship layout (internals and graphics) as is the ship you capture and dissect for knowledge ... the problem is there is no current support in the code for this (you cannot have two different ship designs named "battleship", etc)

the other approach would be (and I like this better from lore point of view) not a direct copy of particular captured ship ... but each race would accommodate what they learn from dissecting captured ship into their existing fleet ... so if Phidi capture battlecruiser, they won't copy design one for one, but they design their own battlecruiser from scratch ... this would require additional work from devs to create graphics to have each ship design (or call it a ship class for better distinction) available to each race but some designs would be accessible by capturing ships only

for the second approach, it doesn't necessary need to include every single ship design, just the major ones, like capturing any_of(battlecruiser, battleship) grants access to some kind of hybrid for a race which has none, races with access to one of those designs can be considered set in that area and they won't get themselves any new ship design ... similar for torpedo destroyer, missile cruiser ... only races lacking any ship design in this area would benefit from capturing this ship

approach one should be possible to do with the current code mods if one is willing to name each design unique name (where the name is identical between races) and mod appropriate sections of code to reflect it (mainly techtree unlocking) ... and also each race needs to be told to look for all ship designs rather than just its own folders ... I may play around with this ;)
How did YOU get a key? All right, go in.

User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: Capturing ships with Phidi race

Postby siyoa » Thu Apr 27, 2017 5:36 am

hmm, this is in certain ways more complicated than I thought and in certain ways less complicated :shock:

this is nowhere close to what I was planning to do, but ... beware Phidi can use battlecruiser design after capturing one

phidi_battlecruiser_02.jpg
phidi_battlecruiser_02.jpg (181.94 KiB) Viewed 27221 times
How did YOU get a key? All right, go in.

User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: Capturing ships with Phidi race

Postby siyoa » Sat Apr 29, 2017 4:36 pm

if anyone is interested in a workaround, here it is (I don't have enough time to try to put together permanent fix, and this current solution involves editing one file occasionally during gameplay, takes less than a minute)

first, let me say I was wrong again ;)
siyoa wrote:there is no current support in the code for this (you cannot have two different ship designs named "battleship", etc)

you can have more than one design with the same name, there is a drawback though

now the workaround

"Lua state\~ShipTechPrereqs.lua", add this code (after definition of local shared_placeholders, but it can be anywhere, really)

Code: Select all

local captured_designs_yoral = join( all_drawer_configs {} )
local captured_designs_teros = join( all_drawer_configs {} )
local captured_designs_haduir = join( all_drawer_configs {} )
local captured_designs_phidi = join( all_drawer_configs {} )
local captured_designs_orthin = join( all_drawer_configs {} )
local captured_designs_gremak = join( all_drawer_configs {} )
local captured_designs_human = join( all_drawer_configs {} )


in the same file change local base_configs (it should be right after the code you just added) to this

Code: Select all

local base_configs = {
  yoral = join( all_theme_configs 'Box', shared_placeholders,captured_designs_yoral),
  teros = join(all_theme_configs ('Hawk'),global_configs,captured_designs_teros),
  haduir = join(all_theme_configs ('Hawk'),global_configs,captured_designs_haduir),
  phidi = join( all_theme_configs 'Star', shared_placeholders,captured_designs_phidi),
  orthin = join( all_theme_configs 'Manta', shared_placeholders,captured_designs_orthin),
  gremak = join( all_theme_configs 'Blade', shared_placeholders,captured_designs_gremak),
  human = join( all_theme_configs 'Hammer', shared_placeholders,captured_designs_human),
}


now everytime you capture a ship, you can add it to the pool of captured_designs_...... for the particular race you are playing

so if you capture "Battlecruiser" from Teros/Haduir with Phidi and the game unlocks "Battlecruisers" for you, you change it to this

Code: Select all

local captured_designs_phidi = join( all_drawer_configs {'HawkBC'} )


if later in the game you capture "Dreadnought" from Orthin and game unlocks "Dreadnoughts" for you, you can modify it to this

Code: Select all

local captured_designs_phidi = join( all_drawer_configs {'HawkBC','MantaBB1'} )


before starting a new game, make sure you empty the pool of captured ship designs

ship names are located in "Lua state\Drawers\Ships"

this is nowhere close to elegant solution, but it's quick, and (to my best knowledge) it works, feel free to let me know if something goes funny :idea:

a quick example of finished code in my current plays, I have two games ongoing, one Phidi (captured Battlecruiser from Haduir) and one Haduir (captured Dreadnought from Orthin)

Code: Select all

local shared_placeholders = join(global_configs,all_drawer_configs {
'HawkLargeStation','HawkSmallBase','HawkMP','HawkYard'} )

local captured_designs_yoral = join( all_drawer_configs {} )
local captured_designs_teros = join( all_drawer_configs {} )
local captured_designs_haduir = join( all_drawer_configs {'MantaBB1'} )
local captured_designs_phidi = join( all_drawer_configs {'HawkBC'} )
local captured_designs_orthin = join( all_drawer_configs {} )
local captured_designs_gremak = join( all_drawer_configs {} )
local captured_designs_human = join( all_drawer_configs {} )

local base_configs = {
  yoral = join( all_theme_configs 'Box', shared_placeholders,captured_designs_yoral),
  teros = join(all_theme_configs ('Hawk'),global_configs,captured_designs_teros),
  haduir = join(all_theme_configs ('Hawk'),global_configs,captured_designs_haduir),
  phidi = join( all_theme_configs 'Star', shared_placeholders,captured_designs_phidi),
  orthin = join( all_theme_configs 'Manta', shared_placeholders,captured_designs_orthin),
  gremak = join( all_theme_configs 'Blade', shared_placeholders,captured_designs_gremak),
  human = join( all_theme_configs 'Hammer', shared_placeholders,captured_designs_human),
}
Last edited by siyoa on Sat Apr 29, 2017 4:48 pm, edited 2 times in total.
How did YOU get a key? All right, go in.

User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: Capturing ships with Phidi race

Postby siyoa » Sat Apr 29, 2017 4:46 pm

now the reason, you want to empty the pool of captured ship designs (at the beginning of the new game), and here I was partially right that the code can have a problem with ship designs sharing the same name 8-)

let's say you keep this in the code (Haduir captured Orthin Dreadnought)

Code: Select all

local captured_designs_haduir = join( all_drawer_configs {'MantaBB1'} )


now you play a new game as a Haduir and you capture Human Dreadnought (well they call it Battleship)

so you change the code to

Code: Select all

local captured_designs_haduir = join( all_drawer_configs {'MantaBB1','HammerBB'} )


now the game unlocks you both designs (because they fall under the same ship class - dreadnoughts) anytime you capture any dreadnought from any race and get access to that technology by dissecting the captured ship, it is mainly lore breaking

I hope I didn't confuse you much :P
How did YOU get a key? All right, go in.

User avatar
Captainspire
Posts: 153
Joined: Mon Mar 30, 2015 8:30 pm

Re: Capturing ships with Phidi race

Postby Captainspire » Tue May 15, 2018 2:58 pm

siyoa wrote:if anyone is interested in a workaround, here it is (I don't have enough time to try to put together permanent fix, and this current solution involves editing one file occasionally during gameplay, takes less than a minute)

first, let me say I was wrong again ;)
siyoa wrote:there is no current support in the code for this (you cannot have two different ship designs named "battleship", etc)

you can have more than one design with the same name, there is a drawback though

now the workaround

"Lua state\~ShipTechPrereqs.lua", add this code (after definition of local shared_placeholders, but it can be anywhere, really)

Code: Select all

local captured_designs_yoral = join( all_drawer_configs {} )
local captured_designs_teros = join( all_drawer_configs {} )
local captured_designs_haduir = join( all_drawer_configs {} )
local captured_designs_phidi = join( all_drawer_configs {} )
local captured_designs_orthin = join( all_drawer_configs {} )
local captured_designs_gremak = join( all_drawer_configs {} )
local captured_designs_human = join( all_drawer_configs {} )


in the same file change local base_configs (it should be right after the code you just added) to this

Code: Select all

local base_configs = {
  yoral = join( all_theme_configs 'Box', shared_placeholders,captured_designs_yoral),
  teros = join(all_theme_configs ('Hawk'),global_configs,captured_designs_teros),
  haduir = join(all_theme_configs ('Hawk'),global_configs,captured_designs_haduir),
  phidi = join( all_theme_configs 'Star', shared_placeholders,captured_designs_phidi),
  orthin = join( all_theme_configs 'Manta', shared_placeholders,captured_designs_orthin),
  gremak = join( all_theme_configs 'Blade', shared_placeholders,captured_designs_gremak),
  human = join( all_theme_configs 'Hammer', shared_placeholders,captured_designs_human),
}


now everytime you capture a ship, you can add it to the pool of captured_designs_...... for the particular race you are playing

so if you capture "Battlecruiser" from Teros/Haduir with Phidi and the game unlocks "Battlecruisers" for you, you change it to this

Code: Select all

local captured_designs_phidi = join( all_drawer_configs {'HawkBC'} )


if later in the game you capture "Dreadnought" from Orthin and game unlocks "Dreadnoughts" for you, you can modify it to this

Code: Select all

local captured_designs_phidi = join( all_drawer_configs {'HawkBC','MantaBB1'} )


before starting a new game, make sure you empty the pool of captured ship designs

ship names are located in "Lua state\Drawers\Ships"

this is nowhere close to elegant solution, but it's quick, and (to my best knowledge) it works, feel free to let me know if something goes funny :idea:

a quick example of finished code in my current plays, I have two games ongoing, one Phidi (captured Battlecruiser from Haduir) and one Haduir (captured Dreadnought from Orthin)

Code: Select all

local shared_placeholders = join(global_configs,all_drawer_configs {
'HawkLargeStation','HawkSmallBase','HawkMP','HawkYard'} )

local captured_designs_yoral = join( all_drawer_configs {} )
local captured_designs_teros = join( all_drawer_configs {} )
local captured_designs_haduir = join( all_drawer_configs {'MantaBB1'} )
local captured_designs_phidi = join( all_drawer_configs {'HawkBC'} )
local captured_designs_orthin = join( all_drawer_configs {} )
local captured_designs_gremak = join( all_drawer_configs {} )
local captured_designs_human = join( all_drawer_configs {} )

local base_configs = {
  yoral = join( all_theme_configs 'Box', shared_placeholders,captured_designs_yoral),
  teros = join(all_theme_configs ('Hawk'),global_configs,captured_designs_teros),
  haduir = join(all_theme_configs ('Hawk'),global_configs,captured_designs_haduir),
  phidi = join( all_theme_configs 'Star', shared_placeholders,captured_designs_phidi),
  orthin = join( all_theme_configs 'Manta', shared_placeholders,captured_designs_orthin),
  gremak = join( all_theme_configs 'Blade', shared_placeholders,captured_designs_gremak),
  human = join( all_theme_configs 'Hammer', shared_placeholders,captured_designs_human),
}



Image

So there's the file, where in that file do I paste that info to?

User avatar
siyoa
Posts: 182
Joined: Fri Apr 21, 2017 3:19 pm

Re: Capturing ships with Phidi race

Postby siyoa » Tue May 15, 2018 4:35 pm

Your message contains too few characters.
Attachments
captured_designs.jpg
captured_designs.jpg (287.68 KiB) Viewed 24903 times
How did YOU get a key? All right, go in.


Return to “Testing”

Who is online

Users browsing this forum: No registered users and 65 guests