OpenXcom Forum
Modding => Work In Progress => Topic started by: souljoe999 on July 28, 2017, 07:31:26 pm
-
So I tried my hand at creating a very small mod, just adding in an additional magnum (Raging Bull). I placed it in my mods folder and when I activated it and the game relaunched I got this error message:
SDL_RWFromFile(): No file or mode specified
The file I added to the mods folder contains a resources folder for the sprites and sounds of the gun and its ammo and a ruleset folder with the attached ruleset in it. The ruleset is only intended to add 2 items, and the extra sprites, sounds, and UFOpedia page associated with the weapon and its drum. I'm not sure what file or mode isn't being specified and why this mod is causing it. Any advice?
The Final mod pack 1.9.7 nightly has been functioning fine, and this error occurs with or without FMP being activated alongside the Raging Bull. I also used the OXC Ruleset editor ver 0.5.0 to edit the ruleset.
This is the first mod I have tried to create and really the first PC-gaming experience I've had so any other advice would be appreciated as well!
-
Hi! Welcome to the forums, and the wonderful world of modding!
I haven't delved too deep, but a couple things caught much attention:
size: .3
Should be 0.3 - I don't think YAML would read that correctly, but I could be wrong.
bigSprite: 1
floorSprite: 4
handSprite: 2
- type: BIGOBS.PCK
width: 32
height: 48
files:
1: Resources/RagingB/RagingBull.png
0: Resources/RagingB/RagingBullDrum.png
- type: FLOOROB.PCK
files:
4: Resources/RagingB/floorob_ragingbull.png
3: Resources/RagingB/floorob_RagingBullDrum.png
- type: HANDOB.PCK
width: 256
height: 40
singleImage: true
subX: 32
subY: 40
files:
2: Resources/RagingB/HandOb_RagingBull.png
- type: Projectiles
width: 65
height: 3
singleImage: true
subX: 3
subY: 3
files:
5: Resources/RagingB/BulletSprite.png
This is certainly problematic, since by using so low numbers you are effectively replacing vanilla graphics. Increase these values by, say, 100.
Also, handobs are actually 8 pictures each (various directions), so they should be numbered 0, 7, 15, 23, 31 etc. Pick a number which is reasonably high and one less than something divisible by 8.
That's for starters. I don't know if it'll solve your problem, but give it a try, since these certainly need to be fixed.
And if it doesn't work, then for best results I suggest you upload the entire mod here as an attachment.
-
Thanks, changed that around, but the error still popped up. I've attached the entire mod.
For future reference, do bullet sprites function similarly to handob in terms of numbering them? And is it correct to call handobs and bullet sprites a single image because only parts of the whole being referenced at different times not completely separate files?
-
I fixed your ruleset and the sprite palettes.
The Mod does load now and work properly now, see attached zip file.
Also use: https://www.ufopaedia.org/index.php?title=Ruleset_Reference_Nightly_%28OpenXcom%29
-
If you want to know what was wrong:
Crashes:
- "singleImage: true" in HANDOB.PCK is wrong... it's not a single image
- "singleImage: true" in Projectiles is wrong... it's not a single image
- file is called "RangingBullhit.wav" but ruleset says "RagingBullhit.wav"... file not found
Other:
- the drum ruleset is missing "battleType: 2"
- all picture have completely wrong palette
- BulletSprite.png doesn't even have a palette
- probably more...
-
The mod functions, thanks hellrazor, and thanks for the explanation Meridian! Got the UFOpedia page to not crash as well which is nice. What program do you use to check/change the palette? The bullets aren't appearing at all and the BIGOB Drum is off color I guess the wrong palette.