Skip to main content

setFactionRelation

An eventCall to force an emotion between an instigating and target faction in an idEncounterManager.

Usage

item[0] = {
	eventCall = {
		eventDef = "setFactionRelation";
		args = {
			num = 4;
			item[0] = {
				eEncounterSpawnType_t = ""; // instigatorSpawnType
			}
			item[1] = {
				string = ""; // groupLabel
			}
			item[2] = {
				eEncounterSpawnType_t = ""; // targetSpawnType
			}
			item[3] = {
				socialEmotion_t = ""; // relation
			}
		}
	}
}
  • instigatorSpawnType is the ai type for the instigator.
  • targetSpawnType is the ai type for the target.
  • relation is the socialEmotion_t (emotion) that the instigator feels towards the target.

The set emotion is only for the instigator towards the target. The target does not automatically reciprocate the same set emotion.

Example Usage

item[0] = {
	eventCall = {
		eventDef = "setFactionRelation";
		args = {
			num = 4;
			item[0] = {
				eEncounterSpawnType_t = "ENCOUNTER_SPAWN_BARON"; // instigatorSpawnType
			}
			item[1] = {
				string = ""; // groupLabel
			}
			item[2] = {
				eEncounterSpawnType_t = "ENCOUNTER_SPAWN_IMP ENCOUNTER_SPAWN_HELL_SOLDIER"; // targetSpawnType
			}
			item[3] = {
				socialEmotion_t = "EMOTION_DESTROY_AT_ALL_COSTS"; // relation
			}
		}
	}
}
item[1] = {
	eventCall = {
		eventDef = "setFactionRelation";
		args = {
			num = 4;
			item[0] = {
				eEncounterSpawnType_t = "ENCOUNTER_SPAWN_IMP ENCOUNTER_SPAWN_HELL_SOLDIER"; // instigatorSpawnType
			}
			item[1] = {
				string = ""; // groupLabel
			}
			item[2] = {
				eEncounterSpawnType_t = "ENCOUNTER_SPAWN_BARON"; // targetSpawnType
			}
			item[3] = {
				socialEmotion_t = "EMOTION_DESTROY_AT_ALL_COSTS"; // relation
			}
		}
	}
}

In this example, Barons are set to EMOTION_DESTROY_AT_ALL_COSTS against Imps/Soldiers, and vice versa. This results in forced infighting between Barons and Imps/Soldiers.

See Also