[SCRIPT] Command Queuing V1.21 : 26/05/2009

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

Armegeddon
Posts: 393
Joined: Fri, 26. Dec 03, 13:37
x4

Post by Armegeddon »

I think TC just wants me to embarrass myself by falsely accusing people of having broken scripts. :oops:

I just went through and retested all 71 of my packages, and now it works fine with Command Queue, while the exact same setup did not work last night. Although the other two packages did have problems that I fixed in my copy.

Sorry for the false alarm.
There is a thin line between genius & insanity i have erased this line

Armegeddon's X3 scripts and mods
silverpenny7
Posts: 1
Joined: Fri, 5. Feb 10, 09:16

Post by silverpenny7 »

I don't know if anyone else is having this problem but all my ques work fine except ones that dock. The moment one of my ships docks the script stops every time.

The que looks like this:

1. Dock at
2. Buy Wares At Max Price
...

It stops between docking and buying. Is anyone else having this problem?
Change is inevitable, except from vending machines.
Retiredman
Posts: 795
Joined: Fri, 4. Sep 09, 02:35
x3ap

Post by Retiredman »

Great found the thread.

Like just above sometime the ship stops.. but that isn't my question.

Confusion on..

Wait for seconds.
I noticed that many scripts use milliseconds for their loops. eg: wait 5000 = waits 5 real time seconds.

Yours saids seconds.. so if I place
1.) wait for seconds -- 6000 ; it should wait 6000/60 = 100 minutes or
real time - 1 hr 40 mins.
or is it

2.) wait for seconds -- 6000 millsecond or 6 real time seconds.

I hope it's #1 and you have already done the conversions.

question 2.

Loop
Straight forward.. loop X number of times

Can you nest loops?

(series of commands 1)
Loop 10
(second series of commands)
loop 10
finish
_ does the 1 series of commands 10 times then does the second series once then returns to the first set 10X and then 2nd and so forth until loop 10 on second series completes, then ends.

it does the 1st set 100 times and the second set 10 times.

Am I correct on this?
Like in the old basic lang..
set $value = 0
set $count= 0
For X = 1 to 10
For Y = 1 to 10
Let $value = $value +1
next Y
Let $count = $count +1
Next X
Print $value;$count

We see 100 10
(OK I didn't show line numbers)

Next Q for Loop (dependent on last answer)
What is max value I can set loop to? does it have a max value (like 65000)
; if I want to loop forever in game..

Dock at %P (station or place where ware is located)
Buy 100 X(ware)
Dock at $homebase
Sell 100 X - (dump ware at homebase)
* Loop 1000000 (million times)


or do I do this on loop
*
Loop 1000
Loop 1000
* twice to achieve 1 million ?


Running 2.1 and I can't for the life of me see where you can save the commands.. (must be getting old)

Apprieciate your time to answer.
mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

Post by mark_a_condren »

Retiredman

for your 100 10 loop, you could do something like this, and this is only one way of doing it, there are prob lots of other ways too.

Code: Select all

10  $counter.check = 0
11  $counter = 0
12  while $counter < 110
13    inc $counter.check
14    if $counter.check = 10
15      $counter.check = 0
16
17      Do whatever i need to do ten times (once)
18
19    else
20
21      Do whatever i need to do a hundred times (once)
22
23    end
24    inc = $counter
25  end
26
Just put the code in the pots that you what done ten time and a hundred times. It wikk run that code once every time through. You need to cycle it 110 times so you set $counter to cycle until it gets upto 110.

Hope this helps a bit.

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

Post by Cycrow »

the loop command is very basic, it will only loop the whole queue

as for the number of times, -1 will loop indefinatly.

the limit is the same limit all numbers have, which is 2billion


as for the wait, its already in seconds, as theres really reason for wanting to wait for milliseconds :)
Retiredman
Posts: 795
Joined: Fri, 4. Sep 09, 02:35
x3ap

Post by Retiredman »

OK that answers that..

It's definately in seconds and the loop is an entire loop for the entire command set.
and (-1) is forever.

Great.. thank you.
facetious1
Posts: 180
Joined: Sat, 5. Sep 09, 00:32
x3tc

Post by facetious1 »

Please add "Jump to sector" as a menu item ... I am way too stupid to figure out this scripting stuff. :o (actually only about an hour of gaming a day.....).

