Space Engineers

Space Engineers

Lagless Drills (OBSOLETE)
DanP  [개발자] 2015년 5월 16일 오후 5시 00분
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.
DanP 님이 마지막으로 수정; 2015년 5월 16일 오후 5시 01분
< >
전체 댓글 3개 중 1~3개 표시 중
Colqhoun 2015년 5월 16일 오후 11시 05분 
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  [개발자] 2015년 5월 17일 오후 3시 44분 
Rubricant, you might also look into raycasting directly if the projectiles do not work. Good luck!
Siro 2015년 5월 19일 오후 1시 07분 
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.
< >
전체 댓글 3개 중 1~3개 표시 중
페이지당 표시 개수: 1530 50