Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
And making discussions is great.
An existing but possibly outdated mod that might help is gabfou's ClickNFight mod (demonstration vid on the mod page). It hasn't been updated in a while, though, haven't tried that mod with recent versions of the game. Also, the mod's buttons don't visually show if an ability is on cooldown or disabled.
I don't know whether I'll get to this mod request. It's a great one and well-explained from one SC2 player to another. I've slowed down on modding and have mostly been maintaining my existing mods. But in case I do get to this, some questions for you:
0. What are your thoughts on the ClickNFight mod?
1. I understand that your goal is to select units using hotkeys. Once the control group is selected, would you want to interact with the abilities through the buttons or through keyboard shortcuts? (Both might be possible, but sometimes modding Total War games is a bit hacky, and I would want to make sure I designed with the priority in mind.)
2. Your comments have been on WH2 versions. You are wanting this for WH2 specifically, not WH3?
(Also, thank you for your bug reports, including video. I'm hoping to look into that soon.)
I'm using this instead: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2200533232
Through buttons is fine though spells should also be cast-able using the standard spell hotkeys. Although with the idea I now have I don't think we need to consider this part.
Your Find Idle Units mod is able to cycle through all the idle units, with MCT settings to either simply select or actually zoom to each unit. It can even ignore specific units you exclude.
Judging from that mod's capability, I think the best way is to create a "tab" mod that will cycle through units of that control group akin to Starcraft.
The process is as follows:
1) I group some units in control group #. In the background the script takes note of the # and those units.
2) I press #, nothing happens on the surface except vanilla behavior—all the units are selected and only the shared abilities/spells show.
But in the background it triggers the script for step 3, AKA ready to go into cycle mode for that control group.
3) I press the special hotkey (SH for short henceforth), it now cycles to the first unit of #, then the second, then the third etc. and keeps looping around. For a single unit in a control group all by itself, this SH would do nothing.
The script stays in this cycle mode until...
• I press another control group's #
➜ Script now goes into cycle mode for that group. SH cycles through those units.
• I click on a portrait, whether said portrait is in any control group doesn't matter.
➜ Script exits cycle mode. SH now behaves like vanilla next-unit hotkey. Except it's better because vanilla's forces the zoom to that unit, whereas yours could simply select it (again subject to options in MCT).
This way even if I don't have any control group the hotkey can still be useful if I've arranged by portraits in a specific way.
-----------------------------------------------------------------------------------------------
Overall I think setting up the mod like this interferes least with vanilla behavior, which ensures compatibility with other mods. It piggybacks of the vanilla next-unit hotkey a lot of course.
Speaking of which I have noticed that your Find Idle mod, using the find next idle unit hotkey, it cycles through all the idle units but in a rather random order (at least not left to right). What's the order according to the code there? https://youtu.be/W7n0lRBIEus
If the game's selection listener allowed it, I'd want to make a small modification: Instead of basing it off of control group selections, would it work as well for you if it was based on the current selection regardless of whether you selected it with a control group, some other hotkey like CTRL+C for selecting cavalry, or just drag-selected a cluster of units on the map?
One thing that would change about what you described is that when you pressed hotkey for a group with only one unit in it, it would act the same as if you clicked on that unit's portrait.
------------------
Regarding Find Idle Units: I can't view the video you shared in the last post because it's visibility is private. But the cycle order for that mod's next idle unit hotkey is indeed arbitrary. Too much detail: The script is using the next() looping order for a Lua table (a data structure similar to a Python dictionary or a Java map). next() is guaranteed to hit every key-value pair, but the order is arbitrary and is dependent on the implementation of the language.
At the time that I wrote the Find Idle Units mod, I had not yet found the game's scripting documentation,. Even now, I'm generally hesitant to make more assumptions than necessary. (I can't view the game's C++ layer of code, only the Lua scripts.) I didn't see a clear value to having a more predictable cycle order, so I didn't put in much work to try to change it. Does the unpredictable order make things harder for you?
idk unless you tried it while one of your other mods was slowing the battle manager's clock significantly, but I would think that would either be obvious--like when the Quick Spell Menu slows things down on purpose--or if it was a logic bottleneck then I'd expect it to also be affecting other things, not just this mod. Which brings me back to: idk and can only guess unless I'm able to reproduce it.
Yes, your idea is even better. Do that!
I don't see the part about having one unit selected not skipping to the next unit on the card being an issue, since we already have the vanilla next-unit hotkey. Though I really really wish that could be modded so it didn't zoom across the map but simply just select the next unit. Not sure if you'd be able to hijack that original hotkey or if you would have to make a new one. Beware however the next-unit/previous-unit hotkey is also used on the campaign map (I personally use it a lot to skip between my various lords and heroes). So if you were to hijack it for battle purposes maybe it'll have unintended consequences on the campaign map.
I have no issues with the Find Idle mod, I pretty much only use the pulse unit card function. I only experimented with the find-next-idle hotkey because it seems very similar in function to our idea for the new mod, which I guess we can call Control Group Tabbing or something 🤣
The only complaint about the Find Idle pulsing is that it's a little too bright. The entire card flashes and it's a little distracting which causes me to not really use it that much. If either the brightness of the flash can be toned down, or only part of the card flashes (like for AI general, though I don't know how many separate "components" there are to make flash), then it'd be much better.
For comparison, the four unit cards on the right are flashing from AI general, the others are from Find Idle: https://youtu.be/eXqWExx2KSw
PS: And yeah don't worry about the 0.2 check for the aerial pursuit. I had a look at the script and there were no typos. Possible a CPU issue or something. 0.4 works just like instant.