Post tutorial Report RSS Skinning in Rune

Everyone wants to create their own skins for Rune. Well, this step-by-step tutorial shows you how.

Posted by on - Advanced Skinning

Originally posted on Runegame.com by Beau "LonghorN" Liddell

Mirrored here for archival purposes

Step 1. Getting the skins out of Rune.
This first and easiest step is exporting skins. Load RuneEd and go to "Textures."

Scroll down to "Players."

Select the texture(s) you wish to export and click "Export" at the bottom.

Voila! There's your texture template in a nifty Texture.pcx format.

*For the sake of continuity I will assume you know how to edit graphics files.*


Step 2. Creating a texture package.
In RuneEd browse to "Textures." At the bottom of the browser click "New."
You are presented with a window where you're asked to customize your new
texture package.

In the "Name" field put whatever you want, it doesn't matter because you will
be deleting this anyway.

In the "Package" field enter the name of your texture package
(eg. LonghornDarkViking).

In the "Group" field, leave it at "None."

In the "Class" field scroll to "Texture" and leave the "Size" fields as they are.

Click "Create this texture."

Now you have a brand new texture package with a blank texture in it
(sometimes colored blue or green). Delete this texture.

It's time to import your new texture files. With the browser still on your
texture package, at the bottom click "Import" and import all of your
texture files. (Most characters have 7 textures. Hair, torso(body),
torsopain, armleg, armlegpain, head and headpain).

Make sure you name your textures appropriately as it will help later on
when you associate them with the code.

Once you have completed that, click "Save" at the bottom. Save your
texture package exactly what you called it (it should automatically
show up in the save dialog box). Make sure you save your textures to
your Rune/Textures directory.

Now you have your very own Texture package.

Step 3. Creating a character classes for your skin (Including
severed limb classes).
Probably the most difficult part of this whole process, but I made it
easier for ya.

First off, you should already know what Character you are skinning
for (eg. PlayerAlric, PlayerDarkViking..etc).

In RuneEd browse to "Classes." Then, in the class hierarchy tree go
to "Pawn > Player Pawn > RunePlayer > (Player Class)" for this I will
use the DarkViking.

Once you have located the class, click once on it. Then at the
bottom click "New." Now you are presented with the "Create new
actor class" dialog box.

Here's what you do:
In the "New actor class" field it should say something like
"MyPlayerDarkViking." You should modify this to your personal
setting like so: "LonghornDarkViking."

In the "Package Name" field enter in the exact same name as in the
"New actor class" field, which in this case would be:
"LonghornDarkViking."

Click "Create this actor class".

A script window pops up, and the new class is added below the
original class in the tree to the right:

+DarkViking
LonghornDarkViking

The script window should display something like this:

//================================================
// LonghornDarkViking.
//================================================
class LonghornDarkViking expands PlayerDarkViking;

Now, before we get into tying these two sections together, you
are going to save this actor class. With your actor class still
selected on the right, click "Save" at the bottom. No dialog box
will pop up, but just to make sure it saved your class: you can do
this: Go to your Rune/System directory and locate the file with the
name of your Class Package.

For example "LonghornDarkViking.u." You will know it is your class if
it has the name, and the *.u extension.

Beautiful! Now you have a texture package, and an actor package.
Let's make some severed limb classes.

Step 4. Creating severed limb & carcass classes
You are going to create a severed limb class so that when, in the
game, if your newly skinned character loses his/her arm/head it
won't default to the parent class model. Here's how you do it.

With your character package still loaded and the browser on
"Classes," locate the "Inventory" section.

In the Inventory category locate "Weapon" and expand it. Under
Weapon expand "NonStow" and under NonStow expand
"LimbWeapon." All of the player model severed limbs are located here.

You need to locate the player class limbs for your model you are
skinning for. In this example the limbs are: DarkVikingLArm,
DarkVikingRArm and DarkVikingHead (under the "Head" subclass).
The process for creating your custom severed limb classes is
relatively the same as creating your cusom Player class.

Select a limb and click "New" at the bottom. In the "Create New Actor
Class" dialogue box enter the name of your character's limb
(LonghornDarkVikingLArm), and in the Package box enter the name of
your package (LonghornDarkViking).

Click "Create this Actor Class." After you do that, a script window pops
up. Just close it, there is not script to enter for these. Do this for
YourPlaterLArm, YourPlayerRArm and YourPlayerHead.

But wait, there's more. Let's create a carcass class for your skin. In the
browser, locate "Decoration" and expand it. Under Decoration find
"RuneCarcass" and expand that to find "PlayerCarcass." Under player
carcass it lists all of the carcasses for the players. Locate the carcass
for your model and repeat the same steps for creating your player and
his/her severed limbs.

Name it "YourPlayerCarcass."

Click save at the bottom of the browser to save your package with
your player and all of his/her limbs.

Now let's tie in the textures to these actor classes and get your skin
rolling:

