[MOD] Holy Asteroids Mod - 3.11 Compatible [Version 2.0 is available - 26/07/2010]

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

User avatar
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

Post by Serial Kicked » Mon, 12. Jul 10, 05:59

Damn, how i loved to do that in X2, hidden in my little hole when hell was breaking loose around me !

Gonna install that :)


EDIT // Dunno if it's my firefox going crazy (or mediafire) but the ZIP link shows me a white empty page instead of redirecting properly. SPK link works fine (so i used that).
X3:TC/AP Pirate Guild 3 - Yaki Armada 2 - Anarkis Defense System

Anarkis Gaming HQ
Independent Game Development
X3 Scripting and Modding Station

TEKing66
Posts: 601
Joined: Thu, 10. Nov 05, 18:44
xr

Post by TEKing66 » Mon, 12. Jul 10, 06:40

I just tried the Link, seems to work fine here. You might try it again a little later, maybe traffic was heavy on mediafire dunno about that.

Hope you enjoy it. Cool thing is to build a mine them, the tunnels stay intact.
So, you can fly through your mine. :D
My mods for X3TC & X3AP

Been with the X-series from the beginning. If it happens in the X_Universe I've been there done that several times over.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30435
Joined: Fri, 16. Apr 04, 19:21
x4

Post by Alan Phipps » Sun, 18. Jul 10, 17:06

Firstly thanks for this mod, it adds a bit of character back to the stock game asteroids and debris fields. I am using 1.3 at the moment, I will try 1.4 shortly.

Just a question/comment on mine asteroids in v1.3 at least. I notice when I am IS that a lot of ships are dying by crashing into Ore Mines, far more than I have ever noticed before using the mod. They are mostly NPC TSs trying to supply the mines with e-cells but also passing traffic seems to be coming a cropper too leaving the areas of the mines littered with floating crates, mainly e-cells, while I am IS. I have even lost one of my traders to an Ore Mine while IS.

Do you think that your mod may have significantly changed the size or shape of the rock the mine is on such that the AI is now struggling to navigate ships to the docking arms or around the mine. Do you think the AI is trying to navigate the tunnel as a shortcut even???

User avatar
X2-Eliah
Posts: 4369
Joined: Thu, 12. Oct 06, 16:30
x4

Post by X2-Eliah » Sun, 18. Jul 10, 17:26

Sounds more like it that the asteroid(s) that was changed turned 'invisible' to the AI entirely - that usually leads to them bumping into mines they try docking at / flying through. Easy to test, spawn a mine and order your ship to fly on the opposite side of it. If it crashes, there's the problem.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30435
Joined: Fri, 16. Apr 04, 19:21
x4

Post by Alan Phipps » Sun, 18. Jul 10, 17:34

Yes, I just loaded v1.4 and took my ship a fair distance to the far side of a mine from the docking arms and told the AI to autodock. It headed straight at the docking arms through the rock and died (it missed the tunnel entrance too). Looks like both 1.3 and 1.4 have the mines on rocks that are invisible to the AI but still kill ships on collision. Oh dear, back to vanilla for a while.

TEKing66
Posts: 601
Joined: Thu, 10. Nov 05, 18:44
xr

Post by TEKing66 » Sun, 18. Jul 10, 19:31

The physical size did not change, so I don't believe that is the issue.
And with the size of the tunnels, I don't believe the AI would try to use them.
I'll look into this today, see what I can find out. It has to be something related to collision avoidance.

Are you running any additional mods that mess with the collision avoidance system? Just asking so as to better help trouble shoot this?

EDIT: I'll pull them up in GMAX and load the originals over top of them to verify the the sizes didn't change. I could have inadvertently changed the scale of one of them. If so that may be the problem. Anyway, I'm gone to check this out.
Last edited by TEKing66 on Sun, 18. Jul 10, 20:13, edited 2 times in total.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30435
Joined: Fri, 16. Apr 04, 19:21
x4

