Names and Portraits

Post Reply
CorporalHicks
Posts: 11
Joined: Mon Jan 10, 2022 12:50 am

Names and Portraits

Post by CorporalHicks »

Hello,
I'm trying to figure out how names and portraits are assigned to soldiers. So, I've made a mod that adds about 200 real soldier photos instead of the placeholder images. It worked just fine, with pictures randomly assigned to all the soldiers. Next, I decided to increase the number of soldier names, since 300 resulted in too many repeats. So, I programmed another 150 names into the system. Well, the names work, and they are being assigned randomly to my men.

The problem is, I've noticed that certain portraits now seem to be sticking to certain names, and I have no idea why. Let's say I have 4 guys named Malone in my company, then all of them have the same picture. I have run tests and the problem persists. Any idea what I might have broke by adding more names?

Thank you,
Hicks
User avatar
PipFromSlitherine
Posts: 1503
Joined: Wed Jun 23, 2010 7:11 pm

Re: Names and Portraits

Post by PipFromSlitherine »

It looks like that is how the portrait logic works - it uses the name as the base of the index. This is coded, so I'm not sure there is a workaround. Sorry.

Cheers

Pip
follow me on Twitter here
CorporalHicks
Posts: 11
Joined: Mon Jan 10, 2022 12:50 am

Re: Names and Portraits

Post by CorporalHicks »

Thanks for the reply!

I am just curious, though, because I didn't ever notice this problem until I added new names. I had multiples of one name with various pictures (as far as I can remember.)

Another issue has popped up since I added tanker photos. I have the same issue with multiples of the same name and photo. But also, it seems like the tanker names are now limited to about 20 (the amount of tanker photos I added.) I would think that all names would still be in play if the name is the base of the index. This one could possibly be a coincidence.

One workaround I can think of is to add multiples of names... So have 10 Smiths and 6 Williams etc, just have thousands of names. Unfortunately I've had to do most of it manually because excel doesn't paste right into wordpad.
User avatar
PipFromSlitherine
Posts: 1503
Joined: Wed Jun 23, 2010 7:11 pm

Re: Names and Portraits

Post by PipFromSlitherine »

It does a wrap based on the number of portraits, so with less portraits you get some more mixing up (IIRC), but if you add more it will pretty much just be static.

Cheers

Pip
follow me on Twitter here
Post Reply

Return to “Close Combat The Bloody First - Modding”