Space Engineers

Space Engineers

Lagless Drills (OBSOLETE)
DanP  [developer] 16 May, 2015 @ 5:00pm
Particle Effects, Dust Clouds, etc
For everyone asking about particle effects, dust clouds, etc:

Keen does not allow mods to access the particle effect manager that the vanilla drills use. I have found no tutorials, no examples, and no other code structures that look like they have anything to do with creating particle effects. As far as I can tell, at this point it is simply not possible to use the effects without also using the laggy vanilla logic.

If you can find an example to the contrary, please do let me know.
Last edited by DanP; 16 May, 2015 @ 5:01pm
< >
Showing 1-3 of 3 comments
Colqhoun 16 May, 2015 @ 11:05pm 
I've been going through the code in hopes of creating a Strip Mining Laser Turret similar to what is used in EVE online. I found code in the ammunition definitions for damage type drill. I was very excited until I realized that it is likely related to the particle effect you are referring to... and even less enthused when I realized I was looking at something well outside of the ModAPI boundaries.

Second enum if interested:
https://github.com/KeenSoftwareHouse/SpaceEngineers/blob/master/Sources/Sandbox.Common/ObjectBuilders/Definitions/MyObjectBuilder_AmmoDefinition.cs

However, after looking at your lagless drill code I think I may have found what I need... if MyEntities includes projectiles, and if I can find their parent weapon. Not sure projectiles have a child-parent relationship with the weapon that fired them.
DanP  [developer] 17 May, 2015 @ 3:44pm 
Rubricant, you might also look into raycasting directly if the projectiles do not work. Good luck!
Siro 19 May, 2015 @ 1:07pm 
Definitely check out Keen's github. The particle effect is enumerated in the definition of MyShipDrill.
m_drillBase = new MyDrillBase(this,
MyDrillConstants.DRILL_SHIP_DUST_EFFECT,
MyDrillConstants.DRILL_SHIP_DUST_STONES_EFFECT,
MyDrillConstants.DRILL_SHIP_SPARKS_EFFECT,
new MyDrillSensorSphere(def.SensorRadius, def.SensorOffset),
new MyDrillCutOut(def.SensorOffset , def.SensorRadius),
HEAD_SLOWDOWN_TIME_IN_SECONDS,
floatingObjectSpawnOffset: -0.4f,
floatingObjectSpawnRadius: 0.4f,
sounds: m_sounds,
inventoryCollectionRatio: 0.7f
);

I've been staring at the same code for hours now trying to figure out how to modify the implementation in a way that allows for dynamically changing SensorRadius and SensorOffset to add a new drill upgrade type (and possibly integrate lagless drills w/ other mods without sweeping changes in other mods). Still not having any luck with figuring out how to access/override it without modifying the base class (as a steam compatible mod).

Honestly might have better luck putting in a pull request to keen's github to expose the drill definition to the mod api. But your code, your call.
< >
Showing 1-3 of 3 comments
Per page: 1530 50