combat support

classic Classic list List threaded Threaded
44 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Re: combat support

squid_daddy
if(isImprovedArtillerySupport(player))
                artillerySupportAvailable *= 2;
this is for a technology. does this currently interact with units that can support more than one infantry?
if not perhaps it should be +1 instead of *2.
does it exist in newer rulesets that use support from units other than artillery?
need to know if it applies to them or not.
------

there seems to be some disagreement in the code about heavy bombers tech
and defence rolls
is this technology supposed to increase rolls on defence or not?

edit: also notice that heavy bomber tech is also broken in several ways
1)lhtr bombers always defend on 2 dice regardless of the bomber roll number specified in options
2)lhtr bombers with roll number > 3 causes exception on attacking
3)lhtr bombers while bombing pick the highest dice and add 1. is this the rule?

kinda need to know how this is supposed to work as I am modifying shared methods.
Reply | Threaded
Open this post in threaded view
|

Re: combat support

Veqryn
Administrator
1) isImprovedArtillerySupport is a technology from aa50 (ww2v3) that doubles the number of infantry an artillery is able to support (from 1 to 2).

kev could have coded it as +1 or *2, and we talked about it on the forum and decided it would be more interesting as *2


2) yes, currently this is the way support works in the triplea engine, this works no matter what units are being considered.

so for example, in pac40 you have 2 units that can receive support (infantry and mech_infantry), and artillery which gives support.

in Napoleonic Empires, there are 6 ground units which can receive support (fusiliers, chasseurs, grenadiers, dragoons, cuirassiers, marshals), and 3 ground units which can give support (howitzers, artillery, mortars).
there are also 3 ships that can receive support (brigantine, frigate, battleship/ship-of-the-line), and 1 ship that can give support (cutter)

i also have an upcoming map (galaxy), which has air units which give support, and some air units that receive support.  The air units giving support will give support to land, sea, and air units, picking whoever has the lowest attack first.  And air units that can receive support, can receive it from land, sea, or air.  

that is how triplea currently works.  (and currently support does not ever stack).




3) How Heavy Bombers works:
in classic, I know it increases rolls to 3 rolls, not sure if it is just attack or both attack and defense.
in both Revised and aa50 (ww2v2, and ww2v3), Heavy Bombers increases the rolls on ATTACK only (to 2 rolls).
for LHTR rules, you roll 2 dice for attack AND defense, then choose the better of those 2.  If it is strategic bombing, you roll 2 dice, pick the highest, then add 1.



4) I think that your new support class should not be affected by any technology.  If people want to use heavy bombers, or improved artillery support, then they need to use the old isSupportable, isArtillery stuff.  I don't want to have all your support classes doubled when someone gets that tech.  :)
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: combat support

squid_daddy
1) dandy
2) that wasn't the question.
question is. does this technology exist in pac40 or whatever.
if it does, does the  technology apply to the tank->plane support or just artillery->infantry support.

I'll clear up the question of stackability since you seem stuck on it.
currently there is only 1 bonus. (artillery support supportable units) so stackability is moot. the current rules do not imply/define stackability or otherwise.
nepoleonic empires for example declares the ships as supportable, and the cutter as artillery.
whether the unit name contains the word "artillery" is completely irrelevant.
if you could somehow get a cutter on land it would add +1 to infantry
likewise a mortar at sea would support a frigate.
in order to apply negative bonuses in a sensible fashion it must be possible for bonuses to stack.
given this it is no more or less work to allow any number of stackable bonuses.
it is entirely up to the map creator to define their support rules as they please.
I see no reason whatsoever to restrict this. not sure why you do.

3) ok I will clean that up.
4) no reason for that option to be unavailable
in any case I need to take care of it. It is infeasable to run two seperate support models
or are you suggesting a map which simply adds tank support plane, should preclude the use of heavy bombers.

question for people in general.
the odds calculating stuff OCBattle.java etc
I'm assuming this is not implemented. is anyone working on it? do i need to care?
(this is _not_ the battle calculator, it appears to be designed to show odds when mouseover territory)



Reply | Threaded
Open this post in threaded view
|

Re: combat support

