[MOD] Immediate Orders (updated April 18, 2021)

The place to discuss scripting and game modifications for X4: Foundations.

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

Berserk Knight
Posts: 398
Joined: Tue, 17. Dec 13, 01:34
x4

[MOD] Immediate Orders (updated April 18, 2021)

Post by Berserk Knight » Thu, 4. Apr 19, 13:44

Adds copies of some regular orders as "Priority Orders" which are added to the front of the order queue instead of the back, and "Clear Orders" which clears out the order queue on top of that.
Adds several default behaviors to the right-click menu so you can issue them to multiple units with a single click.

Get it on Nexus.

Adds the following "Priority Orders".
-Fly to
-Attack
-Attack in range
-Dock at

Adds the following "default behaviors" to the right-click menu.
-Patrol (on the sector that you clicked on)
-AutoTrader
-Distribute Wares
-Sector Miner
-Advanced Miner
-Expert Miner
(AutoTrader/Miner type behaviors automatically have the warebasket filled with all possible wares.)

Adds all of the above to "Clear Orders".


Now, if EgoSoft would please take notes and implement at least some of these in the base game...
Last edited by Berserk Knight on Sun, 18. Apr 21, 19:09, edited 3 times in total.

Hornet108
Posts: 343
Joined: Thu, 15. Nov 12, 13:46
x4

Re: [MOD] Immediate Orders

Post by Hornet108 » Fri, 5. Apr 19, 00:15

m8, excellent. This is badly needed

Falcrack
Posts: 4994
Joined: Wed, 29. Jul 09, 00:46
x4

Re: [MOD] Immediate Orders

Post by Falcrack » Sun, 7. Apr 19, 18:30

Cool, could you add this to Steam Workshop?

Hornet108
Posts: 343
Joined: Thu, 15. Nov 12, 13:46
x4

Re: [MOD] Immediate Orders

Post by Hornet108 » Tue, 16. Apr 19, 13:05

FYI this isn't compatible with the 2.5 beta branch. Right clicking on objects when you have one of your own selected doesn't work.

Berserk Knight
Posts: 398
Joined: Tue, 17. Dec 13, 01:34
x4

Re: [MOD] Immediate Orders

Post by Berserk Knight » Tue, 16. Apr 19, 22:14

Hornet108 wrote:
Tue, 16. Apr 19, 13:05
FYI this isn't compatible with the 2.5 beta branch. Right clicking on objects when you have one of your own selected doesn't work.
It is caused by the outdated RightClickAPI, which I'll pick up until/unless morbideth returns.

However, unless you are a modder attempting to keep your mods' code updated, you really should be using the beta to test the patch itself so EgoSoft can fix THEIR stuff, not as an early update.
On that principle, I do not release updates for beta. (Also, beta updates can be frequent at times, which is very annoying when trying to maintain code through.)

Hornet108
Posts: 343
Joined: Thu, 15. Nov 12, 13:46
x4

Re: [MOD] Immediate Orders

Post by Hornet108 » Wed, 17. Apr 19, 10:47

Berserk Knight wrote:
Tue, 16. Apr 19, 22:14
However, unless you are a modder attempting to keep your mods' code updated, you really should be using the beta to test the patch itself so EgoSoft can fix THEIR stuff, not as an early update.
On that principle, I do not release updates for beta. (Also, beta updates can be frequent at times, which is very annoying when trying to maintain code through.)
Tbh mate, im not asking you to update for the beta, and I do submit feedback for egosoft on their beta builds (not that it matters if I don't, that's largely my business) - I posted here to let you know that once 2.5 hits the mod will be incompatible as a courtesy and a heads up, nothing more nothing less.

Berserk Knight
Posts: 398
Joined: Tue, 17. Dec 13, 01:34
x4

Re: [MOD] Immediate Orders

Post by Berserk Knight » Wed, 17. Apr 19, 10:58

