Získajte Premium skryť všetky reklamy
Príspevky: 16   Navštívené: 72 users
17.08.2025 - 16:54
Welcome to the nerd corner

Introduction

You've seen the title correctly, I made a custom battle simulator. You can add custom units, strategies, general bonuses, upgrades and even building bonuses. Most of you will probably use the script I provided to "download" the unit roster of scenarios though to plug it into the sim, just so you know, you can edit these things manually in the files as well (scripts folder).

Link to the custom sim:
(Download) - fully customizable
https://github.com/Pat313/AtWar-Custom-Battle-Simulator
- recommended for scenario unit testing, especially for map makers
(Cloud-based) - testing ground
https://pat313.github.io/AtWar-Custom-Battle-Simulator/ <<< IF YOU'RE A RETURNING VISITOR, THIS IS NEW
- recommended as a better default unit simulator, mostly for comp players
Note: Not a final release, subject to changes.

Disclaimer: The script I made for downloading the unit roster from maps is basically pulling data from the html, that's all it does. It does not grant you any benefit in the game, it just makes "copy-pasting" the units' stats into the simulator from a custom map 3 seconds instead of 3 days. Dire's maps take more than 5000 lines of json... So technically this is not against the game rules, as it is more like a macro, but I obfuscated the script to make it harder to reverse engineer, just in case; other than that, the code is open source.




How to use

The basic functionality and layout of the simulator is almost identical to https://atwar-game.com/sim/.


You drag units in, you set up the parameters for each stack, you hit Run Simulation. Simple.
There are a few key differences though...

1. On the top, you have to select the unit set that you'd like to use. Check out the tutorial on the github page if you want to know how to populate it easily with any custom map's units. Changing it will reload all the controls, so do this first.


2. When the unit set is properly loaded, you will see the units pop up on the left panel. The main difference to the original sim is that here you have a search option (necessary with 200+ unit maps) and the units are grouped into General, Ground, Naval, Air and Building - similarly to how they work in-game. In the settings, you can enable alphabetic sorting too, otherwise it's taking the default order (the order in which the map maker added the units, not ordered by cost like in-game).
If you see a unit in the 'Other' group pop up, that either means:
A) the unit type has a typo in it or otherwise does not exist, like "grund_staelth" instead of "ground_stealth" (you can still use it, but specific buffs may not work as expected)
B) there is a new unit type in the game (unlikely) that is not yet added to the custom sim


3. The original sim does not take upgrades into account AT ALL and the underlying simulator itself does not include them either, I've tested this thoroughly. You can customize the upgrades each stack (player) has for that battle, split into global and general upgrades; obviously the general upgrades only work if there's also a General unit in the stack. By default, every upgrade is enabled. You can disable them by clicking on the "enable upgrades" checkbox on the stack control.
You can access this panel to tailor the upgrades as you want by clicking on the little gear icon near "enable upgrades". It also shows how many upgrades you have enabled right now for that stack.


4. Before running the simulation, make sure that you check if any of these icons appear on the top right. Hover the mouse over them to see what they mean. The typical scheme is...
Blue (info) - does not affect the math, but you might have messed something up or forgot to do something
Yellow (warning) - potentially mess up the numbers in the end, or otherwise affecting the simulation negatively, although not completely ruining it
Red (error) - invalidates the simulation, there's a serious error in the configuration/setup that you should look into





Bugfixes & Improvements

The official sim has a number of key issues that I fixed here, so this simulator works better even for the default units:
- Building: Defence type units now properly add the defense bonus
- multiple building bonuses of the same type stack (this is how it works in-game, whether it is intended or not)
- dragging a building into a stack is now adding 1 unit instead of 5 by default
- minor display bugs fixed like "against against Destroyer"
- stacks can only have "in defence line" or "in city" if they are also set to "defending"; the original sim messes this up because an attacking Militia shouldn't be getting the "+1 defense in city" buff from Imperialist - in certain situations this leads to invalid calculations
- dragging units into the control is a little more intuitive (includes the unit name, not only the image)
- the little icons on the top help you understand the simulator better and immediately see if you set things up incorrectly
- upgrades are now factored into the calculation
- you cannot have multiple stacks defending (leads to faulty calculation), and if every stack is allied to each other, that will show an error message (though you can still run the simulation, but it does not make any sense)
- the allies control now simultaneously adds/removes the allied stack on both sides, making it easier to track with more than 2 stacks




