Total War: WARHAMMER II

Total War: WARHAMMER II

Aerial Pursuit
V 18 Jul, 2023 @ 2:38am
Your mods are amazing!
Sorry to make a discussion but my characters exceed the length permitted for comments.

One of the biggest issues with WH control groups is that when different units are selected, no abilities or spells show up in the interface anymore.

Only shared abilities show, which is silly, and even then you often don't want them to cast together, like have two Bastiladon (Revivification Crystal) grouped together casting the heal just wastes one of them.

If my Lord is on a horse and I group him with other cavalry units, then I hit the control group hotkey (so I can easily move them together in unison), I can't cast any of his spells or abilities until I individually click on his portrait, which defeats the purpose of having control groups in the first place.

Is it possible to make a mod so when two or more units are selected, the abilities/spells UI for the first unit shows? That way as long as the lord or hero is the left-most unit in the control group, we will be able to use all their spells/abilities.

Such a mod would be a true godsend.

----------------------------------------------------------------------------------

Alternatively, the mod could simply use a hotkey to cycle through all the units currently selected, starting with the left-most one. This is how competitive RTS like Starcraft 2 does it, essentially allowing you to cycle through units in a control group. Though this is probably easier said then done.
< >
Showing 1-5 of 5 comments
paperpancake  [developer] 18 Jul, 2023 @ 1:23pm 
Thanks for the compliment.
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.)
V 18 Jul, 2023 @ 5:29pm 
I'm aware of that mod, but because it's outdated and doesn't show charges/CD, and requires setting up all the spells every time, I am reluctant to use it.

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
Last edited by V; 18 Jul, 2023 @ 5:29pm
paperpancake  [developer] 18 Jul, 2023 @ 8:32pm 
I think that the idea in your previous post is technically possible.

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?
paperpancake  [developer] 18 Jul, 2023 @ 8:40pm 
Oh, also, I haven't been able to reproduce the issue you mentioned with 0.2 seconds between checks instead of 0.4. Without reproducing it, I can't say for sure what might be causing it, and I don't think my guesses would be any better than yours. I'm happy that it's working well for you at 0.4 seconds, though. :)

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.
V 18 Jul, 2023 @ 9:05pm 
Sorry I forgot to make the video unlisted, should be visible now. And yeah this is all for WH2 since it won't get any more patches so nothing more should change. WH3 still has many years of updates and who knows what they features they may add, though I've no doubt the mod would easily translate to WH3.

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.
Last edited by V; 18 Jul, 2023 @ 9:07pm
< >
Showing 1-5 of 5 comments
Per page: 1530 50