Veqryn
Administrator
2. There is technology for global 1940, but i don't know what it is because i don't have the rule book for that game.  Perhaps someone else in the forum can help with that one?  

4. Does this mean you will get rid of the current support system?  Will you keep backwards compatibility for the maps already made?
If you will have your support class affected by technology, I am assuming you will have some sort of way for map makers to say if a support is affected by tech or not?  (so that I could say artillery is affected by the isImprovedArtillery technology, but tanks supporting tactical_bombers are not affected by that technology)

(ideally in the future, there will also be options for the map makers to decide on what tech they want for their map, rather than having to pick between 3 unchangeable sets of tech.)

thx,
veqryn

Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: combat support

squid_daddy
yep I am replacing all existing references to artillery support (in theory)
planning to maintain compatibility but converting old references into the new style.
when the rulesset is parsed. (i'm blinding assuming i can do this, haven't got that far just yet);
I will not under any circumstances inflict some massive xml rewrite on myself or anyone else.

Yes i suppose I could make the tech an option explicitly
or I can enforce a naming convention, such that if your bonus is called "artilleryBonus" then it will be affected by that tech. otherwise it wouldn't. (which was what i was planning)

for the record I'm nearly finished, excluding AI modifications, which aren't extremely important.
Reply | Threaded
Open this post in threaded view
|

Re: combat support

squid_daddy
In reply to this post by squid_daddy
code submitted, see updated OP
Reply | Threaded
Open this post in threaded view
|

Re: combat support

Sean Bridges
Administrator
In reply to this post by Ajmdemen
For the battle calculator code in g.s.t.oddsCalculator.zengland, it is not being used, and should probably be deleted.

For the battle calculator code in g.s.t.oddsCalculator.ta, it works more like just running the battle without the gui, having a very simply ai that selects casualties, so chances are there won't need to be any changes to it.
Reply | Threaded
Open this post in threaded view
|

Re: combat support

Veqryn
Administrator
The odds calculator's default choice for taking casualties (and the default choice when asking humans what casualties to take) just takes the casualties with the lowest value, ignoring any support (not even current artillery is counted in it).

so if for example, you have this situation:

5x howitzer: 1attack / 1defense / 1move / 4cost  (provides support)

5x fusilier: 1attack / 2defense / 1move / 4cost (receives support)


if you were attacking, the odds calc's default casualty select will take ALL the howitzers as casualties first

when in fact, the optimal route is to take 1 howitzer casualty, then 1 fusilier, then 1 howitzer, then 1 fusilier, then 1 howitzer, etc. on and on.  

(and if you had 3x howitzers and 5x fusiliers, you would take 2 fusiliers as casualty first, then start taking 1 howitzer & 1 fusilier casualty, on and on.  and if you had 5x howitzers and 3x fusiliers, then it would be 2 howitzers casualty first, then 1 howitzer, 1 fusilier, etc.)

Fixing this to take into consideration support, is on my long to-do list.

Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: combat support

squid_daddy
ahh ok i'll take a look, never considered this as the current situation for 1940 games makes it moot.
if the files coincide i'll hold fire until/if my submitted code is commited.

@SGB righty ho, don't need to tell me twice to ignore things.

Edit:
default casualties are in rolls,strength,cost order for the record.
StrongAI at least ignores this completely
and players can always choose.
So don't need to stress over it hugely. Like you i'll add it to the end of my list.
though to be honest in a complicated battle players aren't even that likely to follow the default.
they might deliberately choose a less optimal casualty pool to preserve some sort of mix
(i.e. remove supported units and leave supporters, because they have a stack of
supported units nearby)
Reply | Threaded
Open this post in threaded view
|

Re: combat support

Veqryn
Administrator
In reply to this post by squid_daddy
Ok, committed, then rolled back, then committed again.

However, comradeKev, you need to take a look at lines 1266 - 1278

squid is commenting stuff out, and you are adding stuff in.  there is a comflict because you added stuff after he commented out (but squid's wasn't committed earlier).


Also, you said on the SF page that:
Fixed a small bug in rollDiceNormal() where the int min =
Constants.MAX_DICE; was defined within the for loop- causing it to get
reset each iteration.

