Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1582 closed enhancement (fixed)

[PATCH] Improve default player names.

Reported by: wraitii Owned by: O.Davoodi
Priority: Nice to Have Milestone: Alpha 12
Component: UI & Simulation Keywords:
Cc: Patch:

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 (10)

playernames.patch (2.1 KB ) - added by O.Davoodi 12 years ago.
civs.zip (36.5 KB ) - added by O.Davoodi 12 years ago.
civ_names.patch (3.7 KB ) - added by Doménique 12 years 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 O.Davoodi 12 years ago.
civs.3.zip (36.7 KB ) - added by O.Davoodi 12 years ago.
Changed generic names into real ones.
playernames.2.patch (2.8 KB ) - added by O.Davoodi 12 years ago.
playernames.3.patch (2.8 KB ) - added by O.Davoodi 12 years ago.
playernamespatch.patch (2.6 KB ) - added by O.Davoodi 12 years ago.
playernamespatch.2.patch (2.7 KB ) - added by O.Davoodi 12 years ago.
A small fix
playernamespatch.3.patch (2.4 KB ) - added by O.Davoodi 12 years ago.

Download all attachments as: .zip

Change History (33)

comment:1 by O.Davoodi, 12 years ago

Milestone: BacklogAlpha 12
Owner: set to O.Davoodi
Status: newassigned

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 by wraitii, 12 years ago

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 by Doménique, 12 years ago

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

comment:4 by Doménique, 12 years ago

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).

by O.Davoodi, 12 years ago

Attachment: playernames.patch added

by O.Davoodi, 12 years ago

Attachment: civs.zip added

comment:5 by O.Davoodi, 12 years ago

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 by historic_bruno, 12 years ago

Keywords: patch review added
Summary: Improve default player names.[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 by O.Davoodi, 12 years ago

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 by historic_bruno, 12 years ago

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 by O.Davoodi, 12 years ago

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

by Doménique, 12 years ago

Attachment: civ_names.patch added

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

comment:10 by Doménique, 12 years ago

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 by O.Davoodi, 12 years ago

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 by historic_bruno, 12 years ago

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 12 years ago by historic_bruno (previous) (diff)

comment:13 by O.Davoodi, 12 years ago

Yeah I was also thinking of that shuffling.

comment:14 by wraitii, 12 years ago

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

in reply to:  14 comment:15 by historic_bruno, 12 years ago

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 12 years ago by historic_bruno (previous) (diff)

by O.Davoodi, 12 years ago

Attachment: civs.2.zip added

comment:17 by O.Davoodi, 12 years ago

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

by O.Davoodi, 12 years ago

Attachment: civs.3.zip added

Changed generic names into real ones.

by O.Davoodi, 12 years ago

Attachment: playernames.2.patch added

comment:18 by O.Davoodi, 12 years ago

Latest patch. "Chooses" the names randomly.

comment:19 by O.Davoodi, 12 years ago

Milestone: Alpha 12Alpha 11

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

by O.Davoodi, 12 years ago

Attachment: playernames.3.patch added

comment:20 by Kieran P, 12 years ago

Milestone: Alpha 11Alpha 12

by O.Davoodi, 12 years ago

Attachment: playernamespatch.patch added

comment:21 by O.Davoodi, 12 years ago

Cleanup of the patch.

by O.Davoodi, 12 years ago

Attachment: playernamespatch.2.patch added

A small fix

by O.Davoodi, 12 years ago

Attachment: playernamespatch.3.patch added

comment:22 by O.Davoodi, 12 years ago

Resolution: fixed
Status: assignedclosed

In 12666:

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

comment:23 by O.Davoodi, 12 years ago

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