[SCR] Follow me / Remember homebase + wingman (v8)
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 36
- Joined: Thu, 28. May 09, 23:07
AFAIK, TC 3.0 didn't change the script language or the homebase property in any way.
It should work.
It might just take a little time to record the homebase setting of all your ships before it can work.
It should work.
It might just take a little time to record the homebase setting of all your ships before it can work.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
How about the situation, From carrier jump to a fighter which is one of a wing, since the wing may have order, if player want to do something on that fighter, he need to remove that fighter from wing. Unless he want to set on that fighter and watch what it doing.
I have a carrier with about 10 fighters in a wing, after 'finish' big ships, I'd like to enter one fighter to kill the small ships, and the same time order the wing to protect me or attack my target. Then ... I need to remove the fighter from the wing. And now only have 9 fighters in a wing, one left for me to jump in.
Maybe this can be a switch for temporary let the fighter leave the wing, and when player go another ship, the fighter re join back the wing.
I have a carrier with about 10 fighters in a wing, after 'finish' big ships, I'd like to enter one fighter to kill the small ships, and the same time order the wing to protect me or attack my target. Then ... I need to remove the fighter from the wing. And now only have 9 fighters in a wing, one left for me to jump in.
Maybe this can be a switch for temporary let the fighter leave the wing, and when player go another ship, the fighter re join back the wing.
Just tried this mod out and like it.
Found the AL settings under Options->Gameplay->Artificial Life Settings
@wga I've dealt w/that too in that if fighter is part of a wing and you take control of it, but then give wing commands you will be forced into autopilot continuously.
What is interesting is that in the way Gazz described things in the OP is that it sounds like the game might have used to delete the wingman status. I haven't seen that happen (as of 3.0 anyway). Now I'm wondering if maybe a remove from wing call could be added so it's gone while we are in control and then wing status gets restored by the mod (as normal) when leaving the ship
EDIT: I misunderstood. The mod is maintaining the wingman for player setting for which, I just learned, ties in the Shift-6 and Shift-7 hotkeys.
EDIT2: Given the amount of wing commands I was able to add the changes need to save the wing name off and disband/restore wing membership accordingly. Did not worry about Formation leader as I typically do wing setups of all one ship type and then have that wing protect a ship on patrol (not part of the wing, but treated as the leader)
Found the AL settings under Options->Gameplay->Artificial Life Settings
@wga I've dealt w/that too in that if fighter is part of a wing and you take control of it, but then give wing commands you will be forced into autopilot continuously.
What is interesting is that in the way Gazz described things in the OP is that it sounds like the game might have used to delete the wingman status. I haven't seen that happen (as of 3.0 anyway). Now I'm wondering if maybe a remove from wing call could be added so it's gone while we are in control and then wing status gets restored by the mod (as normal) when leaving the ship
EDIT: I misunderstood. The mod is maintaining the wingman for player setting for which, I just learned, ties in the Shift-6 and Shift-7 hotkeys.
EDIT2: Given the amount of wing commands I was able to add the changes need to save the wing name off and disband/restore wing membership accordingly. Did not worry about Formation leader as I typically do wing setups of all one ship type and then have that wing protect a ship on patrol (not part of the wing, but treated as the leader)
- X2-Illuminatus
- Moderator (Deutsch)
- Posts: 24965
- Joined: Sun, 2. Apr 06, 16:38
Files for X3AP always go into the "addon" directory.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)
Neuauflage der fünf X-Romane als Taschenbuch
The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!
Re: [SCR] Follow me / Remember homebase + wingman (v8)
This is the 2nd most essential mod I use (Bounce being 1st place), so I just wanted to say thanks for such a great mod!
I made some modifications to it...
1) Fixed a bug in there...
2) Added support for Wings (when you switch into a ship that's in a Wing, you're fighting the autopilot constantly... hated that, so I fixed with some minor code additions to your mod).
3) Added support for Bounce (so when you switch ships, Bounce is re-added to your old ship automatically).
4) Doubled the wait time in the ship scan loop, and decreased the fake modulo check from 25 iterations to 20 -- because I don't really care if it takes an extra second every 5 minutes.
5) Removed the 1 ms wait before the ship scan loop -- I don't see why it's needed and couldn't a 1 ms wait cause unnecessary context switching? It hasn't done any real work at that point yet. Probably doesn't matter either way tbh.
I made some modifications to it...
1) Fixed a bug in there...
Code: Select all
Assign.Old.Homebase:
gosub AddBounce: <-- Bounce support
* $Home = $Ship-> get homebase <-- this is wrong
$Home = $Playership.Old-> get homebase <-- this is what it should be
$Home.Old = $Playership.Old-> get local variable: name=$VarName.Homebase
if not $Home-> exists
if $Home.Old-> exists
$Playership.Old-> set homebase to $Home.Old
end
end
$Is.Wingman = $Playership.Old-> get local variable: name=$VarName.Wingman
$Playership.Old-> set as player wingman: $Is.Wingman
gosub AddOldShipBackToWing: <-- Wing support
endsub
2) Added support for Wings (when you switch into a ship that's in a Wing, you're fighting the autopilot constantly... hated that, so I fixed with some minor code additions to your mod).
Code: Select all
...
* Player CHANGED SHIPS, old and new ship exist
gosub Assign.Old.Homebase:
gosub MarkAndRemoveNewShipFromWing: <--- Wing support
gosub Assign.Target:
...
MarkAndRemoveNewShipFromWing:
$Ship.new.is.in.wing = [PLAYERSHIP]-> get flight wing
[PLAYERSHIP]-> set local variable: name=$VarName.flightWing value=$Ship.new.is.in.wing
do if $Ship.new.is.in.wing
[PLAYERSHIP]-> remove from flight wing
endsub
AddOldShipBackToWing:
$Is.inWing = $Playership.Old-> get local variable: name=$VarName.flightWing
do if $Is.inWing
$Playership.Old-> add to flight wing: wing=$Is.inWing
endsub
Code: Select all
AddBounce:
* adds bounce to old ship when player changes ships, undocks from carrier, or ejects
if get global variable: name=$Key.LitQB.Bounce.OnOff
skip if $Playership.Old-> is script 'Lib.Cmd.Bounce.Check' on stack of task=323
$Playership.Old-> begin task 323 with script 'Lib.Cmd.Bounce.Check' and priority 10: arg1=null arg2=null arg3=null arg4=null arg5=null
end
endsub
5) Removed the 1 ms wait before the ship scan loop -- I don't see why it's needed and couldn't a 1 ms wait cause unnecessary context switching? It hasn't done any real work at that point yet. Probably doesn't matter either way tbh.