Post by Alan Phipps » Sun, 18. Jul 10, 19:36

No, running 2.7.1 vanilla apart from your mod and Saetan's no complex tubes mod.

I removed the mod cat/dat and repeated the same experiment as before with the Ore Mine and its now-vanilla rock. The ship on autopilot flew toward the mine and then evaded the rock in its usual extreme avoidance routine. It does seem as if the AI cannot see the rock dimensions in the mod versions.

TEKing66
Posts: 601
Joined: Thu, 10. Nov 05, 18:44
xr

Post by TEKing66 » Sun, 18. Jul 10, 20:23

Good info to know, saves me a little bit of debugging. As I mentioned in my edit on my previous post. I could have changed the scale on one of the.
I'll keep you posted as to my findings. Hopefully it will be an easy fix.
My mods for X3TC & X3AP

Been with the X-series from the beginning. If it happens in the X_Universe I've been there done that several times over.

TEKing66
Posts: 601
Joined: Thu, 10. Nov 05, 18:44
xr

Post by TEKing66 » Mon, 19. Jul 10, 01:46

I have discussed this with killerog in great detail, and we're both kinda stumped.

I have verified that the asteroid models are the exact same size as the originals, the models are oriented exactly the same. At least when I pull my modified models and the original models into GMAX they overlay perfectly.

The only way I could recreate the issue is to start a ship out from a point that is inside the range that autopilot would actually have already started avoidance maneuvers. Outside that range and autopilot seems to see the asteroid and avoid as it should. I am not denying that a problem exists, but at this point I an unsure exactly how to or what needs to be done to correct it. I'm open to suggestions if anyone has any ideas.

Of course there is always this possibility. Maybe Egosoft tried putting similar asteroid models into the game at first and found that the engine had a problem with them and settled on the models without tunnels.
I don't know this for sure, but it is a possibility.

I do know that even before I created and started using this mod, I have lost plenty of ships to autopilot and docking. Especially while in sector.

I'm going to sleep on this, maybe something I missed will come to me.
If anyone has any ideas that may provide an answer, then please shout it out.

Edit: I took an M6 to Savage Spur, Flew to the South side of the sector at a point well above the mass of asteroids in there. Then set autopilot to fly to the Northeast side and down to the bottom of the mass. The flight path went straight through the middle of the mass of asteroids with out so much as a hiccup. I had even over tuned this M6 to fly twice as fast as normal. The ship dodged, bucked, turned and twisted every which way but never collided with any of the asteroids.
My mods for X3TC & X3AP

Been with the X-series from the beginning. If it happens in the X_Universe I've been there done that several times over.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30435
Joined: Fri, 16. Apr 04, 19:21
x4

Post by Alan Phipps » Mon, 19. Jul 10, 16:34

It doesn't seem to be a problem with free asteroids, the problem lies with the holed rock that an Ore Mine is on. (Note to self: must test Silicon mines too.) Somehow, the AI sees the minehead and perhaps some of the rock, but not enough of it. It is as if the collision avoidance for the combined rock and minehead station is different to that of the vanilla station and not anything to do with the asteroids alone. Perhaps the AI thinks the centre of the new asteroid is at the centre of the minehead in the revised version? (Just a suggestion - no evidence to go on.)

Perhaps look at how your revised rock interfaces with, and offsets its collision envelope from, a mine in the factory model and dimensions when compared with vanilla?

EDIT: Yes, exactly same deadly collision issue with Silicon Mines. Also it does rather appear from observing the too late attempts at evasion when on auto-docking from the other side of the mine as if the AI thinks that the centre of the new holed rock is at the centre of the minehead (assuming the rock has the same dimensions as in vanilla) or otherwise that the AI thinks (wrongly) that the new rock has a much smaller collision radius than that in vanilla mines.

Tests of autodocking the same ship from exactly the same positions relative to both types of mine in pure vanilla lead to much earlier evasions around the vanilla rocks so it is not just poor ship placement for docking.

