Passive acquire mode
Passive acquire mode
- Now you can order the units to enter "Ceasefire Mode" or "Aggressive Mode", just like in RA3.
- In ceasefire mode, units will only attack the targets specified by the player.
- In aggressive mode, units will automatically attack all enemies, including buildings without weapons.
- In normal mode, units will auto-target like usual.
- You can use two hotkeys to switch between these two modes if
[General] -> EnablePassiveAcquireModeis set totrue. When you press one of these hotkeys:- If all selected units are in that mode, they will switch to the normal mode. Otherwise, they will enter that mode. Units that cannot switch modes are not counted.
- If any unit successfully switches its mode, a sound effect will be emitted. This sound can be customized through
[TechnoType] -> Voice(Enter/Exit)(Aggressive/Ceasefire)Mode.
- You can use
[TechnoType] -> PassiveAcquireMode.Togglableto specify whether the unit can toggle its mode. - You can use
[TechnoType] -> PassiveAcquireModeto specify the unit's initial mode.
In rulesmd.ini:
[General]
EnablePassiveAcquireMode=false ; boolean
[SOMETECHNO] ; TechnoType
PassiveAcquireMode=Normal ; passive acquire mode, Normal / Aggressive / Ceasefire
PassiveAcquireMode.Togglable=true ; boolean
VoiceEnterAggressiveMode= ; Sound entry, default to VoiceAttack or VoiceMove
VoiceExitAggressiveMode= ; Sound entry, default to VoiceMove or VoiceSelect
VoiceEnterCeasefireMode= ; Sound entry, default to VoiceSelect or VoiceMove
VoiceExitCeasefireMode= ; Sound entry, default to VoiceAttack or VoiceMove
[ ] Ceasefire Mode
- Order the selected units to enter or exit the ceasefire mode. See this for details.
- For localization add
TXT_CEASEFIRE_MODE,TXT_CEASEFIRE_MODE_DESC,MSG:CEASEFIRE_MODE_ONandMSG:CEASEFIRE_MODE_OFFinto your.csffile.
[ ] Aggressive Mode
- Order the selected units to enter or exit the aggressive mode. See this for details.
- For localization add
TXT_AGGRESSIVE_MODE,TXT_AGGRESSIVE_MODE_DESC,MSG:AGGRESSIVE_MODE_ONandMSG:AGGRESSIVE_MODE_OFFinto your.csffile.
Nightly build for this pull request:
- compiled-dll-7655eba8f2cfb55d1dc0c0369013fea334d13231.zip These artifacts will expire in 90 days and will not be available for download after that time.
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.
Previously when discussing stances we figured there should be a button/indicator at bottom bar. Have this went anywhere? If I recall correctly, someone even had the code to add custom buttons there.
Previously when discussing stances we figured there should be a button/indicator at bottom bar. Have this went anywhere? If I recall correctly, someone even had the code to add custom buttons there.
Hmmmm ... where is that code then🤔
Aggressive stance if I'm not wrong :-/
Aggressive stance if I'm not wrong :-/
https://github.com/Phobos-developers/Phobos/pull/1464 did not touch the bottom bar.
Could there be visual indicator on techno to tell which of them is in aggressive/passive stance if it’s toggleable?
Maybe it could be drawn next to the unit like the insignia. But I don't think this is a good idea. We already have too many things to draw next to the unit. I'm asking Crim to open a pr for his bottom bar.
Maybe it could be drawn next to the unit like the insignia. But I don't think this is a good idea. We already have too many things to draw next to the unit. I'm asking Crim to open a pr for his bottom bar.
I think @Otamaa had the code for custom vanilla bottom bar buttons?
About the buttons on bottom: https://github.com/CrimRecya/Phobos-Mix/blob/Mix-ECpack/src/Commands/Commands.cpp#L180C1-L180C69 https://github.com/CrimRecya/Phobos-Mix/blob/Mix-ECpack/src/Commands/Commands.h#L17
Maybe it could be drawn next to the unit like the insignia. But I don't think this is a good idea. We already have too many things to draw next to the unit. I'm asking Crim to open a pr for his bottom bar.
I think @Otamaa had the code for custom vanilla bottom bar buttons?
my code is more big than Crim one , i do play around with these for a bit just for fun : https://github.com/Otamaa/Phobos-Minimal/blob/f2ac3f68b7561d3b91b1d59d13ac9f6a601cb573/src/Misc/Hook.CommandButtons.cpp
Previously when discussing stances we figured there should be a button/indicator at bottom bar. Have this went anywhere? If I recall correctly, someone even had the code to add custom buttons there.
@Metadorius The existing code has exceeded 500 lines. I think it's better to complete this PR before initiating a new one to finish these tasks, to avoid overwhelming the reviewer with too much code. What do you think?
@Metadorius The existing code has exceeded 500 lines. I think it's better to complete this PR before initiating a new one to finish these tasks, to avoid overwhelming the reviewer with too much code. What do you think?
@TaranDahl I propose to take CrimRecya's implementation of the bottom bar buttons from #1453 separately as a new PR without any extra logics (maybe could do a new button for triggering Select Next Idle Harvester command; however, I am not sure if the buttons have to be always tied to CommandClass, this is up for discussion), reviewing/refactoring it so it fits our standards, merging, and then rebasing this PR so it can use it.
oh and don't merge latest develop commit, we're deciding how to proceed on it
resolved the situation with develop, feel free to merge it
@TaranDahl I propose to take CrimRecya's implementation of the bottom bar buttons from https://github.com/Phobos-developers/Phobos/pull/1453 separately as a new PR without any extra logics (maybe could do a new button for triggering Select Next Idle Harvester command; however, I am not sure if the buttons have to be always tied to CommandClass, this is up for discussion), reviewing/refactoring it so it fits our standards, merging, and then rebasing this PR so it can use it.
@CrimRecya How about this