[X3LU] Quick Wings 1.10

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

kaistern
Posts: 443
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 11:21

Joubarbe wrote:It doesn't hurt, it's just ugly and useless :)

Code: Select all

$flag = get global variable: name = 'qw_flag'
$wing = get predefined wing: wing = $flag
I used this forever but couldn't get it to work (the flag was setting the global variable to vaule=[Blue.Wing] but $wing wouldn't set to it. I'll look at it again though to try and make things prettier for ya'll ;) )
When Cycrow said you need to start your scripts, it means what I said earlier :

Code: Select all

START THIS -> call script '!wing.cmd.attack.std' : WING=$wing target=$target
The problem is wings are special like he said, and I'd need to some tests to be sure how they work ; the problem is to overwrite the current command, and I'm not sure your script will do that.
this is the script I am using... err... i think. I use @ start this -> call script.... but i couldn't find a script call that didn't have the @ and when I tried to write it out in X-studio it auto added it

ADDED: any ideas about why the script isn't finishing properly?
[ external image ]
Running LU 1.4.7 + XM-O 1.0 + Quick Wings 1.0
Rise of Phanon DiD LUV
Wrath of the Hive DiD XM-O
Try my script: Quick Wings for better wing control in LU!

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Thu, 13. Nov 14, 11:31

Forget the @, you don't need to worry about that.

Uhhh, just to be clear :

Code: Select all

!wing.cmd.attack.std
This is a script.

Code: Select all

call script
This is a command.

You have different way to call a script via your command. "= [THIS]" means you could have a return value given by the script you call (that could be "$MyReturnValue = [THIS]"). "START [THIS]" means you call the script on another "thread" and that won't return anything because your current script won't wait for it to finish.

And you call the script from "[THIS]" which is null, because it's a wing command.

You say you used START, no you didn't. You must write it manually.

kaistern
Posts: 443
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 11:33

I think when it calls the script instead of continuing and ending it is waiting on the called script to finish? I'm going back to the MSCI handbook and rereading that section lol
[ external image ]
Running LU 1.4.7 + XM-O 1.0 + Quick Wings 1.0
Rise of Phanon DiD LUV
Wrath of the Hive DiD XM-O
Try my script: Quick Wings for better wing control in LU!

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Thu, 13. Nov 14, 11:40

To start the command, there is a script command to do it, something like
$wing -> start wing command: COMMAND_WING_ATTACK, args=$target

this will start what ever script is connected to the command COMMAND_WING_ATTACK

kaistern
Posts: 443
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 11:49

Joubarbe wrote:Forget the @, you don't need to worry about that.
ok :D
Uhhh, just to be clear :

Code: Select all

!wing.cmd.attack.std
This is a script.

Code: Select all

call script
This is a command.
yup i must have misstyped somewhere
You have different way to call a script via your command. "= [THIS]" means you could have a return value given by the script you call (that could be "$MyReturnValue = [THIS]"). "START [THIS]" means you call the script on another "thread" and that won't return anything because your current script won't wait for it to finish.

And you call the script from "[THIS]" which is null, because it's a wing command.

You say you used START, no you didn't. You must write it manually.
I had it in there originally but took it out to test a theory that didn't pan out, and forgot to add it back. It's back now with a slight change in condition.... The ships still won't accept new orders however in global task list it shows "!wing.cmd.attack.std" instead of "Action1" I'm going to go back and reread cycrows post and see if i can get anything more out of it the fourth time :D
[ external image ]
Running LU 1.4.7 + XM-O 1.0 + Quick Wings 1.0
Rise of Phanon DiD LUV
Wrath of the Hive DiD XM-O
Try my script: Quick Wings for better wing control in LU!

kaistern
Posts: 443
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 11:49

Cycrow wrote:To start the command, there is a script command to do it, something like
$wing -> start wing command: COMMAND_WING_ATTACK, args=$target

this will start what ever script is connected to the command COMMAND_WING_ATTACK
you ninja :D let me go try that
[ external image ]
Running LU 1.4.7 + XM-O 1.0 + Quick Wings 1.0
Rise of Phanon DiD LUV
Wrath of the Hive DiD XM-O
Try my script: Quick Wings for better wing control in LU!

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Thu, 13. Nov 14, 11:54

just checked, the command will be

Code: Select all

START $wing -> wing command: COMMAND_WING_ATTACK : arg1=$target, arg2=null, arg3=null, arg4=null

kaistern
Posts: 443
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 12:02

VICTORY!!!!!!!!!!!!!!!!!!!!!!!!!!!!

now just to try and make everything pretty, write the other three command scripts (I had to add a shield attack hotkey.... Dont know how I forgot it as it is one of the commands I use most) and then wrap everything up and upload it!


THANK YOU GUYS!!!!!!!!
[ external image ]
Running LU 1.4.7 + XM-O 1.0 + Quick Wings 1.0
Rise of Phanon DiD LUV
Wrath of the Hive DiD XM-O
Try my script: Quick Wings for better wing control in LU!

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Thu, 13. Nov 14, 12:05

FYI, you can see all wing commands into the "Script Objects" tab in X-Studio (COMMAND_WING_ATTACK_SHIELDS, for instance).

If I may add a suggestion : a command to resupply/refuel would also be great :)

kaistern
Posts: 443
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 12:50

For you Jaubarbe, anything.

I'll add it
[ external image ]
Running LU 1.4.7 + XM-O 1.0 + Quick Wings 1.0
Rise of Phanon DiD LUV
Wrath of the Hive DiD XM-O
Try my script: Quick Wings for better wing control in LU!

kaistern
Posts: 443
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 13:03