It is not working properly / Future plans

If you believe you have found a bug, error or oversight in the custom sim, send me a letter in game or on discord (patrick0365).
Although I would prefer if you contacted me in-game for these matters.

The same applies if you have any ideas to improve it.
I mostly want to refactorize the code and improve its performance, but I do have some features that I think of adding in the future. For instance: running multiple small-scale simulations in sequence to automatically build a map for custom units (like the one Witch-Doctor created manually here: https://atwar-game.com/forum/topic.php?topic_id=39894&topicsearch=&page=1)

Finally, some thanks to Clovis (https://atwar-game.com/users/profile.php?user_id=102902) who laid down the backbone of this calculator years ago, it's just a continuation of his work really.

Enjoy
----
Nahrávam...
Nahrávam...
17.08.2025 - 17:06
!!!!!!!!!
----
The Gifted INC.


Nahrávam...
Nahrávam...
17.08.2025 - 17:09
Amazing work, Patrick!
Nahrávam...
Nahrávam...
17.08.2025 - 17:44
Dope!
----
Nahrávam...
Nahrávam...
17.08.2025 - 18:14
Can't wait to use this for every battle!
----
https://prnt.sc/W3aEpwbpEwEU
Nahrávam...
Nahrávam...
18.08.2025 - 06:04


----
Nahrávam...
Nahrávam...
18.08.2025 - 06:15
 Kaska (Moderátor)
How will people complain about rolls now ?
----
Nahrávam...
Nahrávam...
18.08.2025 - 07:03
 DireWarlord99 (Moderátor)
Nooooooo! My secrets to unit creation have been exposed! I am doomed lmao!
Nahrávam...
Nahrávam...
18.08.2025 - 07:41
Message deleted by Kaska. Reason: Spam
Nahrávam...
Nahrávam...
18.08.2025 - 07:58
Napísal Estus, 17.08.2025 at 17:09

Amazing work, Patrick!

i deserve 2020 Poty you brazilian cingani dont think u can get away with that. i will raid ur favela tonight
----
Ottoman admin shield made by Patricky

Nahrávam...
Nahrávam...
18.08.2025 - 08:25
Napísal 77TENGRI99, 18.08.2025 at 07:41




PC set to 2025/08/26 while it's only 2025/08/18 today gc
----
Nahrávam...
Nahrávam...
18.08.2025 - 16:27
Now this is cool
----
''Everywhere where i am absent, they commit nothing but follies''
~Napoleon


Nahrávam...
Nahrávam...
19.08.2025 - 09:59
Important Update

If you guys only want to use a better battle simulator with the default units (like buildings and upgrades working, better configuration options and such).
You don't have to download anything, I published a basic schematic on github.io that you can use:
https://pat313.github.io/AtWar-Custom-Battle-Simulator/
----
Nahrávam...
Nahrávam...
19.08.2025 - 11:14
Can you add Endsieg units to the battle simulator? Endsieg is a map that is still being played alongside WW1. Well, and Pacific Front (WW2).
----
.
Nahrávam...
Nahrávam...
19.08.2025 - 11:23
Napísal VON RUTTER, 19.08.2025 at 11:14

Can you add Endsieg units to the battle simulator? Endsieg is a map that is still being played alongside WW1. Well, and Pacific Front (WW2).


Originally i wanted to add Pyrrhus' endsieg and Aetius' ww1, but people nowadays play Estus' ww1 and Dire's neuordnung (these 2 are already added), and the latter two get constant updates so it might mislead people.

The idea with the two links was to give a fully customizable local version that you can download and plug any units into it anytime, while the cloud based version can be used as a more advanced battle sim (w/ default units) where buildings and other stuff work properly.

Sure I can add the most played maps but those are also the most frequently updated ones so it might become invalid when the maps get updated from time to time.

Edit:
Now endsieg and og ww1 are incuded.
----
Nahrávam...
Nahrávam...
21.08.2025 - 19:30
Nice
Nahrávam...
Nahrávam...
atWar

About Us
Contact

Utajenie | Podmienky služby | bannery | Partners

Copyright © 2025 atWar. All rights reserved.

Pripojte sa k nám na

Dajte o nás vedieť