Men of War: Assault Squad 2

Men of War: Assault Squad 2

CheatsMod 5.16
Floppa gaming 22 Sep, 2022 @ 7:15am
How to add own vehicles to spawn list.
Edit: it seems that steam is stinky so all the coding will be flat, you will have to match up the horisontal lines to the other tanks.



Thanks to Type-2 Chimera for helping me figure this out.


I recommend having Notepad++ for this.

First find the cheat.mi file in "resource\map\cheatmod\"
Then you want open it up with notepad++ (Normal notepad works fine).

I recommend you launch mowas2_ed so that you can know what the vehicles names are.

Now this part is a bit difficult to explain so I will just give an example:
This part will explain how to add the M4A4 to the medium list.

Find the calliope and paste this under it:

}
{"cheat_usa_tank_medium_m4a4"
{state hidden}
{text "M4A4"}
{image m4a4}
{hint ""}
{count -1}
{score 0}
{delay 0}
{eventEnd "cheatmod/spawn/tank/10"}
{waypoint "3001"}
}

Make sure that there is no:

}
}

in the file as these makes the game crash.

What the part you copy pasted is the control of selecting, and spawing the vehicle. The "Text" line is what the entity is named in the spawn menu.
The "image" line is what image it will show on the entity on the menu.

Now it is important to have the cheatmod/spawn/tank/ a uniqe number so that no other command interferes with it.
Now you find the other batch of calliope and paste this under it:

{"cheats/tanks/american/medium/10"
{condition
{terms
{"1.event"
{id "cheatmod/spawn/tank/10"}
}
{"2.cmp_i"
{var "cheatmenu$"}
{op "=="}
{value 10}
}
{"3.cmp_i"
{var "cheatcountry$"}
{op "=="}
{value 2}
}
}
}
{actions
{"loop" 4
{"actor_to_waypoint"
{selector
{ignore_captured_by_user 0}
{tag cheat_american_crew}
}
{waypoint "3002"}
{clone}
{approach teleport}
}
}
{"spawn"
{entity "m4a4"}
{waypoint "3000"}
}
{"call"
{function "tankgetsfilled"}
}
{"event"
{event "cheatmod/spawn/tank/10"}
{mode reset}
{delay 0}
}
{"trigger"
{name "cheats/tanks/american/medium/10"}
}
}
}

This is what actually spawns the vehicle.

You can experiment with other vehicle by replacing everything with "m4a4" to something else like "ostwind".
This is a brief explanation on how to add vehicles.

Post your bugs in replies.
Last edited by Floppa gaming; 26 Mar, 2023 @ 1:01pm
< >
Showing 1-15 of 15 comments
MagiChris 24 Jan, 2023 @ 5:39pm 
Hey, thank you for this it's pretty helpful as a template and quick guide. So I'm having an issue with having images for the vehicles show up within the in-game menu. Is there anything that can be done about this?
Floppa gaming 30 Jan, 2023 @ 11:41am 
It just does that sometimes.
I know it is from either resource/interface/scene/unit_icon or /unit_icon_small.

Maybe try to check if there is any file for it there or create a new one to test things out.
Last edited by Floppa gaming; 30 Jan, 2023 @ 11:41am
Drake 21 Feb, 2023 @ 5:02pm 
So in the second half of the code, the one that actually does the spawning. Do I need to change the tag cheat_american_crew if it isn't American? Also is the entity (In this case "m4a4") the acutal vehicle?

So If it was a vehicle from another mod, I could just use its entity name that I can get from the editor?

Man this is my first foray into MOW scripting at all, Thanks in advance for the patience.
Drake 22 Feb, 2023 @ 6:08pm 
Ok, I've done some experimenting.

I've taken a mod vehicle and moved it to another category.
(I've changed it's unique tank number to 1 and the preceding category to medium instead of heavy)
However, strangely enough, It doesn't spawn UNTIL I switch back to the heavy category, then both the T14 and the M-51 Super Sherman spawn in the same place.

WHY!?!?

I suppose I'll look more into the German side of things since their bonustanks category does have working medium vehicles to spawn while no other nation does.
Drake 22 Feb, 2023 @ 11:08pm 
Alright I've figured it all out and written a document explaining exactly how to add vehicles and what numbers need changed. I'll polish it and post it if there is any interest at all.
Floppa gaming 24 Feb, 2023 @ 5:52am 
Originally posted by Drake:
So in the second half of the code, the one that actually does the spawning. Do I need to change the tag cheat_american_crew if it isn't American? Also is the entity (In this case "m4a4") the acutal vehicle?

So If it was a vehicle from another mod, I could just use its entity name that I can get from the editor?

Man this is my first foray into MOW scripting at all, Thanks in advance for the patience.

The M4A4 is an actual vehicle.
Just go to resource\entity\-vehicle\XXX\NAME.def.

The name of the .def file is the name of the entity.
Check out what folder it is in, or just choose yourself.
Last edited by Floppa gaming; 24 Feb, 2023 @ 5:52am
Drake 27 Feb, 2023 @ 7:06pm 
Thanks for your reply. I've tracked down the missing information. I'll post it here, I've been using it to add all kinds of tanks from Terminator v2.0 and Tank Rumble.

