532
edits
(respond) |
(Added what I've found from looking at the code) |
||
Line 34: | Line 34: | ||
:<li>FWIW I don't think becoming tech scannable or EMPable is worth highlighting; it's not clear to me that there's a case where <code>ModOverloaded</code> could be applied where those weren't already the case.</li> | :<li>FWIW I don't think becoming tech scannable or EMPable is worth highlighting; it's not clear to me that there's a case where <code>ModOverloaded</code> could be applied where those weren't already the case.</li> | ||
:<li>Also FWIW, the original line for that message is <code>Messaging.XDidY(Object, "overheat", terminalPunctuation: "!", SubjectPossessedBy: who, UseVisibilityOf: who);</code>. What the decompiler is doing to it is pretty hideous. --[[User:Chaos|Chaos]] ([[User talk:Chaos|talk]]) 03:30, 2 August 2021 (UTC)</li> | :<li>Also FWIW, the original line for that message is <code>Messaging.XDidY(Object, "overheat", terminalPunctuation: "!", SubjectPossessedBy: who, UseVisibilityOf: who);</code>. What the decompiler is doing to it is pretty hideous. --[[User:Chaos|Chaos]] ([[User talk:Chaos|talk]]) 03:30, 2 August 2021 (UTC)</li> | ||
== More Notes == | |||
Looking at the decompilation, it seems like the only material effect of Overloaded is adding 300 to the power load level of the object: | |||
<pre> | |||
public override bool HandleEvent(GetPowerLoadLevelEvent E) | |||
{ | |||
E.Level += 300; | |||
return base.HandleEvent(E); | |||
} | |||
</pre> | |||
GameObject has a method GetPowerLoadLevel(), which just calls GetPowerLoadLevelEvent.GetFor with Level empty, as seen below: | |||
<pre> | |||
public static int GetFor(GameObject Object, int Level = 100) | |||
{ | |||
bool flag = true; | |||
if (flag && GameObject.validate(ref Object) && Object.HasRegisteredEvent("GetPowerLoadLevel")) | |||
{ | |||
Event E = Event.New("GetPowerLoadLevel"); | |||
E.SetParameter(nameof (Object), (object) Object); | |||
E.SetParameter(nameof (Level), Level); | |||
flag = Object.FireEvent(E); | |||
Level = E.GetIntParameter(nameof (Level)); | |||
} | |||
if (flag && GameObject.validate(ref Object) && Object.WantEvent(GetPowerLoadLevelEvent.ID, MinEvent.CascadeLevel)) | |||
{ | |||
GetPowerLoadLevelEvent E = GetPowerLoadLevelEvent.FromPool(); | |||
E.Object = Object; | |||
E.Level = Level; | |||
Object.HandleEvent<GetPowerLoadLevelEvent>(E); | |||
Level = E.Level; | |||
} | |||
return Level; | |||
} | |||
} | |||
</pre> | |||
So the default power load level is 100, meaning Overloaded multiplies it by 4 (I can't find anything that calls GetFor with anything other than the default Level). This mostly just multiplies charge usage by 4 (though I haven't verified this in general, it's the case everywhere I've checked). It seems like most things that use it go through <code>XRL.World.IComponent</code>'s MyPowerLoadBonus(), which gives a bonus of (Load - Baseline)/Divisor, with Baseline being default 100 and Divisor being default 150. So the default for a power load level of 400 gives a bonus of 2. The bonus seems to be usually additive (added to radius of light sources, strength of reality stabilization, and I cannot for the life of me decipher the missile weapon damage adjustment code but it <i>looks</i> like it adds to that as well, and empirically it seems to add 2 to the damage roll). It gets more complicated for stuff like gas generation (seems to add 30% to density?) and so on. | |||
[[User:Illuminatiswag|Illuminatiswag]] ([[User talk:Illuminatiswag|talk]]) 04:14, 17 September 2021 (UTC) |