Bombers – Single Round Attack
-
@Contango Not an error... the game is simply telling you the bomber has no attack value and will die in combat as it cannot win the battle. Game should still function as intended. No way to remove the warning that I am aware of.
-
@Contango said in Bombers – Single Round Attack:
@Hepps said in Bombers – Single Round Attack:
@Contango Take a look at this thread... this might just solve all your problems...
https://forums.triplea-game.org/topic/1579/add-ability-for-suicide-units-to-provide-support/53
If you made your "payload" unit support the bomber +1 att... and the bomber still started with a 0 att. Then you should be able to achieve what you want.
Excellent, with the suicide unit giving a bonus to the bomber, and the suicide unit having isSuicideOnAttack, that works to make the defenders able to return fire.
One issue I’m now noticing is that when I try to use the bomber for strategic bombing, I now throw the below error because the Bomber has zero attack value:
The error is inconsequential and the bombing run still functions properly, it’s just annoying and misleading. Any suggestions on overriding that?
What you could do to eliminate the warning is to give all bombers an attack of 1... then add a terrain modifier to all territories and sea zones giving all bombers a -1 on attack. Then the engine would never know the units are powerless on attack and should not throw the warning message. A lot of work for something people will otherwise learn to ignore.
Also if you do this the game will then show that bombers have an attack value of 1 in the tool tips... which is probably more misleading than having the warning during Strat Bombing.
-
Thanks for the suggestion. Although I think I've found a simpler way to override the warning message...
I gave the bomber an OffesiveAttackAA value and set targetsAA to a non-existent unit. Thus the engine thinks it can attack and doesn't throw the warning.
-
@Contango Always a work around if you just think outside the box.
-
@Hepps said in Bombers – Single Round Attack:
Another avenue I’m thinking now: Is it possible for a unit bonus to last a set number of rounds? I’m wondering if the Bomber could have a regular attack value of zero, but a single round bonus. I haven’t come across anything that seems to do that yet, have you?
You could make your bomber carry a suicide unit that auto repopulates at the end of every turn or start of the following turn for all surviving bombers.
I’ve worked out a trigger to remove all unused bomber_payload units after the combat move phase is over.
My ideal now would be to have them spawn for the active nation at the start of their turn. So far the best thing I’ve come up with is putting the below in the bomber's unit attachment:
<option name="createsUnitsList" value="1:bomber_payload"/>
The problem is that this executes at the end of the nation’s turn rather than the beginning, and I’d prefer to not have the payload units hanging around during other nation’s turns if possible.
Any suggestions on how to get this to fire at the beginning of the turn instead? Or some other alternative?
-
-
@Hepps His Warcraft map definitely does it. But it does it at the end of the turn.
-
@ff03k64 Then all you have to do is copy the idea and place the triggers prior to the combat moves of the current players turn.
-
@Hepps it isn't triggers creating the units though, it is a unit attachment, createsunitslist I think, that does it at the end of the turn. If there is a way to do it at the beginning, i am all ears!
-
I went through Age of Tribes and it also looks to be using the createsUnitsList, which is hard wired to produce the units at the end of the turn, as far as I can tell.
At any rate, I've discovered the isSuicideOnDefense option, so at least my payload units will be ignored if they territory they are parked in does get attacked.
Thanks for the input.
-
@Contango This is a guess as I haven't tried it, but I think it also would have worked if you simply had added a new step to each nations Game Sequence...
If you had added a second...
<delegate name="place" javaClass="games.strategy.triplea.delegate.PlaceDelegate" display="Place Units"/>
To the beginning of each players Game Sequence (prior to the purchase step) then the bombers would produce the payloads before the movement phase. Since there would be no purchased units... this should work.
-
Good idea, although it appears the createsUnitsList fires during "endTurn" rather than "place" step.
I first tried making a duplicate endTurn in the phase, but this causes income collection twice.
However, I've discovered the NoPUEndTurn step, so now I have that at the beginning of the turn to create the payload units, and the regular endTurn at the end.
The result is that I have the payload units being created twice, but I'm able to work around that with two triggers to clear them out.
Long story short: I think I'm in a good place on this now. One downside is that the user gets notified at the end of the turn that they received payload units, which immediately disappear.
-
I’ve encountered a new problem which apparently I didn’t test before…
It seems that air transports can’t combat move into sea zones whilst transporting cargo. (makes sense since they shouldn't be carrying a land based unit into naval combat). If I set my payload to be IsAir or isSea, then it won’t be eligible to be air transportable.
I’m not seeing any way around this one, but let me know if any suggestions.
Otherwise was getting so close to what I wanted.
-
@Contango Huh? Is this an unrelated issue?
-
It's somewhat related. It's was an unintended consequence of trying to use a transported suicide unit as the bomber's attack to effectively make the bomber a single round attack unit. (while also allowing the defenders to fire back)
This works for land territories, but the bomber can't transport the suicide unit into sea zones.
-
@Contango Why not make the payload unit an air unit that gains movement when moving with the bomber rather than being cargo?
givesMovement values: allows a unit to give movement to other units. must be an integer, followed by a colon ":", followed by the name of the unit
-
Good idea, I was thinking something similar. This seems to work well.
In the end I didn't use the givesMovement, I just gave the payload it's own movement. Apparently movement bonuses don't stack, so the bomber and the payload weren't working out evenly when at an airbase vs not at an airbase.
-
@Contango said in Bombers – Single Round Attack:
Good idea, although it appears the createsUnitsList fires during "endTurn" rather than "place" step.
I first tried making a duplicate endTurn in the phase, but this causes income collection twice.
However, I've discovered the NoPUEndTurn step, so now I have that at the beginning of the turn to create the payload units, and the regular endTurn at the end.
Did you get any unintended consequences of having two end turn steps? I was looking at that, but didn't know if it did anything else.
-
@ff03k64 said in Bombers – Single Round Attack:
@Contango said in Bombers – Single Round Attack:
Good idea, although it appears the createsUnitsList fires during "endTurn" rather than "place" step.
I first tried making a duplicate endTurn in the phase, but this causes income collection twice.
However, I've discovered the NoPUEndTurn step, so now I have that at the beginning of the turn to create the payload units, and the regular endTurn at the end.
Did you get any unintended consequences of having two end turn steps? I was looking at that, but didn't know if it did anything else.
Yes actually. NoPUEndTurn avoids income collection, but unfortunately doesn't cancel national objective collection. So I was getting some duplicate income.
I've deleted the duplicate end turn step and am just leaving the payload units parked for the whole turn now. However, they are isSuicideOnDefense and have no defense value so they have no impact on any battle that happens to occur where they are.
-
@Contango that is unfortunate. My map was going to have most of the income be objective based for one side.