Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4758 closed defect (invalid)

After 2 hours of playing, enemy units aren't attacked anymore

Reported by: Pshem Owned by:
Priority: Should Have Milestone:
Component: UI & Simulation Keywords:
Cc: Patch:

Description

I was playing my third game, against an easy opponent after loosing twice against medium AI. I wanted to learn all the options, so I walled up the only way to my base with a wall and stationed ~80 units in it, the surrounding buildings, towers and behind it. Apart from the first skirmish where I nearly got wiped out, as the wall wasn't built yet, the defense was going quite well and I was getting ready to counter attack after researching all the upgrades, when suddenly(3-5 minutes before the end of the provided replay), my units stopped shooting their opponents. Manual targeting was also impossible.

I'm playing the Linux version, from the play0ad snap. I'm including the replay file and the savegame, so hopefully the problem can be replicated and fixed. I'm not sure if it's and AI problem, or a core engine one.

If I were to guess what happened it would be something like this: opposing units unique id's overflew and new opponents were considered dead by my soldiers targeting algorithms. But that's just a theory and hopefully someone can discover the real issue.

As a sidenote: I couldn't generate an automatic bugreport with my version of the game, probably because of how snap confinement is done. The displayed URL couldn't be selected and copy pasted into a browser, which is a small usability issue.

Attachments (4)

commands.txt (754.8 KB ) - added by Pshem 7 years ago.
Replay of the battle in which the problem appeared
metadata.json (207.2 KB ) - added by Pshem 7 years ago.
The other file in the reply folder. Not sure if it's usefull, but I'll err on the side of caution
savegame-0001.0adsave (556.7 KB ) - added by Pshem 7 years ago.
Savegame of the described battle. I've not yet verified if the effect will persist if the save is loaded after the game's restart
system_info.txt (6.4 KB ) - added by Pshem 7 years ago.
System information. The version of the game in the snap is 19921P-release

Download all attachments as: .zip

Change History (8)

by Pshem, 7 years ago

Attachment: commands.txt added

Replay of the battle in which the problem appeared

by Pshem, 7 years ago

Attachment: metadata.json added

The other file in the reply folder. Not sure if it's usefull, but I'll err on the side of caution

by Pshem, 7 years ago

Attachment: savegame-0001.0adsave added

Savegame of the described battle. I've not yet verified if the effect will persist if the save is loaded after the game's restart

by Pshem, 7 years ago

Attachment: system_info.txt added

System information. The version of the game in the snap is 19921P-release

comment:1 by elexis, 7 years ago

Component: Core engineUI & Simulation
Milestone: Alpha 23
Resolution: invalid
Status: newclosed

Hi there.

Thanks for the bugreport, it is well documented and all relevant files are uploaded!

By loading the savegame we can reproduce what was described - the other player cannot be attacked.

However the explanation is simple - the diplomacy is set to neutral and by definition, this means it is impossible to attack that player.

The AI player has set the diplomacy to enemy, so he can attack you.

If the alliance or neutral relation is mutual and some player sets it to enemy, the othe player sets it to enemy too (unless there is an unknown bug).

So I expect that the bot has set the diplomacy to enemy against you, but you set it to neutral afterwards, then some time passed until the attack started.

The replay file says the diplomacy was set to neutral by you on turn 32438 (200ms turn length), i.e. after 1h 48min if my math is correct.

The scene in the savegame takes place at 1h 58min.

One could replay the entire game and check for diplomacy changes by the bot, but I assume the bot never set the diplomacy to neutral or allied.

comment:2 by Pshem, 7 years ago

Thank you for your answer, elexis. Is there a section on how Diplomacy works in any of the tutorials? I've seen nothing on it in https://play0ad.com/category/game-manual/ nor in https://trac.wildfiregames.com/wiki/0adManual. A link to a forum page on the topic newer than https://wildfiregames.com/forum/index.php?/topic/10588-diplomacy-in-0-ad/ would also do.

If there is no such topic, would you care to briefly describe how diplomacy works?

If I understand correctly, setting your diplomacy to neutral against someone isn't considered a diplomatic offer that the target can accept or reject, but instead comes into force as a unilateral declaration. That's... unintuitive.

How did the AI send me neutrality offers previously then, and answer my offers with "pay me X wood before I'll ally with you" in a three way game I made?? Is there a different way to do it, or does it only work in games with multiple opponents(and thus diplomacy should be inaccessible/locked in two player games)?

comment:3 by elexis, 7 years ago

The AI sends a chat message, possibly demanding resources and remembering that it had sent it. It probably does not actually change the relation to "neutral" or "allied" before.

Whenever a player (no matter if human or AI) actually changes the diplomacy, a chat message is sent "Player X is now neutral with you".

If X set Y to neutral or ally, then X cant attack Y. If X set Y to enemy, then X can attack Y.

It could be considered unexpected that clicking on neutral isn't an offer but an actual change, but it can also prove useful in games when one doesn't want to attack one enemy or show courtesy.

Perhaps the way the AI does diplomacy requests could also be transfered to the players diplomacy dialog (as in sending a diplomacy request with resources). But on the other side, players can use the chat manually and write more complex contracts (in multiplayergames, there are often ceasefire agreements until only the last 3 players are remaining).

I could offer to add tooltips to the diplomacy buttons in the dialog that would explain what the effect of pressing them is.

comment:4 by Pshem, 7 years ago

As a beginner, I would really appreciate these tooltips, but I can also see how they could become annoying to advanced players. Do you plan on eventually introducing something like beginner tooltips that players could turn off in the settings when they feel comfortable with their level of knowledge? I assume diplomacy is not the only area with such quirks.

Alternatively, you could just throw it into what seems like the most complete manual(https://trac.wildfiregames.com/wiki/Manual_OtherFeatures) for now.

I must admit diplomatic status change offers in exchange for payment seem like the most intuitive option to me.

Note: See TracTickets for help on using tickets.