Creating random names
Moderators: flockmastoR, Alkworld, Gipfelstuermer, systemmods
-
- Posts: 391
- Joined: Mon Jul 25, 2022 12:47 pm
- Contact:
Creating random names
The Nations Committee suggests a function, which allows the teams a second option besides choosing an own name. Instead of this, you can also just choose a nation and the game finds a random name for this one.
E.g.: I want a rider from Cameroon but don't have an idea for a name. So I just choose Cameroon and click on a "random name" button and the game finds one. Now I can accept this one or press it again until I get a name I like.
E.g.: I want a rider from Cameroon but don't have an idea for a name. So I just choose Cameroon and click on a "random name" button and the game finds one. Now I can accept this one or press it again until I get a name I like.
Re: Creating random names
As long as the option to name a rider and chose his nationality myself still exists, I support this idea. My question is regarding the technical implementation: What would be the database for names for a particular nationality?
I didn't mean to say it. But I meant what I said.
-
- Posts: 391
- Joined: Mon Jul 25, 2022 12:47 pm
- Contact:
Re: Creating random names
Yes, we want both options!
There are only databases which we can use and implement. If this won't work, we will fill a database by our own
There are only databases which we can use and implement. If this won't work, we will fill a database by our own

Re: Creating random names
Yeah, but what database would you use? Something like https://forebears.io/?Chemnitz Pro Cycling Team wrote: ↑Tue Aug 26, 2025 8:46 amYes, we want both options!
There are only databases which we can use and implement. If this won't work, we will fill a database by our own![]()
There are other browser games doing this already, like hattrick.org for example. They generate random player names that fit the nationality. Maybe you could just ask them bluntly how they're doing it? Or use a random name generator that already exists, like https://fullnamegenerator.com/. Just make sure it fits the technical naming conditions (number of letters, how to deal with two-name-surnames and the "van der xyzs").
But I am sure, you figure it out

I didn't mean to say it. But I meant what I said.
Re: Creating random names
It's actually pretty simple. My idea is:
- choose a nationality first
- click a new button for generating a name
- the game then randomly picks names from a list
- the list can be created / maintained (practically one-time job) by anyone from the community, you'll only need a developer for converting / uploading it
- choose a nationality first
- click a new button for generating a name
- the game then randomly picks names from a list
- the list can be created / maintained (practically one-time job) by anyone from the community, you'll only need a developer for converting / uploading it
-
- Posts: 26
- Joined: Thu Aug 31, 2023 5:42 pm
- Contact:
Re: Creating random names
sounds good
Re: Creating random names
Same opinion here. To be able to name riders myself is very important.
Re: Creating random names
Ah yes, very important. Only male names should be generated of course, as this game simluates the male UCI races. 