Step 5. Tying the textures with the actor classes.
*NOTE: The following example shows the code you will need
to add to your new player class specifically if it is based on the
DarkViking class. HOWEVER, if your new player class is based on a
DIFFERENT model (not DarkViking), you will obviously want to copy
and paste the correct code for THAT model - you will go to
Classes>Pawn>PlayerPawn>RunePlayer and then right click on the
appropriate parent class and select "Edit*PlayerModel*Script." Then
you can copy and paste the script that you need to update (which
will be everything after the first 2 lines of text). First, read the
following example so you can see how you will add the script to your
new player class.*

You are going to need to add some code in the Script window of your
new player class. In RuneEd, make sure you are Browsed to "Classes"
and your freshly created player class is selected. Now, right-click on
your new player class and select the first menu item: "Edit
LonghornDarkViking Script." The Script window should come up with
this inside:

//==================================================
// LonghornDarkViking.
//==================================================
class LonghornDarkViking expands PlayerDarkViking;

**<----At about right here in the window, paste the below to the script. **

//====================================================
//
// PainSkin
//
// returns the pain skin for a given polygroup
//====================================================

function Texture PainSkin(int BodyPart)
{
switch(BodyPart)
{
case BODYPART_TORSO:
SkelGroupSkins[2] = Texture'LHDarkViking.lh_bodypain';
break;
case BODYPART_HEAD:
SkelGroupSkins[3] = Texture'LHDarkViking.lh_headpain';
break;
case BODYPART_LARM1:
SkelGroupSkins[10] = Texture'LHDarkViking.lh_armlegpain';
SkelGroupSkins[12] = Texture'LHDarkViking.lh_armlegpain';
break;
case BODYPART_RARM1:
SkelGroupSkins[7] = Texture'LHDarkViking.lh_armlegpain';
SkelGroupSkins[11] = Texture'LHDarkViking.lh_armlegpain';
break;
case BODYPART_LLEG1:
SkelGroupSkins[1] = Texture'LHDarkViking.lh_armlegpain';
break;
case BODYPART_RLEG1:
SkelGroupSkins[4] = Texture'LHDarkViking.lh_armlegpain';
break;
}
return None;
}

//====================================================
//
// BodyPartForPolyGroup
//
//====================================================

function int BodyPartForPolyGroup(int polygroup)
{
switch(polygroup)
{
case 3: case 5: return BODYPART_HEAD;
case 12: return BODYPART_LARM1;
case 11: return BODYPART_RARM1;
case 1: return BODYPART_LLEG1;
case 4: return BODYPART_RLEG1;
case 2: case 6: case 7: case 8:
case 9: case 10: return BODYPART_TORSO;
}
return BODYPART_BODY;
}

//===================================================
//
// ApplyGoreCap
//
//===================================================

function ApplyGoreCap(int BodyPart)
{
switch(BodyPart)
{
case BODYPART_LARM1:
SkelGroupSkins[9] = Texture'runefx.gore_bone';
SkelGroupFlags[9] = SkelGroupFlags[9] & ~POLYFLAG_INVISIBLE;
break;
case BODYPART_RARM1:
SkelGroupSkins[8] = Texture'runefx.gore_bone';
SkelGroupFlags[8] = SkelGroupFlags[8] & ~POLYFLAG_INVISIBLE;
break;
case BODYPART_HEAD:
SkelGroupSkins[6] = Texture'runefx.gore_bone';
SkelGroupFlags[6] = SkelGroupFlags[6] & ~POLYFLAG_INVISIBLE;
break;
}
}

//================================================
//
// SeveredLimbClass
//
//================================================
function class SeveredLimbClass(int BodyPart)
{
switch(BodyPart)
{
case BODYPART_LARM1:
return class'DarkVikingLArm';
case BODYPART_RARM1:
return class'DarkVikingRArm';
case BODYPART_HEAD:
return class'DarkVikingHead';
break;
}

return None;
}

//=====================================

*REMEMBER, the above is an example for a new player class
based on the DarkViking class. If you're using a different parent class,
you will need to copy the similar code from the appropriate parent class
Script window and paste it into the Script window of your new player
class. When copying the script from the parent class, copy the
"PainSkin" box and everything after that.*

Once you get the appropriate code pasted into your new player class
Script window, you are going to need to edit this script so that Rune
knows where to find your textures. So, in the above code where it says

Texture'LHDarkViking.lh_bodypain';

You should replace "LHDarkViking" with your skinpackage name and
"lh_bodypain" with the appropriate texture in your skinpackage.

For example:

Texture'MyTexturePackage.Texture_bodypain;

Do this for all of the instances of the texture property.

The next and last thing you have to change in this code is the part
where it says:

case BODYPART_LARM1:
return class'DarkVikingLArm';
case BODYPART_RARM1:
return class'DarkVikingRArm';
case BODYPART_HEAD:
return class'DarkVikingHead';
break;

You are going to need to replace the name "DarkViking" with the
name of your new player class, whatever it may be, for example:

return class'YourPlayerLArm';