can you do this again please?


Squid, and Kev, can you check and see if there were any other conflicts?  I think I did a pretty good job with tortoise merge, but this is the first time i've merged conflicts before.

Thanks,
Veqryn
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: combat support

squid_daddy
battledisplay.java looks fine.
only change there from kev was adding the disabled parameter yes?
Reply | Threaded
Open this post in threaded view
|

Re: combat support

Veqryn
Administrator
In reply to this post by Veqryn
ya nevermind, i found it kev
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: combat support

Veqryn
Administrator
In reply to this post by squid_daddy
squid, don't waste your time looking at this bug,

i'll try to isolate it better before i send you on a wild goose chase again,


on the 4th turn of POS2, this pops out when using AI's to play everything:


WARNING [Triplea start local thread] UnifiedMessenger->Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called artillery with name:supportAttachmentRussiansArtillery2 new value:[PlayerID named:Russians]
java.lang.IllegalStateException: Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called artillery with name:supportAttachmentRussiansArtillery2 new value:[PlayerID named:Russians]
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:39)
        at games.strategy.engine.data.ChangeAttachmentChange.perform(ChangeAttachmentChange.java:75)
        at games.strategy.engine.data.CompositeChange.perform(CompositeChange.java:81)
        at games.strategy.engine.data.ChangePerformer.perform(ChangePerformer.java:56)
        at games.strategy.engine.framework.ServerGame$2.gameDataChanged(ServerGame.java:730)
        at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.engine.message.EndPoint.invokeSingle(UnifiedMessenger.java:728)
        at games.strategy.engine.message.EndPoint.invokeMultiple(UnifiedMessenger.java:697)
        at games.strategy.engine.message.EndPoint.invokeLocal(UnifiedMessenger.java:671)
        at games.strategy.engine.message.UnifiedMessenger.invoke(UnifiedMessenger.java:227)
        at games.strategy.engine.message.UnifiedInvocationHandler.invoke(UnifiedInvocationHandler.java:65)
        at $Proxy13.gameDataChanged(Unknown Source)
        at games.strategy.engine.framework.ServerGame.addChange(ServerGame.java:694)
        at games.strategy.engine.delegate.DefaultDelegateBridge.addChange(DefaultDelegateBridge.java:103)
        at games.strategy.triplea.attatchments.TriggerAttachment.triggerSupportChange(TriggerAttachment.java:528)
        at games.strategy.triplea.delegate.TechActivationDelegate.start(TechActivationDelegate.java:88)
        at games.strategy.engine.framework.ServerGame.startStep(ServerGame.java:613)
        at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:486)
        at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:303)
        at games.strategy.engine.framework.startup.launcher.LocalLauncher$2.run(LocalLauncher.java:125)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:36)
        ... 22 more
java.lang.IllegalStateException: Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called artillery with name:supportAttachmentRussiansArtillery2 new value:[PlayerID named:Russians]
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:39)
        at games.strategy.engine.data.ChangeAttachmentChange.perform(ChangeAttachmentChange.java:75)
        at games.strategy.engine.data.CompositeChange.perform(CompositeChange.java:81)
        at games.strategy.engine.data.ChangePerformer.perform(ChangePerformer.java:56)
        at games.strategy.engine.history.History.changeAdded(History.java:156)
        at games.strategy.engine.history.HistoryWriter.addChange(HistoryWriter.java:256)
        at games.strategy.engine.framework.HistorySynchronizer$1$1.run(HistorySynchronizer.java:77)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:36)
        ... 14 more
