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

Change descriptions and displaying of AI tooltips #281

Merged
merged 3 commits into from Jun 27, 2019

Conversation

@Forgon2100
Copy link
Contributor

commented Mar 28, 2019

AI tooltips, shown in the game setup screen, are

  • more accurate. Most importantly, Nexus is no longer described as the
    default AI. "SemperFi JS" has been renamed to "SemperFi JavaScript"
    (suggested by Kreuvf).
  • translatable
  • shown whenever an AI is locked (i.e. cannot be changed by a player).
    This is useful to identify AIs in challenges where they receive custom
    names, such as "Two-faced", and when joining multiplayer games.

renamed_challenge_ai_new

The attached ZIP file contains

  • screenshots of AI tooltips in the game setup screen, which should be
    • shown for locked challenge slots and when joining multiplayer games
    • empty for closed challenge slots
    • replaced with the message "Click to change AI" for the AI chooser
      when hosting skirmish and multiplayer games
  • a shell script to generate them

ai_descriptions_documentation.zip

Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Apr 3, 2019
Change AI descriptions
* do not call Nexus the default AI
* rename Semperfi to "SemperFi"
* more accurate descriptions (tooltips) for
  * Hover AI
  * Nexus
  * NullBot
  * SemperFi
  * SemperFi JS

Fixes Warzone2100#281
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Apr 16, 2019
Add German translation of AI descriptions
* add translations for all AI tooltips
* "Semperfi" has been renamed to "SemperFi"

Refs Warzone2100#281
Fixes Warzone2100#328

@KJeff01 KJeff01 added this to the 3.3.0_beta2 milestone Apr 17, 2019

@Forgon2100 Forgon2100 changed the title Change AI descriptions [WIP] Change AI descriptions Apr 17, 2019

@Forgon2100 Forgon2100 force-pushed the Forgon2100:ai_descriptions branch from 3157cf5 to c80d07a Apr 18, 2019

Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Apr 18, 2019
Change AI descriptions
* do not call Nexus the default AI
* rename Semperfi to "SemperFi"
* rename "SemperFi JS" to "SemperFi JavaScript"
* more accurate descriptions (tooltips) for
  * Hover AI
  * Nexus
  * NullBot
  * SemperFi
  * SemperFi JavaScript

Fixes Warzone2100#281
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Apr 18, 2019
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Apr 18, 2019
Add tooltips for locked AIs in game setup screen
* make it easier to identify AIs with custom names in challenges
* also show tooltips to players who join multiplayer games

Fixes Warzone2100#281
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Apr 18, 2019
Add German translation of AI descriptions
* add translations for all AI tooltips
* "Semperfi" has been renamed to "SemperFi"
* "SemperFi JS" has been renamed to "SemperFi JavaScript"

Refs Warzone2100#281
Fixes Warzone2100#328
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Apr 23, 2019
Add German translation of AI descriptions
* add translations for all AI tooltips
* "Semperfi" has been renamed to "SemperFi"
* "SemperFi JS" has been renamed to "SemperFi JavaScript"

Refs Warzone2100#281
Fixes Warzone2100#328
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Apr 24, 2019
Add German translation of AI descriptions
* add translations for all AI tooltips
* "Semperfi" has been renamed to "SemperFi"
* "SemperFi JS" has been renamed to "SemperFi JavaScript"

Refs Warzone2100#281
Fixes Warzone2100#328
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Apr 25, 2019
Add German translation of AI descriptions
* add translations for all AI tooltips
* "Semperfi" has been renamed to "SemperFi"
* "SemperFi JS" has been renamed to "SemperFi JavaScript"

Refs Warzone2100#281
Fixes Warzone2100#328
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request May 15, 2019
Change AI descriptions
* do not call Nexus the default AI
* rename Semperfi to "SemperFi"
* more accurate descriptions (tooltips) for
  * Hover AI
  * Nexus
  * NullBot
  * SemperFi
  * SemperFi JS

Fixes Warzone2100#281
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request May 15, 2019
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request May 15, 2019
Add tooltips for locked AIs in game setup screen
* make it easier to identify AIs with custom names in challenges
* also show tooltips to players who join multiplayer games

Fixes Warzone2100#281

@KJeff01 KJeff01 changed the title [WIP] Change AI descriptions Change AI descriptions Jun 1, 2019

@KJeff01 KJeff01 changed the title Change AI descriptions [WIP] Change AI descriptions Jun 1, 2019

@KJeff01

This comment has been minimized.

Copy link
Contributor

commented Jun 1, 2019

Closed challenge slots display an empty box so you might want to set a default tip or not even show anything in that case.

@Forgon2100

This comment has been minimized.

Copy link
Contributor Author

commented Jun 2, 2019

Closed challenge slots display an empty box so you might want to set a default tip or not even show anything in that case.

Closed challenge slots do not display an empty box.

Just like empty skirmish/multiplayer slots, they show the translated
string "Closed" in place of a player/AI name (regardless of my patches).

