Community

 
Post Reply
Quick Reply
Cancel
Custom Eye Colors, Nail Polish & Tutorial
3 years ago  ::  Jun 23, 2010 - 11:56PM #1
IdolNinja
Posts: 1,456
For a tutorial on how this works using basic nail polish, see here.



You can setup a color grid to choose different iris color and sclera (white of the eye) color by adding a default color grid to the human eyes entry in customization_items.xtbl.



    <Customization_Item>

        <Name>human eyes</Name>

        <DisplayName>CUST_ITEM_HUMAN_EYES</DisplayName>

        <Wear_Options>

            <Wear_Option>

                <Name>CUST_WEAR_NORMAL</Name>

                <disabled>no</disabled>

                <Active_Flags></Active_Flags>

                <Required_Flags></Required_Flags>

                <Incompatible_Flags></Incompatible_Flags>

                <Particle_Systems></Particle_Systems>

                <Mesh_Information>

                    <MeshID>473</MeshID>

                    <Mesh_Filename>

                        <Filename>cmEye_humanEyes.cmeshx</Filename>

                        </Mesh_Filename>

                    <Cutscene_Only>yes</Cutscene_Only>

                    <Obscured_VIDs></Obscured_VIDs>

                    <Obscured_slots></Obscured_slots>

                    <Texture_Infos></Texture_Infos>

                    <VID_List>1</VID_List>

                    <Morph_Filename>

                        <Filename>cmEye_humanEyes_pc_CTE.morphx</Filename>

                        </Morph_Filename>

                    </Mesh_Information>

                </Wear_Option>

            </Wear_Options>

        <Variants>

            <Variant>

                <Name>CUST_VARIANT_BLUE</Name>

                <Price>0</Price>

                <Respect_Bonus>0</Respect_Bonus>

                <Mesh_Variant_Info>

                    <Variant_Name>blue</Variant_Name>

                    <VariantID>275</VariantID>

                    <Material_List>

                        <Material_Element>

                            <Material>blue</Material>

                            <Shader_Type>SR2Cloth</Shader_Type>

                            <Default_Colors_Grid></Default_Colors_Grid>

                            </Material_Element>

                        </Material_List>

                    </Mesh_Variant_Info>

                </Variant>

            <Variant>

                <Name>CUST_VARIANT_HAZEL</Name>

                <Price>0</Price>

                <Respect_Bonus>0</Respect_Bonus>

                <Mesh_Variant_Info>

                    <Variant_Name>hazel</Variant_Name>

                    <VariantID>276</VariantID>

                    <Material_List>

                        <Material_Element>

                            <Material>hazel</Material>

                            <Shader_Type>SR2Cloth</Shader_Type>

                            <Default_Colors_Grid></Default_Colors_Grid>

                            </Material_Element>

                        </Material_List>

                    </Mesh_Variant_Info>

                </Variant>

            <Variant>

                <Name>CUST_VARIANT_GREEN</Name>

                <Price>0</Price>

                <Respect_Bonus>0</Respect_Bonus>

                <Mesh_Variant_Info>

                    <Variant_Name>green</Variant_Name>

                    <VariantID>277</VariantID>

                    <Material_List>

                        <Material_Element>

                            <Material>green</Material>

                            <Shader_Type>SR2Cloth</Shader_Type>

                            <Default_Colors_Grid></Default_Colors_Grid>

                            </Material_Element>

                        </Material_List>

                    </Mesh_Variant_Info>

                </Variant>

            <Variant>

                <Name>CUST_VARIANT_GRAY</Name>

                <Price>0</Price>

                <Respect_Bonus>0</Respect_Bonus>

                <Mesh_Variant_Info>

                    <Variant_Name>gray</Variant_Name>

                    <VariantID>278</VariantID>

                    <Material_List>

                        <Material_Element>

                            <Material>gray</Material>

                            <Shader_Type>SR2Cloth</Shader_Type>

                            <Default_Colors_Grid></Default_Colors_Grid>

                            </Material_Element>

                        </Material_List>

                    </Mesh_Variant_Info>

                </Variant>

            <Variant>

                <Name>CUST_VARIANT_AMBER</Name>

                <Price>0</Price>

                <Respect_Bonus>0</Respect_Bonus>

                <Mesh_Variant_Info>

                    <Variant_Name>amber</Variant_Name>

                    <VariantID>279</VariantID>

                    <Material_List>

                        <Material_Element>

                            <Material>amber</Material>

                            <Shader_Type>SR2Cloth</Shader_Type>

                            <Default_Colors_Grid></Default_Colors_Grid>

                            </Material_Element>

                        </Material_List>

                    </Mesh_Variant_Info>

                </Variant>

            <Variant>

                <Name>CUST_VARIANT_DARK_BROWN</Name>

                <Price>0</Price>

                <Respect_Bonus>0</Respect_Bonus>

                <Mesh_Variant_Info>

                    <Variant_Name>dark brown</Variant_Name>

                    <VariantID>280</VariantID>

                    <Material_List>

                        <Material_Element>

                            <Material>dark brown</Material>

                            <Shader_Type>SR2Cloth</Shader_Type>

                            <Default_Colors_Grid></Default_Colors_Grid>

                            </Material_Element>

                        </Material_List>

                    </Mesh_Variant_Info>

                </Variant>

            <Variant>

                <Name>CUST_VARIANT_BROWN</Name>

                <Price>0</Price>

                <Respect_Bonus>0</Respect_Bonus>

                <Mesh_Variant_Info>

                    <Variant_Name>brown</Variant_Name>

                    <VariantID>281</VariantID>

                    <Material_List>

                        <Material_Element>

                            <Material>brown</Material>

                            <Shader_Type>SR2Cloth</Shader_Type>

                            <Default_Colors_Grid></Default_Colors_Grid>

                            </Material_Element>

                        </Material_List>

                    </Mesh_Variant_Info>

                </Variant>

            </Variants>

        <_Editor>

            <Category>Entries</Category>

            </_Editor>

        <ID>302</ID>

        <Flags>

            </Flags>

        <Base_Respect_Bonus>0</Base_Respect_Bonus>

        <Slot>eyes</Slot>

        <Default_Colors_Grid>

            <Default_Color>

                <Clothing_Color>Red</Clothing_Color>

                </Default_Color>

            <Default_Color>

                <Clothing_Color>Green</Clothing_Color>

                </Default_Color>


            </Default_Colors_Grid>

        <Base_Price>0</Base_Price>

        </Customization_Item>






