Thursday, February 1, 2018

Tutorial - Repository Part 1 - Linking back to EA textures (Simple)

This is the start of a number of tutorials that I'm creating around repositorying things to minimise textures in your game.

WHY have repository:

This is useful to downloaders because

1. It allows you to have things matching in a much more complete way.
2. It minimises the number of textures that you have loaded into graphics memory - reducing the opportunity for pink flashing.
3. Makes it easier to remove some things from the game - don't want that slaved table? remove it, and don't worry about the recolours - you don't need to go searching for them.  Note: if you want to remove a master - don't. Instead go into Simpe, and untick it's catalog sorts in the OBJD segment. Commit, Save. And it's gone from your game, but still retains the recolours for your other pieces.
4. You don't have to have hundred's of recolours in game to match up your sofa pieces with your armchair, etc.

This is useful for creators because:

1. You don't have to recolour all umpteen million pieces to have a matching set.
2. If everything is mapped correctly, you only need to test your recolours on the master object.
3. It allows you to have an expanded set, with less work.

So that's the why: Under the cut - the How

Step 1: A Handy-Dandy Repository Checklist.
I have this as a text file that I open up  so I can check off each section, and copy over each long name as I go.
Right Click on this link and choose "save as..." to  Download CHECKLIST-Repository.txt
Open this file up in notepad, and have it handy, while you work.

Step 2: Choosing the textures
Each object is going to be different - so what I'm going to do is give you a for example - easy, and we'll go through a more complicated one in a separate tutorial.

Our simple example - Someone's made a bed and not linked the bedding to EA bedding.  I'm doing the Big Barn Double Bed from Wood for Sims.

Choosing the texture for our simple example is fairly easy - we want it to go to the EA bedding which is linked to one of the base game beds. Don't know which one? Don't worry about that - we don't need to know that to link it.

a. Find a recolour of an EA bedding and open it up in SimPE, then go to the MMAT segment.
b. We are going to collect 2 pieces of information from here:

subsetName (dtString) = bedding
modelName (dtString) = beddoublecolonial_cres

Close the recolour.















Start up Object Workshop in SimPE, wait for it to load, and then choose any double bed.
 I use this one: Seating -> Bed -> Bed - Double - Expensive

Choose Next - then change to Clone, and update the checks below to match the picture - i.e. untick the  "Set Custom Group ID" (especially important) and make sure "Create a stand-alone object" is ticked. The others are less important - untick them so that the package is emptier, but if you forget it's not a big deal.


 Click Start - and it will bring up a package where everything in the resource list is italicised. That means that it's not saved yet, and if you close it without saving it won't be on your PC. (This is good and what we want).















Now go down to the SHPE segment and have a look at the details with the bedding in it, then copy the Material Definition File name for our bedding.

Now close the package without Saving.


I copy it over to a second textfile so I can just copy and paste it into the object I'm changing. If you're going to do a lot of one type, it's worthwhile saving this textfile so you don't have to repeat this step.












Step 3: Copy your original object that you are changing, and put the original somewhere safe.
We do that so if something goes belly up - it's just a matter of deleting the stuffed up package, and taking a copy of the original package to start again.

On the object I am updating I put the suffix tag - _2bSlaved-bedding. i.e. what's happening, and which thing I'm doing the repository for, if it was not an EA repo, then I would also include a short description of the object I'm repoing it to.

In this case - the object gets renamed from -
wfs2bbbedbeddouble1a.package to
wfs2bbbedbeddouble1a_2bSlaved-bedding.package

Then we open the renamed package up in SimPE, and it's time to use our checklist.

Step 4: Using the Checklist

1. GMDC 
First go to the GMDC segment and check that the bedding has the same name as EA  bedding.

Is the subsetName that we copied from the recolour, the same as the model name in the GMDC?
  •  Yes? - Don't need to do anything.
  •  No? - Choose the Groups tab,  and select the model name you need to change, then go over to the name field and change it to the SubsetName (dtString) that you copied over. In our example case, we don't need to do that. But I include how to for completeness. Commit and Save
Choose the Groups Tab


Update the subsetName 










2. TXTR, MMAT, and TXMT segments.
Delete the matching segments.