Unlike them, they also show a team letter and a player color flag.
This bug, however, should be fixed in a separate pull request.

The attached ZIP file contains

  • a screenshot showing an empty challenge slot with patches of this PR
  • a custom challenge file used to generate it

empty_challenge_slot.zip

@KJeff01

This comment has been minimized.

Copy link
Contributor

commented Jun 2, 2019

Forgive my wording, I was talking about the tooltip.

tooltip2

@Forgon2100 Forgon2100 force-pushed the Forgon2100:ai_descriptions branch from c80d07a to 5e2be7b Jun 3, 2019

Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 3, 2019
Add tooltips for locked AIs in game setup screen
* make it easier to identify AIs with custom names in challenges
* also show tooltips to players who join multiplayer games

Fixes Warzone2100#281
@Forgon2100

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2019

Forgive my wording, I was talking about the tooltip.

tooltip2

Thank you. I have fixed this.
My third patch should only change AI descriptions, but accidentally
affected unused player slots. The solution was trivial:

diff --git a/src/multiint.cpp b/src/multiint.cpp
index 2fb3d32cc..95bfb140c 100644
--- a/src/multiint.cpp
+++ b/src/multiint.cpp
@@ -2686,9 +2686,9 @@ void addPlayerBox(bool players)
 				{
 					sButInit.pTip = _("Click to change player position");
 				}