In the above code, the iris is red and the sclera is green.







The problem is that the color grid menu doesn't show up yet at the plastic surgeon, so you're stuck with adding the colors manually to the xtbl file to get what you want. I think the key is to modify pcr01.lua so the eye menus populate with a clothing color grid instead of the eye variants. My guess is that we should be able to drop one in from clothing_store.lua. Anyone who wants to play with that and get it working, feel free. :)

0 (0 Ratings)
Quick Reply
Cancel
3 years ago  ::  Jun 22, 2010 - 1:02PM #2
samlynch2
Posts: 2,118
 PLEASE DON'T ADD THE RED EYES TO YOUR FAT, PONYTAIL SHE-MAN! He looks evil enough as it is.



On Topic: Nice! I certainly would like to customise all of the eyes. I can finally make a perfect devil >:)
0 (0 Ratings)
Modder of Saint's Row 2 for two years.
Quick Reply
Cancel
3 years ago  ::  Jun 23, 2010 - 3:48AM #3
IdolNinja
Posts: 1,456
Success! It turns out that the key was the customization_icons.xtbl file which controls what type of slot items will actually display in stores for purchase.





    <Icon>

        <Name>Head</Name>

        <Angle>0.230000</Angle>

        <Distance>1.5</Distance>

        <Offset>

            <X>0.0</X>

            <Y>-0.10</Y>

            <Z>0.0</Z>

            </Offset>

        <_Editor>

            <Category>Entries</Category>

            </_Editor>

        <Categories>

            <Category_Element>

                <Category>Hat</Category>

                </Category_Element>

            <Category_Element>

                <Category>Eyewear</Category>

                </Category_Element>

            <Category_Element>

                <Category>Eyes</Category>

                </Category_Element>


            </Categories>

        <DisplayName>CUST_ICON_HEAD</DisplayName>

        <Outfits_Only>no</Outfits_Only>

        </Icon>






