Mods / Ana's Flag of War

Tags:
Utility QoL Tweak
Author:
Aspiracja
Side:
Server
Created:
Oct 5th 2024 at 3:27 PM
Last modified:
Oct 8th 2025 at 2:05 PM
Downloads:
1930
Latest release (for Vintage Story 1.21.0, 1.21.1 and 1.21.2 - 1.21.4, outdated):
AnasFlagOfWar-v2.0.21.zip  1-click install

This server side mod intejects any form of pvp combat and makes sure both sides gave their consent.
You can manage your personal consent settings via the /pvp command and it's subcommands

Mod allows for 3 modes of fighting:

  • Flag of War: (/pvp on/off) Flagging you for FFA pvp. After turning it on you need to wait 90 seconds before being able to turn it off again.
  • Battle: (/pvp battle <password>) Enabling you to kill or be killed by people who have given the same password
  • Duel: (/pvp duel <player>) Sends or accepts a challenge to a player, allowing only you two to engage in combat between each other. (Duel ends when one side dies)

You can also forfeit battles and duels via /pvp forfeit battle/duel if you no longer feel like fighting.

THIS MOD IS FULLY SERVER SIDE AND IS NOT REQUIRED TO BE DOWNLOADED BY PLAYERS

Planned features:
- Team Private Battle (Same as private battle, but allowing you to team up)

THIS MOD IS NOT COMBAT OVERHAUL COMPATIBLE

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
2.0.21 anasflagofwar
1.21.2 - 1.21.4
100 Oct 8th 2025 at 2:05 PM AnasFlagOfWar-v2.0.21.zip 1-click install
  • Remade the entire mod to no longer use behaviors and instead to use a simple harmony prefix for players' ShouldReceiveDamage
  • Added lang file for english (Currently it will use server language)
  • Created easy to use api for new pvp states with the use of an IPvPState interface and a pvphandler singleton.
  • Created an easy to use access for custom pvp and forfeit subcommands by using the RegisterMainSubcommand and RegisterForfeitSubcommand static methods.
  • Implemented flag cooldown.
  • Fully isolated the mod to the server and prevented the client side from downloading anything related to this mod.

    Known issues:
  • OverhaulLib mods are not bound by the constraints (currently working on a compatibility)
1.2.21 anasflagofwar 926 Sep 2nd 2025 at 2:38 PM AnasFlagOfWar-1.2.21.zip 1-click install

- Fixed an issue where flag cooldown wasn't removed.
- Updated to 1.21.1
- Changed from .NET 7.0 to .NET 8.0

1.1.21 anasflagofwar 686 Sep 2nd 2025 at 11:13 AM AnasFlagOfWar-v1.1.21.zip 1-click install

Updated to 1.21.0

- Added 90 second cooldown for [/pvp off] after turining on pvp

1.0.0 anasflagofwar 185 Oct 5th 2024 at 3:29 PM Empty AnasFlagOfWar-v1.0.0.zip 1-click install

19 Comments (oldest first | newest first) (threaded | flat)

MandrakeMaster, May 9th at 1:50 PM

Hello, did you plane to update this mod for 1.22 ?

Tyeia, Dec 15th 2025 at 7:02 AM

Is there anything you can do on your end to implement CO compatability, or does CO need to implement compatability on their end?

Aspiracja , Nov 15th 2025 at 9:45 AM

DimitriRascolov

CO ignores the checks made by this mod. It doesn't crash.

DimitriRascolov, Nov 13th 2025 at 10:55 PM

by not combat overhaul compat is this something that causes crashes, or is this something that makes it so combat overhaul just ignores this mod
sorry for the comment, just wanted to know if its safe to load the mod up for our server or if i should wait till if/when its compat

TheCatDied, Oct 25th 2025 at 9:11 PM

Works great now, thanks Aspiracja

MrFlame, Oct 8th 2025 at 4:38 PM

I previously had an idea for a mod where, when you are in the same group as someone, you cannot damage each other even if PvP is enabled on the server. Your mod provides more flexible settings and is genuinely useful.

Aspiracja , Oct 7th 2025 at 10:23 AM

TheCatDied

IRL work stuff and testing environment issues postponed the new release. I'll try to release it asap. Sorry for the long delays >.<

TheCatDied, Oct 5th 2025 at 10:53 PM

any update on this?

