[X3LU] Quick Wings 1.10

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

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

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

Post by kaistern » Thu, 13. Nov 14, 12: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?
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: 4439
Joined: Tue, 31. Oct 06, 13:11
xr

Post by Joubarbe » Thu, 13. Nov 14, 12: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: 441
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 12: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
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: 20606
Joined: Mon, 15. Nov 04, 00:26
x4

Post by Cycrow » Thu, 13. Nov 14, 12: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: 441
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 12: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
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: 441
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 12: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
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: 20606
Joined: Mon, 15. Nov 04, 00:26
x4

Post by Cycrow » Thu, 13. Nov 14, 12: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: 441
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 13: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!!!!!!!!
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: 4439
Joined: Tue, 31. Oct 06, 13:11
xr

Post by Joubarbe » Thu, 13. Nov 14, 13: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: 441
Joined: Mon, 30. Jun 14, 13:29
x3ap

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

For you Jaubarbe, anything.

I'll add it
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: 441
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 14: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
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: 64
Joined: Fri, 13. Mar 09, 13:40

Post by DeathBreath » Thu, 13. Nov 14, 14: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: 441
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 16: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, 01:44, edited 1 time in total.
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: 441
Joined: Mon, 30. Jun 14, 13:29
x3ap

Post by kaistern » Thu, 13. Nov 14, 16: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
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: 4439
Joined: Tue, 31. Oct 06, 13:11
xr

Post by Joubarbe » Thu, 13. Nov 14, 17: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 ?

Post Reply

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