lol I think LU breaks x-studio sometimes i have seen a few <Unrecognised Command> in the LU specific areas

any suggestions on the order to give for refuel? I don't see that in wing commands
[ external image ]
Running LU 1.4.7 + XM-O 1.0 + Quick Wings 1.0
Rise of Phanon DiD LUV
Wrath of the Hive DiD XM-O
Try my script: Quick Wings for better wing control in LU!

DeathBreath
Posts: 70
Joined: Fri, 13. Mar 09, 12:40

Post by DeathBreath » Thu, 13. Nov 14, 13:51

kaistern wrote:lol I think LU breaks x-studio sometimes i have seen a few <Unrecognised Command> in the LU specific areas

any suggestions on the order to give for refuel? I don't see that in wing commands
About that <Unrecognised Command> I don't script so I'm not really sure but on the download page for LU
https://code.google.com/p/litcubesunive ... structions
on the bottom theres an "X-Studio I custom syntax" download. It will probably fix that I hope.
Also I Congrats on making the script and I'm really happy that some of the users here are willing to help to this extend the people who are trying to understand and make a custom script.

kaistern
Posts: 443
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 15:07

DeathBreath wrote:
kaistern wrote:lol I think LU breaks x-studio sometimes i have seen a few <Unrecognised Command> in the LU specific areas

any suggestions on the order to give for refuel? I don't see that in wing commands
About that <Unrecognised Command> I don't script so I'm not really sure but on the download page for LU
https://code.google.com/p/litcubesunive ... structions
on the bottom theres an "X-Studio I custom syntax" download. It will probably fix that I hope.
Also I Congrats on making the script and I'm really happy that some of the users here are willing to help to this extend the people who are trying to understand and make a custom script.
Thanks! I didn't see that download (I am horrible unobservant) so yeah it would probably fix the issue. :D

Joubarbe and Cycrow have been amazingly helpful and I could NEVER have done this with out them!
Last edited by kaistern on Fri, 14. Nov 14, 00:44, edited 1 time in total.
[ external image ]
Running LU 1.4.7 + XM-O 1.0 + Quick Wings 1.0
Rise of Phanon DiD LUV
Wrath of the Hive DiD XM-O
Try my script: Quick Wings for better wing control in LU!

kaistern
Posts: 443
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 15:30

Joubarbe wrote:If I may add a suggestion : a command to resupply/refuel would also be great :)
Unless I am (once again) missing the obvious, I think this maybe hard as I'll either have to write a script to individually go for refuel, or do that and make it into a wing command. This might be tough.

But I'll make it work some how... I like challenges
[ external image ]
Running LU 1.4.7 + XM-O 1.0 + Quick Wings 1.0
Rise of Phanon DiD LUV
Wrath of the Hive DiD XM-O
Try my script: Quick Wings for better wing control in LU!

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Thu, 13. Nov 14, 16:57

Hehe, yeah I know it is hard, that was to tease you :)

That could be a nice 1.01 feature and a next step to learn the magic of scripting :)

Joubarbe (not Juoberbe, nor Jaubarbe, nor Jobarbe !) and you have to pronounce it with a French twang, a big OUUUU and a big ARRRRRRRRR (I can't emphasize enough on the Rs).

EDIT : question : I didn't take a look at your final code, does it remember the last wing you selected ? Or you have to select it every time you must give an order ?

User avatar
Hector0x
Posts: 994
Joined: Mon, 18. Nov 13, 18:03
x3tc

Post by Hector0x » Thu, 13. Nov 14, 17:56

Hi kaistern,
i'm just reading your description - sounds promising. two suggestions for the time you eventually run out of ideas.

1. adding/removing targeted ships from wings by pressing the selection hotkey with a modifier (like SHIFT)
2. some kind of "passive decoy mode". ships set their turrets to missles only and idle around the target (soaking up enemy fire)

best of luck

kaistern
Posts: 443
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Fri, 14. Nov 14, 00:38

@Joubarbe: lol I thought that that might be the case, but I still like the idea :D. Sorry about the name... I'm a bad speller lol especially when I am holding a baby in one hand and trying to type in the other :D

It remembers the wing you selected until you select another wing. I am not entirely sure but I think that it will remember it when you save/load too, though that really depends on exactly how global variables work.

@Hector0x: Thanks! 1)I think this is possible :D I'll add it to the future ideas pile. 2) This is the harder of the two, getting them to follow the target is simple enough but the turrets part I'll have to look at. But it will be a good learning experience to see if I can figure it out
[ external image ]
Running LU 1.4.7 + XM-O 1.0 + Quick Wings 1.0
Rise of Phanon DiD LUV
Wrath of the Hive DiD XM-O
Try my script: Quick Wings for better wing control in LU!

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Fri, 14. Nov 14, 08:36

All global and local variables are stored in savegames. When you make bigger scripts however, you have to think about LU's E/I.

EDIT : people must have an account to download this on GDrive. You should consider an easier way to download this... .rar on Mediafire, for instance...

kaistern
Posts: 443
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Mon, 17. Nov 14, 07:37

I didn't know that :( I'll have to fix that when I get home
[ external image ]
Running LU 1.4.7 + XM-O 1.0 + Quick Wings 1.0
Rise of Phanon DiD LUV
Wrath of the Hive DiD XM-O
Try my script: Quick Wings for better wing control in LU!

kaistern
Posts: 443
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Wed, 19. Nov 14, 19:34

New Link posted so that you do not need a account with google to download :D


oops.... :D
[ external image ]
Running LU 1.4.7 + XM-O 1.0 + Quick Wings 1.0
Rise of Phanon DiD LUV
Wrath of the Hive DiD XM-O
Try my script: Quick Wings for better wing control in LU!

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”