Jurassic Mainframe
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Creation is an act of sheer will. Next time it will be flawless...(est. 2016)
 
Jurassic Mainframe NewsHomeOur Discord ServerLatest imagesJurassic-PediaSearchRegisterLog in

 

 Multiskinning tutorial by Integrity Zero

Go down 
2 posters
AuthorMessage
SpinoInWonderland
Hatchling
Hatchling
SpinoInWonderland


Posts : 88
Reputation : 7
Join date : 2016-06-09

Multiskinning tutorial by Integrity Zero Empty
PostSubject: Multiskinning tutorial by Integrity Zero   Multiskinning tutorial by Integrity Zero Icon_minitimeMon Aug 15, 2016 10:57 am

Posted from Modding Genesis. I heard that MG's host may be shutting down soon, so I'm going to repost those really helpful tutorials here to save them.

Integrity Zero wrote:
I thought that since this is much more a tutorial and not so much about the skins that are made as a result of this, it would be best to send the tutorial over to the Skinning Assistance section, where it more properly belongs/would be much more relevant. Whoever can do this first, I congratulate you, sir/ma'am!

Ever been extremely annoyed that whenever you used an MST file that you always ended up with dead dinosaurs that either turned bright white or a funky weird shade of green? Tired of answering noobs (like me!) who ask questions about MSTs and wonder if they can keep their dead skins? Ever just want to scream and kick DL around some? (I would not recommend that!).

If the latter's your problem, I'm not here to get you sent to the cornfield. I will, however, be able to help with the first two questions. Bear with me, this is my first time to show a mod for JPOG to the public.

Yes, that's right, you CAN have dead skins with MSTs!

MST'ing with Dead Skins: The Tutorial

BEFORE PROCEEDING I DEMAND THAT YOU BACK-UP YOUR FILES. THAT MEANS COPY EVERYTHING FROM YOUR JPOG FOLDER AND PASTE/SAVE IT IN ANOTHER LOCATION/FILE. IF YOU MESS UP AND HAVEN'T BACKED UP YOUR FILES, I CAN'T HELP YOU.

Now, I hope that you've already tried your hand at switching skins within TMLs BEFORE you try doing this. Otherwise, this isn't going to make sense to you. I'd advise you to read over:

