[patch] Allow outposts to be invaded

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
Daniel Santos
Space Floater
Posts: 30
Joined: Sun Nov 15, 2009 8:15 am

[patch] Allow outposts to be invaded

#1 Post by Daniel Santos »

This will cause the the SidePanel::PlanetPanel::Refresh() code to ignore METER_TARGET_POPULATION when determining if we can invade or not because:
  1. This is only updated if we have a colony ship in the fleet and selected (MapWnd::UpdateMeterEstimates(const std::vector<int>&))
  2. We aren't attempting to replace the current population on the planet (come on! where's the cruel Pax Imperia-style genocide in this game!?) and
  3. There wouldn't be a population there already if couldn't inhabit it themselves.
Attachments

[The extension diff has been deactivated and can no longer be displayed.]


User avatar
em3
Vacuum Dragon
Posts: 630
Joined: Sun Sep 25, 2011 2:51 pm

Re: [patch] Allow outposts to be invaded

#2 Post by em3 »

So... invading an outpost will make the outpost yours, destroy it, or convert it to a colony?
https://github.com/mmoderau
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [patch] Allow outposts to be invaded

#3 Post by Geoff the Medio »

For allowing invasions, the target population (METER_TARGET_POPULATION) shouldn't be a consideration, but the actual population (METER_POPULATION) should be. That's how it was before your previous patch, so I think you should restore that test, in addition to removing the unnecessary test of target population.

That said, what difference does the target population test make? If a planet already has some nonzero population, it doesn't get an updated target population when a colony ship is selected. But as you note, it should have a nonzero target population for its current species anyway, so would be invadable with the current tests regardless, wouldn't it?

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: [patch] Allow outposts to be invaded

#4 Post by eleazar »

Maybe part of the confusion is over what an outpost IS.

There are plans that an outpost would be qualitatively different than a colony, particularly that it would have no population. But currently those plans aren't official, and as far as i know nothing's been implemented. The thing that currently is called an outpost is merely a colony that starts smaller -- a stand-in for the "real" outpost which isn't yet possible. But the current kludgy "outposts" probably shouldn't be treated any differently than colonies.

(come on! where's the cruel Pax Imperia-style genocide in this game!?)
It just hasn't been added yet.

Daniel Santos
Space Floater
Posts: 30
Joined: Sun Nov 15, 2009 8:15 am

Re: [patch] Allow outposts to be invaded

#5 Post by Daniel Santos »

It just hasn't been added yet.
Hehe, that was mostly a negative comment towards Pax Imperia's "genocide-only" formula for taking over planets, but I can see cases where a player may prefer not to have a particular species in their empire. Which brings me to the topic of reputation, is there such a mechanism or plans for such? (i.e., other AI empires don't look so kindly upon you if you go around using bio-terror and genociding for no good reason, etc.)
Geoff the Medio wrote:For allowing invasions, the target population (METER_TARGET_POPULATION) shouldn't be a consideration, but the actual population (METER_POPULATION) should be. That's how it was before your previous patch, so I think you should restore that test, in addition to removing the unnecessary test of target population.

That said, what difference does the target population test make? If a planet already has some nonzero population, it doesn't get an updated target population when a colony ship is selected. But as you note, it should have a nonzero target population for its current species anyway, so would be invadable with the current tests regardless, wouldn't it?
Well, I'm not certain about the state of it before, I wouldn't be surprised if my previous patch broke it, I'm sorry if that's the case. :) None the less, this patch removes the test for target population for invasion and allows you to invade the colony and take possession of it. Sorry for any lack of clarity here. So yes, without the above attached patch, you can't invade outposts and this appears to fix it.

EDIT: OOPS!! I guess it's a bad patch. It allows you to invade uncolonized worlds too! Like that!? I'll get back to you, sorry :)

Daniel Santos
Space Floater
Posts: 30
Joined: Sun Nov 15, 2009 8:15 am

Re: [patch] Allow outposts to be invaded

#6 Post by Daniel Santos »

So let's try this one then :)

EDIT: btw, I'm working on another patch to MapWnd::UpdateMeterEstimates to fix up the "can colonize" message when you have a colony ship in the system that isn't selected, but you can't really colonize the planet. In a nutshell, I'm thinking it should:
  • If you have a colony ship selected, it should behave as now
  • If you have a single colony ship in a fleet at the system, it should show you what the max population would be if you colonized it with that ship.
  • If you have multiple colony ships (potentially containing different species) it should show you the best target population for each planet.
Please let me know if that's OK.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

Last edited by Daniel Santos on Fri Nov 04, 2011 11:50 pm, edited 1 time in total.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: [patch] Allow outposts to be invaded

#7 Post by eleazar »

Daniel Santos wrote:Which brings me to the topic of reputation, is there such a mechanism or plans for such? (i.e., other AI empires don't look so kindly upon you if you go around using bio-terror and genociding for no good reason, etc.)
There has been a lot of discussion in that area, but nothing yet finalized or implemented. Search the forums and wiki for "simulating citizens" and "alignments" if you are curious.

If brief, AI empires will probably be entirely pragmatic, but the all the citizens of all the empires may react with favor or disfavor --according to the ethos of each species-- to various actions. Some warlike species may approve of genocide, etc.

Daniel Santos
Space Floater
Posts: 30
Joined: Sun Nov 15, 2009 8:15 am

Re: [patch] Allow outposts to be invaded

#8 Post by Daniel Santos »

oh, very cool, ty!

Post Reply