[MOD] Asteroid collision fix
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
[MOD] Asteroid collision fix
Hi mates,
This tiny mod fix that annoying asteroid collision that made our capships boost trips looks like a pool table. This annoying bug, that had already fixed in old XR versions , was reintroduced in XR 4.0 and also leads to capships long and erratic trips inside asteroid belts. XR4.0 compatible, not yet tested on XR4.10.
link:
https://www.dropbox.com/s/w9owlkgzgindy ... .1.7z?dl=0
Good boosting capships travels!
Rubini.
This tiny mod fix that annoying asteroid collision that made our capships boost trips looks like a pool table. This annoying bug, that had already fixed in old XR versions , was reintroduced in XR 4.0 and also leads to capships long and erratic trips inside asteroid belts. XR4.0 compatible, not yet tested on XR4.10.
link:
https://www.dropbox.com/s/w9owlkgzgindy ... .1.7z?dl=0
Good boosting capships travels!
Rubini.
Last edited by Rubini on Wed, 22. Feb 17, 06:00, edited 2 times in total.
Yes, its my opinion too. What i made is just restore the same behavior as before XR4.0. So, its not a miraculous algorithm, even because I dunno if a real collision avoidance can be made on XR engine. Then again, capships will just pass into the asteroids when boosting (when taking a close external or bridge look).Senner wrote:Yes but ramming into asteroids just seems so unrealistic. It must be because they could not come up with an algorithm that enabled the ships to steer around them.
XR4.0 added two main problems to this issue: the collision itself that brings that pool table feeling - and the bad side effect - sometimes the capships just took hours to travel from a zone to another because it becomes lost on the pool ball effect.
We know that 4.10 is at the door...its a pity that this fix as made too late, but its here.
Well, the link is update. Here at my end capships can now travel again normally into the asteroid fields.
Edited: another already knowing workaround was just to do all zoom out when looking for a capship boosting into asteroid fields...seems that a lod control disables the collison too...but its an annoying solution, if you forgot to zoom all out or just zoom in again...kabum!! And all immersion is lost.
so in short you disable the collision detection for capships while boosting right?
well, with that approach it would also make sense to switch off collision avoidance, because with 4.10 the Ships will slow-boad around the Asteroids which can also take a wille (not as much as he billiard caused by the combined inertia change from several Collisions though)
i personally found an imo even better solution:
this way the Inertia is still applied, but only for one collsision per Asteroid, not several. so only the second or third collision in sequence will throw the Ship off course, and not as much. Also you get nice Fireworks ^^ Fell free to use it - i have n intention to integrate this Snippet from my Nav Scripts into the Vanilla Scripts[/code]
well, with that approach it would also make sense to switch off collision avoidance, because with 4.10 the Ships will slow-boad around the Asteroids which can also take a wille (not as much as he billiard caused by the combined inertia change from several Collisions though)
i personally found an imo even better solution:
Code: Select all
<interrupts>
<handler comment="Exploding Rocks">
<conditions>
<event_object_collided object="this.ship"/>
<check_value value="this.ship.isboostactive"/>
<check_value value="event.param.isclass.asteroid"/>
</conditions>
<actions>
<destroy_object object="event.param" explosion="true"/>
</actions>
</handler>
</interrupts>
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Hi Uni!
It works like a charm!
Anyhow i dont disabled the collision detection at all, see:
Just the response to the collisions was disabled. Also the avoidance. This means that the ship knows that it is colliding and just dont changes its patch.
So, your suggestion works very well with this approach. I even tried it with this one:
Then you cant even see the ships passing thought some asteroids anymore. Well, its hard to say what version is better!
It works like a charm!
Anyhow i dont disabled the collision detection at all, see:
Code: Select all
<disable_collision_response object="this.ship" />
<set_avoid_collisions object="this.ship" enabled="false" />
So, your suggestion works very well with this approach. I even tried it with this one:
Code: Select all
<destroy_object object="event.param" explosion="false"/>
that would be more credible, cap ships would be more like ice breakers moving/breaking everything aside in their path (if they can't seem to navigate correctly around them)
Last edited by ezra-r on Fri, 24. Mar 17, 14:20, edited 1 time in total.
in that case you need a bigger Ship. because the "mass" of each Object seems to be based on its size (recently boosted a bit through Toride with a Balor, and that ship was regularly bounced back a few kms, but for Suls or Rahanas the behavior with my "Asteroid-Blow-Up"-Interrupt resulted in far less bouncing, and an Arawn just plows through seemingly without effect)
i also assume that the bounce-back in Vanilla was applied multiple times per Ship ( before the change with blowing up the Asteroids on first contact), resulting in an unnecesarily huge bounce. but that doesnt matter anymore, i heard EGO is using my variant with blowing up Astros during Boost in 4.10 RC2 - not sure if other measueres are also used (i think in RC1 they were slow-boating around Astros) or if its currently the only one.
i also assume that the bounce-back in Vanilla was applied multiple times per Ship ( before the change with blowing up the Asteroids on first contact), resulting in an unnecesarily huge bounce. but that doesnt matter anymore, i heard EGO is using my variant with blowing up Astros during Boost in 4.10 RC2 - not sure if other measueres are also used (i think in RC1 they were slow-boating around Astros) or if its currently the only one.
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help