Ticket #1582 (closed enhancement: fixed)

Opened 10 months ago

Last modified 8 months ago

[PATCH] Improve default player names.

Reported by: wraitii Owned by: Spahbod
Priority: Nice to Have Milestone: Alpha 12
Component: UI & Simulation Keywords:
Cc:

Description

The game uses the "Player X" template for player names when playing on a random map. While this is not a big letdown, it would be nice to use a system similar to AOE I/II, where the name of the AIs were historical rulers. (additionally, we could show the AI used in the endgame screen next to the player name).

Attachments

playernames.patch (2.1 KB) - added by Spahbod 10 months ago.
civs.zip (36.5 KB) - added by Spahbod 10 months ago.
civ_names.patch (3.7 KB) - added by dvangennip 10 months ago.
Adds a piece of code that adjusts default player names, if possible with names from a list
civs.2.zip (36.7 KB) - added by Spahbod 10 months ago.
civs.3.zip (36.7 KB) - added by Spahbod 10 months ago.
Changed generic names into real ones.
playernames.2.patch (2.8 KB) - added by Spahbod 10 months ago.
playernames.3.patch (2.8 KB) - added by Spahbod 9 months ago.
playernamespatch.patch (2.6 KB) - added by Spahbod 9 months ago.
playernamespatch.2.patch (2.7 KB) - added by Spahbod 9 months ago.
A small fix
playernamespatch.3.patch (2.4 KB) - added by Spahbod 8 months ago.

Change History

comment:1 Changed 10 months ago by Spahbod

  • Owner set to Spahbod
  • Status changed from new to assigned
  • Milestone changed from Backlog to Alpha 12

I wanted to do this in near future. Thank you for creating the ticket :D One thing is: Should we put the names in each civ's representative .json file or in the AI's?

comment:2 Changed 10 months ago by wraitii

It seems more logical to put it in the civ's representative .json files. Perhaps AIs could also defines names that would override the civ names if present but that's secondary.

comment:3 Changed 10 months ago by dvangennip

Funny, I had the same idea :) I will post a patch later today that should do the trick.

comment:4 Changed 10 months ago by dvangennip

I have attached a patch that adjust the player name, but only if it is set to a default (Player <number>). When a HistoricalRulers? array is available within the civ JSON file it will take one of those names. Otherwise it sets the player name to the name of the civ. So an example game with 8 players could look like this:

  • You
  • Xenophon (Athenians)
  • Cimon (Athenians)
  • Macedonians
  • Iberians
  • Gauls
  • Gauls 2
  • Gauls 3

Currently I only added some historical rulers to the Athenians JSON file (taken from a list on WikiPedia?). All other civs will default to their civ name, and if more than one player has this civ it adds a number (as with the Gauls above). The first gets no number (if desired I can change this behaviour).

I found that just a name of ruler is difficult, because Athenians, Macedonians and Spartans cannot easily be distinguished from their looks. Unless someone is an expert of classic Greek rulers his or her name is not of much help. For now, I add (Athenians) behind their names. An alternative would be something like "Xenophon of Athens," but it requires the civ name added in this form (Athens is not in the file, only Athenians).

Changed 10 months ago by Spahbod

Changed 10 months ago by Spahbod

comment:5 Changed 10 months ago by Spahbod

Added a patch. Ruler names are in civs.zip file. If it selects an existing ruler, or a player already has the name, it will add roman numbers to the end of it.

comment:6 Changed 10 months ago by historic_bruno

  • Keywords patch review added
  • Summary changed from Improve default player names. to [PATCH] Improve default player names.

Can't we just have at least 8 historical names per civ? That way they would be guaranteed to be unique for each game. That seems better than adding arbitrary numbers, since numbers would imply historical figures who may or may not have existed :)

comment:7 Changed 10 months ago by Spahbod

Well, there are not enough names for some civs. Also a player can choose a name similar to an AI and that won't be good. In my opinion, it doesn't matter if it isn't historically accurate because we just add a bunch of "names", not "rulers".

comment:8 Changed 10 months ago by historic_bruno

I'm not sure how we could detect and avoid name similarity or why we should try. Sounds like we need to find more historic names for those civs with less than 8 :P

comment:9 Changed 10 months ago by Spahbod

It is almost impossible to find enough names for gauls, britons and iberians.

Changed 10 months ago by dvangennip

Adds a piece of code that adjusts default player names, if possible with names from a list

comment:10 Changed 10 months ago by dvangennip

I updated my patch so it works with the civ files of Spahbod, plus a couple of fixes. It should work without issues now.

To avoid further double work: Our patches seem to do mostly the same, except that my code reverts to generic civilisation names if a list of possible AINames is not available (or is shorter than 8 names to avoid numbering; generic civ names are still numbered though, e.g. Hellenes III). What is the desired behaviour / which direction will be taken?

comment:11 Changed 10 months ago by Spahbod

It depends on our ability to find more rulers for britons, gauls and iberians. If so, we can pick some names from the list.

comment:12 Changed 10 months ago by historic_bruno

Gauls:

Iberians:

There's some additions to sift through, hopefully they aren't duplicates. I didn't look for more Brittonic leaders because brit.json already had enough, but I think we can easily get 8 names per civ (and hopefully more to add variety). If we want to pick random names uniquely, there is a shuffling technique I used in the random map generator (for random player positions) that should work.

Last edited 10 months ago by historic_bruno (previous) (diff)

comment:13 Changed 10 months ago by Spahbod

Yeah I was also thinking of that shuffling.

comment:14 follow-up: ↓ 15 Changed 10 months ago by wraitii

Do names really have to be rulers? Couldn't we choose princes/whatever was in a position of power if we really lack names?

comment:15 in reply to: ↑ 14 Changed 10 months ago by historic_bruno

In my opinion, yes we can choose other roles, most names to have survived this long would have been important, powerful people :)

A few more Gallic leaders, these were titled vergobret or uergobretos, like Diviciacus above:

  • Liscus
  • Valetiacos
  • Convictolitavis
  • Celtillos
  • Sedullos
Last edited 10 months ago by historic_bruno (previous) (diff)

Changed 10 months ago by Spahbod

comment:17 Changed 10 months ago by Spahbod

New set of names. There are enough names for each civ now.

Changed 10 months ago by Spahbod

Changed generic names into real ones.

Changed 10 months ago by Spahbod

comment:18 Changed 10 months ago by Spahbod

Latest patch. "Chooses" the names randomly.

comment:19 Changed 10 months ago by Spahbod

  • Milestone changed from Alpha 12 to Alpha 11

As we have postponed the release, i think we can get this into alpha 11

Changed 9 months ago by Spahbod

comment:20 Changed 9 months ago by k776

  • Milestone changed from Alpha 11 to Alpha 12

Changed 9 months ago by Spahbod

comment:21 Changed 9 months ago by Spahbod

Cleanup of the patch.

Changed 9 months ago by Spahbod

A small fix

Changed 8 months ago by Spahbod

comment:22 Changed 8 months ago by Spahbod

  • Status changed from assigned to closed
  • Resolution set to fixed

In 12666:

Default ai player names patch: Codes. Fixes #1582.

comment:23 Changed 8 months ago by Spahbod

  • Keywords player name patch review removed
Note: See TracTickets for help on using tickets.