Hello people, this if my first tutorial. I know it’s very simple but I hope some people find it useful.
In this tutorial I’ll teach you how to change the default sprite with pink background to a custom image with class description (or anything else you want)
Before start tutorial I’ll explain the concept for the newbies.
When you open the character creation menu theres a picturebox named picSprite that shows the sprites of the selected class. What I did was create another picturebox where I’ll be showing a custom image with the same selected sprite’s name.
For this tutorial I’ll be using an image that I created quickly just for it. I’ll be attaching all the images used and the blank model, but it’s very recommended that you create your own models for more exclusive game graphics.
1. Open the frmMenu and click on the picturebox named picCharacter.
2. Inside picCharacter create another picturebox named picDesc or whatever name you want (but remember that picturebox’s name must be matching with the code)
3. Set the size of the picDesc for same size of your custom description image. (in this tutorial I’ve used 385x137 but you’re free to use any size you want, just remember that picturebox’s size and the image’s size must be matching)
4. Set the BorderStyle of picDesc to 0 - None
5. Be sure that picDesc is above the picSprite and DON’T delete the picSprite
6. Arrange the position of the elements as you want
7. Go to modDirectDraw7 > Public Sub NewCharacterBltSprite and find these lines:
If frmMenu.optMale.Value = True Then Sprite = Class(frmMenu.cmbClass.ListIndex + 1).MaleSprite(newCharSprite) Else Sprite = Class(frmMenu.cmbClass.ListIndex + 1).FemaleSprite(newCharSprite) End If
and chage them to
If frmMenu.optMale.Value = True Then Sprite = Class(frmMenu.cmbClass.ListIndex + 1).MaleSprite(newCharSprite) frmMenu.picDesc.Picture = LoadPicture(App.Path & "\data files\graphics\picdesc\" & Sprite & ".jpg") Else Sprite = Class(frmMenu.cmbClass.ListIndex + 1).FemaleSprite(newCharSprite) frmMenu.picDesc.Picture = LoadPicture(App.Path & "\data files\graphics\picdesc\" & Sprite & ".jpg") End If
8. Create the picdesc directory
The *\data files\graphics\picdesc* is the the directory of the description picture.
The frmMenu.picDesc is the frame name
OBS: In case of you use same sprite for different classes, do a copy of the sprite, because the displayed picture’s number will be equal with the selected sprite’s number.
Sorry about my english, I’m form Brazil. :embarrassed:
Hope someone find it useful.