Some help with playerships please?

Freeform discussion about anything related to modding Transcendence.
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

There is an engine feature to help with models where the center of mass is in the wrong place: rotationOffset. For example, the Corsair has

Code: Select all

<Image imageID="&rsCorsairHD;" imageWidth="52" imageHeight="52" rotationCount="120" rotationColumns="12" viewportRatio="0.00375" rotationOffset="-10" />
This shifts its image backward 10 pixels, or causes it to rotate around a point 10 pixels ahead of center.

Unfortunately, due to the angle that ship images are rendered from, using this feature causes them to "wobble" oddly as they rotate. I made a mod to fix the center of gravity on several player ships, and I found it too distracting.
Kaama
Anarchist
Anarchist
Posts: 19
Joined: Sat May 11, 2019 11:17 am

That rotation offset parameter works fine on this ship. I tried difrent values and you can make it behave in whatever way you like, and only side effect is that drive image needs to be adjusted.

<Image imageID="&rsF1Image;" imageWidth="150" imageHeight="150" rotationCount="120" viewportRatio="0.005625" rotationOffset="17" />
Eventualy decided to set it to 17.
But i am still unhappy about drive images , what else it could be besides "thrustmain" ?

Copied thrust effects from big Lindworm and it looks nice :twisted:

Now i am just curious about 1 last thing : Ai setings are 100% pointless in playership code, but is it possible to move those to playersetings?
And if so then i know that default fire rate for players is 10, but what about "perception"? how much in ls is 4 and would changing it to 5 or 6 improve range at which omni weapons pick targets?
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

I downloaded the F1 Freighter mod. The freighter does look a little odd when turning. It still looks like it is pivoting slightly behind its center. This does make it appear that the ship should be facing the other way!

As Xephyr says, the actual image of the ship isn't centered in the whole image. The first attached image is the 150 x 150 first rotation of 120-facing freighter.jpg. There is 27 pixels of blank image at the top of the ship and only 3 at the bottom.
So (according to my very, very limited graphics knowledge) I think it would need a re-render (as a png maybe?).
It might be possible to reduce the amount of black border around the actual ship image. But not too much as long ships look odd when they appear to be too far away or too close when docked depending on which way they are facing. This would make it appear larger as well, I think. Possibly if this is done there is auto-scaling code that will make the armor HUD ship image fit better as well. Not sure on that.

Attached is a new pair of hero images in a zip file. I centered the actual ship image and reduced the border around it. It looks better in the playership select screen and in the dock service screens now. It looked too small and was off-center before.


Also the mod uses the old dock services itemPicker screens.

Adding an API version to the mod and the Human Space library will make the new dock services screens appear.

Code: Select all

<TranscendenceExtension UNID="&unidF1;" version="1.0" name="Tinkers Freighter" apiVersion="44">

<Library UNID="&unidHumanSpaceLibrary;"/>
The mod won't work in pre 1.8 versions if this is done.
I think there is another way to do this but I can't remember what it is. Anyone know?


And I'll see if I can get some code working so the weapon fires from the front of the ship as well. I want to do this for the Taipan anyway now that there is an easy way to separate single and dual firing weapons. So it will just be cut and paste then with a little bit of fine-tuning.

Nice work.

Also
Maybe those : imageX="0" imageY="0" parameters could help if changed somehow, no idea what they are doing.
These coordinates select one image from a larger image that has multiple images in it. See Items1.jpg for an example of a multiple image. This topic, https://forums.kronosaur.com/viewtopic.php?f=8&t=7672, explains it but is a bit dated now and is missing a few images. Images can now be transparent .png format images and don't need a 'mask' image.

And finally
But i am still unhappy about drive images , what else it could be besides "thrustmain" ?
The Sandstorm and Britannia both use something called 'rotateRight' and 'rotateLeft' in their thrust code but I have no idea what it does.
There are three different effect with "thrust" in their names. &efManeuveringThrustEffect;, &efMainThrustDefault; and &efMainThrusterLarge;. You could try the other two to see what they look like.
If you are a VOTG tester you could also search that code. There are some different thrust effects in there which could give you some ideas. But George may not want these used in SOTP so you would need to ask him if you wanted to use them.
Attachments
freighterlargenew320.zip
(9.22 KiB) Downloaded 319 times
freighter first150x150.jpg
freighter first150x150.jpg (8.52 KiB) Viewed 9803 times
Stupid code. Do what I want, not what I typed in!
NMS
Militia Captain
Militia Captain
Posts: 569
Joined: Tue Mar 05, 2013 8:26 am

George created maneuvering thrust effects that some ships can show when they start or stop rotating. But apparently most players didn't like them, so they're disabled by default. You can enable them in settings.xml for ships that have them.

It's common for ship images not to be quite centered in each image frame due to the camera angle they're rendered from. Ideally, the center of mass of the ship would be at the center of each frame, but this isn't always the case either.
Kaama
Anarchist
Anarchist
Posts: 19
Joined: Sat May 11, 2019 11:17 am

Added "api version= 29" because PM mods use such, but he also has sort order = 10 and i dont know what it means.
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

I can't be sure because I got erratic results when I played around with it a while ago, but I think 'sortOrder=' somehow affects the order that playerships appear in the playership select screen when you start a game.

But there must be some other criteria as well. They can appear in alphabetical order but they might do this for the adventure first and then for each extension, possibly in hex UNID order for the extensions. Dunno. I was never able to work it out.
Stupid code. Do what I want, not what I typed in!
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

It sorts by sortOrder first, then alphabetically if sortOrder between ships is equal. The lower the sortOrder, the higher priority the ship has. If no sortOrder is given, (I think) it defaults to 100.
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.
Post Reply