OpenXcom Forum
Modding => Help => Topic started by: Barghum on September 27, 2024, 08:22:20 am
-
I am seeing that some of the hand sprites are being replaced with other hand sprites in my mods
e.g. and m12 being replaced with an m1 carbine (yes maps and scraps is almost done)
or in the case shown the ChemLaser Rifle being replaced with the 'flash in the pan' smg
if anyone has any idea what the cause is or a fix for this please send it to this thread
Thanks for reading and sorry for the pun :)
-
Incorrect mod installation.
Script running twice or more.
Or if it's your own mod then simply bad modding.
Can't say what's wrong without seeing the whole mod.
-
when i say some i mean some on the same handob set
btw here is the mod
thx for reading
(btw it very well might be bad modding)
-
btw here is the mod
doesn't start for me
-
You might want to provide other details, like if your mod is a submod to another and which one it is, for example. What I can spot so far is an incorrect way of adding HANDOB sprites:
- type: HANDOB.PCK
height: 40
width: 256
subX: 32
subY: 40
files:
2801: Resources/CHEMLASERS/Chem_Laser_Rifle_H.png
2802: Resources/CHEMLASERS/Chem_Laser_SMG_H.png
2803: Resources/CHEMLASERS/Chem_Laser_Sawed_Off_Shotgun_H.png
2804: Resources/CHEMLASERS/Chem_Laser_Shotgun_H.png
2805: Resources/CHEMLASERS/Chem_Laser_Sniper_Rifle_H.png
2806: Resources/CHEMLASERS/Flash_In_The_Pan_H.png
2807: Resources/CHEMLASERS/Chem_Laser_Cannon_Hand.png
2808: Resources/CHEMLASERS/Chem_Laser_Machine_Gun_Hand.png
The file numbering needs to change in increments of 8 as each handob png is subdivided into 8 sprites. The engine will load the 1st sprite into the index you've specified and incrementally add the rest for that weapon. The way you're doing it here, you are accidentally replacing each facing for the Chem Laser Rifle to the 1st image of each png of all the others, resulting in what I'll call, a weapon discoball, that will change depending on facing. Also, while it't not sctrictly necessary by what I've seen in other mods, I would recommend always using indexes that are multiples of 8 for handobs, like this:
files:
2800: Resources/CHEMLASERS/Chem_Laser_Rifle_H.png
2808: Resources/CHEMLASERS/Chem_Laser_SMG_H.png
2816: Resources/CHEMLASERS/Chem_Laser_Sawed_Off_Shotgun_H.png
2824: Resources/CHEMLASERS/Chem_Laser_Shotgun_H.png
2832: Resources/CHEMLASERS/Chem_Laser_Sniper_Rifle_H.png
2840: Resources/CHEMLASERS/Flash_In_The_Pan_H.png
2848: Resources/CHEMLASERS/Chem_Laser_Cannon_Hand.png
2856: Resources/CHEMLASERS/Chem_Laser_Machine_Gun_Hand.png
You will also have to correct the handSprite to point to the correct index with this change. Note that since I have no idea what other mods you're using, I can't guarantee that the indexes provided in the example aren't being used by somthing else and you'll have to check that yourself.
-
thx for the help turns out I did not add the needed index values