Planet mines 3 not working

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Post Reply
Message
Author
godel
Space Dragon
Posts: 267
Joined: Tue Mar 24, 2015 12:58 am

Planet mines 3 not working

#1 Post by godel »

In the latest 0.4.4 windows, I was sore beset by heavy duty monsters and researched Planetary mines 3. And no matter which planet I checked, checked many turns after that ressearch, Planet defense 3 never appeared.
I got so many Kraken on my screen that I have to restart. And the Bloated whatsis are mean.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Planet mines 3 not working

#2 Post by Dilvish »

Did you mis-write something? Mines 3 increases the damage of your mines, but does not give you Defense 3. And even at lvl 3, mines are not going to matter noticeably to Black Kracken or other Experimentor monsters.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Planet mines 3 not working

#3 Post by MatGB »

Hmm, looked at the code.

Code: Select all

                OwnedBy affiliation = EnemyOf empire = Source.Owner
Mines are currently set to only hit enemy empire ships. I think that's wrong, as they should hit monsters and rogue fleets as well. I think that code was put in to stop them from hitting allied ships, especially in shared systems, so not sure how to fix it so they hit monsters and enemy empire fleets.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

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

Re: Planet mines 3 not working

#4 Post by Geoff the Medio »

MatGB wrote:Hmm, looked at the code.

Code: Select all

                OwnedBy affiliation = EnemyOf empire = Source.Owner
Mines are currently set to only hit enemy empire ships. I think that's wrong, as they should hit monsters and rogue fleets as well. I think that code was put in to stop them from hitting allied ships, especially in shared systems, so not sure how to fix it so they hit monsters and enemy empire fleets.

Code: Select all

Or [
    Unowned
    OwnedBy affiliation = EnemyOf empire = Source.Owner
]

godel
Space Dragon
Posts: 267
Joined: Tue Mar 24, 2015 12:58 am

Re: Planet mines 3 not working

#5 Post by godel »

OK, I was wrong, was hopeful, and thought the mine would help wear down the monsters. The monsters breed and stackk and overwhelm.
But they should still be part of the planet defenses, and in many cases the planet needs more defense vs monsters than vs anything else.
Or note in the reserch note that they are no good vs monsters.

Planet mines do not show up in the offense nor the defense stats of a planet. That is wrong.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Planet mines 3 not working

#6 Post by MatGB »

That they don't work against monsters is a bug (which I'd suspected but you've made me go and confirm). If you go into the techs.txt file in the default folder of your install and change the code in each of the three mines techs to what Geoff proposes it should then work (I'm playing a game to test it currently).

This will be fixed in the Test releases as soon as a) the Git migration is finalised and b) I've figured out how to use Git (or someone else pushes the fix).

Personally, I don't think mines should be flagged up in advance, they're meant to be hidden, you find out about them when they start hurting your ships. But perhaps a sitrep telling the defending player that their mines are working might be something to code in.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Planet mines 3 not working

#7 Post by Dilvish »

Geoff the Medio wrote:

Code: Select all

Or [
    Unowned
    OwnedBy affiliation = EnemyOf empire = Source.Owner
]
Hmm, is there any particular reason why GetDiplomaticStatus() should return INVALID_DIPLOMATIC_STATUS if either empire is ALL_EMPIRES, as opposed to returning war if either but not both are ALL_EMPIRES? It does seem counter-intuitive to me that in all cases (to my knowledge) unowned mobs/planets are treated (or at least intended) as enemies, but we force ourselves to add extra code to properly effect this.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: Planet mines 3 not working

#8 Post by Geoff the Medio »

Dilvish wrote:Hmm, is there any particular reason why GetDiplomaticStatus() should return INVALID_DIPLOMATIC_STATUS if either empire is ALL_EMPIRES...
That seems like a reasonable and accurate return value for that inquiry....
It does seem counter-intuitive to me that in all cases (to my knowledge) unowned mobs/planets are treated (or at least intended) as enemies...
This should eventually / soon change, with neutrals being neutral, and hostile or not a case-by-case basis.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Planet mines 3 not working

#9 Post by MatGB »

MatGB wrote: This will be fixed in the Test releases as soon as a) the Git migration is finalised and b) I've figured out how to use Git (or someone else pushes the fix).
e02abf5

Done, I hope.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

godel
Space Dragon
Posts: 267
Joined: Tue Mar 24, 2015 12:58 am

Re: Planet mines 3 not working

#10 Post by godel »

Thanks, I will wait for the release, and try not to hit that monster limit again.

Post Reply