Jump to content
Sign in to follow this  
Alyx

Getting Started: Customizing Item Icons

Recommended Posts

Introduction

Having a brief understanding of changing item stats and names in game having read You must be a registered member of RF-Dev and logged in to view this content. you probably would like to make those new items look unique.  One way of doing this is setting a new item icon also called a sprite. Multiple sprites grouped together in a single image are called a sprite sheet.

 

File locations and structure:  SPR, DDS and DAT

Sprite Image Files  .SPR

These are a packed collection of multiple sprite sheets that require unpacking to edit and re-packing to use them in game. Found in ...

RFOnline\Client\SpriteImage\Common\

DirectX Draw Surface Image Files  .DDS

These are the images that can edited once they are unpacked from the .SPR collection.

Client Data Files .DAT

This is the data format used by the Game Client  to store the data about the items in the game. Be sure to read You must be a registered member of RF-Dev and logged in to view this content. to learn how to edit these files.  We will only breifly cover where to make the edits and not how to use the tools used to edit them.

 

Tools Used:

Quote

Before we get started we need to aquire a few basic tools.

Structorian / DatEdit: You must be a registered member of RF-Dev and logged in to view this content.

You must be a registered member of RF-Dev and logged in to view this content.

Structorian is a binary data viewer that uses template files to easiy view and edit data.

 

DDS to SPR  You must be a registered member of RF-Dev and logged in to view this content.

image.png.b9e79f6212f0fb4d8e6bdbedf53cf4e8.png

Console application used to unpack and repack Client  .SPR files.  This can either be used on the command line or dragging your .SPR on top of it.

 

Paint.NET  You must be a registered member of RF-Dev and logged in to view this content.

image.png.3ee3c9efe58ab94868885adaf8eddc5b.png

Paint.NET is a completely free image editing program with full .DDS support built in. Providing easy editing of sprite sheets without any cost. Adobe Photoshop can also be used however this requires the Nvidia Plugin and a valid Adobe licence.

 

 

 

Extracting the sprites

First locate your  item.spr file in RFOnline\Client\SpriteImage\Common\ drag this file on-top of the Spr2DDS.exe.  I suggest creating a new folder for this as item.spr will be extracted to 38 new .DDS files.

image.png.1e1dcca43876f68599e59510d04f683c.png

image.png.826cbaad499cf0bb134cf1d426b6e8a4.png

Extracted Files

Along with the 38 new .DDS files you will also notice a .REP file item.rep this file will later be used to repack the .SPR.

Keep this file safe as we will need it later in the guide.

image.png.3648588733b137bf812a6daccc40d3a3.png

 

Editing Sprites

Now we have successfully extracted our .DDS files we can open them with Paint.NET.  For this example we will edit the sprite for the weapon we edited in You must be a registered member of RF-Dev and logged in to view this content. .  The sprite sheets used to edit this specific item is item-1-1.dds this is the sprite sheet used for all the weapons.

image.png.cb02083c197724a2ad20ffe9d5740eb6.png

Opening item-1-1.dds in Paint.NET we get the following sprite sheet

image.png.46e13f770b7e8bd3c6fa57b6507a0eb7.png

Adding The New Sprite

Using the tools available in Paint.NET draw your new sprite in a empty "NO IMAGE" block.   Ensure you can see the checkerboard behind your new sprite so the background will be transparent in game.   Our new sprite is seen below.

image.png.f61c4467dbce1e79f20cb832f3b3b4de.png

 

image.png.c319f243cceb80f80f089893ec08f96b.png

Save your sprite sheet with File -> Save As.   And save it as  item-1-1.dds making sure to change the "Save as type" to use .DDS
 

image.png.2879069609f0e5d2d32d17b9a971738e.png

Change the format to  BC1 (Linear, DXT1)

DXT1 is used for the item sprite sheets however some other sprite sheets use other formats depending on how transparency is used. DXT5 is used on various parts of the game user interface.

- Perceptual [✓]  Generate Mip Maps [✓]

Hit "OK"  to save the file.

 

Finding the Sprite Index

Now the sprite sheet is saved we need to work out the index for the new sprite we have added.

Starting from 0 we count Left to Right.   When the end of the row is reached we continue on the next, sprites for items are in rows of 32.

Our new sprite is located at index:  262

image.png.99a2e05f7925dd31391eee79f9eacb33.png

Repacking the Sprite Sheet

Now the sprite sheet is saved and we have the sprite index we can proceed to repack it back into the .SPR ready for testing in game.

In the same folder as the sprite sheets is the .REP file,  Drag the .REP file on-top of the SprDDS.exe to repack the sprite sheets.

You should now have a new file named item(new).SPR.  Rename this to  item.SPR and move it to the Client folder.

RFOnline\Client\SpriteImage\Common\

Important Note!

If you don't rename your item(new).SPR to  item.SPR you won't see any changes in game.

image.png.2c5891084655b25c706df910eb954c06.png

image.png.502c6be520586bf028652b0effffb77b.png

 

Editing the item.dat for our new Sprite Index

All that is left now is to update our item with the correct sprite index.  Open the client item.dat and edit the item to use the new index of 262.

This is done by changing the value for m_nIconIDX.

image.png.103a8eef9cae94f8dbd9839d9f70623c.png

 

 

Launch your server and client and check for any errors.

If all has gone well you should see the changes in game.

1) The "Dagger" or "Stabby Knife of Death" now has a new sprite image.     Client change

image.png.148c519f547093c01572771a9185ae18.png

By now you should have a basic understanding of editing item data on the Server and Client along with creating custom sprites for those items.

However there are a whole range of posibilities for your RF Online server by editing various files.  But this should have got you started.

 

Edited by Alyx

-Alyx

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...