<< Back to Programming Forum   Search

Posts 1 - 13 of 13   
Two possible bugs in a modded multi-attack game: 2/14/2020 23:13:20

M. Poireau 
Level 55
Report
I've been experimenting with multi-attack games with Connected Commanders and Late Airlifts - it makes for some interesting tactical challenges.

However, there are two bugs, and the second is absolutely bizarre.

1. The first is that Late Airlifts interact in a funny with the Connected Commanders rule. It seems to process the Airlift AFTER taking into consideration the position of the Commanders.

As a result, you can lose the territories you're Airlifting to!

Imagine that you have an isolated area on the map, and you use an Airlift to send a Commander there. The game seems to flag those territories as "Disconnected", THEN Lift the Commander there, and finally apply the function which turns them into neutrals. As a result, the Commander becomes neutral, and the territories are lost. (However, the territories the Commander has vacated are retained until the following turn!)

I illustrate that here:

https://imgur.com/a/lQsAkwV

It's kind of an odd bug; not game-breaking so long as everyone knows how it works, but it's an odd interaction, and likely to result in some accidental deaths in your games if you use these two mods together.

It's especially odd that the new "neutral" Commander still causes immediate elimination if it is attacked and captured. (You can be playing along and suddenly "lose the game", and have no idea why, because it happened in the fog!)

Edited 2/14/2020 23:15:29
Two possible bugs in a modded multi-attack game: 2/14/2020 23:36:15

M. Poireau 
Level 55
Report
2. The second bug is even more strange. I don't know what's causing it, and therefore don't know how to replicate it.

I can't link to the game, because it is still in progress, but I can show the action in question via screenshots.

On two subsequent turns, I order an attack which sends 100% of the armies, but not all the armies attack, causing the attack to fail.

https://imgur.com/a/5r5yewY

This game uses the same mods as the game in the first example: Connected Commanders and Late Airlifts. However, just in case it's relevant, the game also uses Deployment Limits (10/turn) as well as Randomized Wastelands.

There are NO other orders coming out of that territory, nor any cards being used in that location. However, on both turns, the territory is *receiving* an Airlift. Perhaps that is causing something odd to happen?
Two possible bugs in a modded multi-attack game: 2/15/2020 09:19:51


TBest 
Level 60
Report
It's especially odd that the new "neutral" Commander still causes immediate elimination if it is attacked and captured. (You can be playing along and suddenly "lose the game", and have no idea why, because it happened in the fog!)

The fact that you can have a (Player) Commander on a neutral territory is interesting and can make for some fun capture the flag games. Pretty sure this is absolutely not intended thur, so Fizzer might patch that out at some point I suppose.

Anyway, the first 'bug' looks like a mod conflict. If two mods use the same hook, things can get wonky. Basically, the mods are not aware of each other's changes. (The Connected Commanders don't see the airlift w/commander. Since the mods use the same hook.)

2nd bug: IDK for sure. One theory that you can easily check in history; if the number of armies that actually attack matches the number of armies before any deployment is made. [ 6 armies. 10 deploy (16 toatal). 100% = 6. ]

Feel free to give the gamelink despite the game being in progress btw. Easy and fast to recreate in SP that way

Edited 2/15/2020 09:21:15
Two possible bugs in a modded multi-attack game: 2/17/2020 06:02:35

M. Poireau 
Level 55
Report
Thanks again, TBest.

The numbers don't correspond to pre-deployment armies. On the first turn, there were 10 armies pre-deployment, and 6 attacked. On the second, there were 31, and 27 attacked.

It's most odd and it hasn't happened again!

I'll send you a link by PM.
Two possible bugs in a modded multi-attack game: 2/17/2020 09:14:52

Derfellios 
Level 61
Report
Hey!

The connected commanders mod does not work perfectly, I have to rework it sometime. For the checking whether aq commander is linked to a territory, it uses the Server_AdvanceTurn_End hook. I guess the late-airlift mod uses the same hook for the saved orders.

Commanders are programmed in WZ to be dependent on the owner. In their settings, it is saved whose commander it is, and this can give strange results. WZ removes all your territories, when you lose your commander, hence you are eliminated. These restrictions made it pretty hard to implement and explain some of the choices made.

But it's cool you try my mod, but yeah, compatibility with other mods is not something I thought about.
Two possible bugs in a modded multi-attack game: 2/27/2020 07:10:09