java.lang.IllegalStateException: Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called artillery with name:supportAttachmentRussiansArtillery2 new value:[PlayerID named:Russians]
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:39)
        at games.strategy.engine.data.ChangeAttachmentChange.perform(ChangeAttachmentChange.java:75)
        at games.strategy.engine.data.CompositeChange.perform(CompositeChange.java:81)
        at games.strategy.engine.data.CompositeChange.perform(CompositeChange.java:81)
        at games.strategy.engine.data.ChangePerformer.perform(ChangePerformer.java:56)
        at games.strategy.engine.history.History.gotoNode(History.java:137)
        at games.strategy.triplea.ui.history.HistoryPanel.gotoNode(HistoryPanel.java:299)
        at games.strategy.triplea.ui.history.HistoryPanel.access$7(HistoryPanel.java:292)
        at games.strategy.triplea.ui.history.HistoryPanel$7.run(HistoryPanel.java:326)
        at games.strategy.triplea.ui.history.HistoryPanel.goToEnd(HistoryPanel.java:335)
        at games.strategy.triplea.ui.history.HistoryPanel$4.treeStructureChanged(HistoryPanel.java:142)
        at javax.swing.tree.DefaultTreeModel.fireTreeStructureChanged(Unknown Source)
        at javax.swing.tree.DefaultTreeModel.nodeStructureChanged(Unknown Source)
        at games.strategy.engine.history.HistoryWriter.startNextStep(HistoryWriter.java:88)
        at games.strategy.engine.framework.HistorySynchronizer$1$5.run(HistorySynchronizer.java:138)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:36)
        ... 22 more
java.lang.IllegalStateException: Advance not present:Shipyards
        at games.strategy.engine.data.TechnologyFrontier.removeAdvance(TechnologyFrontier.java:45)
        at games.strategy.engine.data.RemoveAvailableTech.perform(ChangeFactory.java:711)
        at games.strategy.engine.data.ChangePerformer.perform(ChangePerformer.java:56)
        at games.strategy.engine.history.History.changeAdded(History.java:156)
        at games.strategy.engine.history.HistoryWriter.addChange(HistoryWriter.java:256)
        at games.strategy.engine.framework.HistorySynchronizer$1$1.run(HistorySynchronizer.java:77)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: combat support

Veqryn
Administrator
here it is again, 4th turn, moore ai's, POS2:


WARNING [Triplea start local thread] UnifiedMessenger->Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called artillery with name:supportAttachmentArtyOldartillery new value:[PlayerID named:Italians, PlayerID named:Germans, PlayerID named:British, PlayerID named:Japanese, PlayerID named:Americans, PlayerID named:Chinese]
java.lang.IllegalStateException: Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called artillery with name:supportAttachmentArtyOldartillery new value:[PlayerID named:Italians, PlayerID named:Germans, PlayerID named:British, PlayerID named:Japanese, PlayerID named:Americans, PlayerID named:Chinese]
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:39)
        at games.strategy.engine.data.ChangeAttachmentChange.perform(ChangeAttachmentChange.java:75)
        at games.strategy.engine.data.CompositeChange.perform(CompositeChange.java:81)
        at games.strategy.engine.data.ChangePerformer.perform(ChangePerformer.java:56)
        at games.strategy.engine.framework.ServerGame$2.gameDataChanged(ServerGame.java:730)
        at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.engine.message.EndPoint.invokeSingle(UnifiedMessenger.java:728)
        at games.strategy.engine.message.EndPoint.invokeMultiple(UnifiedMessenger.java:697)
        at games.strategy.engine.message.EndPoint.invokeLocal(UnifiedMessenger.java:671)
        at games.strategy.engine.message.UnifiedMessenger.invoke(UnifiedMessenger.java:227)
        at games.strategy.engine.message.UnifiedInvocationHandler.invoke(UnifiedInvocationHandler.java:65)
        at $Proxy14.gameDataChanged(Unknown Source)
        at games.strategy.engine.framework.ServerGame.addChange(ServerGame.java:694)
        at games.strategy.engine.delegate.DefaultDelegateBridge.addChange(DefaultDelegateBridge.java:103)
        at games.strategy.triplea.attatchments.TriggerAttachment.triggerSupportChange(TriggerAttachment.java:528)
        at games.strategy.triplea.delegate.TechActivationDelegate.start(TechActivationDelegate.java:88)
        at games.strategy.engine.framework.ServerGame.startStep(ServerGame.java:613)
        at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:486)
        at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:303)
        at games.strategy.engine.framework.startup.launcher.LocalLauncher$2.run(LocalLauncher.java:125)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:36)
        ... 22 more
