OpenXcom Forum

Modding => Resources => Topic started by: SuperCaffeineDude on May 31, 2017, 04:03:55 pm

Title: Alternate Paperdolls In OpenXcom Extended
Post by: SuperCaffeineDude on May 31, 2017, 04:03:55 pm
Sorry to start up another topic, basically I want to have more ethnicities in game.

Here's kind of an example
(https://1.bp.blogspot.com/-2rLyp1YAn6I/WS66QQbaDKI/AAAAAAAADoA/L9aI1qVDV80ASyFqqV7LTEhBNzNwxEf2wCLcB/s640/OpenXcom_RaceAndCulture.gif)

I've had a look at sol's diversity-pack I've seen that the look-weights range from 0-3 (4 races)and so I'm left wondering how I add a 5th, 6th, etc race. Could anyone point me in the right direction here? Is it even possible without heavy modifications?
Title: Re: Question: Adding more Paperdolls
Post by: SuperCaffeineDude on June 02, 2017, 06:33:14 pm
Sorry guys is there any info out there on this, expanding the paperdolls is something I really want to do, but I'm hitting a dead end and can't find any examples of it.

I've dug through the soldier script, which goes straight to the soldier name file, but if I add on a 5th look weight where will it grab the images from, idk.

For instance if I add a 5th look-weight in a name-list does it automatically grab from type: MAN_0M4.SPK? I'll work on it some more today but I'd appreciate if someone could drop me some tips here.
Title: Re: Question: Adding more Paperdolls
Post by: Meridian on June 02, 2017, 06:56:03 pm
In vanilla there are only 2 genders and 4 races (looks).

In Extended, there are 16 sub-races (lookVariants)... for a grand total of 2*4*16 = 128 possible paperdolls.
If you look into PirateZ ruleset, you'll find examples how to add them, I think there are 80 or so different paperdolls there.

If 128 is not enough, then we have soldier types, which allow you to add unlimited amount of paperdolls (128 per each soldier type).
Title: Re: Question: Adding more Paperdolls
Post by: SuperCaffeineDude on June 02, 2017, 07:30:43 pm
Hmm so 16 variants of each sex for each of 4 races. So I'm presuming the .nam file is restricted to 4 races still, and the 16 variants are completely random?

Or is it possible to have an IslamicNation.nam file select the mediterranean/indian-skin tone and access a specific variant, or rather define the sub-look-weight?
Quote
i.e.
lookWeights:
-1
-90 (90,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0)
-3
-6

I'll download the PirateZ mod again and take a look, cheers for your help
Title: Re: Question: Adding more Paperdolls
Post by: Meridian on June 02, 2017, 07:33:36 pm
Hmm so 16 variants of each sex for each of 4 races. So I'm presuming the .nam file is restricted to 4 races still, and the 16 variants are completely random?

Yes.

Or is it possible to have an IslamicNation.nam file select the mediterranean/indian-skin tone and access a specific variant, or rather define the sub-look-weight?

Not at the moment. Can be implemented.
Title: Re: Question: Adding more Paperdolls
Post by: SuperCaffeineDude on June 02, 2017, 07:47:25 pm
Thank you for clarifying, I'll work towards having some the random 16 filled out and working, having a Muslim named Aadarsh or Bhuvanesh shouldn't be that jarring.
Title: Re: Question: Adding more Paperdolls
Post by: SuperCaffeineDude on June 03, 2017, 04:09:56 am
Hmm I seem to be struggling with finding where the additional 16 sub-race portraits are defined in Pitatez, I'm going to put some this on hold whilst I work on some other projects.
Title: Re: Question: Adding more Paperdolls
Post by: Dioxine on June 10, 2017, 02:50:42 pm
No need to define anything, you simply declare M dolls above M3 and female dolls above F3. Races go sequentially, meaning M4...M7 is repetition of the same race sequence as M0...M3.
Title: Re: Question: Adding more Paperdolls
Post by: SuperCaffeineDude on August 25, 2017, 09:40:30 am
Hi back again (for a while :p ) I obviously hit the wall.

Thank you Dioxene and Meridian for your thoughts so far, my technical knowledge is pretty rocky and I needed to work on something, so hopefully I can resolve this today.

So to clarify on Dioxine's comment all I need to do for a race paperdoll variant is...

  - type: HEAVY_PERSONAL_ARMOR_INVM0.SPK
    singleImage: true
    files:
      0: Resources/AnyNameILike1.gif

  - type: HEAVY_PERSONAL_ARMOR_INVM4.SPK
    singleImage: true
    files:
      0: Resources/AnyNameIAlsoLike.gif

  - type: HEAVY_PERSONAL_ARMOR_INVM8.SPK
    singleImage: true
    files:
      0: Resources/AnyNameIAlsoLikePlease.gif

And that will yield 3 alternate paperdolls for caucasian males? No catches right? I'll run an experiment later today, hopefully finally complete this small mod.
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: SuperCaffeineDude on August 25, 2017, 05:10:35 pm
So I'm using this...

Code: [Select]
extraSprites:
  - type: MAN_0F0.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/man_0f0.png
  - type: MAN_0F4.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NoArmor_F_Blonde_Curls.png
  - type: MAN_0F8.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NoArmor_F_Blonde_Crop.png

...it's the only change I've made, seems to work, so far no "man_0f0" but that's rng I guess.
You can see two of the three randomly selected paperdolls ingame below.

(https://2.bp.blogspot.com/-DCepCT6IGiw/WaAm6_1g6PI/AAAAAAAADo4/4lPJ7Bi4XSY3xuUai9Dei3FdMRnFKVOqgCLcBGAs/s1600/Test.png)

So now I need to learn how to save my images properly in GIMP lol. I think I've been lucky up till now, there's plenty of topics on that though, so I'll have a dig around.

My plan is to divide up races like so
-North Western (European)
-Southern (African)
-Eastern (Non-Islamic Asia)
-Middle-Eastern (Islamic Arabian)

It seems a bit silly to lose a spot for an Islamic portrait selection, this is just to avoid having a Sikh character portrait assigned to a "Mohammed" name.
Does anyone know a better way to divide up names and races between the 4 skin-tones?

Shorter term though for north-western I'm working on these...
(https://2.bp.blogspot.com/-Lja0dW512Ss/WaA5JDlapRI/AAAAAAAADpI/06gKvqT8cSU17iMl5n9mMvVAZFxECOP9ACLcBGAs/s640/Showcase.png)
1.cropped-hair, blonde/ginger/brunette //DONE
2.curly hair, blonde //DONE
3.straight hair, blonde //DONE
4.curly hair, ginger //DONE
5.straight hair, ginger
6.curly hair, brunette
7.straight hair, brunette
8.curly hair, black
9.straight hair, black
10.cropped hair, black // DONE
11.punk green
12.punk pink
13.glasses
14.sunglasses
15.ott feminine
16.ott masculine

We'll see what of that I can do this weekend  :P
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: Solarius Scorch on August 25, 2017, 08:44:38 pm
Wow... I will be cheering you on :)
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: SuperCaffeineDude on August 25, 2017, 10:03:33 pm
 :) Cheers bud
(https://3.bp.blogspot.com/-HtK9nSTP_Cs/WaByr-wc66I/AAAAAAAADpY/HrjY7Lr26MUo4Wlxuy55qVONtO0pTvR2wCLcBGAs/s640/Showcase2.png)
Gone through the alternative gals. Just need to convert some black + brown curly/straight hair for the western females.

Probably convert some of my western males next.
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: Solarius Scorch on August 25, 2017, 10:28:34 pm
I love them.
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: mrcalzon02 on August 27, 2017, 09:43:57 am
 ;D They look Great! looking forward to being able to see them in-game at some point!
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: SuperCaffeineDude on August 27, 2017, 12:16:47 pm
Cheers! Another peek...
(https://1.bp.blogspot.com/-j5fxQZZ05AI/WaKLby85AFI/AAAAAAAADpo/NZ00HJSf9EcrbjSVlpd6wIj08CcbLV1SgCLcBGAs/s640/Showcase3.png)

Does anyone have a better way to test if the paperdolls are accessible? My worry is that it seems to be drawing from very little of my pool (1st four or so images)?
Code: [Select]
extraSprites:
  - type: MAN_0F0.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/man_0f0.png
  - type: MAN_0F4.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type01.png
  - type: MAN_0F8.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type02.png
  - type: MAN_0F12.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type03.png
  - type: MAN_0F16.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type04.png
  - type: MAN_0F20.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type05.png
  - type: MAN_0F24.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type06.png
  - type: MAN_0F28.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type07.png
  - type: MAN_0F32.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type08.png
  - type: MAN_0F36.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type09.png
  - type: MAN_0F40.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type10.png
  - type: MAN_0F44.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type11.png

Perhaps its when I bring MAN_0F into the double digits? Would be great to know if a technical wiz-kid/dude could clarify that? My understanding is for one paperdoll race I need to go x+4+4+4+4+4,etc.

Cheers again!
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: Solarius Scorch on August 27, 2017, 12:33:02 pm
You need to add this part to the global ruleset:

Code: [Select]
maxLookVariant: X
X being the number of your faces (of one sex only), divided by 4, and then you subtract 1.

For example I currently have 28 faces, so my entry is maxLookVariant: 6.
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: SuperCaffeineDude on August 27, 2017, 12:47:43 pm
Cheers solarius, I'm afraid I'm not understanding what the global ruleset is?
as in modify a separate .rul file, or tag what you've written on the top of my script??
I can't seem to find a global ruleset is all  :-[

Also for those 12 sprites i need (/4-1) maxLookVarient: 2 ?

Thanks
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: Solarius Scorch on August 27, 2017, 12:53:08 pm
Cheers solarius, I'm afraid I'm not understanding what the global ruleset is?
as in modify a separate .rul file, or tag what you've written on the top of my script??
I can't seem to find a global ruleset is all  :-[

You can put it in any file on the highest position - so it has the same order as units:, items:, extraStrings etc.

I keep a separate file for such global variables. Other such flags are maxViewDistance, initialFunding, startingTime, surrenderMode etc.
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: Meridian on August 27, 2017, 12:53:59 pm
You need to add this part to the global ruleset:
Code: [Select]
maxLookVariant: XX being the number of your faces (of one sex only), divided by 4, and then you subtract 1.
For example I currently have 28 faces, so my entry is maxLookVariant: 6.

That's a complicated formula :)

How about like this:
0 = 8 paperdolls (vanilla)
1 = 16 paperdolls
2 = 24 paperdolls
3 = 32 paperdolls
etc.
15 = 128 paperdolls (max)
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: SuperCaffeineDude on August 27, 2017, 01:16:36 pm
(https://1.bp.blogspot.com/-mqpzYL9Ijqw/WaKZqabUumI/AAAAAAAADp4/d4z3Ts_B-lgNGF9S4fPozctzWQQkS3tqACLcBGAs/s640/Showcase4.png)
Okay cool it seems to accessing at least half of the list so far as a I am able to make out.

Code: [Select]
maxLookVariant: 2
extraSprites:
  - type: MAN_0F0.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/man_0f0.png
  - type: MAN_0F4.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type01.png
  - type: MAN_0F8.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type02.png
  - type: MAN_0F12.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type03.png
  - type: MAN_0F16.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type04.png
  - type: MAN_0F20.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type05.png
  - type: MAN_0F24.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type06.png
  - type: MAN_0F28.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type07.png
  - type: MAN_0F32.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type08.png
  - type: MAN_0F36.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type09.png
  - type: MAN_0F40.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type10.png
  - type: MAN_0F44.SPK
    singleImage: true
    files:
      0: Resources/GenderDetail/NWOrigin_F_Armor0_Type11.png

Odd that it was able to access  and randomise around 3-4 portraits without editing no, maybe I have something editing that variable? This is cool thanks Solarius
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: Meridian on August 27, 2017, 01:34:44 pm
Odd that it was able to access  and randomise around 3-4 portraits without editing no, maybe I have something editing that variable? This is cool thanks Solarius

The paperdolls are randomized also without that setting.
The setting only defines how many paperdolls will appear in the selection window, when you try to change it manually.
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: SuperCaffeineDude on August 27, 2017, 01:52:28 pm
Ah, so are you suggesting I was just unlucky before maybe, how do you change it manually out of interest?
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: Meridian on August 27, 2017, 01:54:51 pm
Ah, so are you suggesting I was just unlucky before maybe, how do you change it manually out of interest?

In the base, go to Inventory and press M... or right-click on the paperdoll.
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: SuperCaffeineDude on August 27, 2017, 02:33:21 pm
Took me a while to find but cool
So Base... Equip Craft... aTroopCarrier... Equipment... Inventory... rightclick paperdoll, to anyone reading is the route to go?

Definitely lack full access to my 11 sprites on this with current settings, I'll have a play, but this should allow me to show off my roster without relying on luck
It's as you say, 2 = 24 cap but total not individual as I'd thought, so I'd want to take the number to = the least number of sprites in a category.

Cheers sirs!
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: Yankes on August 27, 2017, 05:00:12 pm
btw when you change hair color of paperdoll then you should change hair color in battle scape. Property you look for is `spriteHairColor` in armor definition.
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: SuperCaffeineDude on August 27, 2017, 11:13:10 pm
Cool yanks, looks like that could add a lot, the example that pops up is

Code: [Select]
spriteFaceGroup: 14
    spriteFaceColor: [160, 160, 64, 160, 160, 64, 160, 160] #M0 F0 M1 F1 M2 F2 M3 F3
    spriteHairGroup: 4
    spriteHairColor: [130, 160, 201, 130, 64, 198, 160, 64] #M0 F0 M1 F1 M2 F2 M3 F3

Can I ask how this applies with an expanded asset list, I take it I just tag on more values that would correspond to M4, F4, M5, F5, etc?

Also the face colour might be an interesting addition too, does that apply to hands and such too?

May need to rethink how I'm going to organise my races, seems like I could maybe combine african and arabian paperdoll sets, that is if I can alter the skintone, and do something else with the fourth set. idk will need to think on it.
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: Yankes on August 28, 2017, 01:19:03 am
Yes, each position in that array represents next paperdoll.

"Face" color is color of all pixels that represents skin color (`spriteFaceColor` to change it, if you want).

Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: SuperCaffeineDude on August 28, 2017, 08:55:22 pm
(https://2.bp.blogspot.com/-aOqLekiAbBY/WaRP3i4oGbI/AAAAAAAADqI/RSIVp2bSS-AAt9yjxYTlDtUUTJVd2NMWwCLcBGAs/s640/Oriental.png)

There's my ladies from the far-east, the paperdolls are too bright and yellow maybe, hard to do in xcom's pallet, let me know what you think

Changing the way I divide up the paperdolls

1-Western 1-8 Nordic 9-16 Mediterranean(Latin) - Names : Western
2-Far East: 1-8 Oriental 9-16 Indian - Names : Asian
3-South East: 1-8 African 9-16 Arabian - Names : Islamic
4-Mix: 1-4 Anglo-African, 5-16 Punk/Emo/Alternative Styles - Names : Modern

Since hair and skin tone can be assigned by the paperdoll id, it makes sense to to split a category between africa and arabia, as many north-africans will likely share islamic names that may not make sense on characters from the far-east or the more flamboyant female paperdolls. Another better way might be to also ditch the "Mix" category for "Western, Indian, South-Eastern, Oriental" with the Mediterranean peoples losing 2 slots to western-africans as Chinese and Japanese names can be quite distinct from Indian ones.

Not going to overthink it just yet, I'll get the paperdolls done and test out how it all feels, this is just a rough guide I'm hoping to follow, I'm going through all the females first I think.
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: SuperCaffeineDude on August 29, 2017, 03:58:05 pm
(https://2.bp.blogspot.com/-R_8LyMM4mJs/WaVg2xPz6FI/AAAAAAAADqY/ugjB9enhvqI8iCjKYj1BNUMf7vZQPPPkQCLcBGAs/s1600/Showcase4.png)
Short term to aim for 8 per category's sex
Hijab looks a little shit atm, the sunglasses don't work in combination with it. Some of those western paperdolls with the darker hair aren't working for me, need to be a dark brown like my other races rather than an anime blue hair.
Pretty happy with the Indian paperdolls though.
Next is the African, then the Mediterranean women. 
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: crono_05 on July 13, 2018, 05:35:30 am
Are you still working on this? all of them look awesome  :)

Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: Diego21ARG on November 02, 2019, 03:14:14 pm
This looks great!
Title: Re: Alternate Paperdolls In OpenXcom Extended
Post by: SuperCaffeineDude on November 10, 2019, 08:39:10 am
Cheers bud!

Are you still working on this? all of them look awesome  :)

Forgot I posted this tbh, I believe there was some progress made regarding paperdoll layering in extended, so I want to get my head around that, previously (more than 2 years ago now) I think I burnt out when I had to save the variants and my laptop broke (plays violin), I also didn't like the idea of representing religions, but having names and paperdolls mismatching in a way that might seem pretty tasteless.

I'm thinking a way to avoid name weirdness might be to segregate them into types of soldiers that share armor, then have them available from quests (i.e. pick up soldiers (type oriental) from china, pick up soldiers (type arabian) from Egypt), that seems like a lot of work, though it potentially gives me an infinite variety cap. (Additionally I guess you could have men and women as different types of soldier, then use their "sex" as "culture" which grants me a different torso and death-scream (i.e. have some indians wearing turbans with a different set of names))
And another way might be to avoid regional specific clothing and names, though this really nulls the point of what I'd intended.

If anything should be clear from what I've written it's that I'm not clear and I'm more likely to use these assets in another project than a vanilla extension atm.

Cheers though!