Change Ship mod

A place to discuss mods in development and concepts for new mods.
Post Reply
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

Quick and dirty mod using 'plyChangeShip' which enables you to jump to the nearest ship, friendly or enemy.
Press 'C' for 'Change Ship' in the Ship's Interior dockscreen and you will be teleported to the closest ship.
It's buggy but fun to see what the other ships are like.

Could lead to a pirate mod where you board a ship and pilot it to the nearest shipyard to sell. Then go back to your original ship. Shiver me timbers! :lol:

EDIT: Use JBW's version further down in the topic for Part I: Stars of the Pilgrim.
For Part II: Vault of the Galaxy use Change Ship Mod VOTG further down.
Last edited by relanat on Wed Jan 11, 2017 11:41 pm, edited 1 time in total.
Stupid code. Do what I want, not what I typed in!
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

this is a great example of plyChangeShip ! nice ! :)
JohnBWatson
Fleet Officer
Fleet Officer
Posts: 1452
Joined: Tue Aug 19, 2014 10:17 pm

George's fixing of the issue with deployed ships had an interesting consequence - if you hijack a Charon frigate, the code that spawns subservient fighters will remain functional. Excellent mod, especially given its simplicity. I had a lot of fun with it.

Note that there is a bit of a glitch - the 250MW reactor ends up being severely insufficient for many of the ships in the base game - especially capital ships with fuel devouring drives. A system that calculates the needed power and produces a compatible drive would resolve this.
JohnBWatson
Fleet Officer
Fleet Officer
Posts: 1452
Joined: Tue Aug 19, 2014 10:17 pm

Here's a quick hacked- together fix for the above mentioned problem. It also installs a targeting ROM whenever you switch ships!
Attachments
ChangeShipMod.xml
(2.33 KiB) Downloaded 346 times
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

Nice work, JBW. Much better.

Here's a version for Part II. EDIT: Mod removed. Use JBW's updated version below.
Added SRS enhancement as well and got rid of the multiplying reactors in the cargo hold. Thanks for the inspiration.

For general info: to get this mod to work in Part II only had to change the apiVersion= to 33 and underneath that insert this line of code:

Code: Select all

extends= "0x00310000"
See the API 33 Ministry topic for more info.
Last edited by relanat on Fri Feb 23, 2018 1:18 am, edited 1 time in total.
Stupid code. Do what I want, not what I typed in!
JohnBWatson
Fleet Officer
Fleet Officer
Posts: 1452
Joined: Tue Aug 19, 2014 10:17 pm

I've modified the VOTG version to increase the reactor power and to prioritize the targeted object if it is valid rather than just using the nearest ship. Overall a major usability improvement. In addition, I removed the library declaration that caused Ares and Teraton encounters to show up outside human space.

ChangeShipMod VOTG.xml
(2.92 KiB) Downloaded 304 times
relanat
Militia Captain
Militia Captain
Posts: 941
Joined: Tue Nov 05, 2013 9:56 am

More good work, JBW. Something had to happen, it was getting frustrating jumping to a non-thrusting ship and getting stuck there. Using the targeting system is excellent.

And I have a lead on what's causing the "non-thrusting ships".
If you change to a docked ship, it won't thrust, but a patrolling or moving ship thrusts normally.

On changing to a docked ship if you press "D" three times you eventually end up docking with the station or wreck. After you then "Undock" you can fly around. Note that this won't work if the new ship is docked at a station without playership-usable docking ports like the Remora habitats in the Remora commune groups.
'forceUndock'ing doesn't seem to change anything unfortunately, probably because the ship isn't docked yet.

I think the game might be getting confused when the new playership (it's the playership now that we have changed to it) is in a docked state but not in a dockscreen.
The ship has inherited the 'dock' order from before it was the new playership but the order then doesn't exist in the new changed-to ship which is now the playership, even though the new playership still needs to dock. So orders on the playership can't be cancelled because it doesn't have any. So the new ship would appear to need its orders changed before changing to it. (If you can follow that!)

I did have one success on a docked ship using

Code: Select all

(setq theShipObj (sysFindObject gPlayership 'sN))
(shpOrderImmediate theShipObj 'dock (shpGetDockObj theShipObj))
(shpOrderImmediate theShipObj 'hold)
in the debug screen. Changing to this ship then had the ship moving as normal. But I haven't been able to make it work in the mod code.

Other existing uses of plyChangeShip create a new ship so don't have this problem.

Possibly relevant, not sure: when you change to a new ship, gSource remains as the previous ship while gPlayership is the new ship.



One of these days I might try to get the reactor power of the new ship and create a reactor for the ship using that, as you suggested some time ago (XML functions perhaps). This would match the normal ship reactor power and give a more realistic example of the ship IMO, ....one day, somewhen, possibly!

Also it's quite funny watching a Balin dragon stretch itself out when you change to one of its sections. Like a Slinky spring gone crazy! :lol:
Stupid code. Do what I want, not what I typed in!
JohnBWatson
Fleet Officer
Fleet Officer
Posts: 1452
Joined: Tue Aug 19, 2014 10:17 pm

Also it's quite funny watching a Balin dragon stretch itself out when you change to one of its sections. Like a Slinky spring gone crazy!
I always targeted the head. The body drags you in all sorts of crazy directions if you let it - it'll even move faster than light at the right angles.
Post Reply