Skip to content

Commit 22ae60e

Browse files
committed
feat: first version
1 parent 84a911c commit 22ae60e

File tree

2 files changed

+213
-0
lines changed

2 files changed

+213
-0
lines changed

ReadMe.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## DESCRIPTION
2+
This is a mod for Battle Brothers that changes the names of the enemies in the game to some comical/funny/pun names. The mod also adds the ability for the players to customize the name of every entity in the game.
3+
4+
### Installation
5+
Download the .zip file attached to the latest [release] and paste it in your Battle Brothers data folder. Do not unzip the file.
6+
7+
### Modifying entity names
8+
This can be achieved through the Mod Options.
9+
10+
### Save Compatibility
11+
This mod can be added/removed from savegames without any problem.
12+
13+
### Mod Compatibility
14+
This mod is compatible with all mods but it won't modify the names of entities added by other mods. For Reforged specifically, however, it also modifies names of the entities added by Reforged.
Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
local info = {
2+
ID = "mod_comical_entity_names",
3+
Name = "Comical Entity Names",
4+
Version = "1.0.0"
5+
};
6+
7+
local mh = ::Hooks.register(info.ID, info.Version, info.Name);
8+
mh.require("mod_msu");
9+
10+
local mod;
11+
mh.queue(">mod_msu", function() {
12+
mod = ::MSU.Class.Mod(info.ID, info.Version, info.Name);
13+
mod.Registry.addModSource(::MSU.System.Registry.ModSourceDomain.GitHub, "https://github.com/LordMidas/mod_comical_entity_names");
14+
mod.Registry.addModSource(::MSU.System.Registry.ModSourceDomain.NexusMods, "https://www.nexusmods.com/battlebrothers/mods/776");
15+
mod.Registry.setUpdateSource(::MSU.System.Registry.ModSourceDomain.GitHub);
16+
});
17+
18+
mh.queue(function() {
19+
local name = ::Const.Strings.EntityName;
20+
local namePlural = ::Const.Strings.EntityNamePlural;
21+
22+
local function setName( _entityTypeKey, _name, _namePlural = null )
23+
{
24+
if (_entityTypeKey in ::Const.EntityType)
25+
{
26+
local entityType = ::Const.EntityType[_entityTypeKey];
27+
name[entityType] = _name;
28+
namePlural[entityType] = _namePlural == null ? _name + "s" : _namePlural;
29+
}
30+
}
31+
32+
setName("Necromancer", "Neck-row-dancer");
33+
setName("Zombie", "Back Again-er");
34+
setName("ZombieYeoman", "Armored Back Again-er");
35+
setName("ZombieKnight", "Fallen Zero");
36+
setName("ZombieBoss", "Grudge Boo");
37+
setName("SkeletonLight", "Ancient Secretary", "Anicent Secretaries");
38+
setName("SkeletonMedium", "Ancient Lego Player");
39+
setName("SkeletonHeavy", "Ancient Honor Card");
40+
setName("SkeletonPriest", "Ancient Spooker");
41+
setName("SkeletonBoss", "The Conqu-errr");
42+
setName("Vampire", "Necro Servant");
43+
setName("Ghost", "Spookster");
44+
setName("Ghoul", "Nacho");
45+
setName("OrcYoung", "Orc Yung\'Un");
46+
setName("OrcBerserker", "Orc Big\'Un");
47+
setName("OrcWarrior", "Orc Worryer");
48+
setName("OrcWarlord", "Orc WarLoud");
49+
setName("Militia", "Next Door Militia");
50+
setName("MilitiaRanged", "Distant Militia");
51+
setName("MilitiaVeteran", "Better Militia");
52+
setName("MilitiaCaptain", "Best Militia");
53+
setName("BountyHunter", "Bounty Haunter");
54+
setName("Peasant", "Please not");
55+
setName("CaravanHand", "Carry a van Hand");
56+
setName("CaravanGuard", "Cart Cop");
57+
setName("CaravanDonkey", "Poor Donkey");
58+
setName("Footman", "Marchy McStomp");
59+
setName("Greatsword", "Swordy McSwordFace");
60+
setName("Billman", "Pointy McPoke");
61+
setName("Arbalester", "Shooty McPewPew");
62+
setName("StandardBearer", "Flaggy McFlapper");
63+
setName("Sergeant", "Barky McOrder");
64+
setName("Knight", "Knighty McGood");
65+
setName("MilitaryDonkey", "Kicky McHooves");
66+
setName("BanditThug", "Bri\'ish Mug");
67+
setName("BanditPoacher", "Bri\'ish Roacher");
68+
setName("BanditMarksman", "Bri\'ish Marksman");
69+
setName("BanditRaider", "Bri\'ish Reader");
70+
setName("BanditLeader", "Bri\'ish Litter");
71+
setName("GoblinAmbusher", "Goblin Am-busy-here");
72+
setName("GoblinFighter", "Goblin Shanker");
73+
setName("GoblinLeader", "Goblin Overthere");
74+
setName("GoblinShaman", "Goblin Shamanigan");
75+
setName("GoblinWolfrider", "Goblin Woof Woof");
76+
setName("Wolf", "Waffle");
77+
setName("Wardog", "Wardrobe");
78+
setName("ArmoredWardog", "Sturdy Wardrobe");
79+
setName("Mercenary", "Money no Worry", "Money no Worries");
80+
setName("MercenaryRanged", "Money no Worry", "Money no Worries");
81+
setName("Swordmaster", "You die now", "You die for sure now");
82+
setName("HedgeKnight", "Edge Knight");
83+
setName("MasterArcher", "Master Blaster");
84+
// setName("GreenskinCatapult", "");
85+
setName("Cultist", "Davkul is Coming");
86+
setName("Direwolf", "Big Bad Wolf", "Big Bad Wolves");
87+
setName("Lindwurm", "Lintworm");
88+
setName("Unhold", "Un-hugger");
89+
setName("UnholdFrost", "Un-hugger");
90+
setName("UnholdBog", "Un-hugger");
91+
setName("Spider", "Websnack");
92+
// setName("SpiderEggs", "");
93+
setName("Alp", "Take a Nap");
94+
setName("Hexe", "Hag");
95+
setName("Schrat", "Scratch");
96+
setName("SchratSmall", "Small Scratch");
97+
// setName("Wildman", "");
98+
setName("Kraken", "Bones McKraken");
99+
// setName("KrakenTentacle", "");
100+
// setName("ZombieBetrayer", "");
101+
// setName("AlpShadow", "");
102+
setName("BarbarianThrall", "Barbarian Brawl");
103+
setName("BarbarianMarauder", "Barbarian Beaver");
104+
setName("BarbarianChampion", "Barbarian Chomper");
105+
setName("BarbarianDrummer", "Barbarian Dumber");
106+
setName("BarbarianBeastmaster", "Barbarian Petter");
107+
setName("BarbarianUnhold", "Armored Un-hugger");
108+
setName("BarbarianUnholdFrost", "Armored Un-hugger");
109+
setName("BarbarianChosen", "Bling of the North", "Blings of the North");
110+
setName("Warhound", "Snorehound");
111+
// setName("TricksterGod", "");
112+
setName("BarbarianMadman", "Barbarian Mad Lad");
113+
setName("Serpent", "");
114+
setName("SandGolem", "Tea-Frit");
115+
setName("Hyena", "High Yawner");
116+
setName("Conscript", "Conskip");
117+
setName("Gunner", "Boomer");
118+
setName("Officer", "Millenial");
119+
setName("Engineer", "Gen Z");
120+
setName("Assassin", "Gen Alpha");
121+
setName("Slave", "Shave");
122+
setName("Gladiator", "GladiYeeter")
123+
// setName("Mortar", "");
124+
setName("NomadCutthroat", "No-Mad Cutthrough");
125+
setName("NomadOutlaw", "No-Mad Out(back)Lawyer");
126+
setName("NomadSlinger", "No-Mad Flinger");
127+
setName("NomadArcher", "No-Mad Lurcher");
128+
setName("NomadLeader", "No-Mad Leather");
129+
setName("DesertStalker", "Desert Stalk \'n\' Roll");
130+
setName("DesertDevil", "Ballet Dancer");
131+
setName("Executioner", "Eggs-Terminator");
132+
setName("PeasantSouthern", "Sit-zen");
133+
// setName("SkeletonLich", "");
134+
// setName("SkeletonLichMirrorImage", "");
135+
// setName("SkeletonPhylactery", "");
136+
// setName("ZombieTreasureHunter", "");
137+
// setName("FlyingSkull", "");
138+
setName("Oathbringer", "Oat Bringer");
139+
140+
if (::Hooks.hasMod("mod_reforged"))
141+
{
142+
setName("RF_BanditScoundrel", "Bri\'ish Scoundrel");
143+
setName("RF_BanditRobber", "Bri\'ish Robber");
144+
setName("RF_BanditHunter", "Bri\'ish Hunter");
145+
setName("RF_BanditVandal", "Bri\'ish Vandal");
146+
setName("RF_BanditPillager", "Bri\'ish Pillager");
147+
setName("RF_BanditOutlaw", "Bri\'ish Out(back)Lawyer");
148+
setName("RF_BanditBandit", "Bri\'ish Bandit");
149+
setName("RF_BanditHighwayman", "Bri\'ish Motorwayman");
150+
setName("RF_BanditMarauder", "Bri\'ish Marauder");
151+
setName("RF_BanditKiller", "Bri\'ish Killer");
152+
setName("RF_BanditSharpshooter", "Bri\'ish Sharpshoo\'er");
153+
setName("RF_BanditBaron", "Bri\'ish Baron");
154+
155+
setName("RF_SkeletonLightElite", "Ancient Deputy", "Ancient Deputies");
156+
setName("RF_SkeletonMediumElite", "Ancient Palate Cleaner");
157+
setName("RF_SkeletonHeavyLesser", "Ancient Pray-torian");
158+
setName("RF_SkeletonDecanus", "Ancient Decaf");
159+
setName("RF_SkeletonCenturion", "Ancient Capuccino");
160+
setName("RF_SkeletonLegatus", "Ancient Latte");
161+
setName("RF_VampireLord", "Necro Not-Servant");
162+
163+
164+
setName("RF_FootmanHeavy", "Marchy McThud");
165+
setName("RF_BillmanHeavy", "Pointy McReach");
166+
setName("RF_ArbalesterHeavy", "Snipe-y McZoom");
167+
setName("RF_Herald", "Fancy McFlagger");
168+
setName("RF_Marshal", "Blitz McKrieger");
169+
setName("RF_ManAtArms", "Man McArms", "Men McArms");
170+
setName("RF_Fencer", "Speedy McGoGo");
171+
setName("RF_KnightAnointed", "Knighty McAnointy");
172+
setName("RF_Squire", "Suck McQuire");
173+
setName("RF_HeraldsBodyguard", "Fashion McIsta");
174+
}
175+
176+
local entityNamesPage = mod.ModSettings.addPage("EntityNames", "Entity Names");
177+
178+
local keys = [];
179+
foreach (key, entityType in ::Const.EntityType)
180+
{
181+
if (typeof entityType == "integer" && entityType >= 0)
182+
{
183+
keys.push(key);
184+
}
185+
}
186+
187+
keys.sort();
188+
189+
foreach (key in keys)
190+
{
191+
local type = ::Const.EntityType[key];
192+
193+
entityNamesPage.addStringSetting("Name_" + key, ::Const.Strings.EntityName[type], key, "Set a custom name for this entity.")
194+
.addAfterChangeCallback(@( _ ) ::Const.Strings.EntityName[::Const.EntityType[this.getID().slice(5)]] = this.getValue());
195+
196+
entityNamesPage.addStringSetting("NamePlural_" + key, ::Const.Strings.EntityNamePlural[type], key + " Plural", "Set a custom plural name for this entity.")
197+
.addAfterChangeCallback(@( _ ) ::Const.Strings.EntityNamePlural[::Const.EntityType[this.getID().slice(11)]] = this.getValue());
198+
}
199+
}, ::Hooks.QueueBucket.AfterHooks);

0 commit comments

Comments
 (0)