changing ships and squadron commands

Freeform discussion about anything related to modding Transcendence.
Post Reply
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

I am trying to apply changing ships to the UGWingmen mod (so you upgrade them by flying them), but am encountering some problems.


1. when I change to a wingman, and then back, they stop responding to squadron commands, and their orbiting position is reset.

2. they also lose their "always at the top of the communications list" attribute, however that works.


Any ideas? I'm not changing anything that wouldn't be changed in normal operation of previous versions of the mod, except for the player ship.




P.S.

The new experimental version of UGW is incompatible with saves from previous versions or wingmen designed for use with them

The ship changing code is contained in dsWingman in the "screens" file, and a virtual item at the top of the "base" file
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

Once you take control of the wingman, it cancels the recurring timer. when you switch back to the original you have to restart the timer with something like:

Code: Select all

(typFireObjEvent &baStdWingmanBase; (objGetObjByID wingman) 'OnCreate)
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

That's seems to be it Prophet, thanks.

If I re-do the shpSetPlayerWingman function it (the unresponsiveness and communications list issue) is fixed.

However, as for player chosen formations/orbit positions, it seems that any objSetData's set on the wingman get lost when the player transfers to it. (solved by saving formation on the player instead)

I think the new version is almost ready.



The critical step is shpSetPlayerWingman, does anyone know what it does exactly?

Also, is there a persistent place to store data other than on the player?


One last thing I thought I should mention: new ships don't come with autopilot.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

You can store data persistantly with typSetGlobalData. If you have some good type to store data on, that is a good place to do it
Post Reply