Further mod observation: You said that if you built a mine on a 'holed asteroid' you would keep the holes for the mine. I note that on installing the mod, it seems as though every extant NPC mine ends up with a holed rock straight away. In fact it also seems as though just about every full asteroid has holes now. Was that your intent as in X2 the holed asteroid was fairly rare and was more of a pleasant discovery than being the norm?

TEKing66
Posts: 601
Joined: Thu, 10. Nov 05, 18:44
xr

Post by TEKing66 » Mon, 19. Jul 10, 18:21

I modified bothe the asteroid_A_ClassMine.bod and the asteroid_B_ClassMine.bod models. The actual Mine scene file just reference those two asteroid models. So, if they are change it does affect all of the mines in the game. The only other way of getting an asteroid with tunnels into the game and not having the mine affected would be to create a totally new model. But, then that model would need to be added to the map before it would actually exist in the universe.

I will remove those two from the MOD and just add the tunnels asteroid_C_ClassOne.bod, that one is easily destroyed however. And it is a much smaller asteroid. Doing that should completely eliminate the problem. But, at this point it seems like the only answer.

My guess would be that the collision avoidance is some how picking up on the tunnels instead of the exterior of the asteroid. Though everything that I have read on the subject suggest that the maximum exterior geometer y is what the collision detection looks at. Apparently this is not the case, at least in this instance.

A new version should be available no later than tomorrow (20/07/2010).
My mods for X3TC & X3AP

Been with the X-series from the beginning. If it happens in the X_Universe I've been there done that several times over.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30435
Joined: Fri, 16. Apr 04, 19:21
x4

Post by Alan Phipps » Mon, 19. Jul 10, 18:52

Ok Thanks. That does seem a rather drastic measure for something that only happens with mines and when IS, but it can be expensive to the Player if left there so I suppose you are right.

I wonder if the vanilla mines perhaps have an inflated or offset (rock) collision-avoidance envelope set in the station model that needs to be reset when you insert your model rock? They must have at least some station 'special case' treatment in order to get their extended range for the docking computer. Can you see anything in the station model coding for mines that differs between your modified version and vanilla? Also X2-Eliah above spoke as if he had previous experience of this issue resulting from modded mine rocks, I wonder if he could help you further?

Good luck and I hope you can crack this.

TEKing66
Posts: 601
Joined: Thu, 10. Nov 05, 18:44
xr

Post by TEKing66 » Mon, 19. Jul 10, 21:17

My MOD doesn't actually touch the the mine models, only the asteroid models. So, I would have thought that as long as the physical size and the location was the same that nothing that I done would affect the station scene files. But, it is apparent that somehow it does.

Though that may actually point to something with the model origin, I'll take a look at that and verify the the origins of the two are in the same place. Doing the boolean operation to add the tunnels could have changed that.
And, it would have been easy to overlook. I'll check that out first as that may be the answer, and could be a simple fix if that is the case.

EDIT: Well, that wasn't the case. So, at this point, it looks like the only alternative is to remove those two from the MOD. A new version of the MOD should be available this afternoon sometime. Once I get that done, there is another possibility that I will take a look at. It may be possible to create a couple of new asteroid types and then place them into the universe using the Mission Director. I have not yet verified that this is going to be doable, but I suspect it is with some of the commands I am seeing in the MD HTML file. But, since I am just learning MD, it may be awhile before this will actually come to light.
My mods for X3TC & X3AP

Been with the X-series from the beginning. If it happens in the X_Universe I've been there done that several times over.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30435
Joined: Fri, 16. Apr 04, 19:21
x4

Post by Alan Phipps » Tue, 20. Jul 10, 16:05

Last attempt to save you spoiling your excellent mod or doing lots of work on the MD (which I assume would prevent your mod being vanilla-safe). You mentioned a lot of scaling issues with GMAX earlier. I don't profess to understand, but here goes a theory anyway.

