I thought I was being clever...

General Stars in Shadow Discussion Forum
gaerzi
Posts: 209
Joined: Wed Jul 10, 2019 1:30 pm

I thought I was being clever...

Postby gaerzi » Thu Jul 18, 2019 9:43 pm

Capture a mobile base from the Tinkers, retrofit it for habitation, load up colonists, move it to a system with uncolonizable planets but a free slot, deploy it into orbit to turn it into a colony, and build an artificial planet this way...

Image

Last step isn't allowed. :cry:

You'll notice by the way that the interface tells me the "colony" could support three units of population, given by various techs... In fact no.

bjg
Posts: 638
Joined: Wed Feb 03, 2016 10:55 pm

Re: I thought I was being clever...

Postby bjg » Thu Jul 18, 2019 10:46 pm

In a similar situation (not having any big plans though) I was wondering why the food making project isn't available on such planet/station.

gaerzi
Posts: 209
Joined: Wed Jul 10, 2019 1:30 pm

Re: I thought I was being clever...

Postby gaerzi » Sun Jul 21, 2019 7:54 am

It took a while because I'm not used at all to Lua and its syntax is strange and alien to me, but I finally figured it out: the bit to change is in
GUI\~GalaxyMap\@ChooseProduction.lua

Code: Select all

function calc_production_candidates(limit)

  local planet = selected_planet
  local empire,star in planet
   local no_colony in planet
  local push, production_candidates = pusher {}

 
  if limit~='projects' and not no_colony
    working_refit_candidates(push)
  end


  if limit~='ships'  and not no_colony
    improvement_candidates(push)
  end

  local refit_candidates = refit_option(push)

  if (limit~='ships')  and not no_colony
    terraforming(push)
    colony_bases(push)
    ground_unit_candidates(push)
  end
  if limit~='projects'  and not no_colony
    ship_candidates(push)
  end
  if limit~='ships'
    activities (push)
  end



Specifically, it's this:

Code: Select all

  if (limit~='ships')  and not no_colony
    terraforming(push)
    colony_bases(push)
    ground_unit_candidates(push)
  end

Artificial planet creation is part of colony_bases. So you can either remove the "and not no_colony" here (but it would allow you to build ground units, I'm not sure what side effects this could have if you do) or you can move colony_bases(push) to the bit that doesn't have that restriction:

Code: Select all

  if (limit~='ships')  and not no_colony
    terraforming(push)
    ground_unit_candidates(push)
  end
  if limit~='projects'  and not no_colony
    ship_candidates(push)
  end
  if limit~='ships'
    colony_bases(push)
    activities (push)
  end



bjg wrote:In a similar situation (not having any big plans though) I was wondering why the food making project isn't available on such planet/station.


Presumably lack of room on the orbital station to scale up farming? To change that, it's in Orders\activities.lua:

Code: Select all

do

   local allowed_hab_only_activities = set("Trade","Research")

   function Planet.dont_show_activity(planet,activity)
      if planet.no_colony and planet.productive
         if not allowed_hab_only_activities[activity]
            return 'hab_only'
         end
      end
   end

end


You could add "Synthesize Food" to that set. "Mining" would work too. "City Planning" and "Manufacture Population" would probably be a bad idea, though.

gaerzi
Posts: 209
Joined: Wed Jul 10, 2019 1:30 pm

Re: I thought I was being clever...

Postby gaerzi » Sun Jul 21, 2019 9:41 am

Scratch that, they can build the artificial planet, but they can't complete it. There's some other obstruction somewhere I have to find.

Edit: that's economy_update in Orders\economy.lua.

Code: Select all

      if planet.inhabited

         if(planet.skip_production)
            planet.skip_production=nil
         elseif not planet.no_colony
            production_update(planet)
            change_production_if_needed(planet)   
        planet:create_overflow_project()
         end
      end end


I modified it this way:

Code: Select all

      if planet.inhabited or planet.productive

         if(planet.skip_production)
            planet.skip_production=nil
         else -- if not planet.no_colony
            production_update(planet)
            change_production_if_needed(planet)   
        planet:create_overflow_project()
         end
      end end

The artificial planet was completed from the mobile base. It can now move to another uncolonizable system to do this again.


Return to “General Forum”

Who is online

Users browsing this forum: No registered users and 24 guests

cron