The Illustrative Skinning Tutorial: https://jurassicmainframe.forumotion.com/t791-illustrative-skinning-tutorial-by-maximusthedark
It helps you to get a basic grasp of skinning, and, even if you're not using your own skins, it should teach you how to replace skins within a TML, which is ESSENTIAL.
(ERC's) Multiple Skinning Tutorial: https://jurassicmainframe.forumotion.com/t790-multiskinning-tutorial-by-eternal_rocker_chick
Yes, I am aware that ERC's no longer has any pictures. But there are some parts to ERC's tutorial - like editting the model files - that she covers better than the others. It doesn't hurt to go back to what one of the best modders here wrote, either.
The Easier Multiple Skinning Tutorial: https://jurassicmainframe.forumotion.com/t789-multiskinning-tutorial-by-docszoo
Docszoo's tutorial is very helpful - I read over it many times as I was making MSTs in the beginning - and while he doesn't talk so much about the model editting (*wink*) he still does an excellent job of making MSTs easy. Haha, thanks Docszoo, you tricked me. Wink

Note: Docszoo's is the only one with viable pictures that really relate to MST skinning as I know it. Thus, I will refer to some of his pictures while mine are not yet uploaded.


All right. You probably want to get started huh? Please make sure you've read those above before reading further.

You will also need the following programs:

A Hex Editor (I use Hex Editor, which I found on http://www.download.com) - to edit the TML and model files
ConvertCCT (http://www.geocities.com/andres_james/jpog/ConvertCCT.zip) - to obtain the skins and check to see you coded the TML properly
Photoshop (or some other image editor) that has a .DDS plugin (search Google!) - to edit your images
TextPad (or some other program to edit .ini, .inx, .nwt) - to edit your Units files

Oh, and just a quick overview of Hex coding: Hex is in base-16. This means that there are values from 0 - 15, except that 10, 11, 12, 13, 14, and 15 aren't represented as such (we typically use base-10). Instead:

Code:
0 = 00, 1 = 01, 2 = 02, 3 = 03, 4 = 04 ... 9 = 09, 10 = 0A, 11 = 0B, 12 = 0C, 13 = 0D, 14 = 0E, 15 = 0F

The first zero is the 16's place (how many "sixteens" there are, so 32 = 20), and the second is for the "one's" place, or anything less than 16.

Now, then, let's proceed.

The process of making this type of MST file has three basic parts:

-Constant Editting (it's not as bad as it sounds!)
-Skin/Header Additions
-Clean-Up (editting model files, Eng.txt, etc.)

The Clean-Up portion is not unique to this type of MST skinning and is required for all types of big MST mods, but it WILL be covered in this as tutorial as well (for your reading pleasure Wink ).

Constant Editting:

We'll get started with the Constant Editting. Now, as bad as that sounds, it really just has to do with editting some of your constants/basics within the MST framework to get it all working. This includes the footer, the dinosaur names, and the Dino/Skin constants.

First, the dinosaur names. Now, the other MST tutorials suggested that you break the live and dead skins apart, but we dont' want to do that. Therefore, when you see something like this: (Note the periods are not necessarily right)

Galli............
.................
Homalo........
.................
Raptor..........
..................

Note that the code for a dinosaur's name BEGINS with the FIRST LETTER of its name and ends just before the same position (column-wise) two lines down. Therefore, the whole code for a dinosaur's name should consist of EIGHT (Cool sets of four hex values / "columns" of four hex values.

Now, you'll simply want to copy the code for the dinosaur's name and put it directly below where it came from. So if I were to clone a raptor (for whatever reasons, whether it be to make a Deinonychus or to make another raptor skin), the code would now look like this:

Galli............
.................
Homalo........
.................
Raptor..........
..................
Raptor..........
..................

Please note, though, that two dinosaurs CANNOT have the same name. So, you must rename your dinosaur and reorganize the code in ALPHABETICAL order! In my case, I simply want to make another skin for the raptor, so my code will look like this:

Galli............
.................
Homalo........
.................
Raptor..........
..................
Raptor2.........
..................

Try and keep your names for your dinosaurs as short and memorable as possible (the best names are between five to seven letters/characters long). It will make your life SO much easier when you have to edit the Model files (which you should know about presuming you've read the tutorials I've told you to?).

All right. Now you have to edit the footer. The footer starts with the NINTH (9) set of four hex values AFTER the very last dinosaur's first name. It should be marked by something like this:

Code:
00 00 00 00 02 00 02 00

Which is to say, four sets of 00 hex values and then a set of 02 00 02 00 (or 03 00 02 00) values. You're going to have to replace this footer with a new one, as outlined below:

(Note, the footer changes depending on how many SKINS, not dinosaurs, are involved).

Code for the Footer of a Six-Dinosaur/12-Skin File:
Code:
00 00 00 00 02 00 02 00 00 00 00 00 01 00 00 00
01 00 00 00 02 00 02 00 02 00 00 00 03 00 00 00
02 00 00 00 03 00 02 00 04 00 00 00 05 00 00 00
03 00 00 00 04 00 02 00 06 00 00 00 07 00 00 00
04 00 00 00 05 00 02 00 08 00 00 00 09 00 00 00
05 00 00 00 06 00 02 00 0A 00 00 00 0B 00 00 00
...
Note: The differences between SKINS and DINOSAURS is ESSENTIAL to coding this type of TML correctly!

All right, now for the last part of Constant Editting: the constants themselves.
If you think of four hex values as being one "column" (as they will appear to be on your hex editor), a pattern quickly emerges:

First Column: The first hex value increases by one for every line.
Second Column: The first hex value increases by one for every line.
Third Column: The first hex value increases by two and REMAINS EVEN for every line.
Fourth Column: The first hex value increases by two and REMAINS ODD for every line.

Note additionally that you only put as much of the footer as is necessary for your skin. Your footer MUST end with some value from the fourth column (as displayed above). That number MUST be equal to:

Number of Skins - 1 (in hex)
(Not the number of dinosaurs!)

So, for example, that twelve (0C) skin, your footer must end with the value from the fourth column that reads eleven (0B).

All right, now the last part, the constants. You'll find that there are two constants: one at the top (the first value in the third column of hex values), and one at the bottom, the set of four hex values DIRECTLY before the code for the first dinosaur.  

The top constant is the SKIN-constant, meaning how many skins there are in the file. The bottom constant is the DINOSAUR-constant, meaning how many dinosaurs you will incorpoate into the file. I presume that since you want a live AND dead skin, the number of skins you'll want is TWICE the number of dinosaurs you want. Therefore, change the lower constant to the number of dinosaurs you want, and make the top constant double that. Note, it must be in hex. Do NOT write "12" as "12" but rather as "0C" (but you'd know that if you read the other tutorials, of course!).

Now you're all set to get down and dirty with the skin replacements!

Header/Skin Additions:

All right, here's the fairly hard part. It really has to do with keeping track of how the files are organized.

The organization of a TML runs as thus:

Header for the TML
The Header for the LAST Dinosaur's Dead Skin
The LAST Dinosaur's Dead Skin DDS
The Header for the LAST Dinosaur's Live Skin
The LAST Dinosaur's Live Skin DDS
The Header for the SECOND-TO-LAST Dinosaur's Dead Skin
The SECOND-TO-LAST Dinosaur's Dead Skin DDS
The Header for the SECOND-TO-LAST Dinosaur's Live Skin
The SECOND-TO-LAST Dinosaur's Live Skin DDS
The Header for the FIRST Dinosaur's Dead Skin
The FIRST Dinosaur's Dead Skin DDS
The Header for the FIRST Dinosaur's Live Skin
The FIRST Dinosaur's Live Skin DDS
The Footer


(Excluding constants)

You'll need to keep this order when you're making your MSTs. Note how I said "second-to-last" and not "middle" - you'll need to keep this kind of thought in mind when coding. After all, it must be listed from the last dinosaur to the first dinosaur, dead skins then live skins.

Since our TML runs (first to last) from Galli, Homalo, Raptor, and Raptor2, our TML will be arranged:

Raptor2
Raptor
Homalo
Galli

If your new dinosaur's name is SHORTER than the name of the dinosaur you copied, you MUST replace any extra spaces with "." (THIS IS NOT A PERIOD!!!!) which, if you see the left-hand column, is simply a pair of zeros (00). You may wish to write this by hand on the left side, or simply copying a dot on the right-hand side that has a "00" value on the left-hand side.

All right, so assuming you've backed-up your files as I suggested, I want you to open up two files:

The TML that you wish to edit
An Unmodded Copy of the very same TML

We need to add another header in order to add our second raptor skins. You'll need to find the dead and live skin headers from the unmodded TML. As Docszoo suggested in his guide, the best way to find the headers is to search for "DDS" in your TMLs. This brings you to the DDS file for a skin. A HEADER is the SEVEN (7) sets of four hex values that precede the DDS segment.

Note also that a header BEGINS with a NUMBER. This number recognizes what Skin this is. So if the value is 09, then that means that this is Skin Number Nine. These numbers range from 00 to:

Total Number of Skins - 1

These numbers start at the largest value and work down by one towards zero. In other words, with our TML:

Raptor2 Dead Skin (07)
Raptor2 Live Skin (06)
Raptor Dead Skin (05)
Raptor Live Skin (04)
Homalo Dead Skin (03)
Homalo Live Skin (02)
Galli Dead Skin (01)
Galli Live Skin (00)

Go into the unmodded TML and search for DDS. Remember the order of the skins and their headers! You'll have to request to find the DDS the proper number of times. In our case, we need the header that precedes the first and second DDS (since the raptor is the last one listed in the TML, its skins are first to appear). I'd recommend you open new TML tabs and put the data into different tabs and save them, to make SURE you know which one is which. While you are doing this, I would suggest that you open yet ANOTHER TAB and, in your unmodded TML, find the DDS data for the dinosaur you want to edit. Since we want the raptor's dead skin DDS, I would suggest you go to the SECOND DDS (the raptor's live skin file) and copy EVERYTHING from BEFORE its live skin header to the end of the dead skin header above.

(The part about finding the dead dinosaur's DDS is recommended because with some dinosaurs, having to make sure that the dead skin's transparent parts have been removed is a pain in the arse, but for some dinosaurs like the Brachiosaurus, where the dead skin has no holes, it doesn't really matter).

Open your DDS files for the skin you want.

Now, RIGHT after your Skin-Constant at the top, the Header/Skin data begins. Since we want our dinosaur's data to be first (since it is listed last), I'd advise you work from back to front. So take the LIVE skin header and INSERT (not overwrite) it directly after the Skin-Constant. REMEMBER TO CHANGE ITS HEADER NUMBER. Since there are eight total skins and this is the second one in the list, this one must have its header's first value changed to 06. (The way to figure out the header number is to take the total number of skins and then subtract what order it is in the TML).

Now, you must do the same for its dead counterpart. So proceed to the top, directly after the Skin-Constant, where you pasted the last header. Now INSERT (not overwrite) the dead skin's header (changing its number as necessary, in this case to be one less than the total number of skins). Below this, paste in the dead skin's DDS data that I told you to copy earlier, or your own if you have one you'd prefer.

All you have to do now is to repeat this with as many dinosaurs as you want.

There you go! You're all done with the skin/header additions AND the TML editting!

If I were you, I'd use your new TML on ConvertCCT and make SURE that all the skins come out properly named (just the dinosaur's code name for the regular, live skins, and the dinosaur's code name with a "-2" at the end for the dead skins).

Cleaning Up (Yes, you have to do this...)
Newest Section, added 03/20/09

All right. You've made an MST file - that's good. But you're not done yet - if you just put in the game and play it, you'd simply get a normal game. Why? You've just added all the data to the game, sure, but you haven't made the game call on that data yet. It's like the unused section of the library where...well, anyway!

You need to edit the following files:

Eng.txt (found in Gui > Locales > Eng.txt)
Dinolist.ini
FslHunt.ini
Necessary Model Files (name, name_low, name_med, name_hi)
Necessary Unit Files (.ini, .inx, .nwt)

Let's start from the top, shall we?

Open up your Eng.txt (open the GUI folder, then Locales, and it should be there). Now, there's one rule to this: the dinosaurs appear on the Hatchery menu in the order that you wrote them up. So, if you want it to be right before or after the dinosaur you cloned, you need to put it before or after the code for the dinosaur you cloned (respectively).  So if you were doing what I normally do for a reskinned dinosaur (which is to put it right after the original), search for the name of the dinosaur you editted (i.e. if I reskinned a Velociraptor or used its model to make a Deinonychus, I would search for "raptor"). You should get something like this:

Unit_originaldinosaur'sname   "Original Dinosaur's Name"

The first phrase that follows "Unit_" is what you listed the dinosaur's name as in the TML file (which is how the game knows to find the skin). The second part in quotations is what the dinosaur's name should appear as WHEN YOU ARE PLAYING THE GAME.

For my example, it would be:

Unit_raptor   "Velociraptor"

You need to repeat this structure for your own dinosaur. So, if we were to continue using our example, ours would look like this:

Unit_raptor2   "Velociraptor"

If you were to make a Deinonychus and you'd named it as "deino" in the TML file, it would be:

Unit_deino   "Deinonychus"

That's it for the Eng.txt. Now for the two .ini files.

The DinoList.ini is very simple to edit. Like with the Eng.txt, you just have to put the dinosaur's name (as according to the TML) on its own line in the order you'd like it to appear. So according to our example, I'd simply type "raptor2" on its own line below "raptor".

FslHunt.ini is a little harder to edit, but not very much. Just open it up and search for the name of the digsite that you editted (remember, every TML is named according to the digsite). You should find a small section where the names of the dinosaurs are listed in brackets. For example, under flamingcliffs would be:

{ galli, homalo, raptor }

You need to add your own dinosaur's name in, preferably alphabetically. So, for our example, we would put:

{ galli, homalo, raptor, raptor2 }

Pretty simple huh?

Now for the harder parts (but it's still relatively easy). Find (in Models) the four files of the dinosaur that you originally cloned (name, name_lo, name_med, name_hi, so for us, it'd be raptor, raptor_lo, raptor_med, raptor_hi). Copy and paste them, and then rename them as according to your dinosaur (for us, it'd be raptor2, raptor2_lo, raptor2_med, raptor2_hi). Now open these four new files. You MUST open these up with a Hex Editor.

The model files all are connected to the TMLs in one way or another. All you need to know about this is that there are string references that name which skin the model will use. Since you just made a copy of the old dinosaur, this means your new dinosaur currently has the old one's skin. That's not very good.

Search for the name of the dinosaur you originally editted (i.e. for us, "raptor"). You should come across a string ON THE RIGHT HAND COLUMN that has that name (usually four in the name_hi and name files, and three in the name_lo and name_med files - NOTE: they may be in lowercase OR uppercase, so make sure your search is NOT case-sensitive!). You will need to edit all of these to be the name of your dinosaur as listed in your editted TML. Change them now. If your dinosaur's name is shorter than the name of the dinosaur you editted (i.e. "Deino" from "Raptor") then I would make sure that any remaining spaces are filled with "." (THIS IS NOT A PERIOD!!!!). If you remember what you did for the TML, you should remember that any extra spaces should be filled in with a DOT that has a hex value of "00".

Note: Sometimes these model files can be very, very picky. I've had trouble with the Stego's model, which turned out to be fine if I erased a "07" that was about two or three hex values after the original "Steg". This will have a minimal effect, if at all, on your actual dinosaur. I'd suggest you experiment around - sometimes there are just restraints there because of interfering code, as I found out, and for the most part you can try longer names or shorter names to prevent this (this is why I recommended you have a name with a length of about five to seven letters). If I were to suspect any other dinosaurs had problems in their model files with interfering hex values, then I'd say you might have trouble with Parasaurolophus or Triceratops, in addition to Stegosaurus. There may be more, but I haven't found problems with most of the others.

You're done with the model files. There's one last category of files to edit: the Unit files. The .ini file contains values that control the animal's behavior, the .inx file controls animations and model appearance (among other things), and the .nwt defines the animal and its behavior (for the most part).

Copy and paste the .ini, .inx, and .nwt files associated with the original dinosaur you editted (i.e. for us, raptor.ini. raptor.inx, raptor.nwt). If you were simply reskinning a pre-existing dinosaur, I would recommend you do the following (the process is similar if you're making a brand-new dinosaur):

Open the three files in TextPad or something else. The first part should read like this:

Unit {
   Name=raptor;
   Directory=AUnitRaptor;
   TClass=AUnitRaptor;
   ScreenName=$Unit_raptor;
   GUIDialog=AUnitDinosaurDialog;
   UICommand1=Orders;
   UICommand3=Species;
   UICommand4=Info;
   VOCreation=SFX_JP6F;
   UseINX= 1 ;
   ...

The bolded parts are the parts you need to edit. Replace the dinosaur's names there with the name of your dinosaur (as in your TML). With ours it should now read:

Unit {
   Name=raptor2;
   Directory=AUnitRaptor;
   TClass=AUnitRaptor;
   ScreenName=$Unit_raptor2;
   GUIDialog=AUnitDinosaurDialog;
   UICommand1=Orders;
   UICommand3=Species;
   UICommand4=Info;
   VOCreation=SFX_JP6F;
   UseINX= 1 ;
   ...

Now search for "model" - you should find something like this:

Animations {
   Model=raptor;
   }

Edit it so instead of the original dinosaur's name, it has your dinosaur's name:

Animations {
   Model=raptor2;
   }

You're done with the .ini file. You now need to edit the .inx file. This one is much simpler. Search for "model" again and you should find something like this:

Model
{
Model = raptor;
Animation = walk_lp;
Position = {0.5, 0, 0};
RotationY = -90;
}

Again, as before, change the dinosaur's name to your dinosaur's name:

Model
{
Model = raptor2;
Animation = walk_lp;
Position = {0.5, 0, 0};
RotationY = -90;
}

That's it for the .inx file. If you're simply reskinning a dinosaur, you're all done now.

Now, the rest is for anyone who is making a new dinosaur (or drastically altering the behavior to be different from the original version). The .nwt file is a bit more complicated to mod, and is not necessary to mod unless you plan on changing the dinosaur's behavior/definition. This requires much more editting, and is (unfortunately) not within my realm of knowledge to set out for you, as I'm trying to figure that part out myself. Note, though, that it's NOT NECESSARY to add new dinosaurs. So you can simply go with the renamed copy that you made a few steps ago.

There you go! You're done! You've made it through this ginormous tutorial! And I finished it too! Yay for both of us! =D

I hope this helps you guys.

EDIT: Gah! I can't believe I messed up the Header/Footer list for the TML!

_______________
Multiskinning tutorial by Integrity Zero Anatotitan_rainbow_by_brolyeuphyfusion9500-dam6x2q
deviantART: http://spinoinwonderland.deviantart.com/
Blog: http://sauropodomorphlair.blogspot.com/ | Imgur: http://spinoinwonderland.imgur.com/
Models | Skins | Mesozoic Revolution
Back to top Go down
http://spinoinwonderland.deviantart.com/
JP_Dino_Hunter
Embryo
Embryo
JP_Dino_Hunter


Posts : 13
Reputation : 0
Join date : 2018-07-06

Multiskinning tutorial by Integrity Zero Empty
PostSubject: Re: Multiskinning tutorial by Integrity Zero   Multiskinning tutorial by Integrity Zero Icon_minitimeFri Oct 19, 2018 11:57 pm



Can someone please explain the footer to me. Apparently it's always different depending on how many skins you have in the file...
Back to top Go down
 
Multiskinning tutorial by Integrity Zero
Back to top 
Page 1 of 1
 Similar topics
-
» Multiskinning tutorial by Eternal_Rocker_Chick
» Multiskinning tutorial by Docszoo
» This site needs a skinning tutorial!
» TUTORIAL SKINS TREES
» Illustrative skinning tutorial by maximusthedark

Permissions in this forum:You cannot reply to topics in this forum
Jurassic Mainframe :: Expanded Lore :: JP: Operation Genesis-
Jump to: