Page 1 of 1
Expanded Faction System
Posted: Fri Sep 15, 2017 2:31 pm
by Flasmix
I was wondering, with the talent we have available, if we are able to expand our faction system beyond the standard friendly or hostile system.
I've seen it done, so I know it's possible. On another server that's now gone, it was possible to have PCs and NPCs of one faction and PCs and NPCs of another fight with proper hostility shown for each one.
Being able to do this would enhance the server tremendously so we could have situations where Good (PCs and NPCs) and Evil (PCs and NPCs) are able to actually fight each other.
The code that existed on the other server is long gone. Are any of our current coders able to take on something like this?
Re: Expanded Faction System
Posted: Fri Sep 15, 2017 2:36 pm
by Valefort
Probably yes, what would you use it for ?
Re: Expanded Faction System
Posted: Fri Sep 15, 2017 2:37 pm
by Aspect of Sorrow
Blanket temp values for opposing factions set in the .fac file, assign groups of spawned NPCs to one or the other. There's not much more to it.
Re: Expanded Faction System
Posted: Fri Sep 15, 2017 2:43 pm
by dedude
It can be done. Could be very cool. But it is not just a question of mechanics and code. It requires that the game(server) is designed to support it. Each time you split the server into another faction, that faction needs areas to adventure, cities, shops, etc. It also splits a relatively small server population into even smaller groups. Case in point, underdark and orcs. Former is supported okay-ish, but kept very separate from rest of server, latter lacks a lot of support to be considered a real faction.
Re: Expanded Faction System
Posted: Fri Sep 15, 2017 2:45 pm
by Flasmix
1) Events where a PC wants to work with 'the bad guys'.
2) It makes it possible for us to have Animals not auto-hostile Druids if we wanted to expand it.
3) Expanding on the previous one, if players make allies/enemies of a certain group we can reflect this by having the NPCs hostile or non-hostile to them.
4) We would be able to do large battles with PCs on either side, having their own NPCs to assist without it causing issues.
There's a lot more possibilities that could be pursued. Someone banished from town? Guards could be auto-hostile if they try to enter.
dedude wrote:Each time you split the server into another faction, that faction needs areas to adventure, cities, shops, etc. It also splits a relatively small server population into even smaller groups. Case in point, underdark and orcs. Former is supported okay-ish, but kept very separate from rest of server, latter lacks a lot of support to be considered a real faction.
It's not meant to be used in that manner. Every player will have the default faction of 'Adventurer' for example, which is exactly what the current server is set to.
If the player gets a token of say, 'Enemy of BG', all guard NPCs are auto-hostile and shopkeepers will not do business with them. This would require an NPC overhaul so the guards are not level 1 fighters, it needs to be deadly to enter the city.
Furthermore, additional factions of 'Red' and 'Blue' for instance would be used for DM events. Team Red and Team Blue are auto-hostile to one another.
Re: Expanded Faction System
Posted: Fri Sep 15, 2017 2:47 pm
by Dagesh
I once set up on a nwn1 server a faction system for each city which applied a reputation to each. Pickpockets would lose rep if seen, pc or npc. Too low rep would equal attack on sight and merchants refused to trade with you.
To get it fixed you paid a fine.
Re: Expanded Faction System
Posted: Fri Sep 15, 2017 2:53 pm
by Flasmix
The more I think of it, I think it was a token based system that influenced how other NPCs perceived you.
Re: Expanded Faction System
Posted: Fri Sep 15, 2017 3:19 pm
by Face
Flasmix wrote:1) Events where a PC wants to work with 'the bad guys'.
2) It makes it possible for us to have Animals not auto-hostile Druids if we wanted to expand it.
3) Expanding on the previous one, if players make allies/enemies of a certain group we can reflect this by having the NPCs hostile or non-hostile to them.
4) We would be able to do large battles with PCs on either side, having their own NPCs to assist without it causing issues.
There's a lot more possibilities that could be pursued. Someone banished from town? Guards could be auto-hostile if they try to enter.
dedude wrote:Each time you split the server into another faction, that faction needs areas to adventure, cities, shops, etc. It also splits a relatively small server population into even smaller groups. Case in point, underdark and orcs. Former is supported okay-ish, but kept very separate from rest of server, latter lacks a lot of support to be considered a real faction.
It's not meant to be used in that manner. Every player will have the default faction of 'Adventurer' for example, which is exactly what the current server is set to.
If the player gets a token of say, 'Enemy of BG', all guard NPCs are auto-hostile and shopkeepers will not do business with them. This would require an NPC overhaul so the guards are not level 1 fighters, it needs to be deadly to enter the city.
Furthermore, additional factions of 'Red' and 'Blue' for instance would be used for DM events. Team Red and Team Blue are auto-hostile to one another.
This sounds like it could be alot of fun.
Re: Expanded Faction System
Posted: Fri Sep 15, 2017 3:21 pm
by Nachti
An character item with local ints = factions and a script within the heartbeat script of creatures that checks for faction scores. If not high enough, the heartbeat script turns them from friendly to hostile. Though I am not sure if it would turn hostile for every PC or just the one.
Or a DM token applied to creatures that assigns the creature toward a faction
- Racial: Elven, Demons, Devils, Celestials, Undead, Hobbit,...
- RP: Event Group 1, Event Group 2
Re: Expanded Faction System
Posted: Fri Sep 15, 2017 3:28 pm
by Aspect of Sorrow
Take all considerations of HB scripts off the table.
This is also only for DM events.
Re: Expanded Faction System
Posted: Fri Sep 15, 2017 3:31 pm
by Dagesh
Aspect of Sorrow wrote:Take all considerations of HB scripts off the table.
This is also only for DM events.
This.
But you can still use the OnPerceived event which most regular AI has anyways. Easy enough to hook into.
edit: I wouldn't mind see it expanded beyond DM events.
Re: Expanded Faction System
Posted: Fri Sep 15, 2017 3:35 pm
by Aspect of Sorrow
Yes, onperceived is the only hook this should apply to.
We can stretch this beyond DM events only, but for right now baby steps as the faction system is at present is one of the most unreliable of all of the vanilla features in NWN 1 & 2. We can iterate into controls for fixing faction issues on the fly and iron out those bugs first DM side specifics before we smack the module with an incomplete and thoroughly untested concept where we all can acknowledge prod has some strange antics.
Re: Expanded Faction System
Posted: Fri Sep 15, 2017 3:52 pm
by Nachti
Btw. The server Sigil has a faction system within the abyss.
Demons and Devils. Both fight each other there.
Its done via two new factions ,which creatures are assigend to, within the toolset and it works pretty well.