Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addVisualEffect returning effect w/ collisionRadius === 0 #255

Open
cag62 opened this issue Sep 4, 2017 · 2 comments
Open

addVisualEffect returning effect w/ collisionRadius === 0 #255

cag62 opened this issue Sep 4, 2017 · 2 comments

Comments

@cag62
Copy link

cag62 commented Sep 4, 2017

The effectKey I'm passing is that of a ship in player.ship.target
This work fine most of the time, even returning null when it fails. But some ships not mentioned in my effectdata.plist file return a visualEffect w/ a 0 collisionRadius.
What Norby did (I'm rewriting telescope, btw) was grab the contents of
Oolite\oolite.app\Resources\Config\shipdata.plist
and change all 'like_ship' property names to 'like_effect'. This should not have been necessary, right?
If you can render a ship in space, its dataKey should be all you need to create an effect, or am I missing something?

I'm running 'development version 1.85.0.6992-170819-0119485 (x86-64 test release) under Windows 6.1.7600 64-bit' with 2 ship oxp's;
oolite.oxp.CaptSolo.Cobra_Mk3-XT.oxz
oolite.oxp.Norby.HardShips.oxz

The "Cobra Mark III-XT" fails on dataKeys 'cobra3-xt', 'cobra3' & 'cobra', getting null each time.
It has no effectdata.plist file.

But the HardShips' "Hard Adder" succeeds w/ dataKey 'hard-adder', getting a visualEffect w/ its collisionRadius = 0. Turns out that Norby did what he did in telescope, duplicate his shipdata.plist
but this time he forgot to change 'like_ship' to 'like_effect'. This may explain why I'm getting whacky visualEffects.

But none of this should be necessary, as the shipdata has all the info you need to make an effect. Otherwise, I'd need effectdata on every ship from every oxp! If anyone's considering an oxp that serves up ship graphics (camera probe, target damage assessment and yes, telescope), that a tall order. In figuring this out, my effectdata file is over 890 kB for 30 oxps.

@Norbylite
Copy link
Contributor

Anno I asked something similar from core developers but I gon an answer that not enough easy to improve the code to allow creating visualeffects from ship objects, so I was must implement an oxp level solution and make a copy into effectdata. Much later we got an addCollisionException function to ship objects, so in a rewrite you can spawn real ships instead and add exceptions to all nearby ships and remove AI to create a visualeffect-like ship without making effectdata entry.

@cag62
Copy link
Author

cag62 commented Sep 4, 2017

ok, but how do I scale a real ship?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants