Deja Vu - face your own mechs in contracts

DejaVu

v1.1.0.0 and higher requires modtek v3 or higher

This is a relatively simple mod that lets player face their own creations in combat. Whenever the player drops a unit, the MechDef for that unit is saved and, on mission complete, exported to MechDef and ChassisDef jsons that will then be loaded as normal mech variants the next time the game is loaded and added to the potential spawn pool.

Before export, the custom mechs are checked against existing mechs in order to avoid duplication. Variant names are also appended with a random 2-character string to further distinguish these mechs when encountered in the wild. E.g., a player-customized variant of the Hunchback HBK-4G might be saved as HBK-4G-2W. These custom mechs will have the same unit tags as their originating variant. Finally, the mech inventory of the custom mech is checked against the inventory of all existing variants; if a duplicate is found, the mech is not exported.

Depends On CustomComponents and CustomUnits

Settings

	"Settings": {
		"enableLogging": true,
		"trace": false,
		"killsToSave": 0,
		"enableMechBayExport": true,
		"disallowedComponentTags": [
			"range_standard"
			],
		"disallowedUnitTags": [
			"mech_heavy"
			],
		"clearMechTags": true,
		"customChassisTags":[
			"thisisacustomChassisTag"
			],
		"customMechTags":[
			"thisisacustomMechTag"
			]
	}

enableLogging: bool, enables logging

trace: bool, enables verbose logging (not recommended to enable)

killsToSave: int, set a minimum number of kills a unit must get during the mission in order to be exported. If set to -1, all exporting of units dropped in contracts is disabled.

enableMechBayExport: bool. if true; holding shift while clicking ā€œvalidateā€ in the MechLab will manually export that unit if that unit is a valid loadout (no ā€œunfieldableā€ warnings and mech name is not blank).

disallowedComponentTags: List of mech ComponentTags which, if present on the mech, will prevent that mech from being exported.

disallowedUnitTags: same as above, but mechdef or chassisdef tags.

clearMechTags: bool. if true, all MechTags and ChassisTags will be cleared from the exported unit.

customChassisTags: List; if clearMechTags = true, the exported mechs ChassisTags will be replaced with these

customMechTags: List; if clearMechTags = true, the exported mechs MechTags will be replaced with these

Always get the latest release and documentation on from github: GitHub - ajkroeg/DejaVu

Iā€™ve been having a bear of a time with this mod mostly with the Custom modsā€¦ Custom Components requires custom etc, etc, and etc. I did some editing and troubleshooting and was able to revoke the other dependencies in a vanilla install of the game along with mods. I figure someone might want to know that this CAN be doneā€¦ however any mod that uses mech engineer for more detailed mech building is going to be yanking their hair out. I know, Iā€™ve tried. But Iā€™m no coder and I only have a very basic understanding of game engine syntax. Maybe there is something you could do to make the mod more ID-10-T error proof?

Honestly forgot I uploaded this here. Just get the latest release from github, it has no dependencies aside from requiring you to use modtek v3 or higher.

1 Like