Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Weapon Scaling Issues

A topic by Gengsta created Nov 21, 2024 Views: 620 Replies: 3
Viewing posts 1 to 3
(3 edits)

Hello im a new user and I have to say thank you for the engine, as its truly amazing.

I have run into some issues tho especially with the weapon scaling. I have read the wiki and manual and couldnt find anything about it so I thought Id ask. 

I have a 160x160 sprite of a meele weapon. If I try to scale it in the Editor it scales, both positively (1.5) and negatively (0.5) it scales. When I go into Test Game the sprite doesnt appear and when I go back into the Editor settings the scaling is set to 0.

I wanted to know if there is something to prevent this behaviour.

Also I would love to know if there is a way to prevent the weapon sprite from ''jumping'' up when the player jumps. I tried disabling all the weapon bobbing and tilt in the settings but it doesnt seem to work .


Thank you!

Hello, brother. I have encountered the same problem as you and I can't find a solution anywhere on the Internet. I scale the sprite negatively (i.e. I make it smaller) and it gets smaller in the display window, but when I click save and go back, the value has already been reset to zero. Scaling to increase works and is saved.

I have yet not found a solution, but ill make sure to let you know if I do :)

(1 edit) (+1)

ran into this myself and found a workaround which allowed me to scale down and save a lot of details on the weapon sprites! see below.
1) add weapon and sprites as normal
2) position and resize in the editor (as you would normally).
To scale down use 0, (a comma). So for instance 0,24. (ps. -(minus values) will put the sprite on top of the screen). 
3) ! WRITE DOWN the scale value, because, as mentioned by o.p.: the editor will not save 0 scale values.
4) Accept and then edit the other values of your weapon, if you want (can also be done later).
5) Save weapon, Save project and EXIT the editor.
6) now go to the EFPSE folder -> projects -> [your project name] and find weapons.dat.
(maybe make a backup of this txt file somewhere, but make sure you rename it (weapons_backup.dat for instance). up to you.
7) open with notepad
8) weapons.dat is the txt file of the weapons in your project. instead of saving scale from the editor (which doesn't work), we're going to save to the editor from the .dat file. 

Below are the definitions of the numbers you see in weapons.dat. Your numbers will be different, depending on what you put in the weaponsvalues.

screenshot weapons.dat 

9) The last string of numbers, the one right above the next weapon, contains the scale value. it is the very first number. (where I put (scale!)  
10) adjust the 0 to the value you wrote down while scaling in the editor. Use a .(full stop) though, instead of the , (comma)
So for example: 0,24 in editor = 0.24 here in weapons.dat. 
11) save the txt file -do not rename it or change any of the other values. and close the file.
12) Start the editor. Your weapon is now properly scaled.
13) Do not resize! You can edit all other values, but do not touch the resize value