So, in the above code, I just added the Eyes category as an element. Then I added the "human eyes" item in customization_stores.xtbl to any store and it will sell them. For example, I added them to On the Rag:



    <Store>

        <Name>On_the_Rag</Name>

        <DisplayName>CLOTHES_RAG</DisplayName>

        <Shops>

            <Shop_Element>

                <Shop>AR On the Rag</Shop>

                </Shop_Element>

            <Shop_Element>

                <Shop>RL On the Rag</Shop>

                </Shop_Element>

            <Shop_Element>

                <Shop>SU On the Rag</Shop>

                </Shop_Element>

            <Shop_Element>

                <Shop>SX On the Rag</Shop>

                </Shop_Element>

            </Shops>

        <Items>

            <Store_Item>

                <Item>human eyes</Item>

                <Variants></Variants>

                </Store_Item>







The only thing I'm not 100% happy about is that the plastic surgeon still lets you choose the 8 or so eye color options, but they don't change when you select different ones, and just stay the two colors that are defined in the default color grid in customization_items.xtbl. All eye color changes happen at the clothing stores instead. I ended up setting the default color grid in customization_items.xtbl as Bistre and White for the two colors which looks good for a standard dark brown eye color (until the player can get to a store to change them.)



        <Default_Colors_Grid>

            <Default_Color>

                <Clothing_Color>Bistre</Clothing_Color>

                </Default_Color>

            <Default_Color>

                <Clothing_Color>White</Clothing_Color>

                </Default_Color>

            </Default_Colors_Grid>






A pic buying new colors at On the Rag:





The implications of this discovery may also be the key to getting other slot items to show up at stores like low chains and medallions, pants chain slot items, back pants pockets slot items and others. :D








0 (0 Ratings)
Quick Reply
Cancel
3 years ago  ::  Jun 23, 2010 - 7:20AM #4
samlynch2
Posts: 2,118
 Cool, but we'd have to make a whole new store for things like this. Make it Futurama style, a back alley shop that sells organs!
0 (0 Ratings)
Modder of Saint's Row 2 for two years.
Quick Reply
Cancel
3 years ago  ::  Jun 23, 2010 - 11:50AM #5
BrandNewb
Posts: 75

ThunderCat * Lion-Newb]Sword of Omens.....Give me sight beyond sight.


Sword of Omens.....Give me sight beyond sight.[/quote]

0 (0 Ratings)
Quick Reply
Cancel
3 years ago  ::  Jun 23, 2010 - 9:51PM #6
IdolNinja
Posts: 1,456
I got the teeth working, but the color grid doesn't work on them. The neat thing though is that you can actually remove them just like the eyes:





Have I gone too far?
0 (0 Ratings)
Quick Reply
Cancel
3 years ago  ::  Jun 23, 2010 - 11:14PM #7
IdolNinja
Posts: 1,456
Fingernail polish is now avaiable for sale with the full custom color grid to choose from:







I'll be adding  a short tutorial here for enabling it. All of this stuff in this thread is already integrated into the latest gentlemen of the row beta which should be released shortly.
0 (0 Ratings)
Quick Reply
Cancel
3 years ago  ::  Jun 23, 2010 - 11:53PM #8
IdolNinja
Posts: 1,456
Understanding how Store Items work:



customization_categories.xtbl contains entries for types of items that CAN be added as menu options. This is like the reference that customization_icons refers to when you add it there as a menu item. I copied the gloves entry for the nail polish to use since it had the correct camera angles already setup.