Hornet108 wrote:
Wed, 17. Apr 19, 10:47
Tbh mate, im not asking you to update for the beta, and I do submit feedback for egosoft on their beta builds (not that it matters if I don't, that's largely my business) - I posted here to let you know that once 2.5 hits the mod will be incompatible as a courtesy and a heads up, nothing more nothing less.
Well, I constantly keep track of the beta so the heads up wasn't really needed, but thanks anyways.

The part about me not doing updates for beta wasn't specifically pointed at you (more of an announcement, really), so sorry if you felt that way and took offense.

Misunderstood Wookie
Posts: 377
Joined: Mon, 15. Mar 04, 08:07
x4

Re: [MOD] Immediate Orders

Post by Misunderstood Wookie » Sat, 20. Apr 19, 11:01

I just wanted to point out that punctuation and choice of wording make all the difference.

Berserk Knights wording of -
Unless you are a modder...
Turned the entire statement towards hornet when coupled with the direct quote from hornet.
Now if the statement read 'Unless a modder...' then okay, you can argue that it was not a direct response to hornet specifically. I touched on that I may as well touch on one other finer detail but one could easily look past when Berserk Knight wrote
So Sorry
and as without a breath 'So, Sorry,' changed for me at least the way even I read the reply.

Look I know people get their arms in a twist when others point out how things are written on the internet but let us be real about it, without communication skills most of us would be no better than monkeys, pointing at each other and making hand signals and hoping the other monkey understood the interpretation. (Example: So Sorry that you took offence to this.) Can be taken two ways, to me it sounded more like condescension and... like a slight stab. However, written as 'So, sorry, I did not mean things to sound directly offensive.' the tone is changed.

Now I am not here to pick a fight I am simply stating from a bystander point of view where mistakes were made that lead to two people passively flexing on each other.
Obviously, I know the intent just myself included have run into plenty of times a bunch of needless back and forth bickering could have been avoided by the tone the statement made. Some people are sensitive, If I had to guess Hornet might be a fellow Australian hornet probably don't care because we fight Kangaroo's on the side of the highway's down here :lol:


All that aside, I watch the mods progress, it has been in my load order for some time and it is really handy to have appreciated the efforts :)
*modified*
*X3 LiteCube User*
MOD GemFX Real Space Shaders
MOD Variety and Rebalance Overhaul Icon Pack
I lost my Hans and should not be flying Solo.
Image

Hornet108
Posts: 343
Joined: Thu, 15. Nov 12, 13:46
x4

Re: [MOD] Immediate Orders

Post by Hornet108 » Wed, 1. May 19, 22:01

So anyway, does this work with 2.5? :mrgreen:

taintedxodus
Posts: 28
Joined: Fri, 2. Mar 07, 00:58
x4

Re: [MOD] Immediate Orders

Post by taintedxodus » Thu, 2. May 19, 00:16

It wont until G_workaround gets updating, it has to be updated everytime egosoft makes changes to the ui.

Nifhtyeq
Posts: 73
Joined: Fri, 15. Feb 19, 17:32

Re: [MOD] Immediate Orders

Post by Nifhtyeq » Thu, 2. May 19, 10:12

Hornet108 wrote:
Wed, 1. May 19, 22:01
So anyway, does this work with 2.5? :mrgreen:
I used it with 2.5 and it worked fine. I don't see why it wouldn't work for you.

Hornet108
Posts: 343
Joined: Thu, 15. Nov 12, 13:46
x4

Re: [MOD] Immediate Orders

Post by Hornet108 » Wed, 29. May 19, 19:53

Sorry to pester, any word on this? :D

Berserk Knight
Posts: 398
Joined: Tue, 17. Dec 13, 01:34
x4

Re: [MOD] Immediate Orders

Post by Berserk Knight » Thu, 30. May 19, 05:22

Hornet108 wrote:
Wed, 29. May 19, 19:53
Sorry to pester, any word on this? :D
Gah, 2.50 got pushed to live on the one day I was too busy to check.