I didn't mean to say it. But I meant what I said.
Re: Creating random names
The name generator is now available in 3.8.0. When naming a rider, you can choose to generate a random name after selecting the nationality of the rider. The name pool consists of all the names that have been previously used in the game, also considering their previous cardinality. Of course you can also just name your riders yourself.
One question to NC members: I could automatically skip NC for riders with generated names. Any thoughts on that?
One question to NC members: I could automatically skip NC for riders with generated names. Any thoughts on that?
-
- Posts: 1918
- Joined: Wed Jul 13, 2011 10:43 am
- Location: Weltenbummler
- Contact:
Re: Creating random names
Nice new feature.Alkworld wrote: ↑Sat Sep 13, 2025 7:27 amThe name generator is now available in 3.8.0. When naming a rider, you can choose to generate a random name after selecting the nationality of the rider. The name pool consists of all the names that have been previously used in the game, also considering their previous cardinality. Of course you can also just name your riders yourself.
One question to NC members: I could automatically skip NC for riders with generated names. Any thoughts on that?
A few things to consider perhaps :
Personally, I would prefer if the data came from a neutral source e.g.: https://www.behindthename.com/names/search
and
https://surnames.behindthename.com/names/search
There you can search by Gender and Place (country). So it's possible to source male names for each (or most) of the countries we have in-game.
Otherwise, I think you might risk creating a naming-circle producing lots of Yuigahama's and Makhamadzhonov's, taking away a bit their uniqueness in a way. At least that's a risk for smaller countries if the data is limited to existing ingame names. (even if I don't know the exact probabilities...).
In terms of approval, if you only consider "approved" names, it's probably fine to auto approve them (even though the code would need to avoid unwanted "clones"). And then again, you end up having a smaller data basis if you only use "approved" names...
GIP MASTERPLAN
Gameplay: Flexible Min-Tact. Improve Sprint System. Windkante.
Marketing: Re-attract old players. Advertisement. Social Media.
New Players: Fair Start Budget, New Tutorial.
Fairplay: Improve FPC features, Fair Prize Money Disribution.
Gameplay: Flexible Min-Tact. Improve Sprint System. Windkante.
Marketing: Re-attract old players. Advertisement. Social Media.
New Players: Fair Start Budget, New Tutorial.
Fairplay: Improve FPC features, Fair Prize Money Disribution.
Re: Creating random names
Also we had Urinkugel and Langeleben, and and and approved in Switzerland...
Kraftsystemrevision! Include the distance!
Basics reform: Give blue a chance!
Don't punish bugusers. We all have to use bugs, since most of them are declared as "features"!
Got a carrot from FL. But they threaten to take it away now.
Basics reform: Give blue a chance!
Don't punish bugusers. We all have to use bugs, since most of them are declared as "features"!
Got a carrot from FL. But they threaten to take it away now.
-
- Posts: 26
- Joined: Thu Aug 31, 2023 5:42 pm
- Contact:
Re: Creating random names
I agree that a neutral source for the names would be better than relying on the existing ones in c4f for the reasons gip mentioned and the examples that donkey gave.
And there might be other cases where specific names might have been accepted coz of a real person for example but the name might not be really common in a specific country. Names like that and really unique names shouldnt be part of the data base.
So i would prefer an external source for names like there are a lot on the internet like the one gip mentioned for example.
And if we have a pretty good data base without some really weird names there should not be a reason not to skip the auto generated names when it comes to the NC. Would be weird then anyway if someone clicks the option and the name gets declined afterwards.
But all depends on the data base for the generated names.
And there might be other cases where specific names might have been accepted coz of a real person for example but the name might not be really common in a specific country. Names like that and really unique names shouldnt be part of the data base.
So i would prefer an external source for names like there are a lot on the internet like the one gip mentioned for example.
And if we have a pretty good data base without some really weird names there should not be a reason not to skip the auto generated names when it comes to the NC. Would be weird then anyway if someone clicks the option and the name gets declined afterwards.
But all depends on the data base for the generated names.
Re: Creating random names
Not against a database (of course will not use it...) but
a) the problem with riders that sneaked through (one solution would be for the NC to then have to delete the name from the database after it was generated and came to their notice again, the one that was generated can keep the nationality, but no others will be generated)
b) maybe some heavenly script that "eliminates" a name temporarily if he's been given out. If we have 7 active Rodriguez in Spain, that is ok, but if we have active 7 Hrubesch in Germany.. weird. (and would that increase the chances of further Hrubesch's further? is every rider in the database individually?) So a script that at diminishes or eliminates the chances of names that got generated in the last x days/weeks/months...
a) the problem with riders that sneaked through (one solution would be for the NC to then have to delete the name from the database after it was generated and came to their notice again, the one that was generated can keep the nationality, but no others will be generated)
b) maybe some heavenly script that "eliminates" a name temporarily if he's been given out. If we have 7 active Rodriguez in Spain, that is ok, but if we have active 7 Hrubesch in Germany.. weird. (and would that increase the chances of further Hrubesch's further? is every rider in the database individually?) So a script that at diminishes or eliminates the chances of names that got generated in the last x days/weeks/months...
Kraftsystemrevision! Include the distance!
Basics reform: Give blue a chance!
Don't punish bugusers. We all have to use bugs, since most of them are declared as "features"!
Got a carrot from FL. But they threaten to take it away now.
Basics reform: Give blue a chance!
Don't punish bugusers. We all have to use bugs, since most of them are declared as "features"!
Got a carrot from FL. But they threaten to take it away now.
-
- Posts: 391
- Joined: Mon Jul 25, 2022 12:47 pm
- Contact:
Re: Creating random names
Same opinion here!Servicio Médico wrote: ↑Sat Sep 13, 2025 6:27 pmI agree that a neutral source for the names would be better than relying on the existing ones in c4f for the reasons gip mentioned and the examples that donkey gave.
And there might be other cases where specific names might have been accepted coz of a real person for example but the name might not be really common in a specific country. Names like that and really unique names shouldnt be part of the data base.
So i would prefer an external source for names like there are a lot on the internet like the one gip mentioned for example.
And if we have a pretty good data base without some really weird names there should not be a reason not to skip the auto generated names when it comes to the NC. Would be weird then anyway if someone clicks the option and the name gets declined afterwards.
But all depends on the data base for the generated names.
Re: Creating random names
I exported than name pool to a file and put it on: https://cycling4freaks.de/c4f-3.0/name- ... ol.csv.zip
The current version is generated as described (from all names we had in the past), but feel free to update it. The file contains (in CSV format - comma separated values):
- id: ignore that (technical ID in database)
- type: 1 = last name, 2 = first name
- name: I guess that's obvious
- count: number of occurrences, which impacts the probability for that name
You can:
- add names (add a line anywhere in the file)
- change names (e.g. to remove typos or change case)
- remove names (remove the line or set count to 0)
- change the count to change probability for a name
- duplicate names don't hurt, but the count will be the sum of duplicates practically
With a new file, I then only have to update the database table.
If you wanna see how the code here works:
The current version is generated as described (from all names we had in the past), but feel free to update it. The file contains (in CSV format - comma separated values):
- id: ignore that (technical ID in database)
- type: 1 = last name, 2 = first name
- name: I guess that's obvious
- count: number of occurrences, which impacts the probability for that name
You can:
- add names (add a line anywhere in the file)
- change names (e.g. to remove typos or change case)
- remove names (remove the line or set count to 0)
- change the count to change probability for a name
- duplicate names don't hurt, but the count will be the sum of duplicates practically
With a new file, I then only have to update the database table.
If you wanna see how the code here works:
Code: Select all
public function generateName($nationality) {
$firstNamePoolEntryResult = $this->c4fda->executeSimpleQueryAssoc(
"select * from c4f_namepool
where type = ".NamePoolEntryType::FirstName."
and nationality = '$nationality'");
$lastNamePoolEntryResult = $this->c4fda->executeSimpleQueryAssoc(
"select * from c4f_namepool
where type = ".NamePoolEntryType::LastName."
and nationality = '$nationality'");
$namePool = array();
foreach($firstNamePoolEntryResult as $namePoolEntry)
$namePool = array_merge($namePool, array_fill(0, $namePoolEntry['count'], $namePoolEntry['name']));
$firstName = sizeof($namePool) ? $namePool[rand(0, sizeof($namePool) - 1)] : '';
$namePool = array();
foreach($lastNamePoolEntryResult as $namePoolEntry)
$namePool = array_merge($namePool, array_fill(0, $namePoolEntry['count'], $namePoolEntry['name']));
$lastName = sizeof($namePool) ? $namePool[rand(0, sizeof($namePool) - 1)] : '';
return [
'firstName' => $firstName,
'lastName' => $lastName
];
}
Who is online
Users browsing this forum: No registered users and 3 guests