OpenXcom Forum

OpenXcom Forks => OpenXcom Extended (OXCE) => OXCE Suggestions DONE => Topic started by: Ostrich-Hungry on September 05, 2022, 06:39:27 pm

Title: [DONE][SUGGESTION] "nationFrequency"
Post by: Ostrich-Hungry on September 05, 2022, 06:39:27 pm
Hey! I'm making a mod about names, and I would love to have some control over what nationality do agents get.
Xenonauts had something like this: "<Nation MODMERGE="insert" MODMERGEATTRIBUTE="name" name="Hungarian" chance="10" flag="hungary" >"

"chance" is the probability that said agent belongs to that nation (In this case, Hungary).
It would help me to elaborate immersion, because in some games you rarely find soldiers from, say, countries like England, Russia, Germany, China or the United States. Countries that would contribute many more soldiers than the rest.
This work the same for nations that are islands or very small countries. It should be very rare to have soldiers from those countries.
Title: Re: [SUGGESTION] "nationFrequency"
Post by: Meridian on October 26, 2022, 09:17:12 pm
How about a weight in the *.nam files:

Code: [Select]
globalWeight: 100    # 100 is the default; minimum is 1, maximum unlimited
maleFirst:
  - David
  - Samuel
  - Morgan
  - Bruce
femaleFirst:
  - Jessica
  - Sigourney
  - Halle
  - Whoopi
maleLast:
  - Copperfield
  - Jackson
  - Freeman
  - Willis
Title: Re: [SUGGESTION] "nationFrequency"
Post by: Ostrich-Hungry on October 28, 2022, 07:09:47 pm
That's perfect! Does it works?
Title: Re: [SUGGESTION] "nationFrequency"
Post by: Meridian on October 28, 2022, 07:29:50 pm
Not yet, I just asked if this solution would be acceptable.
Title: Re: [SUGGESTION] "nationFrequency"
Post by: Ostrich-Hungry on October 28, 2022, 11:15:42 pm
yes! It would be perfect. Thank you for your consideration!!!
Title: Re: [DONE][SUGGESTION] "nationFrequency"
Post by: Meridian on October 30, 2022, 11:39:48 am
Done.

Documentation here: https://openxcom.org/forum/index.php/topic,10845.0.html

Sample mod attached.