Mod updated.

Lazerath
Posts: 860
Joined: Tue, 22. Mar 05, 06:31
x4

Re: [MOD] Immediate Orders

Post by Lazerath » Thu, 30. May 19, 12:22

Berserk Knight wrote:
Thu, 30. May 19, 05:22
Hornet108 wrote:
Wed, 29. May 19, 19:53
Sorry to pester, any word on this? :D
Gah, 2.50 got pushed to live on the one day I was too busy to check.

Mod updated.
Hi Beserk Knight,

You should also update (edit) your original posts subject line to something like:

[MOD] Immediate Ordes (Compatible with v2.50)
or
[MOD] Immediate Ordes (Works with v2.50)

Then update the body of your post to say something like:

Updated May 29, 2019 to work with game update v2.50

That way people don’t have to search the thread looking for that important info! (You probably forgot as it sounds like you’ve been busy like a bee).

Thanks for the mod!

Cheers!
COMPUTER SPECS
[Mobo] SABERTOOTH 990FX R2.0
[CPU] AMD FX-9370 8 Cores 4.4 - 4.7GHZ 16MB DDR3-1866
[Cooling] Corsair Hydro Series H80I CPU Cooler System
[Video] Evga 970 GTX SC 3.5Gb Ram ==> [Ram] G-Skills Ripjaws X 16GB
[Harddrive] (2) x Samsung 850 Evo 250GB SSD
[Harddrive] Samsung 840 Series 120GB SSD ==> [Harddrive] WD BLACK 1TB 64MB 7200RPM
[Disc Player] LG 14X BLU-RAY BURNER ==> [Case] Thermaltake A71 Chaser [Windows 7 Pro]

Berserk Knight
Posts: 398
Joined: Tue, 17. Dec 13, 01:34
x4

Re: [MOD] Immediate Orders

Post by Berserk Knight » Thu, 30. May 19, 12:54

Lazerath wrote:
Thu, 30. May 19, 12:22
Forgot about the title while juggling 4 mods. lol

Hornet108
Posts: 343
Joined: Thu, 15. Nov 12, 13:46
x4

Re: [MOD] Immediate Orders

Post by Hornet108 » Sun, 2. Jun 19, 12:36

Berserk Knight wrote:
Thu, 30. May 19, 05:22
Hornet108 wrote:
Wed, 29. May 19, 19:53
Sorry to pester, any word on this? :D
Gah, 2.50 got pushed to live on the one day I was too busy to check.

Mod updated.
Sorry mate!

Take it as a compliment - im a huge fan of your work!

Hornet108
Posts: 343
Joined: Thu, 15. Nov 12, 13:46
x4

Re: [MOD] Immediate Orders (updated May 30, 2019)

Post by Hornet108 » Mon, 18. Nov 19, 02:18

Just a quick one if anyone finds this absolutely essential but is having problems with it in the 3.0 beta - here is a (very hacky) solution to make this work. I have disabled some of the right click functionality that was causing issues, but they are things that I personally don't miss. Some of the things disabled may still work, but they haven't been tested because I don't need them.

To use this, replace the function capi.InsertLuaAction in the right_click_api.lua in the root of the RightClickAPI extension with the following code:

Code: Select all