customization_categories.xtbl add entry



    <Category>

        <Name>Nail Polish</Name>

        <DisplayName>Nail Polish</DisplayName>

        <Slots_Grid>

            <Slot_Element>

                <Slot>fingernails</Slot>

                </Slot_Element>

            </Slots_Grid>

        <Obscure_Grid></Obscure_Grid>

        <_Editor>

            <Category>Entries</Category>

            </_Editor>

        <Male_Animations>

            <State>Cust Wrist R</State>

            <Animation>Choose Wrist</Animation>

            </Male_Animations>

        <Female_Animations>

            <State>Cust Wrist R</State>

            <Animation>Choose Wrist</Animation>

            </Female_Animations>

        <Camera_Settings>

            <Angle>.23</Angle>

            <Distance>1</Distance>

            <Offset>

                <X>0.0</X>

                <Y>-.35</Y>

                <Z>0.0</Z>

                </Offset>

            </Camera_Settings>

        </Category>






You'll notice the slot above is set to fingernails which is the original slot that the nail polish was under.



Next open up customization_slots.xtbl and give the fingernails slot some memory allocation. (It was 0 originally.)



customization_slots.xtbl edit



    <Slot>

        <Name>fingernails</Name>

        <CPU_Size>12288</CPU_Size>

        <Flags>

            <Flag>remove on outfit</Flag>

            </Flags>

        <_Editor>

            <Category>Entries</Category>

            </_Editor>

        <Render_Order>3</Render_Order>

        <GPU_Size>151552</GPU_Size>

        <PS3_CPU_Size>12288</PS3_CPU_Size>

        <PS3_GPU_Size>151552</PS3_GPU_Size>


        </Slot>






In the above I just copied over the memory allocation from gloves to use for it.



Now open up customization_icons.xtbl to add it as a menu item. This file controls what actually appears in the menu for the clothings stores/wardrobe.



customization_icons edit



    <Icon>

        <Name>Wrists</Name>

        <Angle>0.230000</Angle>

        <Distance>2</Distance>

        <Offset>

            <X>0.0</X>

            <Y>-1.05</Y>

            <Z>0.0</Z>

            </Offset>

        <_Editor>

            <Category>Entries</Category>

            </_Editor>

        <Categories>

            <Category_Element>

                <Category>Left Wrist</Category>

                </Category_Element>

            <Category_Element>

                <Category>Right Wrist</Category>

                </Category_Element>

            <Category_Element>

                <Category>Gloves</Category>

                </Category_Element>

            <Category_Element>

                <Category>Nail Polish</Category>

                </Category_Element>


            </Categories>

        <DisplayName>CUST_ICON_WRISTS</DisplayName>

        <Outfits_Only>no</Outfits_Only>

        </Icon>






Notice in the above that this new menu item is part of the Wrists element so it shows up in that submenu along with gloves, left wrist, right wrist, etc.



Next we'll change the customization_items.xtbl entry for basic nail polish back to the original slot of fingernails (it was set to beards in the cumulative unlock/restore mod to put it at the plastic surgeon with limited color grid.) We'll also add a default color grid so you can choose your color at the store. We'll also give it a price of $75 at the store, (most non-working items like this have their price set to 0 originally.)



