My research building doesn't has the queue ability, but it is still possible to queue research by shift-clicking. This wouldn't be a problem if it weren't for my incremental cost upgrades. I have upgrades which modify their own cost so the later levels get more expensive. The problem is that if you shift-click an upgrade a lot, you can queue up a lot of levels for the default unmodified price.
Is there any way to fix this? I'm quite desperate, so if there's a way to disable shift-queuing or anything really, I'd be willing to try it.
I've tried triggers that order the unit to do what it wanted to do something like:
Event: Unit is issued an order
Actions: Order triggering unit to (Triggering Unit) unit order 0 (Replace existing orders)
Use a Requirement Upgrade-Queued (you might have to add a build queue, but you can always limit it to 1 slot and/or hide the progress bar)
You could also add a cooldown or regenerating charges to the ability or use an Effect-Instant ability for the clickable button, then make that apply an Issue Order effect for the research and some buff setup to handle the timer.
Everything is a lot of work with this editor. Even closing it can take over 2 minutes!
You can try with buffs or charges, but if you don't already know how to build such a system it'll be faster if you just brute-force add all the requirements.
I figured out a way to block it with the trigger editor. Some of the stuff I do might not be necessary, but I've spent enough time with it so I cba testing it again without some parts of it.
It's worth noting that it didn't seem to work if I just ordered it to do "o". I had to order it to do an order with no target and then use the "Ability Command for Order" on o to get it to work.
Yeah that workaround makes sense - ordering it to Stop clears its order queue, and then you re-order it to do it only once. I think it's odd though that without a queue ability it's still possible to queue. Is it possible that within the Research ability you have the flag "Use Unit Order Queue" selected? If so, try turning that off. It makes it so that the research order is treated as along the lines of a move, attack, patrol, etc., order, within its main queue, which every unit has. With the flag off, it is supposed to use a build queue. If that still doesn't fix the problem, then give the unit a queue ability with only 1 slot!
Those fixes should work, but if they don't, then Photoloss' suggestion is valid and more secure than using a trigger workaround. Yes it takes a long time, but familiarize yourself with using the XML view of the Data editor (Ctrl+3), and it makes jobs a LOT quicker. You can simply give all of the upgrades the same Tech Tree Alias within the upgrade data, and make one single requirement that checks how many of those tech tree aliases are queued at the unit. Then put the requirement inside one of the upgrade commands within the research ability using the normal table view. Switch to XML view and copy and paste the same requirement into all of the other commands.
My research building doesn't has the queue ability, but it is still possible to queue research by shift-clicking. This wouldn't be a problem if it weren't for my incremental cost upgrades. I have upgrades which modify their own cost so the later levels get more expensive. The problem is that if you shift-click an upgrade a lot, you can queue up a lot of levels for the default unmodified price.
Is there any way to fix this? I'm quite desperate, so if there's a way to disable shift-queuing or anything really, I'd be willing to try it.
I've tried triggers that order the unit to do what it wanted to do something like:
Event: Unit is issued an order
Actions: Order triggering unit to (Triggering Unit) unit order 0 (Replace existing orders)
but it doesn't seem to replace the shift queue.
Use a Requirement Upgrade-Queued (you might have to add a build queue, but you can always limit it to 1 slot and/or hide the progress bar)
You could also add a cooldown or regenerating charges to the ability or use an Effect-Instant ability for the clickable button, then make that apply an Issue Order effect for the research and some buff setup to handle the timer.
Yeah, this is a possibility, but it's a lot of work since I have over 50 upgrades.
Everything is a lot of work with this editor. Even closing it can take over 2 minutes!
You can try with buffs or charges, but if you don't already know how to build such a system it'll be faster if you just brute-force add all the requirements.
I figured out a way to block it with the trigger editor. Some of the stuff I do might not be necessary, but I've spent enough time with it so I cba testing it again without some parts of it.
It's worth noting that it didn't seem to work if I just ordered it to do "o". I had to order it to do an order with no target and then use the "Ability Command for Order" on o to get it to work.
Yeah that workaround makes sense - ordering it to Stop clears its order queue, and then you re-order it to do it only once. I think it's odd though that without a queue ability it's still possible to queue. Is it possible that within the Research ability you have the flag "Use Unit Order Queue" selected? If so, try turning that off. It makes it so that the research order is treated as along the lines of a move, attack, patrol, etc., order, within its main queue, which every unit has. With the flag off, it is supposed to use a build queue. If that still doesn't fix the problem, then give the unit a queue ability with only 1 slot!
Those fixes should work, but if they don't, then Photoloss' suggestion is valid and more secure than using a trigger workaround. Yes it takes a long time, but familiarize yourself with using the XML view of the Data editor (Ctrl+3), and it makes jobs a LOT quicker. You can simply give all of the upgrades the same Tech Tree Alias within the upgrade data, and make one single requirement that checks how many of those tech tree aliases are queued at the unit. Then put the requirement inside one of the upgrade commands within the research ability using the normal table view. Switch to XML view and copy and paste the same requirement into all of the other commands.