Do this for all instances of the "return class" property.

Now, close the script window and return to the right-side menu
tree.

Right-click on your player class and select "Default (whatever
your class name is) Properties".

In the box that comes up, expand the "Pawn" section. Where it
says: "FOVAngle | 75.000000" enter in a value of 90. It should
look like this:

"FOVAngle | 90.000000"

In that same section locate the "CarcassType" box. In the
browser locate your new player carcass and highlight it. Go back
to the "CarassType" box and click the "Use" button.

Now close that section by clicking on the plus, and locate the
"Skeleton" section. Expand the "Skeleton" section and locate the
"SkelGroupSkins" subsection and expand it. You should see a list of
numbers followed by textures.

Here's what you do (and what you shouldn't do):

Do NOT replace the textures that say:

Texture'Players.Ragnarragd_arms'

But DO replace the once that say:

Texture'Players.Ragnardv_armleg'
Texture'Players.Ragnardv_body'
Texture'Players.Ragnardv_head'
Texture'Players.Ragnardv_hair'
Texture'Players.Ragnardv_armleg'
Texture'Players.Ragnardv_armleg'
Texture'Players.Ragnardv_armleg'
Texture'Players.Ragnardv_armleg'

Or whatever your player class is, with your textures in your texture
package. You can do so by simply clicking on one of the texture
names in the list like above, then directly to the right it will have
3 buttons:

Clear, Use, ...

Click the "..." button to make the browser automatically go to the
"textures" If your texture package is not already up there, locate it in
the list, or load it up. Now all you gotta do is click-once on the
appropriate texture, then go back to the SkelGroupSkins box, and click
the "Use" button. do this for all the appropriate textures.

Next you need to assign textures to your limbs and carcass. Find your
Carcass in the browser, right-click and selet "Default(Carcass Name)
Properties. Open SkelGroupSkins once more and repeat the same process
for your player, with the carcass. The process is also the same for the
severed limbs. However there is only one texture that needs replacing,
and that is...of course...the texture for the arms or head. You will see
that in the SkelGroupSkins for each of the limbs.

When you are finished, close that box.

At the top of the screen, locate the "Script" menu and select "Compile
Changed Scripts."

When it is done compiling and there are no errors, go to the bottom of
the browser (with your player class still selected) and click "Save."

Final step: Getting your package to work with the game
By far the easiest part to do. Simply open up Notepad or some other
text editor (EXCEPT for Microsoft Word or Wordpad, it likes to add
nasty junk to text files and this can cause your player not to show up),
and put this into it:

[Public]
Object=(Name=LonghornDarkViking.LonghornDarkViking,Class=
Class,MetaClass=RuneI.RunePlayer,Description="LonghorN")

Of course replacing "LonghornDarkViking" with the name of your package.

The Description part is what will show up in the character select screen.
So unless you are really in love with my name, you should change it to
something relevant.

Save this file in your Rune/System directory as:

NameOfYourPackage.int

In my example it would be: LonghornDarkViking.int

Done deal.

Now, it's sad, but skins are only server-side. But Rune needs to tell other
Rune players to download the package into their cache. And here is how
you do it:

Open Rune.ini in any text editor and scroll to the part that says:

[Engine.GameEngine]

Under that there is a section that says:

ServerPackages=Players
ServerPackages=Runei

Add "ServerPackages=NameOfYourPackage" below the last one. For me it
would be: ServerPackages=LonghornDarkViking

One more thing while you are in Rune.ini. Scroll down to the part where
it says:

[Editor.EditorEngine]

and add this to the list:

EditPackages=NameOfYourSkinPackage

Hit save.

You are done. Check it out, see if it works.

Post comment Comments
rataje
rataje - - 119 comments

Is it possible to replace Ragnars models with Jun ones?
I tried but it takes no effect ingame.

Reply Good karma Bad karma+1 vote
LithTechGuru Author
LithTechGuru - - 404 comments

I think it would require editing the Unrealscript due to how Ragnar's model changes depending on where you are in the game. There's probably a script controlling it.

Reply Good karma+2 votes
rataje
rataje - - 119 comments

EDIT: Okay, I found a lot more scripts, especially the ones for Singleplayer.

Reply Good karma Bad karma+1 vote
rataje
rataje - - 119 comments

Hey Thank you again for the hint about the SinglePlayer scripts. It was easier as I thought and after a lot of methods I tried it is nearly done for a 1.0 release!

Open RuneEd and in Browser Window
Classes >*Info >*GameInfo >RuneGameInfo >RuneSinglePlayer
Right click on each Script and choose „Default SinglePlayer* Properties", expand +GameInfo

Now Highlight in Browser Window = >Pawn >RunePlayer >PlayerJun

In already open „SinglePlayer* Properties" window under -GameInfo click on „DefaultPlayerClass" and choose "Use" close the Properties window and press in Header Bar „Scripts" and click „Compile Changed Scripts F7"

Done!

Imgur.com

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: