Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore the pursue, guard, and hold secondary orders #263

Merged
merged 7 commits into from Mar 24, 2019

Conversation

KJeff01
Copy link
Member

@KJeff01 KJeff01 commented Mar 13, 2019

Like how it was years ago.

These patches additionally:

  1. Provide the option to set these order from the factory right-click menu.
  2. Show the target icon when auto-acquiring new targets in many more cases.
  3. Fix patrol and circle so that, when guarding, they obey the distance limit checks.
  4. Prevent primary guard from being overridden by DORDER_ATTACK or DORDER_OBSERVE. Meaning units will only move a few tiles to chase something then return to where they were.

These patches should be thoroughly tested before being merged. Not that I haven't but there is a lot to test and I might have missed something.

Partial reverts of 8fd88ed and 2bee384.

-Now prevents regular sensors from observing targets that went out
of the sensor's vision range if the secondary state was not guard.

Fixes ticket 4303.
A VTOL would always "pursue" something outside its cicle/patrol distance checks. Although
this is useful, it can also be useful to make them stay closeby to where they were ordered
to patrol/circle, which is what the default guard state will do now. This behavior applies
to non-VTOLs also.
Units would break out of guarding automatically and start attacking (DORDER_ATTACK).
This prevented units from only moving a few tiles and instead chased whatever came
into weapon range much like a player actually clicked on an object.
- Show the correct buttons.
- Set the pursue, guard, or hold secondary order onto the droids.
@past-due
Copy link
Member

past-due commented Mar 13, 2019

For those wishing to test this on Windows, here are links to builds with this PR applied:

@past-due
Copy link
Member

past-due commented Mar 14, 2019

A number of users have done testing of this patch, but I think the best chance for it to get widespread testing would be to roll it into a 3.3.0_beta2 (especially for testing in multiplayer games).

From the forums:

The best part is, assuming nobody bothers changing from the default "guard" state, then
all the previous action/order code logic is unchanged (as it is in 3.3.0 beta1 / master) as far as I know.

Since the impact to the default state is minimal, and this addresses one of (if not the) chief complaints from users (68 votes to 4) that prevented upgrading to newer versions - while also fixing bugs / edge cases that existed in the prior secondary unit orders code - I'd vote for merging it for a beta2, and getting some exhaustive feedback from multiplayer games.

It would be very easy to revert this PR (if desired), but we simply won't get the kind of exhaustive testing & feedback needed without rolling this into some sort of (beta) release - whether now or later.

Sometimes guarding units that have rotating weapons won't attack objects after they return
to their guarding position.
@KJeff01
Copy link
Member Author

KJeff01 commented Mar 21, 2019

For some reason a guarding unit, that has a rotating weapon, can get stuck unable to attack anything unless explicitly ordered to do something such as moving. Seems rather hard to reproduce (it is also present in 3.2.3). The guarding unit needs to be returning to position, if it moved too far away, and then something has to quickly enter its weapon range as it completes that action. Or something like that.

Don't know what is causing this yet. In the mean time, this hack seems sufficient enough to get them attacking again.

@vexed
Copy link
Member

vexed commented Mar 24, 2019

Looks good, but, as you said, it is very difficult to spot bugs if only a few people to have tested it.

Go ahead and include it into the next release.

@KJeff01 KJeff01 merged commit ff5ec8c into Warzone2100:master Mar 24, 2019
@KJeff01 KJeff01 deleted the secOrderMenuRestore branch March 24, 2019 20:09
@past-due past-due added this to the 3.3.0_beta2 milestone Mar 27, 2019
Forgon2100 pushed a commit to Forgon2100/warzone2100 that referenced this pull request Jun 11, 2019
* add translation of structure limit screen title
* reinstate translation of hold, pursue and guard orders
* add translation of commander limit messages

Refs cac83e9
Refs ticket:4871
Refs Warzone2100#263
Refs Warzone2100#329
Forgon2100 pushed a commit to Forgon2100/warzone2100 that referenced this pull request Jun 11, 2019
* add translation of structure limit screen title
* reinstate translation of hold, pursue and guard orders
* add translation of commander limit messages

Refs cac83e9
Refs ticket:4871
Refs Warzone2100#263
Refs Warzone2100#329
Fixes Warzone2100#377
Forgon2100 pushed a commit to Forgon2100/warzone2100 that referenced this pull request Jun 11, 2019
* add translation of structure limit screen title
* reinstate translation of hold, pursue and guard orders
* add translation of commander limit messages

Refs cac83e9
Refs ticket:4871
Refs Warzone2100#263
Refs Warzone2100#329
Fixes Warzone2100#377
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 12, 2019
KJeff01 pushed a commit that referenced this pull request Jun 13, 2019
* add translation of structure limit screen title
* reinstate translation of hold, pursue and guard orders
* add translation of commander limit messages

Refs cac83e9
Refs ticket:4871
Refs #263
Refs #329
Fixes #377
Forgon2100 pushed a commit to Forgon2100/warzone2100 that referenced this pull request Jun 23, 2019
* remove unnecessary fuzzy flag
* add translation of structure limit screen title
* reinstate translation of hold, pursue and guard orders
* add translation of commander limit messages
* reinstate translation of range orders
* fix format specifiers in map transfer messages

Refs b00b17c
Refs ticket:4871
Refs Warzone2100#263
Refs Warzone2100#329
Refs Warzone2100#314
Refs Warzone2100#392
Fixes Warzone2100#402
past-due pushed a commit that referenced this pull request Jun 24, 2019
* remove unnecessary fuzzy flag
* add translation of structure limit screen title
* reinstate translation of hold, pursue and guard orders
* add translation of commander limit messages
* reinstate translation of range orders
* fix format specifiers in map transfer messages

Refs b00b17c
Refs ticket:4871
Refs #263
Refs #329
Refs #314
Refs #392
Fixes #402
vaut pushed a commit to vaut/warzone2100 that referenced this pull request Jun 27, 2019
KJeff01 pushed a commit that referenced this pull request Jun 27, 2019
Refs ticket:4872
Refs #263
Refs #329
Fixes #382
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants