2.1 Discussion on AI weapon spam "rate of fire" bug

you want a laser shotgun? sure, take a pulse laser and set the Rounds Per Shot value to 12
Shotgun Laser confirmed? :p

the bug can potentially cause hybrids of almost any two weapons... In my testing I've seen cases of railguns firing like slugshots, cannons firing as fast as multicannons, or my favourite absurd case of a Huge Plasma Accelerator firing every frame because it thought it was a beam laser... Ouch.
Plasmabeam?

Actually both sound like very fun weapons, a shortrange laser shotgun and a deadly plasmabeam

But anyway, thanks for explaining how it works, its interesting to know that
 
I dont get one thing if this rail shot gun or plasma beam were not just visuals doing no extra damage, why power distributor allowed that or why the NPC didnt explode due to enormous heat ?
 
Last edited:
I dont get one thing if this rail shot gun or plasma beam were not just visuals doing no extra damage, why power distributor allowed that or why the NPC didnt explode due to enormous heat ?

because generating heat, power distributor and so on are part of the "other" weapon.
 
Given the speculation about what might be causing this bug, and what it means for the game - I thought I'd clarify a few things on the technical side :). Sadly it wasn't as simple a change as an un-initialised or out of range value, my head would be a lot less hurty this week if it had been!

.... <cut>

Thanks Mark. I love floating pointers too, not.

And thanks for all at FDev for being quick to react, open in their discussions on this, and full of information.
 

Thank you for the wonderful insight. And yes, as a fellow programmer I can feel the pain. Dangling pointer... into valid data. Ouch. For the non-programmers: this is why usually we prefer the program to simply crash instead of continuing somehow. Because that somehow could be anything, even demons coming out of your nose (actual programmer adage :D).

Also interesting to learn that beams do a damage tick every frame. I suppose the damage is scaled according to the FPS then? I can already imagine the initial bugs that implementation might have caused, like VSync sometimes halving or doubling beam laser damage... :D
 
Last edited:
(many many technical details)
Thanks for the elaborate description of the internals & the issue. Also means: your debug builds have no sanity checks (post conditions) in place ;)
I love learning how E : D works under the hood, last years conference vids where very interesting. Please keep up this open form of communication.
it's rather hard to move out of range of yourself after all
You haven't had my grandfather's moonshine yet.
 
Depending on which machine this occurred on exactly it would either be as a visual artefact only that does no damage, or (more rarely but entirely possible) the weapon would *actually* fire 12 shots and carve a burning trail of death through the space in front of it.

ahh, so i saw the slugbeam!
 

Javert

Volunteer Moderator
@Mark a question and a comment:

1) Based on your explanation, would I be right in saying that this should not happen in solo mode? Also should this not happen if you are in a private group that nobody else is in at the time?

2) I've seen multiple reports that engineers still have special effects (e.g. heat attack) even after the server side changes on Tuesday, although the frequency is much reduced. I'm guessing this is a separate thing to the bug you describe above?
 
Dangling pointers aren't all that uncommon (and other programmers may know the pains they can cause!) but in this case the slightly surprising thing was that it would always be a pointer to a valid WeaponData

All pointers are by definition safe, there are however many unsafe ways to use pointers. ;) Thanks for the details, my first thought was "what are the odds of that?".
 
Fantastic write-up, Mark. I understand that you guys must be crazy busy but I'd love it if there were more occasional developer post-mortems like this one; informative, amusing and hopefully enough to quell some of the wilder speculation of which we've all been guilty to varying degrees. Thank you.

It's not 100% clear why nobody was reporting this in beta though - possibly it crept in at the last minute, or possibly the patterns of what players were doing in beta didn't trigger this. I would be interested to know that as well.
Well, much as I don't want to risk derailing this thread towards the Path That Shall Not Be Trodden, I can only offer this anecdote. It may only be beta, but my time is no less important and I have little incentive to spend unnecessary time repeating actions because someone decided to break Wheaton's Law.

So I ended up doing the bulk of my testing in Mobius and Solo, and predominantly testing missions rather than sought-out combat, which is almost certainly why I didn't see any examples of the authority weapon bug. Some players may have similar stories, others will vary. Only FD will have the true figures on who was testing in which mode(s), and while it would be great to see those numbers I don't expect we ever will.

Perhaps the answer is to lock all beta players into Open for at least part of the testing period, even though it might ruffle a few feathers.
 
Fantastic write-up, Mark. I understand that you guys must be crazy busy but I'd love it if there were more occasional developer post-mortems like this one; informative, amusing and hopefully enough to quell some of the wilder speculation of which we've all been guilty to varying degrees. Thank you.