customization_items.xtbl edit



    <Customization_Item>

        <Name>basic nail polish</Name>

        <DisplayName>CUST_ITEM_BASIC_NAIL_POLISH</DisplayName>

        <Wear_Options>

            <Wear_Option>

                <Name>CUST_WEAR_NORMAL</Name>

                <disabled>no</disabled>

                <Active_Flags></Active_Flags>

                <Required_Flags></Required_Flags>

                <Incompatible_Flags></Incompatible_Flags>

                <Particle_Systems></Particle_Systems>

                <Mesh_Information>

                    <MeshID>340</MeshID>

                    <Mesh_Filename>

                        <Filename>cmDecNaF_wNails01.cmeshx</Filename>

                        </Mesh_Filename>

                    <Cutscene_Only>no</Cutscene_Only>

                    <Obscured_VIDs></Obscured_VIDs>

                    <Obscured_slots></Obscured_slots>

                    <Texture_Infos></Texture_Infos>

                    <VID_List>25</VID_List>

                    </Mesh_Information>

                </Wear_Option>

            </Wear_Options>

        <Variants>

            <Variant>

                <Name>CUST_VARIANT_NAILS_B</Name>

                <Price>0</Price>

                <Respect_Bonus>0</Respect_Bonus>

                <Mesh_Variant_Info>

                    <Variant_Name>nails B</Variant_Name>

                    <VariantID>179</VariantID>

                    <Material_List>

                        <Material_Element>

                            <Material>nails B</Material>

                            <Shader_Type>BBMakeUp1</Shader_Type>

                            <Default_Colors_Grid></Default_Colors_Grid>

                            </Material_Element>

                        </Material_List>

                    </Mesh_Variant_Info>

                </Variant>

            <Variant>

                <Name>CUST_VARIANT_NAILS_A</Name>

                <Price>0</Price>

                <Respect_Bonus>0</Respect_Bonus>

                <Mesh_Variant_Info>

                    <Variant_Name>nails A</Variant_Name>

                    <VariantID>180</VariantID>

                    <Material_List>

                        <Material_Element>

                            <Material>nails A</Material>

                            <Shader_Type>BBMakeUp1</Shader_Type>

                            <Default_Colors_Grid></Default_Colors_Grid>

                            </Material_Element>

                        </Material_List>

                    </Mesh_Variant_Info>

                </Variant>

            </Variants>

        <_Editor>

            <Category>Entries</Category>

            </_Editor>

        <ID>210</ID>

        <Flags>

            </Flags>

        <Base_Respect_Bonus>0</Base_Respect_Bonus>

        <Slot>fingernails</Slot>

        <Default_Colors_Grid>

            <Default_Color>

                <Clothing_Color>Red</Clothing_Color>

                </Default_Color>

            <Default_Color>

                <Clothing_Color>Black</Clothing_Color>

                </Default_Color>


            </Default_Colors_Grid>

        <Base_Price>75</Base_Price>

        </Customization_Item>






Finally we'll add it to some stores to sell. In GotR I added it to all clothing stores. Here is just an example adding it to On the Rag:



customization_stores.xtbl edit



    <Store>

        <Name>On_the_Rag</Name>

        <DisplayName>CLOTHES_RAG</DisplayName>

        <Shops>

            <Shop_Element>

                <Shop>AR On the Rag</Shop>

                </Shop_Element>

            <Shop_Element>

                <Shop>RL On the Rag</Shop>

                </Shop_Element>

            <Shop_Element>

                <Shop>SU On the Rag</Shop>

                </Shop_Element>

            <Shop_Element>

                <Shop>SX On the Rag</Shop>

                </Shop_Element>

            </Shops>

        <Items>

            <Store_Item>

                <Item>basic nail polish</Item>

                <Variants></Variants>

                </Store_Item>






NOTE: I think a lot of the crashing with items we have experienced was all due to missing entries in the customization_categories.xtbl. We should now (hopefully) be able to allocate some memory to npc only slots like back pants pocket and now use them for items instead of just sticking everything under bra.

0 (0 Ratings)
Quick Reply
Cancel
3 years ago  ::  Jun 24, 2010 - 12:37AM #9
foamcup
Posts: 248
Need more spice!



0 (0 Ratings)
Quick Reply
Cancel
3 years ago  ::  Jun 30, 2010 - 9:29AM #10
IdolNinja
Posts: 1,456
Using the above methodology I was able to get low chains working, and also working pants chain, back pants pocket, and loose belt slots that were formerly npc only. I also created a custom Misc menu with sub menus Misc 1, 2, and 3 for the three slots. What this means is that all those accessories like the headsets, and badges, etc will now be automatically under these misc menus instead of in the bra slot. You can also now equip 3 of them at the same time.



Everything is already integrated in the next gotr beta, and I should be releasing the xtbls here by the end of the week. I'm just waiting on a little surprise from Firespite before I do. ;)



NOTE: The coming mod will also included all the customization mods released into one big package.








0 (0 Ratings)
Quick Reply
Cancel
Post Reply
Quick Reply
Cancel
Jump Menu:
    Viewing this thread :: 0 registered and 1 guest
    No registered users viewing