An improvement suggestion: Optionally, the guard will not protect the PC if this guard is dedicated to the hostile NPC faction, and PC isn't of a higher rank (than the NPC, and in this faction).
Edit: example: imperial guards are dedicated to Census and Excise, East Empire Company (?), Imperial Cult, Imperial Knights, and Imperial Legion (+ Fighters Guild and Mages Guild ?)
Edit2: better idea: if this guard is dedicated to the hostile NPC faction, he will fight the PC.
I made my improvements for my personal use: i edited the aggressor.lua and player.lua files: Now, each legit guard will fight player instead of the aggressor in the following cases:
- guard faction is "imperial legion", "census and excise", "imperial cult", "imperial knights", "royal guard", or "east empire company"; and aggressor faction is one of these too; and player doesn't have a rank higher in one of these factions than the aggressor
- or guard faction is "temple" or "redoran"; and aggressor faction is one of these too; and player doesn't have a rank higher in one of these factions than the aggressor
- or guard faction is "hlaalu"; and aggressor faction is hlaalu too; and player doesn't have a hlaalu rank higher than the aggressor
- or guard faction is "telvanni"; and aggressor faction is telvanni too; and player doesn't have a telvanni rank higher than the aggressor
- or guard faction is "skaal"; and aggressor faction is skaal too; and player doesn't have a skaal rank higher than the aggressor
- or guard is from another faction; and aggressor faction is the same; and player doesn't have rank higher than the aggressor (in this faction).
Furthermore, guards will also intervene in a fight between 2 NPC! (with the same rules as above)
Thank you kuyondo. Do you want to integrate it to your mod? Or do you prefer i publish the modified files as an extension to your mod? Or do you prefer i let it as an "unofficial" publishing as it is now?
Honestly, needs a delay before they come in when you have a fight inside (10-15 seconds at least?). Them instant transmissioning inside the instant someone is hit is a bit much.
The "Search Guard Distance" is the distance between the guard and the PC; if the hostile NPC is far far away, the guard will still running across countrysides, mountains, seas, to get the hostile NPC... Example: if the PC is attacked by a NPC in Balmora, and if the PC teleport himself to Fort Moonmoth, then the guards around the PC in Fort Moonmoth begin to run to the NPC in Balmora...
Examples of solutions by changing the "Search Guard Distance" definition:
- distance between the guard and the PC -> distance between the guard and the hostile NPC
- or: distance between the guard and the PC, and distance between the guard and the hostile NPC
Some strange thing happens when guards attack various daedra brought to them - atronachs, daedroths, dremoras, golden saints, skamps, winged twilighs etc. Guards unequip their swords and attack these creatures with bare fists although their swords are still in quite good condition. Meanwhile the same guards fight all other foes normally, with their weapons equipped - all other creatures and evil NPCs. Can it be fixed so that guards wouldn't go bonkers but attack daedras with their equipped weapons too as expected?
Indeed, I've just figured it out recalling that I lately read about daedra and that feature of them on uesp. Sorry, my fault. Just tested it in regular Morrowind bringing Golden Saint to Balmora and there Hlaalu guards attacked her with their swords to no avail whereas she gradually dealt with them one by one. I wonder what mod or patch makes guards to use their brain and accordingly the best weapon against daedra.
Is it possible to explain why such changing guard weapons to ones capable of causing damage to daedra isn't compatible with your mod or you would have to delve into depths of technical details incomprehensible to an average player?
And what if we do it differently and do not equip the guards with weapons against daedra, but instead remove daedra’s immunity to ordinary weapons in CS, so that guards could successfully cause damage to daedra - is this compatible with your mod? Thank you.
Could you maybe add a blacklist for certain creature types?
I don't think it looks great when guards are frantically swimming and diving into the water when a sea creature attacks. So that way i could add slaughterfish etc manually
142 comments
Optionally, the guard will not protect the PC if this guard is dedicated to the hostile NPC faction, and PC isn't of a higher rank (than the NPC, and in this faction).
Edit: example: imperial guards are dedicated to Census and Excise, East Empire Company (?), Imperial Cult, Imperial Knights, and Imperial Legion (+ Fighters Guild and Mages Guild ?)
Edit2: better idea: if this guard is dedicated to the hostile NPC faction, he will fight the PC.
I made my improvements for my personal use: i edited the aggressor.lua and player.lua files:
Now, each legit guard will fight player instead of the aggressor in the following cases:
- guard faction is "imperial legion", "census and excise", "imperial cult", "imperial knights", "royal guard", or "east empire company"; and aggressor faction is one of these too; and player doesn't have a rank higher in one of these factions than the aggressor
- or guard faction is "temple" or "redoran"; and aggressor faction is one of these too; and player doesn't have a rank higher in one of these factions than the aggressor
- or guard faction is "hlaalu"; and aggressor faction is hlaalu too; and player doesn't have a hlaalu rank higher than the aggressor
- or guard faction is "telvanni"; and aggressor faction is telvanni too; and player doesn't have a telvanni rank higher than the aggressor
- or guard faction is "skaal"; and aggressor faction is skaal too; and player doesn't have a skaal rank higher than the aggressor
- or guard is from another faction; and aggressor faction is the same; and player doesn't have rank higher than the aggressor (in this faction).
Furthermore, guards will also intervene in a fight between 2 NPC! (with the same rules as above)
This is my player.lua file: https://ti1ca.com/Album-player.lua-agdnbaf9This is my modified files: https://ti1ca.com/Album-PG-factions-additions-fdioaltb
Perhaps my software code is awful, but it works.
I like the result and i don't see FPS drop.
If you're interessed, you can use/edit/... as you want.
PS: i recommand this mod: NPC Faction Affiliation Corrector
Do you want to integrate it to your mod? Or do you prefer i publish the modified files as an extension to your mod? Or do you prefer i let it as an "unofficial" publishing as it is now?
I won't be integrating it to Protective Guards though.. At least not in the near future..
If you don't agree, and you want i withdraw my mod, just tell me and i will do it.
The "Search Guard Distance" is the distance between the guard and the PC; if the hostile NPC is far far away, the guard will still running across countrysides, mountains, seas, to get the hostile NPC...
Example: if the PC is attacked by a NPC in Balmora, and if the PC teleport himself to Fort Moonmoth, then the guards around the PC in Fort Moonmoth begin to run to the NPC in Balmora...
Examples of solutions by changing the "Search Guard Distance" definition:
-
distance between the guard and the PC-> distance between the guard and the hostile NPC- or: distance between the guard and the PC, and distance between the guard and the hostile NPC
I don't know how hard it is to implement.
actor.position - self.position
byactor.position - e.actor.position
Maybe it would be a good idea to add that to the mods description?
one way is to have guards use high quality or enchanted weapons, such as glass, ebony, daedric, silver weapons. but such patches doesnt fit this mod.
And what if we do it differently and do not equip the guards with weapons against daedra, but instead remove daedra’s immunity to ordinary weapons in CS, so that guards could successfully cause damage to daedra - is this compatible with your mod? Thank you.
I don't think it looks great when guards are frantically swimming and diving into the water when a sea creature attacks. So that way i could add slaughterfish etc manually
Guards attacking creatures are hardcoded into the game engine and is also morrowind behaviour, not this mod..
To properly achieve your request, the combat mechanics (implemented in the engine) has to be dehardcoded, it's currently a WIP.