Main drive compartment coordinates?

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 Basically, how do I properly assign them? I’m looking at the code for Nomad Salvager to get some frame of reference, here. Going by the fact that the x-coordinate is negative and stays the same while the y-coordinate changes, it looks the coordinates are being assigned with the ship facing to the right (hopefully by using (facings/4)+1, if it’s calculating by facings, and not a static Facing #6). Could somebody clue me in on how to narrow it down a bit finer than that?
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

Find the frame of your ship with its nose pointing east. This is your ship at zero degrees, and the eleventh frame in a forty facings spritesheet. Extract this frame then paste it as a new image so you can draw on it. (For example, with a 128x5120 sheet, go to 0x1280, rectangle select from there to 128x1408, copy, then paste as new image.)

Find the center of your frame. (For example, 63x63 in a 128x128 frame.)

Draw the bounds of your hitbox (of engines or whatever) with a 1x1 pencil. sizeX or sizeY will be as long and wide as your hitbox.

Find the center of your hitbox, and subtract the center of your frame from the center of your hitbox. The difference will be your posX and posY. In other words, (posX, posY) = (center of hitboxX - center of frameX, center of hitboxY - center of frameY).
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

 …Ah-ha, so I was on the right track. I had a feeling this was going to be some pixels-from-center shenanigans instead of the pixels-from-top-left-corner like the HUD stuff uses. Thanks for clarifying.
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
Post Reply