Ket, Sep 23rd 2025 at 6:50 PM

that all sounds awesome :D Looking forward to it!

 

Aspiracja , Sep 23rd 2025 at 6:45 PM

Ket

Yeah, I know about this issue. Because of the order of events, I think pvp behavior needs to be before the health behavior for it to prevent any damage. I'm not really sure how all that behavior stuff really works (and the mod is a bunch of spaghetti code rn) so for that very reason I've decided to stop using them in the next update and build a per-player, not a per-entity based system with a harmony patch to handle the events. I have also finally added some other bells and whistles like an actual abstraction for modes and command attachment api so it's gonna be great. I have it all written already and just need to test it before release. Expect 2.0.21 to drop very soon.

Ket, Sep 23rd 2025 at 3:18 PM

Love this mod. Can you change player.json patch to use 'addmerge' instead of 'add' to fix incompatibility with playermodellib? that mod needs to use 'replace' at a specific path in player.json and the 'add' op in your patch moves the position of that path from '11' to '12' when 'EntityBehaviorPvp' is placed at '0', and causes playermodelib to replace 'bodytemperature' instead of 'extrasskinnable' I don't know if this will break things in your C# code though, so if not that is ok, thank you anyway! 

Aspiracja , Sep 15th 2025 at 11:05 PM

I'm not exactly sure what the issue is, but I'll be working on fixing any issues that are happening and could possibly happen in the future. 2.0.21 should be available soon with a solid rewrite of the core but with the same features.

TheCatDied

Sterlin_Crimson

TheCatDied, Sep 15th 2025 at 9:33 PM (modified Sep 15th 2025 at 9:42 PM)

There is a crash I discovered on this mod that prevented the character from getting their body temperature updated, and whenver you opened the character window it resulted in client side crash. Disabling the mod fixed the client side crashes and the character updates body temperature correctly now.

I have player mod lib, racial equality and racial ability. The crash only happened when these interacted in conjunction with Ana's Flag of War.

Crash Report
Running on 64 bit Windows 10.0.26100.0 with 64599 MB RAM Game Version: v1.21.1 (Stable) 9/15/2025 4:09:07 PM: Critical error occurred Loaded Mods: ancientarmory@1.1.4, barkbeetle@1.0.4, buzzybees@1.1.7, canoemode@1.0.4, catchledge@0.5.6, cavesymphony@1.2.0, chiseltools@1.15.1, cinematiccamera@1.0.3, forestsymphony@1.0.6, freelook@1.0.3, overhaullib@1.8.1, packyourshovel@1.0.8, slowwalkmod@1.2.5, sortablestorage@2.4.2, tankardsandgoblets@1.3.0-pre.1, game@1.21.1, vsimgui@1.1.12, arrowbarrels@1.2.1, attributerenderinglibrary@2.1.1, betterentityinteraction@1.0.4, betterruins@0.5.0, bullseyecontinued@3.4.3, caneconomy@1.0.8, canmailbox@1.1.1, carryon@1.10.9, cartwrightscaravan@1.7.1, commonlib@2.8.0, configlib@1.10.2, drifterlightlevel2@1.0.3, envelopes@2.0.2, farseer@1.3.2, fleeexhaustion@1.2.0, genelib@2.0.0-rc.1, hidenametagsmod@1.21.0, jaunt@2.1.0-rc.1, landclaming@1.0.3-rc.1, maltiezcrossbows@1.5.3, medievalexpansionpatch@1.3.1, nbcartographer@2.2.1, noticeboard@1.1.2, spearexpantion@0.3.6, playerlist@2.1.5, playermodellib@1.0.7, rebuildablebloomery@1.0.3, rpvoicechat@2.3.22, slowtox@3.0.1, smithingplus@1.7.4, stablesurface@0.0.2, stepupadvanced@1.2.1, stonerailings@1.4.0, terraprety@7.0.6, vinconomy@5.0.2, creative@1.21.1, survival@1.21.1, woopmotd@1.0.4, autoconfiglib@2.0.9, equus@1.2.0-rc.5, lessdurablemaltiezcrossbows@1.0.0, playercorpse@1.12.0, quiversandsheaths@0.3.3, racialequality@0.1.23, rivergen@1.0.0, stonequarry@3.5.1, tabards@0.2.1, tabletopgames@3.0.0, th3essentials@2.12.0, racialability@0.1.24, tabatdsemblems@0.0.1 System.NullReferenceException: Object reference not set to an instance of an object. at Vintagestory.Server.ServerMain.LogShutdownException(Exception exception) in VintagestoryLib\Server\ServerMain.cs:line 1215 at Vintagestory.Server.ServerMain.Stop(String reason, String finalLogMessage, EnumLogType finalLogType) in VintagestoryLib\Server\ServerMain.cs:line 1098 at Vintagestory.Client.ClientProgram.ServerThreadStart() in VintagestoryLib\Client\ClientProgram.cs:line 511 Event Log entries for Vintagestory.exe, the latest 1 ================================== { TimeGenerated = 9/15/2025 3:40:05 PM, Site = , Source = Application Error, Message = Faulting application name: Vintagestory.exe, version: 1.21.1.0, time stamp: 0x67fe0000 Faulting module name: openal32.dll, version: 1.23.0.0, time stamp: 0x63dd31ad Exception code: 0x40000015 Fault offset: 0x00000000000df046 Faulting process id: 0x8cdc Faulting application start time: 0x1dc267fb75daa71 Faulting application path: C:\Users\LWFer\AppData\Roaming\Vintagestory\Vintagestory.exe Faulting module path: C:\Users\LWFer\AppData\Roaming\Vintagestory\Lib\openal32.dll Report Id: f6ff5d67-30f4-444c-a21c-609514146b6c Faulting package full name: Faulting package-relative application ID: }
Sterlin_Crimson, Sep 15th 2025 at 8:55 PM

