Talk:Faking Dynamic Variables With Factions
Jump to navigation
Jump to search
Potential Uses[edit source]
smashing good idea. i just need a reason to use it...--Snake 06:11, 21 June 2006 (EDT)
- Let's see, a few ideas ...
- Remembering the last time an NPC spoke to the player, or talked about a specific topic, and using it in the dialogue to select an appropriate response. Due to the limited range of a faction rank value, you can only reliably store the week those two last spoke with each other in a single faction rank, though.
- Creating a "local fame" and "local infamy" factions, and giving other "local" factions like ChorrolFaction or AnvilFaction a reaction modifier of +1/-1 (or more - remember, the actual modifier is this value times the faction rank) to them.
- Flags for various things, like if an NPCs witnessed something (a crime, the player walking through a specific door, and so on). This can be used for various things, among other things dialogue. Another example would be a "Did this (N)PC have contact with diseased NPC X?" flag, which would get checked by a quest script to see which NPCs are infected.
- Counters, like the article suggests, for example for the numbers of goblins this NPC killed, to direct the revenge at a specific NPC, without him needing any special scripts and without actually knowing anything about this NPC besides him being in the general area (checked via a scripted spell effect fired off an activator) and being the one with the biggest "goblins killed" count around.
- All this works without changing the NPCs themselves, and so is very useful for ensuring mod compatibility. --Khadir 08:01, 21 June 2006 (EDT)
Can a faction be used to store a variable per actor?[edit source]
It seems that different actors of the same base share the same faction according to the info on CS Wiki.
- Yes, faction rank is stored on the base object. Also, flagging NPCs by way of faction can have unwanted side effects, for example when SameFaction occurs in a dialog or script condition. Scruggs 12:03, 5 December 2007 (EST)
Deprecated[edit source]
I'm marking this as a deprecated article. Someone else may want to reverse this, but I would suggest that this only be done if someone is actually using this.
Problems:
- First, I'm assuming that this is not just being used for signaling, but instead is being used specifically for variable representation.
- Faction rank is stored on base object, not on actor. (Although this wouldn't be a problem for vanilla non-generic characters, there are a number of mods which add generic (and non-aggressive) NPCs -- e.g. Crowded Cities.)
- It seems kludgey. Seems that for most practical uses, you would end up using a different technique.
- Upper limit of 127. If you're counting, this limit is rather close.
- Locks the NPCs factions against changes by mods. Since the changes are done ingame, they trump any changes to factions made in mods once the npcs faction is set.
--Wrye 23:07, 31 May 2008 (EDT)