[Patch] Unarmed fleets should not be aggressive by default
Moderator: Committer
[Patch] Unarmed fleets should not be aggressive by default
It's annoying that scouts and colony ships are aggressive by default. Doesn't everyone lose ships now and then because they forget to tell them not to be suicidally brave?
Here's a simple patch that fixes this by making new fleets aggressive only if they're armed.
Here's a simple patch that fixes this by making new fleets aggressive only if they're armed.
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [Patch] Unarmed fleets should not be aggressive by defau
I think there are a few more appropriate places to do this. Including:
* In Empire::CheckProductionProgress, after the "// create new fleet for ships" line in Empire.cpp
* In the CreateNewFleet function in Effect.cpp
* By adding an auto-aggression setting to the FleetWnd new fleet drop panel. This might use an icon such as this. This would probably require adjusting the NewFleetOrder to have cases where it is intended to auto-pick an aggression.
Just setting it in the AddShips function is prone to missing cases, being overwritten, or overwriting when this is not the intended behaviour.
* In Empire::CheckProductionProgress, after the "// create new fleet for ships" line in Empire.cpp
* In the CreateNewFleet function in Effect.cpp
* By adding an auto-aggression setting to the FleetWnd new fleet drop panel. This might use an icon such as this. This would probably require adjusting the NewFleetOrder to have cases where it is intended to auto-pick an aggression.
Just setting it in the AddShips function is prone to missing cases, being overwritten, or overwriting when this is not the intended behaviour.
Re: [Patch] Unarmed fleets should not be aggressive by defau
OK, here's a patch that sets aggression at places that create fleets: newly produced fleets in Empire::CheckProductionProgress, effect-created fleets in CreateNewFleet, and initial fleets in PythonUniverseGenerator's CreateShip (not CreateFleet, because fleets are created before their ships).
An auto-aggression setting would seldom matter, because fleets rarely change whether they contain armed ships.
An auto-aggression setting would seldom matter, because fleets rarely change whether they contain armed ships.
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [Patch] Unarmed fleets should not be aggressive by defau
The point of the auto aggression suggestion was to set the aggression automatically when creating a new fleet by dropping ships onto the new fleet drop target in the fleetwnd... It has nothing to do with changing the aggression of existing fleets. Currently the new fleet drop target can be set to passive or aggressive, and switched between these options manually. The auto setting would pick for itself what to do for any new fleet based on the dropped ships.
Re: [Patch] Unarmed fleets should not be aggressive by defau
While on this subject: What irritates me the most regarding this is the opposite, that the automatic setting always reverts to 'Hide'. I frequently have ships sent to catch enemies just to let them go instead of fighting them.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [Patch] Unarmed fleets should not be aggressive by defau
Note that you can currently click on the icon on the new fleet drop panel in the fleets window to toggle between hide and control system. This will make all new fleets aggressive (or hidden) when dropped onto that panel.jenschou wrote:While on this subject: What irritates me the most regarding this is the opposite, that the automatic setting always reverts to 'Hide'. I frequently have ships sent to catch enemies just to let them go instead of fighting them.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [Patch] Unarmed fleets should not be aggressive by defau
Committed.
Would be nice to have an auto option for the new fleet drop target as well. The same logic would seemingly suffice (ie. does the fleet have any armed ships).
Would be nice to have an auto option for the new fleet drop target as well. The same logic would seemingly suffice (ie. does the fleet have any armed ships).
Re: [Patch] Unarmed fleets should not be aggressive by defau
yes, that is what I was referring to: If I set the new fleet stance icon to aggressive, when I split ships from the fleet, they stay aggressive, nice. Next turn the new fleet stance icon has usually changed to passive again, and If I miss it newly split ships/fleets will be passive. So I have to check for this every time I split a ship from a fleet. I have not really checked what exactly triggers it since it happens so often I assumed everyone would know what I was talking about.Geoff the Medio wrote:Note that you can currently click on the icon on the new fleet drop panel in the fleets window to toggle between hide and control system. This will make all new fleets aggressive (or hidden) when dropped onto that panel.jenschou wrote:While on this subject: What irritates me the most regarding this is the opposite, that the automatic setting always reverts to 'Hide'. I frequently have ships sent to catch enemies just to let them go instead of fighting them.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [Patch] Unarmed fleets should not be aggressive by defau
It's not changing when the turn updates; it's changing when a different system's fleets are selected, or the fleets window is closed and reopened. It (probably) shouldn't do that (and instead should stick to a particular setting).
Re: [Patch] Unarmed fleets should not be aggressive by defau
Agreed, when I'm splitting off scout ships or similar I always remember to check they have the right stance, when I'm splitting off combat ships I regularly forget. Which is daft because it's always defaulted to non-aggressive for splitting fleets so why I have it the wrong way around I don't remember.Geoff the Medio wrote: It (probably) shouldn't do that (and instead should stick to a particular setting).
I rarely bother to change the setting because it's never remembered, I just try to remember to change the individual fleets afterwards (it is used more these days since you implemented the merge/split fleet by design options, they're really useful.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Re: [Patch] Unarmed fleets should not be aggressive by defau
Oh, I see what you mean now.Geoff the Medio wrote:Currently the new fleet drop target can be set to passive or aggressive, and switched between these options manually. The auto setting would pick for itself what to do for any new fleet based on the dropped ships.
Rather than have a separate setting, shouldn't all new fleets set aggression automatically? This is safe, since the user can immediately see the result and override it if they want. This means there's no need for the new-fleet aggression toggle.
Here's a patch that does that. Minor uncertainty: should splitting a fleet keep the original aggression or choose based on armament? (This is not very important.)
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [Patch] Unarmed fleets should not be aggressive by defau
I think being able to control the aggression before a new fleet is created, without having to find and open that fleet in the UI to check and make the change is a useful feature. If MatGB or someone else disagrees and thinks it would be of no use, I could probably be convinced otherwise, though.Vegavis wrote:Rather than have a separate setting, shouldn't all new fleets set aggression automatically? This is safe, since the user can immediately see the result and override it if they want. This means there's no need for the new-fleet aggression toggle.
Re: [Patch] Unarmed fleets should not be aggressive by defau
I definitely want it to auto select based on whether it's armed or not, beyond that I can see a use for deciding otherwise but for me, at the moment, it would be an edge case issue.
There might be exceptions-for example Dilvish has the AI make armed colony ships, which I can sorta see the point of on occasions but I never bother, you might still want them to default to hide, but until/unless we see a lot more stuff done with the stealth mechanics (ie mostly with scripting different things to actually do) I'm not seeing a point myself.
New fleets are launched after combat is resolved for the turn, and changing the setting on a fleet does affect pinning of enemy units for the next movement, so on the occasions that it might possibly be useful to predetermine for a specific fleet you can do it during the turn I'd have thought.
There might be exceptions-for example Dilvish has the AI make armed colony ships, which I can sorta see the point of on occasions but I never bother, you might still want them to default to hide, but until/unless we see a lot more stuff done with the stealth mechanics (ie mostly with scripting different things to actually do) I'm not seeing a point myself.
New fleets are launched after combat is resolved for the turn, and changing the setting on a fleet does affect pinning of enemy units for the next movement, so on the occasions that it might possibly be useful to predetermine for a specific fleet you can do it during the turn I'd have thought.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [Patch] Unarmed fleets should not be aggressive by defau
I've implemented the auto aggression setting myself, with the function that tests if a set of ships contains an armed ship mostly based on Vegavis' equivalent.