Skip to main content

Commands, permissions & config

Reference for server admins and players of the FactionApi mod itself. Vampirism adds its own commands and options on top; those are covered in the Vampirism wiki.

Commands​

All FactionApi commands live under the root literal /factions (FactionCommands#registerCommands, registered on RegisterCommandsEvent). In non-production (development) environments the aliases /f, /level and /lord also exist.

Permission levels are the vanilla ones (Commands.LEVEL_GAMEMASTERS = 2, LEVEL_ADMINS = 3). A node without a requirement is available to everyone.

CommandLevelEffect
/factions faction set <faction id>2Puts you into the faction at level 1. Only playable factions are offered.
/factions faction set <faction id> level [<level> [<players>]]2Sets the faction level for you or the given players (min. 1; capped at the faction's highest reachable level).
/factions faction set <faction id> lord [<level> [<players>]]2Sets the lord level (default 1) – puts the player into the faction at max level with that lord level; fails if the faction has no lords.
/factions faction get <player>2Prints the player's faction, level and lord level.
/factions skills enable <skill|all> [<player(s)>] [force]3Enables a skill (or all skills of the current faction). Without force the normal unlock rules apply (points, parents, locks); force ignores them.
/factions skills disable <skill|all> [<player(s)>]3Disables a skill, or all skills (all also resets refinements).
/factions skills toggle <skill> [<player>] [force]3Disables the skill if enabled, otherwise enables it.
/factions actions bind <key> <action>–Binds an action to the action key ACTION_1 … ACTION_9 of the executing player (sent to the client as a binding packet).
/factions actions reset [<players>]3Resets all action cooldown/duration timers.
/factions customization gender <gender>–Sets the lord title gender (unknown, male, female) of the executing player.
/factions village capture <faction>2Forces the given faction to start capturing the village at your position.
/factions village abort2Aborts the running capture of the totem near your position.
/factions minion create <faction> [<appearance args…>]2Creates a new minion of the faction's minion entry for yourself. The optional trailing arguments are the entry's MinionAppearances in order (Vampirism's entries use name, skin, use_minion_skin, use_lord_skin). You must be in the faction, be a lord and have a free minion slot.
/factions minion recall [<player>]2Recalls all minions to the player.
/factions minion respawn [<player>]2Respawns minions without an entity (unclaimed).
/factions minion purge [<player>]2Deletes the player's minion controller data (all minions).
/factions minion inventory <minion> list3Lists a minion's inventory.
/factions minion inventory <minion> add <item> [count]3Adds items to a minion's inventory.
/factions minion inventory <minion> remove <item> [count]3Removes items and gives them to you.

The faction ids offered by faction set also include factionapi:neutral (its highest level defaults to 1, so this puts you into the neutral faction at level 1). Use it only for testing.

<minion> uses the custom factionapi:minion_id argument (<player>:<id>, optionally with | name). The suggestions are sent to the client at login, so minions created afterwards only show up after rejoining or reloading. <faction id> tab-completes registered faction ids.

note

<players> accepts an entity selector such as @a (faction set … level/lord, skills enable all, skills disable all, actions reset); <player> is a single player. The optional <player> of skills enable|disable|toggle <skill> and minion recall|respawn|purge defaults to yourself. The force flag of enable/toggle can also be given directly after the skill.

Permissions​

FactionApi can check the NeoForge permission API for some actions. The check is only active if the server option usePermissions is true; otherwise everything is allowed.

Node (PermissionNode)DefaultMeaning
factionapi.actionallowed for everyoneWhether a player may use a faction action. Evaluated with the dynamic context key action (value: the action id, e.g. vampirism:rage), so a permission handler can allow or deny individual actions.
factionapi.checkallowed for everyoneGeneral check node. It is registered but nothing in FactionApi's code currently queries it.

Config​

NeoForge writes the files factionapi-server.toml (per world, serverconfig/) and factionapi-client.toml (config/) using the default naming scheme for a SERVER / CLIENT config. Section names below are the TOML tables.

Server config​

OptionSectionDefaultRangeDescription
villageMaxSpawnableVillagersworld.village300..Maximum number of villagers the totem can respawn.
villageAllowPoiDestructionworld.villagefalse–Allow destroying point-of-interest blocks in faction villages the player does not own.
villageMaximumTotemRadiusworld.village1000..Maximum range of a totem used to grow the village.
raidRandomChanceworld.raid2.77777777778E-40..1Chance per second of a faction raid occurring.
raidPhaseOneDurationworld.raid801..1000Duration of capture phase one, seconds.
raidPhaseTwoMembersForceTargetTimeworld.raid801..1000Seconds into phase two after which capture entities seek a target regardless of distance.
raidNotifyDistanceworld.raid400000..100000Squared distance within which players are notified of a village capture.
raidDisableVillageGuardsworld.raidfalse–Villagers in controlled villages do not turn into guards when attacked.
factionColorInChatfactiontrue–Colour player names in chat by faction.
factionLordPrefixInChatfactiontrue–Prefix the lord title to player names in chat.
factionPvpOnlyBetweenFactionsfactionfalse–PVP only between members of different factions (needs server PVP; "not guaranteed to always protect teammates").
factionUnlockAllSkillsfactionfalse–Allow unlocking all skills when the max level is reached.
factionSkillPointsPerLevelfaction2.01..20Skill points per level-up (other values are unbalanced).
factionSkillPointsPerLordLevelfaction2.01..20Skill points per lord level-up.
minionDeathRecoveryTimefaction.minions2201..Seconds a minion needs to recover after death.
minionPerLordLevelfaction.minions10..100Minions a player may have per lord level.
minionResourceCooldownfaction.minions150020..Ticks between collect-resources loot rolls.
minionOfflineResourceCooldownMultiplierfaction.minions20.01..100000Cooldown multiplier for collect tasks while the owner is offline.
minionCollectFailuresUntilFinishedfaction.minions31..Consecutive collections that do not fit into the inventory before a collect task finishes.
minionEquipmentRepairAmountfaction.minions101..Equipment repair amount when completing resource tasks.
taskDurationSinglePlayerfaction.tasks1201..Minutes a task may take in singleplayer.
taskDurationDedicatedServerfaction.tasks14401..Minutes a task may take on a dedicated server.
taskMasterMaxTasksfaction.tasks31..Maximum tasks shown at a task master (excluding unique tasks).
entitiesIMobadminSMARTALWAYS_IMOB, NEVER_IMOB, SMARTWhether faction entities count as hostile (Enemy) for other mods; SMART falls back to NEVER_IMOB on servers.
preventDebugBoundingBoxesadminfalse–Stops players from enabling debug bounding boxes, which can reveal disguised entities.
usePermissionsadminfalse–Use the NeoForge permission system for permission nodes.
enableFactionLoggingadminfalse–Write a custom log file of specific faction actions (e.g. minion inventory commands). Dedicated server only, needs a restart.

Client config​

OptionSectionDefaultRangeDescription
renderTotemFactionName(root)true–Render the owning faction's name above totem blocks.
addFactionMenuButtonToInventoryguitrue–Add a shortcut button to the faction menu in the inventory screen.
factionMenuButtonXPosgui125intHorizontal offset from the screen centre, px.
factionMenuButtonYPosgui-22intVertical offset from the screen centre, px.
showFactionLevelOverlayoverlaystrue–Show the faction level indicator.
factionLevelOverlayXPosoverlays0-250..250Horizontal offset from the screen centre, px.
factionLevelOverlayYPosoverlays470..270Vertical offset from the bottom, px.
showFactionRaidBarOverlayoverlaystrue–Show the raid bar.
showActionCooldownOverlayoverlaystrue–Show cooldowns of actions in the show_cooldown_in_hud tag.
showActionDurationOverlayoverlaystrue–Show durations of actions in the show_duration_in_hud tag.

Besides the config file, the client keeps per-world preferences (action key bindings, action order, minion task order) which are edited in-game.