Crime System
Re: Crime System
The bug is that executing AI setting functions such as "SetFight X" changes this setting on every single instance of this object in the game, instead of just the instance that the script is being executed on.
- silentthief
- Posts: 456
- Joined: 18 Apr 2013, 01:20
- Location: Currently traversing the Ascadian Isles
Re: Crime System
As well as wearing the indoril armor, this is also a reaction of the main quest/dialog when you claim to be "the incarnate". In fact, IIRC you can talk to the temple archanon Saryoni about stopping attacks: http://www.uesp.net/wiki/Morrowind:Cont ... Ordinatorsscrawl wrote:...There is no way to get off that "ordinator deathlist" once you are on it.
ST
Last edited by silentthief on 21 Apr 2014, 03:36, edited 1 time in total.
Re: Crime System
Scrawl, I'm not sure there's anything we can do to fix that, as it's just as likely that some scripts use SetFight to change all instances of an object. And the Fight setting is part of the base object, so you can't really change it on a single reference (it's like trying to set a static class variable only for a specific class instance).
Re: Crime System
The AiSettings are part of CreatureStats, so they are changeable only for a specific instance:
Changing anything on a base object is impossible in OpenMW's design, because the ESM classes are read-only.
Code: Select all
enum AiSetting
{
AI_Hello = 0,
AI_Fight = 1,
AI_Flee = 2,
AI_Alarm = 3
};
void setAiSetting (AiSetting index, Stat<int> value);
void setAiSetting (AiSetting index, int base);
Stat<int> getAiSetting (AiSetting index) const;
Re: Crime System
I'm not sure it should be that way. The Fight/Alarm/Flee settings are part of the (base) NPC_ record, and given the way SetFight affects all actors based on the same NPC_ record, the data is apparently part of the base object that gets shared with individual references. If our "live" references don't share any mutable data, then I think this is a flaw in the design that's going to cause compatibility problems (not to mention wastes memory).scrawl wrote:The AiSettings are part of CreatureStats, so they are changeable only for a specific instance:
Code: Select all
enum AiSetting { AI_Hello = 0, AI_Fight = 1, AI_Flee = 2, AI_Alarm = 3 }; void setAiSetting (AiSetting index, Stat<int> value); void setAiSetting (AiSetting index, int base); Stat<int> getAiSetting (AiSetting index) const;
Re: Crime System
About this bug report
https://bugs.openmw.org/issues/2798
What would be the solution for this?
- coding setfight to go through every instance of the type in the world (save)
- code an overriding variable that will be tied to esm-reading, like a workaround through the fact that base object can't be changed. Variable doesn't do anything by default, but when called by script, it will override every creature coming from base object.
- letting openmw go different path here
- coding something special to happen to, if WearingOrdinatorUni is 1.
About the WearingOrdinatorUni variable that gets changed in script OrdinatorUniform: I can't find anything related to that variable anywhere in the OpenMW project, yet ordinators do attack. Can't find the script from esm-files either, but I don't have proper search tools anyway.
https://bugs.openmw.org/issues/2798
What would be the solution for this?
- coding setfight to go through every instance of the type in the world (save)
- code an overriding variable that will be tied to esm-reading, like a workaround through the fact that base object can't be changed. Variable doesn't do anything by default, but when called by script, it will override every creature coming from base object.
- letting openmw go different path here
- coding something special to happen to, if WearingOrdinatorUni is 1.
About the WearingOrdinatorUni variable that gets changed in script OrdinatorUniform: I can't find anything related to that variable anywhere in the OpenMW project, yet ordinators do attack. Can't find the script from esm-files either, but I don't have proper search tools anyway.
- Thunderforge
- Posts: 503
- Joined: 06 Jun 2017, 05:57
Re: Crime System
Could it have been something that was hardcoded into the vanilla exe, rather than in the esm? I recall reading somewhere that corprus worked that way.unelsson wrote: ↑23 Mar 2018, 23:04 About the WearingOrdinatorUni variable that gets changed in script OrdinatorUniform: I can't find anything related to that variable anywhere in the OpenMW project, yet ordinators do attack. Can't find the script from esm-files either, but I don't have proper search tools anyway.
Re: Crime System
Ordinators attacking PC, if they greet 'em while wearing Indoril armor, is fully scripted, there's no need to refer it in OpenMW code.