M. Poireau 
Level 55
Report
Thank you! It's a wonderful mod, and creates all kinds of emergent gameplay.

I have a question:

How hard would it be to modify it so that you are only eliminated when you lose ALL your Commanders? (In other words, not when you lose any Commander, but when you lose all of them and the last one on the map dies.)

The code for this must exist, since that is how enemy Bosses work in single-player mode.

I feel this would improve the mod dramatically. Is it possible?
Two possible bugs in a modded multi-attack game: 2/27/2020 11:47:54


TBest 
Level 60
Report
Bosses and commanders are completely different things.

Anyway, I think he could, during serveradvance turn order, check if a commander dies and then remove it using a terr modification instead.

Given the mods other property, all territories will be removed if the player has no commander left
Two possible bugs in a modded multi-attack game: 2/27/2020 12:00:47


Krzysztof 
Level 66
Report
nope, there is only addSpecialUnit in TerritoryModification, no way to remove him ;P

Edited 2/27/2020 12:01:11
Two possible bugs in a modded multi-attack game: 2/27/2020 12:20:53


TBest 
Level 60
Report
nope, there is only addSpecialUnit in TerritoryModification, no way to remove him ;P

oh you are right :( {Unless you can somehow have one player own the territory and another own the commander, like with nutral territories and commander. This would look dumb thru, so even if it works, it's bad.}

Guess you are stuck using Bosses as replacement for commander or something :/

Anyway, there is this small print on the wiki to watch out for as well.

Note that players should generally not have more than 3 special units in their control at any point in time. This rule is not currently enforced by the game, but it may be enforced at some point in the future, so it's recommended that mods don't exceed that limit.


EDIT: unrelated note, but it's the same with cities/structures. You can't remove them (set a territory back to nil). But at least you can set the amount to zero.

Edited 2/27/2020 12:32:53
Two possible bugs in a modded multi-attack game: 2/27/2020 23:55:08


dabo1 
Level 57
Report
: unrelated note, but it's the same with cities/structures. You can't remove them (set a territory back to nil). But at least you can set the amount to zero.

Haven't tested it but can't you use https://www.warzone.com/wiki/Mod_API_Reference:TerritoryModification
SetStructuresOpt to remove cities
Two possible bugs in a modded multi-attack game: 2/28/2020 00:42:35


TBest 
Level 60
Report
Haven't tested it but can't you use https://www.warzone.com/wiki/Mod_API_Reference:TerritoryModification
SetStructuresOpt to remove cities

The Cities Structure takes an int32 argument. So if I set the example code = nil, I would get an error. {Google suggest that this is the way to remove a key from a table, but I am not well versed in Lua, so maybe I can do something else or am missing something} While it's possible that there is some other ways that works, I didn't really look for long. As I decided that, for my mod, this was a feature and not a bug. (Now my latest (soonTM) mod supports rebuilding a destroyed city! Since I store information on where cities used to be this way. Which is pretty cool if I dare say so myself)

structure[Cities] = 0;
territory.Structures = structure;


Anyway, it wasn't my intention to hijack a thread. And in terms of implementation, for me it's better to have it as zero then nil anyway.

Since it's possible to have a commander on a neutral territory, I do wonder if you can have it on an enemies territory as well. However, even if that works, it's a pretty sub-optimal solution. The best thing is really if Fizzer adds a few more things to the API for special units :) Would be cool if new special units and cards and structures etc. could be supported without overriding existing stuff. At least I can dream :P

Edited 2/28/2020 00:52:07
Two possible bugs in a modded multi-attack game: 2/28/2020 11:03:27

Derfellios 
Level 61
Report
Krzysztof is right. Commanders cannot be removed as far as I know. The killing of a commander is not a boss event, but still makes all your territories neutral, eliminating you, and I can't work around this without keeping the commander alive.

I have tried multiple solutions, like forcing it to retreat to another territory, and setting the territory to an enormous wasteland, but that also plays weird. I tried some small with other boss units, but disliked all of them. This works IMO best.

To get an idea, the mod works decently well with INSS: https://www.warzone.com/MultiPlayer?GameID=19407038

Edited 2/28/2020 11:08:20
Two possible bugs in a modded multi-attack game: 2/28/2020 20:03:32

M. Poireau 
Level 55
Report
I see! Very interesting. Unfortunate, but clear.
Posts 1 - 13 of 13