after I added the race entites to the mod I stopped crashing but I'm going to test with my other players when they get on later today.

Sterlin_Crimson, Sep 15th 2025 at 8:53 PM

Aspiracja

Crash Report
Game Version: v1.21.1 (Stable)
9/15/2025 12:01:26 AM: Critical error occurred
Loaded Mods: ancientarmory@1.1.2, artspaperlantern@1.0.0, atwatersedge@1.5.1, beamium@1.2.2, buzzwords@1.8.0, catchledge@0.5.6, chiseltools@1.15.1, coldstorage@1.0.2, cpxem@1.0.1, crawlanddive@0.2.1, facop@1.2.2, floralzonescosmopolitanregion@1.0.5, fagothic@1.1.5, fagreenwich@1.2.4, falandsknecht@1.1.3, fatemplar@1.2.5, geoaddons@1.4.3, jonasboat@1.0.1, longtermfood@0.2.2, millwright@1.2.8, overhaullib@1.8.0, primitivesurvival@3.9.5, prospecttogether@2.1.0, soapandlye@1.1.1, soaplyeandbloom@1.3.4, sortablestorage@2.4.2, tankardsandgoblets@1.2.2, torchholdersmithingplusunofficial@1.0.1, vaultandroll@0.1.1, game@1.21.1, vsimgui@1.1.12, wildfarmingrevival@1.4.0, alchemy@1.7.14, anasflagofwar@1.2.21, animalcages@4.0.1, apebeams@1.1.1, apegrapes@1.3.1, attributerenderinglibrary@2.2.0, backpackpackplusexpanded@1.2.5, beararmorrepair@1.0.0, bedspawnv2@1.6.1, betterdeathmessages@1.0.1, bettererprospecting@1.1.10, betterruins@0.5.0, bradycrudebuilding@1.4.3, butchering@1.10.2, canoemodbannta@1.1.1, carryon@1.10.9, cartwrightscaravan@1.7.0, chuteblockplacer@1.0.5, coinage@1.17.3, combatoverhaul@0.9.3, commonlib@2.8.0, configlib@1.10.2, configurableroomsize@1.1.0, danatweaks@3.6.0, envelopes@2.0.2, farseer@1.3.2, fieldsofsalt@1.2.4, foragersgamble@1.0.6, fromgoldencombs@1.9.2-rc.2, genelib@2.0.0-rc.1, herbarium@1.4.0, hidenametagsmod@1.21.0, jaunt@2.1.0-rc.1, maketeaforked@0.7.0, mannequinstand@1.0.6, medievalexpansionpatch@1.3.1, moldsplus@1.0.4, moreanimals@1.6.2, mountcamerafix@0.2.0, ndlexpandedgrowth@3.3.0, ndlwoodentorchholder@2.0.2, noticeboard@1.1.2, oneroof@1.11.0, petai@4.0.0, playermodellib@1.0.8, saltandsands@1.1.3, saltpeterproduction@1.1.0, smithingplus@1.7.4, stepfixelk@0.0.2, stepupadvanced@1.2.1, stonebakeoven@1.2.0, terraprety@7.0.8, th3dungeon@0.4.4, thecritterpack@1.2.9, vanvar@7.1.0, vinconomy@5.0.2, creative@1.21.1, vsinstrumentsbase@2.0.4, survival@1.21.1, windchimes@1.3.2, woodenshuttersandmore@1.2.31, workbenchexpansionpatch@1.1.0, armory@1.2.0, autoconfiglib@2.0.9, castaway@1.0.1, cats@4.0.0, compatlayer@0.0.6, cutthehides@1.2.2, detailedanimals@0.6.0-rc.2, drkboats@1.0.1, elkjaunt@1.2.0, equus@1.2.0-rc.4, em@3.3.0, foxtaming@1.7.2, harepet@1.3.0, monoceros@1.3.0, morefloors@2.1.1, playercorpse@1.12.0, quiversandsheaths@0.3.3, racialequality@0.1.22, shearlib@1.2.0, stonequarry@3.5.1, thebasics@5.2.3, vsinstruments_quackpack@1.0.2, wildcraftfruit@1.4.2, wildcrafttree@1.3.2, wolftaming@4.0.1, bricklayers@3.1.0, racialability@0.1.24, tailorsdelight@2.0.0, wildcrafttreesoneroof@0.8.1, wool@1.7.1
System.NullReferenceException: Object reference not set to an instance of an object.
at Vintagestory.GameContent.CharacterExtraDialogs.getBodyTempText(ITreeAttribute tempTree) in VSEssentials\Systems\CharacterExtraDialogs.cs:line 310
at Vintagestory.GameContent.CharacterExtraDialogs.UpdateStats() in VSEssentials\Systems\CharacterExtraDialogs.cs:line 366
at Vintagestory.API.Datastructures.SyncedTreeAttribute.PartialUpdate(String path, Byte[] data) in VintagestoryApi\Datastructures\AttributeTree\Other\SyncedTreeAttribute.cs:line 270
at Vintagestory.Client.NoObf.ClientSystemEntities.HandleEntityAttributeUpdatePacket(Packet_EntityAttributeUpdate p) in VintagestoryLib\Client\Systems\Entities.cs:line 379
at Vintagestory.Client.NoObf.ClientSystemEntities.HandleEntityBulkAttributesPacket(Packet_Server packet) in VintagestoryLib\Client\Systems\Entities.cs:line 324
at Vintagestory.Client.NoObf.ClientMain.ExecuteMainThreadTasks(Single deltaTime) in VintagestoryLib\Client\ClientMain.cs:line 786
at Vintagestory.Client.GuiScreenRunningGame.RenderToPrimary(Single dt) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenRunningGame.cs:line 172
at Vintagestory.Client.ScreenManager.Render(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 719
at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 663
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(FrameEventArgs e) in VintagestoryLib\Client\ClientPlatform\GameWindow.cs:line 113
at OpenTK.Windowing.Desktop.GameWindow.Run()
at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 338
at Vintagestory.Client.ClientProgram.<>c__DisplayClass10_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 133
at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 95
Aspiracja , Sep 15th 2025 at 8:29 PM (modified Sep 15th 2025 at 8:39 PM)

Sterlin_Crimson

Could you please provide the crash logs? Either here or on discord (same name as here)
The mod shouldn't really have issues with compatibility as it's just a simple EntityBehavior being slapped onto the players, but I'll have a look at it.

EDIT: I have tested it with just those two mods and couldn't reproduce the crash, so I'll gladly accept any logs you've got

Sterlin_Crimson, Sep 15th 2025 at 8:16 PM

Aspiracja

Love the mod and hope it goes well and if anyone ask I got your mod to somewhat work with Racial Equality I will be doing some more testing on my server later when everyones on. (it was causeing crash apon opening the character screen.)

Aspiracja , Sep 14th 2025 at 9:28 PM

TheCatDied

Pvp needs to be on

TheCatDied, Sep 14th 2025 at 4:22 PM

For this mod to work, do you turn PVP off on the server side?