function capi.InsertLuaAction(actiontype, istobedisplayed)
	local doIt = true
	
	-- process your own action
	if actiontype == "accountmanagement" then
		capi.OnAccountmanagement()
		doIt = false
	elseif actiontype == "assign" then
		capi.OnAssign()
		doIt = true
	elseif actiontype == "attack" then
		capi.OnAttack()
		doIt = true
	elseif actiontype == "attackinrange" then
		capi.OnAttackinrange()
		doIt = true
	elseif actiontype == "attackmultiple" then
		capi.OnAttackmultiple()
		doIt = true
	elseif actiontype == "attackplayertarget" then
		capi.OnAttackplayertarget()
		doIt = false
	elseif actiontype == "board" then
		capi.OnBoard()
		doIt = true
	elseif actiontype == "build" then
		capi.OnBuild()
		doIt = true
	elseif actiontype == "buildships" then
		capi.OnBuildships()
		doIt = true
	elseif actiontype == "changeformation" then
		capi.OnChangeformation()
		doIt = false
	elseif actiontype == "configurestation" then
		capi.OnConfigurestation()
		doIt = true
	elseif actiontype == "collect" then
		capi.OnCollect()
		doIt = false
	elseif actiontype == "collectlockbox" then
		capi.OnCollectlockbox()
		doIt = false
	elseif actiontype == "collectspace" then
		capi.OnCollectspace()
		doIt = false
	elseif actiontype == "deployhere" then
		capi.OnDeployhere()
		doIt = true
	elseif actiontype == "deployat" then
		capi.OnDeployat()
		doIt = true
	elseif actiontype == "depositinventory" then
		capi.OnDepositinventory()
		doIt = true
	elseif actiontype == "dockat" then
		capi.OnDockat()
		doIt = true
	elseif actiontype == "dockatplayer" then
		capi.OnDockatplayer()
		doIt = true
	elseif actiontype == "dockrequest" then
		capi.OnDockrequest()
		doIt = true
	elseif actiontype == "dropinventory" then
		capi.OnDropinventory()
		doIt = true
	elseif actiontype == "explore" then
		capi.OnExplore()
		doIt = false
	elseif actiontype == "exploreupdate" then
		capi.OnExploreupdate()
		doIt = false
	elseif actiontype == "flyto" then
		capi.OnFlyto()
		doIt = true
	elseif actiontype == "follow" then
		capi.OnFollow()
		doIt = true
	elseif actiontype == "getsupplies" then
		capi.OnGetsupplies()
		doIt = true
	elseif actiontype == "guidance" then
		capi.OnGuidance()
		doIt = true
	elseif actiontype == "hire" then
		capi.OnHire()
		doIt = false
	elseif actiontype == "logicalstationoverview" then		
		capi.OnLogicalstationoverview()
		doIt = true
	elseif actiontype == "manageassignments" then
		capi.OnManageassignments()
		doIt = false
	elseif actiontype == "mining" then
		capi.OnMining()
		doIt = true
	elseif actiontype == "orderoverview" then
		capi.OnOrderoverview()
		doIt = false
	elseif actiontype == "paintmod" then
		capi.OnPaintmod()
		doIt = false
	elseif actiontype == "player_docktotrade" then
		capi.OnPlayer_docktotrade()
		doIt = true
	elseif actiontype == "proceedwithorders" then
		capi.OnProceedwithorders()
		doIt = true
	elseif actiontype == "protectstation" then
		capi.OnProtectstation()
		doIt = true
	elseif actiontype == "recallsubs" then
		capi.OnRecallsubs()
		doIt = true
	elseif actiontype == "removeallorders" then
		capi.OnRemoveallorders()
		doIt = true
	elseif actiontype == "sellships" then
		capi.OnSellships()
		doIt = true
	elseif actiontype == "stopandholdfire" then
		capi.OnStopandholdfire()
		doIt = true
	elseif actiontype == "targetview" then
		capi.OnTargetview()
		doIt = false
	elseif actiontype == "teleport" then
		capi.OnTeleport()
		doIt = true
	elseif actiontype == "upgrade" then
		capi.OnUpgrade()
		doIt = true
	elseif actiontype == "upgradeships" then
		capi.OnUpgradeships()
		doIt = true
	elseif actiontype == "venturedockat" then
		capi.OnVenturedockat()
		doIt = false
	elseif actiontype == "wareexchange" then
		capi.OnWareexchange()
		doIt = true
	elseif actiontype == "withdrawandhold" then
		capi.OnWithdrawandhold()
		doIt = true
	elseif actiontype == "withdrawfromcombat" then
		capi.OnWithdrawfromcombat()
		doIt = true
	elseif actiontype == "cheat_satellite" then--I don't know if modders can get access to these, so Im adding them anyway.
		capi.OnCheat_satellite()
		doIt = false
	elseif actiontype == "cheat_navbeacon" then
		capi.OnCheat_navbeacon()
		doIt = false
	elseif actiontype == "cheat_resourceprobe" then
		capi.OnCheat_resourceprobe()
		doIt = false
	elseif actiontype == "cheat_takeownership" then
		capi.OnCheat_takeownership()
		doIt = false
	elseif actiontype == "cheat_warp" then
		capi.OnCheat_warp()
		doIt = false
		
		
	elseif actiontype == "rename" then		
		doIt = false
	elseif actiontype == "fleetrename" then
		doIt = false
	elseif actiontype == "removeallordersandwait" then
		doIt = false
	elseif actiontype == "collectdeployables" then
		doIt = false
	elseif actiontype == "crewtransfer" then
		doIt = false			
		
	else 
		DebugError("Unknown order type")
		DebugError(actiontype)
		doIt = false
	end
	
	if doIt == true then
		--then call original function first
		orig.insertLuaAction(actiontype, istobedisplayed)
	end
	