For our example, we want to keep the bedding frames, shadows, etc, etc. So look for the name that has our subset name (or whatever it was previously if it's not the same). Right click on that one, and choose delete. Then Save.


Repeat for all 3 file types. I usually start with TXTR, then go up to MMAT and TXMT. But do it in whatever order you like.

That's the easiest part over. :)

3. SHPE

The SHPE in our package that we are changing needs to have the exact same Material Definition File name for our Subset Name as our EA


The Subset name needs to be the same as the subset name that you've already grabbed.
The Material Definition Name needs to be the same as the Material Definition Name you've already grabbed.

Commit and Save.










4. GMND
Choose the resource that has the bedding in it. In our example, there are 2 - but one just has shadows in it, so you can ignore that one.

 We're in plug-in view - and if you click on blocklist - you can see that there are a number of "extensions". Each has a number in front which is hexadecimal, but you can treat it like a decimal because it's rare that you ever have more than 9 extensions.

The first one that is always called 0x0 is the one that specifies how many extensions there are, and which ones are enabled.

 
When we are repo-ing an object we need an extension called 'tsMaterialsMeshName' which allows us to link our mesh to materials in a different object.

In this case, there is already an extension called tsMaterialsMeshName but it's empty. More often, there isn't an extension, so we have to add one.











How to add an Extension.


1. Click on Edit Blocks Tab to bring up the extension list.
2. Click on the Drop Down list and choose (cDataListExtension).
3. Click Add. This will add a blank extension.

4. Go back to the Content tab, and choose the blank extension from the drop down list in the BlockList and choose the blank extension.

5. Put 'tsMaterialsMeshName' in the Name field

6. Commit and Save. If you click on some other section and then return to the GMND, you'll find the drop down list on your 0x0 extension now includes a named extension.

 Filling in the extension:
1. In the drop down list, choose String, then click 'Add' it will add a blank string to the Items list.








2. Click on the blank string, and you'll have two fields appear - Name, and String.
in Name, goes the SubsetName (dtString) 
in String, goes the modelName (dtString)  remove the _cres off the end.
We got this information from our MMAT file back up in Step 1.
Commit and save.

Enable the Extension:

Now that we have an extension pointing to the right model name, we need to enable it. If you've added it, check your blocklist dropdown list for the index number of your new extension. Remember that number.



Choose 0x00, and then select the cObjectGraphNode tab.

Does your number appear in the list?
Yes. You don't have to do anything.
No.
  • Click on Add, to get an empty list member and select it.
  • 0x01 goes into the Enabled field.
  • Update the index field with the number of your new extension.
  • Commit and Save.

5. CTSS
Finally - update the category description to include what you have repositoried, what you repositoried it to, and who you are.

So in our example case - I have added "Bedding is repositoried to EA bedding. updated by celebkiriedhel".

Commit and Save.

Step 6. TEST
You're done! Close down SimPe. Go into the game and test to see if it works.

If it doesn't work - first start by checking all your steps that everything is done as listed. Double check that you haven't included spaces in any of the names at the front or back.

If you've done all that, and it still doesn't work - let me know. I'm going to do a trouble shooting tutorial for repository as well.

Once it works - change the suffix on the package
from - On the object I updated I put the suffix tag - _2bSlaved-bedding
to - whatever you want the final name to be. For this one I have changed the name significantly - because I have my own naming system.   when I update something as repository I stick a _R on the end, if it still has it's own meshes (which this one does).

8 comments:

  1. Thank you so much for doing this, Kiri. Trying the repository technique is something that I have been wanting to do for a little while, but had sidelined the idea...until now. This tutorial is a very simple and quick way of explaining the process. :)

    ReplyDelete
    Replies
    1. You're welcome Penelope. Do let me know if you have any trouble getting it to work.

      Delete
  2. thank you Kiri, your processes seem a lot easier than the way I've been doing it!

    ReplyDelete
  3. Thanks Donna. This is the way I do it and I like easy. :)

    ReplyDelete
  4. Replies
    1. You're welcome! Let me know how you go if you use this. :)

      Delete
  5. thank you :)
    (squeezleprime@tumblr.com)

    ReplyDelete