java.lang.IllegalStateException: Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called artillery with name:supportAttachmentArtyOldartillery new value:[PlayerID named:Italians, PlayerID named:Germans, PlayerID named:British, PlayerID named:Japanese, PlayerID named:Americans, PlayerID named:Chinese]
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:39)
        at games.strategy.engine.data.ChangeAttachmentChange.perform(ChangeAttachmentChange.java:75)
        at games.strategy.engine.data.CompositeChange.perform(CompositeChange.java:81)
        at games.strategy.engine.data.ChangePerformer.perform(ChangePerformer.java:56)
        at games.strategy.engine.history.History.changeAdded(History.java:156)
        at games.strategy.engine.history.HistoryWriter.addChange(HistoryWriter.java:256)
        at games.strategy.engine.framework.HistorySynchronizer$1$1.run(HistorySynchronizer.java:77)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:36)
        ... 14 more
java.lang.IllegalStateException: Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called artillery with name:supportAttachmentArtyOldartillery new value:[PlayerID named:Italians, PlayerID named:Germans, PlayerID named:British, PlayerID named:Japanese, PlayerID named:Americans, PlayerID named:Chinese]
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:39)
        at games.strategy.engine.data.ChangeAttachmentChange.perform(ChangeAttachmentChange.java:75)
        at games.strategy.engine.data.CompositeChange.perform(CompositeChange.java:81)
        at games.strategy.engine.data.CompositeChange.perform(CompositeChange.java:81)
        at games.strategy.engine.data.ChangePerformer.perform(ChangePerformer.java:56)
        at games.strategy.engine.history.History.gotoNode(History.java:137)
        at games.strategy.triplea.ui.history.HistoryPanel.gotoNode(HistoryPanel.java:299)
        at games.strategy.triplea.ui.history.HistoryPanel.access$7(HistoryPanel.java:292)
        at games.strategy.triplea.ui.history.HistoryPanel$7.run(HistoryPanel.java:326)
        at games.strategy.triplea.ui.history.HistoryPanel.goToEnd(HistoryPanel.java:335)
        at games.strategy.triplea.ui.history.HistoryPanel$4.treeStructureChanged(HistoryPanel.java:142)
        at javax.swing.tree.DefaultTreeModel.fireTreeStructureChanged(Unknown Source)
        at javax.swing.tree.DefaultTreeModel.nodeStructureChanged(Unknown Source)
        at games.strategy.engine.history.HistoryWriter.startNextStep(HistoryWriter.java:88)
        at games.strategy.engine.framework.HistorySynchronizer$1$5.run(HistorySynchronizer.java:138)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:36)
        ... 22 more
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: combat support

squid_daddy
ok well. this is related to the history. not a problem with support attachments etc as such.
guess I've done something fundamentally wrong with the game data.
gonna dig a bit and see wtf is going on.

you may notice if you run pos2 with AI's and view the history you will get errors whenever it tries to change the game data at all, including like removing units from the map due to combat.
Reply | Threaded
Open this post in threaded view
|

Re: combat support

squid_daddy
In reply to this post by Veqryn
right! not as dire as I thought. don't understand why this was causing everything else to be completely fubar, but either way I know the cause.

quick fix can you do it please.

in triggerattachment line 122
please change to

public void setUses(Integer u) {
                m_uses = u;
        }
so Integer parameter instead of int.

same thing in rulesattachment line 340.

stupid automatic primitive type conversion makes me sloppy.

this will fix the errors I am seeing. please let me know if it does fix what you see.
if it doesn't, could you please specify exactly what you are doing at the time. i.e. is the game just running
or are you clicked on the history somewhere, and where exactly.  
Reply | Threaded
Open this post in threaded view
|

Re: combat support

Veqryn
Administrator
i assume you meant line 351 of rules attachments,

i'm glad you found this, as I would have never figured out the error myself.


i'll keep you posted if notice anything else
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: combat support

Geno33
In reply to this post by squid_daddy
Wow this is really great!

If you included movement, you could for example attach +1 movement to all ground units to a unit called 'Infrastructure'. Then I think that if it isInfrastructure and canBeDamaged and you give it a maxOperationalDamage, you could have rails/goatpaths/hyperspace-gates or whatever that could be bombed into ineffectiveness(I think?) by airUnits.
You could make tanks need 'fuel' to move.
hmmm... you could also make it so airUnits have zero movement, and give plus movement to things like air bases or star dreadnoughts.

