Mod generation tool for Civilization 7.
- Mod info
- Import custom files
- Localization
- English
- Internalization
- Units
- Civilizations
- Civilization unlocks
- Leader unlocks
- Constructibles
- Base building
- Improvement
- Unique quarter
- City names
- Civics
- Traditions
- Game Effects
- Great People nodes(+builder?)
- AI nodes(+builder?)
- Unit abilities nodes(+builder?)
- Wonder nodes(+builder?)
- ???
Download repo ZIP file or clone:
clone https://github.com/izica/civ7-modding-toolsbuild.ts contains all the necessary code to get started, so you can begin by modifying it to fit your needs. Also you can copy an example from the examples folder into build.ts.
Then, run the following commands:
npm install
npm run buildnpm install civ7-modding-toolsimport { Mod } from 'civ7-modding-tools';
// or you can import from 'civ7-modding-tools/src' for full typescript source
let mod = new Mod({
id: 'test-mod',
version: '1',
});
/* ... */
mod.build('./dist');To build mod you need to run your script with node.js or tsx;
tsx build.tsconst mod = new Mod({
id: 'mod-test',
version: '1',
});
const unit = new UnitBuilder({
actionGroupBundle: ACTION_GROUP_BUNDLE.AGE_ANTIQUITY,
typeTags: [UNIT_CLASS.RECON, UNIT_CLASS.RECON_ABILITIES],
unit: {
unitType: 'UNIT_CUSTOM_SCOUT',
baseMoves: 2,
baseSightRange: 10,
},
unitCost: { cost: 20 },
unitStat: { combat: 0 },
unitReplace: { replacesUnitType: UNIT.SCOUT },
visualRemap: { to: UNIT.ARMY_COMMANDER },
localizations: [
{ name: 'Custom scout', description: 'test description' }
],
});
mod.add([unit]).build('./dist');const mod = new Mod({
id: 'mod-test',
version: '1',
});
const unit = new UnitNode({
unitType: 'UNIT_CUSTOM_SCOUT',
baseMoves: 2,
baseSightRange: 10,
})
const database = new DatabaseNode({
types: [
new TypeNode({ type: unit.unitType, kind: KIND.UNIT })
],
units: [unit]
});
const unitFile = new XmlFile({
path: `/units/${unit.unitType}.xml`,
name: 'unit.xml',
content: database.toXmlElement(),
actionGroups: [ACTION_GROUP.AGE_ANTIQUITY_CURRENT],
actionGroupActions: [ACTION_GROUP_ACTION.UPDATE_DATABASE]
});
mod.addFiles([unitFile]).build('./dist');