Pretty Please????

with sugar on top?
And a big cherry?

Man I love you!
Retiredman
Posts: 795
Joined: Fri, 4. Sep 09, 02:35
x3ap

Post by Retiredman »

Facetious1;
Jump to sector can be set by each ship's individual setting.

(if "fly to position"(different sector) or "fly to sector" then the ship will attempt to make the jump if the e-cell are available)

I usually set the jump to distance to 1 and a refuel for 35 jumps.


Cycrow : a little more clairty on the loop routines:

Like if I:(generitic form)

[(dock at hub1.
buy X + (jump & return)e-cells (or just set the hub1 as home if I own it, and forget about the jump buy)
dock at trading station
Sell X e-cells
loop 10) (inner loop)
dock at hub 2
buy crystals
dock at hub1
sell crystals
fly to position X (someplace In sector)
wait 60 (wait a minute)
loop -1] [master or outer loop]

as it is shown:
It will buy e-cells at the hub #1
Will jump/walk/run/zoom to the trading dock
sell the X number of e-cells
(does this 10 times - this is the inner loop)
docks at Hub #2
buys crystals
goes back and docks at hub #1
sells the crystals (same amount bought)
flys somewhere to a point
waits 1 minute

Repeats forever, starting at the very beginning to buy e-cells to sell at trading dock 10 times again, then goes to buy crystals. (This is the master/outer loop)

I am hoping that it would nest. The last loop would include the first loop (10 X)

Also I notice I don't have the option to "save" the routine. is it not there or am I missing something? (had thought I saw there was an option)

Edit: seems I tried a simple loop within a loop and it doesn't nest. Oh well.
facetious1
Posts: 180
Joined: Sat, 5. Sep 09, 00:32
x3tc

Post by facetious1 »

Retiredman wrote:Facetious1;
Jump to sector can be set by each ship's individual setting.

(if "fly to position"(different sector) or "fly to sector" then the ship will attempt to make the jump if the e-cell are available)

I usually set the jump to distance to 1 and a refuel for 35 jumps.
Ahh very awesome, thanks for the guidance. I have yet to mess around with individual ship settings like that... Now to get the rest of the ore to the hub!!! First loop worked charms!

Thanks again
snyperwolf
Posts: 6
Joined: Tue, 8. Jul 08, 03:31
xr

Post by snyperwolf »

alright so i DLed this a while ago but didnt really start to use it until today... well not so much use it as attempt to use it.

i cannot and i do mean cannot use this script at all.
i through every last reply in this topic, found people with my same problem but no answers.
my problem is that:
1. there is no hotkey available
2. when going through the plugin config menu i click 'create with argument/no argument' and i just get returned to the plugin config menu
3. i have no idea how to use the script editor, nor do i have any what to use it.

im not a scripter or a modder just a user who is having a spot of trouble at the moment.
madpainter
Posts: 25
Joined: Sat, 6. Dec 08, 04:13
x3tc

Post by madpainter »

Just a heads up on a possible conflict with the Gazz follow me/remember homebase mod.

unless its just me :P
Can anyone confirm /dis-confirm :oops: un-confirm :oops: ........prove me wrong. :P
User avatar
Lordaeron
Posts: 501
Joined: Tue, 17. Jul 07, 16:51
x4

Post by Lordaeron »

snyperwolf wrote:alright so i DLed this a while ago but didnt really start to use it until today... well not so much use it as attempt to use it.

i cannot and i do mean cannot use this script at all.
i through every last reply in this topic, found people with my same problem but no answers.
my problem is that:
1. there is no hotkey available
2. when going through the plugin config menu i click 'create with argument/no argument' and i just get returned to the plugin config menu
3. i have no idea how to use the script editor, nor do i have any what to use it.

im not a scripter or a modder just a user who is having a spot of trouble at the moment.
exact same problem here
Retiredman
Posts: 795
Joined: Fri, 4. Sep 09, 02:35
x3ap

Post by Retiredman »

Could be one of the Plugin version Cycrow has.(If I remeber there are 2 different ones)

I believe I was getting the same problem and switched the Plungin script and reloaded the Command Queue script.
Now it works for me..
User avatar
Lordaeron
Posts: 501
Joined: Tue, 17. Jul 07, 16:51
x4

Post by Lordaeron »

I should have mentioned that I unpacked the .pck to add a german language file, I translated.