What if there was an option that made this bonus apply to the unit listed in the attachment name and you could list units that would activate that that bonus?
'cause uh, that'd be pretty sweet.
Reply | Threaded
Open this post in threaded view
|

Re: combat support

Veqryn
Administrator
In reply to this post by squid_daddy
Getting an error when playing with all AIs,

i suppose this is similar to the last one I posted,

i think getting shipyards working is more important than this, but i need to post it anyway:

WARNING [Triplea start local thread] UnifiedMessenger->Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called submarine with name:supportAttachmentSubmarineReinforcedHulls new value:[PlayerID named:Germans]
java.lang.IllegalStateException: Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called submarine with name:supportAttachmentSubmarineReinforcedHulls new value:[PlayerID named:Germans]
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:39)
        at games.strategy.engine.data.ChangeAttachmentChange.perform(ChangeAttachmentChange.java:75)
        at games.strategy.engine.data.ChangePerformer.perform(ChangePerformer.java:56)
        at games.strategy.engine.framework.ServerGame$2.gameDataChanged(ServerGame.java:727)
        at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.engine.message.EndPoint.invokeSingle(UnifiedMessenger.java:728)
        at games.strategy.engine.message.EndPoint.invokeMultiple(UnifiedMessenger.java:697)
        at games.strategy.engine.message.EndPoint.invokeLocal(UnifiedMessenger.java:671)
        at games.strategy.engine.message.UnifiedMessenger.invoke(UnifiedMessenger.java:227)
        at games.strategy.engine.message.UnifiedInvocationHandler.invoke(UnifiedInvocationHandler.java:65)
        at $Proxy13.gameDataChanged(Unknown Source)
        at games.strategy.engine.framework.ServerGame.addChange(ServerGame.java:691)
        at games.strategy.engine.delegate.DefaultDelegateBridge.addChange(DefaultDelegateBridge.java:103)
        at games.strategy.engine.delegate.DefaultDelegateBridge.addChange(DefaultDelegateBridge.java:98)
        at games.strategy.triplea.attatchments.TriggerAttachment.triggerSupportChange(TriggerAttachment.java:528)
        at games.strategy.triplea.delegate.TechActivationDelegate.start(TechActivationDelegate.java:88)
        at games.strategy.engine.framework.ServerGame.startStep(ServerGame.java:610)
        at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:484)
        at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:301)
        at games.strategy.engine.framework.startup.launcher.LocalLauncher$2.run(LocalLauncher.java:125)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:36)
        ... 22 more
java.lang.IllegalStateException: Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called submarine with name:supportAttachmentSubmarineReinforcedHulls new value:[PlayerID named:Germans]
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:39)
        at games.strategy.engine.data.ChangeAttachmentChange.perform(ChangeAttachmentChange.java:75)
        at games.strategy.engine.data.ChangePerformer.perform(ChangePerformer.java:56)
        at games.strategy.engine.history.History.changeAdded(History.java:156)
        at games.strategy.engine.history.HistoryWriter.addChange(HistoryWriter.java:256)
        at games.strategy.engine.framework.HistorySynchronizer$1$1.run(HistorySynchronizer.java:77)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:36)
        ... 13 more