Button Script:

The line at the top of the script dictates what category the button will be, so cheat_usa_tank_medium_m4a4 will be a US medium tank.
Likewise, cheat_usa_bonustank_medium_m4a4 will be a US medium mod tank.

Also, end of the path must be the entity name of the vehicle, so a Tiger II (P) path would look like:
cheat_ger_bonustank_heavy_pz6bp

The image is also usually the same as the name of its entity, which can be found in the editor, it's just the name used to spawn it.

The eventEnd is where the unique vehicle number is made. MAKE SURE that there is no other vehicle in the subcategory with the
same number. There can only be one cheatmod/spawn/tank/1 inside of cheat_usa_tank_medium and so forth.

To double check, use ctrl+f and search, for example, german heavies, cheats/tanks/german/heavy/1 then 2 and so forth, if it
yields no results, then the number is not used yet and is safe. (This searches the spawning script, but the spawning script and
button script share numbers.)

The order in which the scripts are listed here is the order in which they will appear in the menu

The nations are abreviated as such: Germany = ger | America = usa | Britain = uk | Russia = rus | Japan = ♥♥♥

Spawn Script:

The nations in THIS side of the script are abreviated differently.
Germany = german | America = american | Britain = eng | Russia = rus | Japan = ♥♥♥

The first line of the spawn script must end similar to the eventEnd, using the m4a4 example.
cheats/tanks/american/medium/10
The number at the end is the number at the end of eventEnd.

The next three items in the script are numbered 1,2, and 3.
1. Must be the eventEnd from the above, the one with the unique number
2. Is specific to the category the vehicle is in, the numbers for which will be listed in this cheat sheet
3. Is the country, the numbers for countries will also be listed in this cheat sheet

Down the script a bit there is a subsection called tag. It will look like tag cheat_eng_crew for an english vehicle.
I think you know what to do now, but just in case, change the nation to whatever nation is needed for the vehicle.

Of course, under the spawn category you will find the entity, which should be the entity name of the vehicle

Under Event the second event should be the same as the eventEnd from the button script (eg:"cheatmod/spawn/tank/2")

The last category is trigger with a subcategory of name, the name will be the same as the first line of the spawn script.
And if you've followed good practices the number at the end should be the same as the eventEnd.
(eg:"cheats/tanks/eng/medium/2")



COUNTRY CODES

german =1
american =2
eng =3
rus =4
♥♥♥ =5

CATEGORY CODES

Vanilla
artillery =13
btr =12
light =9
medium =10
heavy =11
Mod Tanks
btr =30
light =31
medium =32
heavy =33
1. Can this work for Anti- Tank guns too? I noticed in the cheats mod, only Germany has a light AT gun- it has the PAK 40 to, but it is missing the pack 38. A lot of factions are missing their light/ medium Anti- Tank gun variants, but always have their heavy variants.
2. "Find the calliope and paste this under it:" I wonder what you mean by that? What's a Calliope? ;-;
Floppa gaming 24 May, 2023 @ 1:46am 
Originally posted by Parra:
1. Can this work for Anti- Tank guns too? I noticed in the cheats mod, only Germany has a light AT gun- it has the PAK 40 to, but it is missing the pack 38. A lot of factions are missing their light/ medium Anti- Tank gun variants, but always have their heavy variants.
2. "Find the calliope and paste this under it:" I wonder what you mean by that? What's a Calliope? ;-;
The calliope is the sherman tank with a rocket platform on top of it.
trollballin 29 May, 2023 @ 1:01pm 
why does it strangely spawn at left side center of map when i added sdkfz303?
Floppa gaming 8 Jun, 2023 @ 12:56am 
Originally posted by trollballin:
why does it strangely spawn at left side center of map when i added sdkfz303?
Yeah I also have that problem. Would not recommend using it.
ShadowVane 20 Mar, 2024 @ 3:46am 
Originally posted by Floppa gaming:
Originally posted by trollballin:
why does it strangely spawn at left side center of map when i added sdkfz303?
Yeah I also have that problem. Would not recommend using it.

Can you add other thing as well like planes, infantry and other thing in the spawn list?
Floppa gaming 22 Mar, 2024 @ 4:10pm 
Originally posted by Spoderman:
Originally posted by Floppa gaming:
Yeah I also have that problem. Would not recommend using it.

Can you add other thing as well like planes, infantry and other thing in the spawn list?
Whilst I would not try with planes. You could examine what a button for something like the rifleman has and replicate it like in the tutorial.
SECRXETT 15 Aug, 2024 @ 5:18pm 
when i try spawn it, nothing happens
Floppa gaming 15 Aug, 2024 @ 11:57pm 
Originally posted by SECRXETT:
when i try spawn it, nothing happens
Can you give more information? Does any tankers appear when you spawn the vehicle? And what vehicle are you trying with?
< >
Showing 1-15 of 15 comments
Per page: 1530 50