end
Again, this is a hacky work-around (I'm not familiar with how this mod actually works, I was just able to hack this together to get it working) until 3.0 is released properly and Berserk Knight hopefully keeps up his excellent work and updates the mod :D

kringol
Posts: 2
Joined: Sat, 1. Dec 18, 22:03
x4

Re: [MOD] Immediate Orders (updated May 30, 2019)

Post by kringol » Thu, 21. Nov 19, 17:01

Hornet108 wrote:
Mon, 18. Nov 19, 02:18
Just a quick one if anyone finds this absolutely essential but is having problems with it in the 3.0 beta - here is a (very hacky) solution to make this work. I have disabled some of the right click functionality that was causing issues, but they are things that I personally don't miss. Some of the things disabled may still work, but they haven't been tested because I don't need them.

To use this, replace the function capi.InsertLuaAction in the right_click_api.lua in the root of the RightClickAPI extension with the following code:

Code: Select all

function capi.InsertLuaAction(actiontype, istobedisplayed)
	local doIt = true
	
	-- process your own action
	if actiontype == "accountmanagement" then
		capi.OnAccountmanagement()
		doIt = false
	elseif actiontype == "assign" then
		capi.OnAssign()
		doIt = true
	elseif actiontype == "attack" then
		capi.OnAttack()
		doIt = true
	elseif actiontype == "attackinrange" then
		capi.OnAttackinrange()
		doIt = true
	elseif actiontype == "attackmultiple" then
		capi.OnAttackmultiple()
		doIt = true
	elseif actiontype == "attackplayertarget" then
		capi.OnAttackplayertarget()
		doIt = false
	elseif actiontype == "board" then
		capi.OnBoard()
		doIt = true
	elseif actiontype == "build" then
		capi.OnBuild()
		doIt = true
	elseif actiontype == "buildships" then
		capi.OnBuildships()
		doIt = true
	elseif actiontype == "changeformation" then
		capi.OnChangeformation()
		doIt = false
	elseif actiontype == "configurestation" then
		capi.OnConfigurestation()
		doIt = true
	elseif actiontype == "collect" then
		capi.OnCollect()
		doIt = false
	elseif actiontype == "collectlockbox" then
		capi.OnCollectlockbox()
		doIt = false
	elseif actiontype == "collectspace" then
		capi.OnCollectspace()
		doIt = false
	elseif actiontype == "deployhere" then
		capi.OnDeployhere()
		doIt = true
	elseif actiontype == "deployat" then
		capi.OnDeployat()
		doIt = true
	elseif actiontype == "depositinventory" then
		capi.OnDepositinventory()
		doIt = true
	elseif actiontype == "dockat" then
		capi.OnDockat()
		doIt = true
	elseif actiontype == "dockatplayer" then
		capi.OnDockatplayer()
		doIt = true
	elseif actiontype == "dockrequest" then
		capi.OnDockrequest()
		doIt = true
	elseif actiontype == "dropinventory" then
		capi.OnDropinventory()
		doIt = true
	elseif actiontype == "explore" then
		capi.OnExplore()
		doIt = false
	elseif actiontype == "exploreupdate" then
		capi.OnExploreupdate()
		doIt = false
	elseif actiontype == "flyto" then
		capi.OnFlyto()
		doIt = true
	elseif actiontype == "follow" then
		capi.OnFollow()
		doIt = true
	elseif actiontype == "getsupplies" then
		capi.OnGetsupplies()
		doIt = true
	elseif actiontype == "guidance" then
		capi.OnGuidance()
		doIt = true
	elseif actiontype == "hire" then
		capi.OnHire()
		doIt = false
	elseif actiontype == "logicalstationoverview" then		
		capi.OnLogicalstationoverview()
		doIt = true
	elseif actiontype == "manageassignments" then
		capi.OnManageassignments()
		doIt = false
	elseif actiontype == "mining" then
		capi.OnMining()
		doIt = true
	elseif actiontype == "orderoverview" then
		capi.OnOrderoverview()
		doIt = false
	elseif actiontype == "paintmod" then
		capi.OnPaintmod()
		doIt = false
	elseif actiontype == "player_docktotrade" then
		capi.OnPlayer_docktotrade()
		doIt = true
	elseif actiontype == "proceedwithorders" then
		capi.OnProceedwithorders()
		doIt = true
	elseif actiontype == "protectstation" then
		capi.OnProtectstation()
		doIt = true
	elseif actiontype == "recallsubs" then
		capi.OnRecallsubs()
		doIt = true
	elseif actiontype == "removeallorders" then
		capi.OnRemoveallorders()
		doIt = true
	elseif actiontype == "sellships" then
		capi.OnSellships()
		doIt = true
	elseif actiontype == "stopandholdfire" then
		capi.OnStopandholdfire()
		doIt = true
	elseif actiontype == "targetview" then
		capi.OnTargetview()
		doIt = false
	elseif actiontype == "teleport" then
		capi.OnTeleport()
		doIt = true
	elseif actiontype == "upgrade" then
		capi.OnUpgrade()
		doIt = true
	elseif actiontype == "upgradeships" then
		capi.OnUpgradeships()
		doIt = true
	elseif actiontype == "venturedockat" then
		capi.OnVenturedockat()
		doIt = false
	elseif actiontype == "wareexchange" then
		capi.OnWareexchange()
		doIt = true
	elseif actiontype == "withdrawandhold" then
		capi.OnWithdrawandhold()
		doIt = true
	elseif actiontype == "withdrawfromcombat" then
		capi.OnWithdrawfromcombat()
		doIt = true
	elseif actiontype == "cheat_satellite" then--I don't know if modders can get access to these, so Im adding them anyway.
		capi.OnCheat_satellite()
		doIt = false
	elseif actiontype == "cheat_navbeacon" then
		capi.OnCheat_navbeacon()
		doIt = false
	elseif actiontype == "cheat_resourceprobe" then
		capi.OnCheat_resourceprobe()
		doIt = false
	elseif actiontype == "cheat_takeownership" then
		capi.OnCheat_takeownership()
		doIt = false
	elseif actiontype == "cheat_warp" then
		capi.OnCheat_warp()
		doIt = false
		
		
	elseif actiontype == "rename" then		
		doIt = false
	elseif actiontype == "fleetrename" then
		doIt = false
	elseif actiontype == "removeallordersandwait" then
		doIt = false
	elseif actiontype == "collectdeployables" then
		doIt = false
	elseif actiontype == "crewtransfer" then
		doIt = false			
		
	else 
		DebugError("Unknown order type")
		DebugError(actiontype)
		doIt = false
	end
	
	if doIt == true then
		--then call original function first
		orig.insertLuaAction(actiontype, istobedisplayed)
	end
	
end
Again, this is a hacky work-around (I'm not familiar with how this mod actually works, I was just able to hack this together to get it working) until 3.0 is released properly and Berserk Knight hopefully keeps up his excellent work and updates the mod :D


Worked for me too not perfect but at least working

XTC0R
Posts: 401
Joined: Sat, 1. Dec 18, 19:58
x4

Re: [MOD] Immediate Orders (updated May 30, 2019)

Post by XTC0R » Thu, 21. Nov 19, 18:24

Hornet108 wrote:
Mon, 18. Nov 19, 02:18
Just a quick one if anyone finds this absolutely essential but is having problems with it in the 3.0 beta - here is a (very hacky) solution to make this work. I have disabled some of the right click functionality that was causing issues, but they are things that I personally don't miss. Some of the things disabled may still work, but they haven't been tested because I don't need them.

To use this, replace the function capi.InsertLuaAction in the right_click_api.lua in the root of the RightClickAPI extension with the following code:

Code: Select all

function capi.InsertLuaAction(actiontype, istobedisplayed)
	local doIt = true
	
	-- process your own action
	if actiontype == "accountmanagement" then
		capi.OnAccountmanagement()
		doIt = false
	elseif actiontype == "assign" then
		capi.OnAssign()
		doIt = true
	elseif actiontype == "attack" then
		capi.OnAttack()
		doIt = true
	elseif actiontype == "attackinrange" then
		capi.OnAttackinrange()
		doIt = true
	elseif actiontype == "attackmultiple" then
		capi.OnAttackmultiple()
		doIt = true
	elseif actiontype == "attackplayertarget" then
		capi.OnAttackplayertarget()
		doIt = false
	elseif actiontype == "board" then
		capi.OnBoard()
		doIt = true
	elseif actiontype == "build" then
		capi.OnBuild()
		doIt = true
	elseif actiontype == "buildships" then
		capi.OnBuildships()
		doIt = true
	elseif actiontype == "changeformation" then
		capi.OnChangeformation()
		doIt = false
	elseif actiontype == "configurestation" then
		capi.OnConfigurestation()
		doIt = true
	elseif actiontype == "collect" then
		capi.OnCollect()
		doIt = false
	elseif actiontype == "collectlockbox" then
		capi.OnCollectlockbox()
		doIt = false
	elseif actiontype == "collectspace" then
		capi.OnCollectspace()
		doIt = false
	elseif actiontype == "deployhere" then
		capi.OnDeployhere()
		doIt = true
	elseif actiontype == "deployat" then
		capi.OnDeployat()
		doIt = true
	elseif actiontype == "depositinventory" then
		capi.OnDepositinventory()
		doIt = true
	elseif actiontype == "dockat" then
		capi.OnDockat()
		doIt = true
	elseif actiontype == "dockatplayer" then
		capi.OnDockatplayer()
		doIt = true
	elseif actiontype == "dockrequest" then
		capi.OnDockrequest()
		doIt = true
	elseif actiontype == "dropinventory" then
		capi.OnDropinventory()
		doIt = true
	elseif actiontype == "explore" then
		capi.OnExplore()
		doIt = false
	elseif actiontype == "exploreupdate" then
		capi.OnExploreupdate()
		doIt = false
	elseif actiontype == "flyto" then
		capi.OnFlyto()
		doIt = true
	elseif actiontype == "follow" then
		capi.OnFollow()
		doIt = true
	elseif actiontype == "getsupplies" then
		capi.OnGetsupplies()
		doIt = true
	elseif actiontype == "guidance" then
		capi.OnGuidance()
		doIt = true
	elseif actiontype == "hire" then
		capi.OnHire()
		doIt = false
	elseif actiontype == "logicalstationoverview" then		
		capi.OnLogicalstationoverview()
		doIt = true
	elseif actiontype == "manageassignments" then
		capi.OnManageassignments()
		doIt = false
	elseif actiontype == "mining" then
		capi.OnMining()
		doIt = true
	elseif actiontype == "orderoverview" then
		capi.OnOrderoverview()
		doIt = false
	elseif actiontype == "paintmod" then
		capi.OnPaintmod()
		doIt = false
	elseif actiontype == "player_docktotrade" then
		capi.OnPlayer_docktotrade()
		doIt = true
	elseif actiontype == "proceedwithorders" then
		capi.OnProceedwithorders()
		doIt = true
	elseif actiontype == "protectstation" then
		capi.OnProtectstation()
		doIt = true
	elseif actiontype == "recallsubs" then
		capi.OnRecallsubs()
		doIt = true
	elseif actiontype == "removeallorders" then
		capi.OnRemoveallorders()
		doIt = true
	elseif actiontype == "sellships" then
		capi.OnSellships()
		doIt = true
	elseif actiontype == "stopandholdfire" then
		capi.OnStopandholdfire()
		doIt = true
	elseif actiontype == "targetview" then
		capi.OnTargetview()
		doIt = false
	elseif actiontype == "teleport" then
		capi.OnTeleport()
		doIt = true
	elseif actiontype == "upgrade" then
		capi.OnUpgrade()
		doIt = true
	elseif actiontype == "upgradeships" then
		capi.OnUpgradeships()
		doIt = true
	elseif actiontype == "venturedockat" then
		capi.OnVenturedockat()
		doIt = false
	elseif actiontype == "wareexchange" then
		capi.OnWareexchange()
		doIt = true
	elseif actiontype == "withdrawandhold" then
		capi.OnWithdrawandhold()
		doIt = true
	elseif actiontype == "withdrawfromcombat" then
		capi.OnWithdrawfromcombat()
		doIt = true
	elseif actiontype == "cheat_satellite" then--I don't know if modders can get access to these, so Im adding them anyway.
		capi.OnCheat_satellite()
		doIt = false
	elseif actiontype == "cheat_navbeacon" then
		capi.OnCheat_navbeacon()
		doIt = false
	elseif actiontype == "cheat_resourceprobe" then
		capi.OnCheat_resourceprobe()
		doIt = false
	elseif actiontype == "cheat_takeownership" then
		capi.OnCheat_takeownership()
		doIt = false
	elseif actiontype == "cheat_warp" then
		capi.OnCheat_warp()
		doIt = false
		
		
	elseif actiontype == "rename" then		
		doIt = false
	elseif actiontype == "fleetrename" then
		doIt = false
	elseif actiontype == "removeallordersandwait" then
		doIt = false
	elseif actiontype == "collectdeployables" then
		doIt = false
	elseif actiontype == "crewtransfer" then
		doIt = false			
		
	else 
		DebugError("Unknown order type")
		DebugError(actiontype)
		doIt = false
	end
	
	if doIt == true then
		--then call original function first
		orig.insertLuaAction(actiontype, istobedisplayed)
	end
	
end
Again, this is a hacky work-around (I'm not familiar with how this mod actually works, I was just able to hack this together to get it working) until 3.0 is released properly and Berserk Knight hopefully keeps up his excellent work and updates the mod :D
I tried your hotfix. The context menu opens again. But is missing the mass crew transfer option which was introduced in Beta 3.0

XTC0R
Posts: 401
Joined: Sat, 1. Dec 18, 19:58
x4

Re: [MOD] Immediate Orders (updated May 30, 2019)

Post by XTC0R » Fri, 22. Nov 19, 11:08

I get the following error in the debug log:

Code: Select all

[=ERROR=] 199789.79 Table row height mismatch in row 4: expected height = 10, actualheight = 15 [Klaus]
The context menu opens but does not show the mass crew transfer option.

Post Reply

Return to “X4: Foundations - Scripts and Modding”