WARNING [Triplea start local thread] UnifiedMessenger->Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called submarine with name:supportAttachmentSubmarineReinforcedHulls new value:[PlayerID named:Italians]
java.lang.IllegalStateException: Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called submarine with name:supportAttachmentSubmarineReinforcedHulls new value:[PlayerID named:Italians]
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:39)
        at games.strategy.engine.data.ChangeAttachmentChange.perform(ChangeAttachmentChange.java:75)
        at games.strategy.engine.data.ChangePerformer.perform(ChangePerformer.java:56)
        at games.strategy.engine.framework.ServerGame$2.gameDataChanged(ServerGame.java:727)
        at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.engine.message.EndPoint.invokeSingle(UnifiedMessenger.java:728)
        at games.strategy.engine.message.EndPoint.invokeMultiple(UnifiedMessenger.java:697)
        at games.strategy.engine.message.EndPoint.invokeLocal(UnifiedMessenger.java:671)
        at games.strategy.engine.message.UnifiedMessenger.invoke(UnifiedMessenger.java:227)
        at games.strategy.engine.message.UnifiedInvocationHandler.invoke(UnifiedInvocationHandler.java:65)
        at $Proxy13.gameDataChanged(Unknown Source)
        at games.strategy.engine.framework.ServerGame.addChange(ServerGame.java:691)
        at games.strategy.engine.delegate.DefaultDelegateBridge.addChange(DefaultDelegateBridge.java:103)
        at games.strategy.engine.delegate.DefaultDelegateBridge.addChange(DefaultDelegateBridge.java:98)
        at games.strategy.triplea.attatchments.TriggerAttachment.triggerSupportChange(TriggerAttachment.java:528)
        at games.strategy.triplea.delegate.TechActivationDelegate.start(TechActivationDelegate.java:88)
        at games.strategy.engine.framework.ServerGame.startStep(ServerGame.java:610)
        at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:484)
        at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:301)
        at games.strategy.engine.framework.startup.launcher.LocalLauncher$2.run(LocalLauncher.java:125)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:36)
        ... 22 more
java.lang.IllegalStateException: Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called submarine with name:supportAttachmentSubmarineReinforcedHulls new value:[PlayerID named:Italians]
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:39)
        at games.strategy.engine.data.ChangeAttachmentChange.perform(ChangeAttachmentChange.java:75)
        at games.strategy.engine.data.ChangePerformer.perform(ChangePerformer.java:56)
        at games.strategy.engine.history.History.changeAdded(History.java:156)
        at games.strategy.engine.history.HistoryWriter.addChange(HistoryWriter.java:256)
        at games.strategy.engine.framework.HistorySynchronizer$1$1.run(HistorySynchronizer.java:77)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:36)
        ... 13 more
java.lang.IllegalStateException: Could not set property:players subject:UnitSupportAttachment attched to:games.strategy.engine.data.UnitType called submarine with name:supportAttachmentSubmarineReinforcedHulls new value:[PlayerID named:Italians]
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:39)
        at games.strategy.engine.data.ChangeAttachmentChange.perform(ChangeAttachmentChange.java:75)
        at games.strategy.engine.data.CompositeChange.perform(CompositeChange.java:81)
        at games.strategy.engine.data.ChangePerformer.perform(ChangePerformer.java:56)
        at games.strategy.engine.history.History.gotoNode(History.java:137)
        at games.strategy.triplea.ui.history.HistoryPanel.gotoNode(HistoryPanel.java:299)
        at games.strategy.triplea.ui.history.HistoryPanel.access$7(HistoryPanel.java:292)
        at games.strategy.triplea.ui.history.HistoryPanel$7.run(HistoryPanel.java:326)
        at games.strategy.triplea.ui.history.HistoryPanel.goToEnd(HistoryPanel.java:335)
        at games.strategy.triplea.ui.history.HistoryPanel$4.treeStructureChanged(HistoryPanel.java:142)
        at javax.swing.tree.DefaultTreeModel.fireTreeStructureChanged(Unknown Source)
        at javax.swing.tree.DefaultTreeModel.nodeStructureChanged(Unknown Source)
        at games.strategy.engine.history.HistoryWriter.startNextStep(HistoryWriter.java:88)
        at games.strategy.engine.framework.HistorySynchronizer$1$5.run(HistorySynchronizer.java:138)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at games.strategy.util.PropertyUtil.set(PropertyUtil.java:36)
        ... 21 more
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: combat support

squid_daddy
again same as last time I can't replicate this.
I think perhaps either a difference in our compilers or java runtimes are changing the order
that reflection is finding methods, which is slightly worrying.

in any case you should be able to fix this simply by changing line 174 in UnitSupportAttachment
to

public void setPlayers(ArrayList<PlayerID> players)
i.e. change parameter from List to ArrayList.

quick fix, I should tidy this up better at some point in the future, the way i'm doing this change
is not ideal.

let me know if this doesn't work for you. As I said I can't test it.

edit: why is the forum removing the type specification from that line of code??
123