-				else if (!NetPlay.players[i].allocated)
+				else if (!NetPlay.players[i].allocated && !locked.ai)
 				{
-					if (NetPlay.isHost && !locked.ai)
+					if (NetPlay.isHost)
 					{
 						sButInit.pTip = _("Click to change AI");
 					}

@Forgon2100 Forgon2100 force-pushed the Forgon2100:ai_descriptions branch from 5e2be7b to 0cc4dac Jun 3, 2019

Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 3, 2019
Change AI descriptions
* do not call Nexus the default AI
* rename Semperfi to "SemperFi"
* rename "SemperFi JS" to "SemperFi JavaScript"
* more accurate descriptions (tooltips) for
  * Hover AI
  * Nexus
  * NullBot
  * SemperFi
  * SemperFi JavaScript

Fixes Warzone2100#281
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 3, 2019
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 3, 2019
Add tooltips for locked AIs in game setup screen
* make it easier to identify AIs with custom names in challenges
* also show tooltips to players who join multiplayer games

Fixes Warzone2100#281
@KJeff01

This comment has been minimized.

Copy link
Contributor

commented Jun 3, 2019

Tips were not showing for me... how about this?

else if (!NetPlay.players[i].allocated)
{
	if (NetPlay.isHost && !locked.ai)
	{
		sButInit.pTip = _("Click to change AI");
	}
	else if (NetPlay.players[i].ai >= 0)
	{
		// show AI description. Useful for challenges.
		sButInit.pTip = aidata[NetPlay.players[i].ai].tip;
	}
}

Tested on a challenge (with a closed slot), a skirmish, and a local multiplayer connection.

Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 16, 2019
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 16, 2019
Add tooltips for locked AIs in game setup screen
* make it easier to identify AIs with custom names in challenges
* also show tooltips to players who join multiplayer games

Fixes Warzone2100#281

Co-authored-by: KJeff01 <kjeff01@users.noreply.github.com>
@past-due

This comment has been minimized.

Copy link
Contributor

commented Jun 19, 2019

@Forgon2100, @KJeff01: What's needed to get this ready to merge?

@KJeff01

This comment has been minimized.

Copy link
Contributor

commented Jun 19, 2019

The descriptions are displaying as they should be, as far as my tests go. IDK what Forgon has left to do, probably not much.

@Forgon2100 Forgon2100 force-pushed the Forgon2100:ai_descriptions branch from 6ce2de7 to e470197 Jun 26, 2019

Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 26, 2019
Change AI descriptions
* do not call Nexus the default AI
* rename Semperfi to "SemperFi"
* rename "SemperFi JS" to "SemperFi JavaScript"
* more accurate descriptions (tooltips) for
  * Hover AI
  * Nexus
  * NullBot
  * SemperFi
  * SemperFi JavaScript

Fixes Warzone2100#281
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 26, 2019
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 26, 2019
Add tooltips for locked AIs in game setup screen
* make it easier to identify AIs with custom names in challenges
* also show tooltips to players who join multiplayer games

Fixes Warzone2100#281

Co-authored-by: KJeff01 <kjeff01@users.noreply.github.com>
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 26, 2019
Add folder for custom AIs to each config directory
* make it easier for players to install new AIs

Refs 2007f14
Refs ticket:4664
Fixes Warzone2100#281
@Forgon2100

This comment has been minimized.

Copy link
Contributor Author

commented Jun 26, 2019

@Forgon2100, @KJeff01: What's needed to get this ready to merge?

This used to be finished, but now I've got some new ideas.
Is this PR urgent?

@past-due

This comment has been minimized.

Copy link
Contributor

commented Jun 27, 2019

@Forgon2100, @KJeff01: What's needed to get this ready to merge?

This used to be finished, but now I've got some new ideas.
Is this PR urgent?

Just looking to see if we can get PRs that impact the translation files merged before beta2. Are those additional ideas something that can come in a later PR?

Forgon2100 and others added 3 commits Oct 21, 2018
Change AI descriptions
* do not call Nexus the default AI
* rename Semperfi to "SemperFi"
* rename "SemperFi JS" to "SemperFi JavaScript"
* more accurate descriptions (tooltips) for
  * Hover AI
  * Nexus
  * NullBot
  * SemperFi
  * SemperFi JavaScript

Fixes #281
Add tooltips for locked AIs in game setup screen
* make it easier to identify AIs with custom names in challenges
* also show tooltips to players who join multiplayer games

Fixes #281

Co-authored-by: KJeff01 <kjeff01@users.noreply.github.com>

@Forgon2100 Forgon2100 force-pushed the Forgon2100:ai_descriptions branch from e470197 to 1b73d62 Jun 27, 2019

@Forgon2100

This comment has been minimized.

Copy link
Contributor Author

commented Jun 27, 2019

[...] Just looking to see if we can get PRs that impact the translation files merged before beta2.

Okay. But I would appreciate if we could wait until #382 is finished
before updating PO files. Otherwise, there will be a merge conflict.

Are those additional ideas something that can come in a later PR?

No problem. I will publish further commits in separate PRs.

@Forgon2100 Forgon2100 changed the title [WIP] Change AI descriptions Change descriptions and displaying of AI tooltips Jun 27, 2019

@KJeff01 KJeff01 added this to the 3.3.0_beta2 milestone Jun 27, 2019

@KJeff01 KJeff01 merged commit a8cc35f into Warzone2100:master Jun 27, 2019

8 checks passed

LGTM analysis: C/C++ No new or fixed alerts
Details
LGTM analysis: JavaScript No new or fixed alerts
Details
LGTM analysis: Python No new or fixed alerts
Details
WIP Ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
freebsd_build FreeBSD:freebsd-11-2-release-amd64 Task Summary
Details
freebsd_build FreeBSD:freebsd-12-0-release-amd64 Task Summary
Details
KJeff01 added a commit that referenced this pull request Jun 27, 2019
Change AI descriptions
* do not call Nexus the default AI
* rename Semperfi to "SemperFi"
* rename "SemperFi JS" to "SemperFi JavaScript"
* more accurate descriptions (tooltips) for
  * Hover AI
  * Nexus
  * NullBot
  * SemperFi
  * SemperFi JavaScript

Fixes #281
KJeff01 added a commit that referenced this pull request Jun 27, 2019
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 28, 2019
Update translation files
* execute `cd po; ./update-po.sh; make update-po`

* fix format specifier in translations of these map downloading messages
  modified in bafc8a4 (refs Warzone2100#392):
  * "Sending Map: %u%% "
  * "Map: %u%% downloaded"

* update all unchanged translations of renamed AIs (refs Warzone2100#281):
  * "Semperfi" -> "SemperFi"
  * "SemperFi JS" -> "SemperFi JavaScript"

Fixes Warzone2100#412
KJeff01 added a commit that referenced this pull request Jun 28, 2019
Update translation files
* execute `cd po; ./update-po.sh; make update-po`

* fix format specifier in translations of these map downloading messages
  modified in bafc8a4 (refs #392):
  * "Sending Map: %u%% "
  * "Map: %u%% downloaded"

* update all unchanged translations of renamed AIs (refs #281):
  * "Semperfi" -> "SemperFi"
  * "SemperFi JS" -> "SemperFi JavaScript"

Fixes #412
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jul 2, 2019
Fix translation of AI names and tooltips
* show translation of AI keys "name" and "tip" or warning messages if
  their values are missing

* if the game language is changed via "Options->Game Options->Language",
  reload the AI list to prevent wrong translations

Refs 509f6bc
Refs Warzone2100#281
Fixes Warzone2100#419
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jul 4, 2019
Fix translation of AI names and tooltips
* show translation of AI keys "name" and "tip" or warning messages if
  their values are missing

* if the game language is changed via "Options->Game Options->Language",
  reload the AI list to prevent wrong translations

Refs 509f6bc
Refs Warzone2100#281
Fixes Warzone2100#419
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jul 4, 2019
Fix translation of AI names and tooltips
* show translation of AI keys "name" and "tip" or warning messages if
  their values are missing

* if the game language is changed via "Options->Game Options->Language",
  reload the AI list to prevent wrong translations

Refs 509f6bc
Refs Warzone2100#281
Fixes Warzone2100#419
KJeff01 added a commit that referenced this pull request Jul 4, 2019
Fix translation of AI names and tooltips
* show translation of AI keys "name" and "tip" or warning messages if
  their values are missing

* if the game language is changed via "Options->Game Options->Language",
  reload the AI list to prevent wrong translations

Refs 509f6bc
Refs #281
Fixes #419
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.