Then I copied the whole thing like usual (script to script/t to t).

Maybe there are conflicts with other scripts I have in my "Must Have" Collection, Ill check that asap.
User avatar
Lordaeron
Posts: 501
Joined: Tue, 17. Jul 07, 16:51
x4

Post by Lordaeron »

Ok, no clue but it fixed itself, somehow.

weird
User avatar
klaatu
Posts: 316
Joined: Fri, 21. Nov 03, 17:23
x4

Post by klaatu »

Lordaeron wrote:
snyperwolf wrote:alright so i DLed this a while ago but didnt really start to use it until today... well not so much use it as attempt to use it.

i cannot and i do mean cannot use this script at all.
i through every last reply in this topic, found people with my same problem but no answers.
my problem is that:
1. there is no hotkey available
2. when going through the plugin config menu i click 'create with argument/no argument' and i just get returned to the plugin config menu
3. i have no idea how to use the script editor, nor do i have any what to use it.

im not a scripter or a modder just a user who is having a spot of trouble at the moment.
exact same problem here
+1
"It's so simple. No, wait--it's needlessly complex!"
- Homer Simpson
You need this!: Cargo Delivery Service
Savohkai
Posts: 9
Joined: Sun, 29. Jul 07, 21:47
x3tc

Post by Savohkai »

Greetings, I am still trying to figure out the scripts on my own but I am having a hard time with it. I'd love to add a DockTS by LV command to command queue but I just keep failing doing so. Can any1 point me to the right direction or hopefully implement it ? THX for assistance

I created this piece of code in the plugin.cmdque.setup :

Code: Select all

 $arr= create new array, arguments= Var/String; 'DOCK TS', null, null, null
@ =[THIS] -> call script plugin.cmdque.register : Command ID= 'Command_Special_523 Dock TS' Command Display Name= 'DOCK TS' Arguments Array= $arr Name of script to run= 'my.script.notify'

I created a seperate script called my.script.notify but im not sure how to add the correct arguments as You say Cycrow on page 5 in your little guide. Im confused now, help me please :)
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22412
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

the command looks fine, althou i would suggest creating you own setup file and putting the register in there. That way, when the command queue script is updated, it wont overright your additions.

simply create a script starting with setup. and it'll run automatically on load and register the command.

the scripts, my.script.notify, do the arguments you set there match what u have in $arr?

ie, 1 arguments thats a Var/String.

other than that, it seems like it should work.

when you open the command queue, does the command, DOCK TS, not get listed in the available commands list?
Savohkai
Posts: 9
Joined: Sun, 29. Jul 07, 21:47
x3tc

Post by Savohkai »

Thank You for the reply Cycrow, the command itself gets listed ( had to reinit cache for that to work) its just not working as it should. Its a matter of trigering the correct command , as for the Command ID should it be the script name sth like setup.dockts or the command number i wrote?
User avatar
Locksley
Posts: 371
Joined: Fri, 18. Mar 05, 16:26
x3tc

Post by Locksley »

1. Running ScriptEditor
2. Installed CommandQue
3. Saved Game
4. Check - still no Hotkey to assign.
5. Use Community plugin Configuration - there is the command to use CQ
6. Create Queue with arguments - Returns you to the starting menu of CPC
7. Create Queue without - Same
8. ReInit scripts - Same
9. Remove Gazz Remember Home - Reinstall all. - Same
10. Using command on other ship - Use CQ -> Create New - returns you to that ships Command interface.

Using:
1.Advanced Navigation Software
2.Advanced Thruster Control
3.Befehlsbibliothek_X3TC_V3408
4.Cheat Collection Package
5.Command Queueing
6.DAD drones
7.Ejon-Tech MarCin Ind Planetary Supply Station
8.E.S.T.
9.Gazz Convoy Control
10.Gazz Follow Me
11.Gazz AI Missile defence and turret update v2
12.Gazz Missile safety
13.Gazz Missile safety
14.Gazz Gazz ai_ammo_cheat1.06
15.JSON parse library
16.LV escape Pods
17.MarCon main menu
18.Military Base Revamp
19.Serial kicked Pirate Guild
20.Ship killed notification
21.Community Plugin Configuration
22.HotKey Manager
23.Ware Manager

Cheers!
Projects:
Onhold..... time time....

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