Well, much as I don't want to risk derailing this thread towards the Path That Shall Not Be Trodden, I can only offer this anecdote. It may only be beta, but my time is no less important and I have little incentive to spend unnecessary time repeating actions because someone decided to break Wheaton's Law.

So I ended up doing the bulk of my testing in Mobius and Solo, and predominantly testing missions rather than sought-out combat, which is almost certainly why I didn't see any examples of the authority weapon bug. Some players may have similar stories, others will vary. Only FD will have the true figures on who was testing in which mode(s), and while it would be great to see those numbers I don't expect we ever will.

Perhaps the answer is to lock all beta players into Open for at least part of the testing period, even though it might ruffle a few feathers.

Most of my time in the beta (of which I didn't manage to spend a great deal, to be fair) was spent dealing with the engineers. And procuring fish, rather than blowing up NPCs for rare materials. I didn't think NPC combat was a priority.
 
Much as I love the insane weapons, and part of me likes having the proof that actually the system is hugely flexible... lets add them when we mean to next time! er... Sorry ;)

-Mark

So now we know what the Gunnery crew chief will be doing. Trying to keep the plasma pulse gun trained on target!
 
Exposed pointers...they can be embarrassing when someone catches a peek. Nice reply Mark! Appreciate the candor and explanation that Beam Plasma can be possible along with MC/Frag Cannons...mmmmm which engineer do I go to for this?
 
Given the speculation about what might be causing this bug, and what it means for the game - I thought I'd clarify a few things on the technical side :). Sadly it wasn't as simple a change as an un-initialised or out of range value, my head would be a lot less hurty this week if it had been!

So, to try and explain.
The data for a module in Elite is split up into a set of blocks: things like power consumption, vulnerability to overheating, health, and of particular interest in this case, Weapon data. Weapon data is about 40-50 values controlling everything from the more obvious rate of fire & range, to slightly obscure things like how fast the beam fades after you release the trigger. More or less any combination of values is allowed (you want a laser shotgun? sure, take a pulse laser and set the Rounds Per Shot value to 12). This flow is identical between players and npcs, even stations and skimmers actually.

Prior to 1.6/2.1 the cached pointer each weapon held to its data was a simple affair pointing at a bit of data loaded from resources, but as part of the changes to make items modifiable I had to change this so it could also be a pointer to a block of data constructed from a base item plus a set of modifiers - ideally without the code reading that data caring (or even knowing) where it actually came from and therefore not needing to be rewritten to cope. This all works great in theory, and then in practice, up until a few naughty NPC's got into the mix and decided to make a mess. I'll gloss over a few details here, but the important information is that a specific sequence of events relating to how NPCs transfer authority from one players' machine to another, combined with some performance optimisations and an otherwise minor misunderstanding on my part of one of the slightly obscure networking functions got the weapon into an odd state. The NPC's weapon which should have been a railgun and had all the correct data for a railgun, but the cached pointer to its weapon data was pointing somewhere else. Dangling pointers aren't all that uncommon (and other programmers may know the pains they can cause!) but in this case the slightly surprising thing was that it would always be a pointer to a valid WeaponData - It's correct enough that it'd never have tripped any of the sanity checks or asserts that something was wrong, and yet.. clearly it's not right either!

What did this do exactly? Well in that example the weapon would have thought it was a slugshot: it'd make decisions on ammo, when to fire, how much power to consume and heat to generate as if it were a slugshot. It then tells the game to fire 12 shots but now we're outside the areas that use the cached data, the weapon manager knows its a railgun and dutifully fires 12 railgun shots :p. Depending on which machine this occurred on exactly it would either be as a visual artefact only that does no damage, or (more rarely but entirely possible) the weapon would *actually* fire 12 shots and carve a burning trail of death through the space in front of it. The hilarious part (for people not being aimed at) is that the bug can potentially cause hybrids of almost any two weapons... In my testing I've seen cases of railguns firing like slugshots, cannons firing as fast as multicannons, or my favourite absurd case of a Huge Plasma Accelerator firing every frame because it thought it was a beam laser... Ouch.

Why does this never occur on players? Well AI and players aren't governed by different rules in combat - but one thing AI's do that players never do is transfer authority between machines (it's rather hard to move out of range of yourself after all), which is the trigger at the heart of this bug. Removing modified weapons from NPCs earlier in the week will have reduced the frequency of the problem as it's more-or-less tied to how many modified weapons are in the session, the fix included in the build Zac mentioned coming soon should stamp it the rest of the way out. With the usual caveat of programmers: I fixed the problem I found, can't promise it's the last one!


Much as I love the insane weapons, and part of me likes having the proof that actually the system is hugely flexible... lets add them when we mean to next time! er... Sorry ;)

-Mark


Short term can't you guys just disable the engineer upgrades for the ai?
 
Back
Top Bottom