Is it possible that the vanilla minehead model has a scaling that is different to the one for the asteroid? When the two are linked for a mine station, does the minehead scaling override and change the asteroid's previous one? Could that cause a difference if your asteroids were previously being scaled up or down anyway to match the size of the vanilla asteroids? It would at least explain why your free asteroids have good collision envelopes while the mine ones do not.

Hope this helps and does not sound too stupid.

TEKing66
Posts: 601
Joined: Thu, 10. Nov 05, 18:44
xr

Post by TEKing66 » Tue, 20. Jul 10, 16:37

Could be, but I don't see anything that would points to that being the case.
The references in the scene file that puts the two together, basically just says to load this asteroid model and place it here, then load this station model and place it here.
My mods for X3TC & X3AP

Been with the X-series from the beginning. If it happens in the X_Universe I've been there done that several times over.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30435
Joined: Fri, 16. Apr 04, 19:21
x4

Post by Alan Phipps » Tue, 20. Jul 10, 16:48

Right, but what then combines and applies the anti-collision envelopes? There has to be something that makes the collision avoidance envelope for the rock cease to apply in the vicinity of the minehead else nothing would ever dock there under AI. (Think Aldrin and the reason you resized the big rock!) There has to be some envelope generation for the complete station model that is being affected by the new asteroid model in a different way to the vanilla situation.

OK, I'm way out of my depth here. I'll shut up now. :roll:

TEKing66
Posts: 601
Joined: Thu, 10. Nov 05, 18:44
xr

Post by TEKing66 » Tue, 20. Jul 10, 17:18

Collision detection, as I understand it, is hard coded. It looks at the geometry of a model, gets the maximum exterior size (based on the polygons) in the x.y.and z axis. Then places a zone (sphere if you will) around that object.

So, the only thing that I can come up with it that with the mines and having two geometry files being loaded (the asteroid and the mine head/docking port), the mine head is inside this "sphere" but that actual docking port is just out side of it. Hence docking is unaffected. Also, I am thinking that the tunnels are somehow being seen and used for by the collision system before/instead of the exterior polygons. Since the tunnels do extend to the exterior geometry this seems plausible. I have noticed the collision in my test never happens close to a tunnel entrance and always seems to happen well away from them. Which leads me to believe that for some reason the exterior polygons are being ignored, and that the tunnels are confusing the game engine in some way.
My mods for X3TC & X3AP

Been with the X-series from the beginning. If it happens in the X_Universe I've been there done that several times over.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30435
Joined: Fri, 16. Apr 04, 19:21
x4

Post by Alan Phipps » Tue, 20. Jul 10, 18:43

Yep (I know I said I'd be quiet! :oops: ). If you took the asteroid model and added the tunnels to get the present model, would it work more the way you want if you started off with just the tunnels and added the asteroid?

TEKing66
Posts: 601
Joined: Thu, 10. Nov 05, 18:44
xr

Post by TEKing66 » Wed, 21. Jul 10, 03:03

Actually, in the process on creating them, the asteroid_A_ClassMine version, the tunnels were in GMAX first, then the asteroid was imported and then the boolean operation done.

For the asteroid_B_ClassMine, I brought in the asteroid model, then the tunnels and the done the boolean.

Basically going at each from opposite directions. Yet both asteroids exhibit the same issue.

Gotta give you a cookie for trying, but still no cigar, :wink:
My mods for X3TC & X3AP

Been with the X-series from the beginning. If it happens in the X_Universe I've been there done that several times over.

TEKing66
Posts: 601
Joined: Thu, 10. Nov 05, 18:44
xr

Post by TEKing66 » Wed, 21. Jul 10, 21:46

Version 1.5 has been released.

Release notes are in the OP.
My mods for X3TC & X3AP

Been with the X-series from the beginning. If it happens in the X_Universe I've been there done that several times over.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”