Author Topic: Help Making A Mod  (Read 8821 times)

Offline ThatDude

  • Captain
  • ***
  • Posts: 73
    • View Profile
Help Making A Mod
« on: July 30, 2014, 11:51:31 pm »
Alright, so I tried making my very first mod. I thought I did it pretty well but when I researched and manufactured it, my game crashed. I've reviewed the ruleset tons of times and still haven't found the issue, can somebody please help and tell me what I did wrong? That problem is resolved, now I just have a problem with the .gif
« Last Edit: July 31, 2014, 01:06:15 am by ThatDude »

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Help Making A Mod
« Reply #1 on: July 31, 2014, 12:16:20 am »
so the game crashed
- directly after manufacture
- opening ufopaedia entry
- in the equipment/inventory screen in base/before battle
- after entering a battle
- ... ?
since you only put the rul file not the complete mod online you need to give more informations

Offline Aldorn

  • Commander
  • *****
  • Posts: 750
    • View Profile
Re: Help Making A Mod
« Reply #2 on: July 31, 2014, 12:19:53 am »
Alright, so I tried making my very first mod. I thought I did it pretty well but when I researched and manufactured it, my game crashed. I've reviewed the ruleset tons of times and still haven't found the issue, can somebody please help and tell me what I did wrong?
I guess it has to do with sprites...

Could you first check if you are able to open ufopaedia without causing a crash ?
To test it :
- open the options file (...\user\options.cfg)
- look for "debug:" and set it to "debug: true"
- start OXC, start a new game, activate debug mode using CTRL+D
- go to ufopaedia and click on your gauss rifle ufopaedia entry
=> does it display or does it crash ?

Question : why do you define an entry in ufopaedia for ammo if you don't want to make it visible ? Do you use another mod that defines this entry, and so you want to inactivate it ? If not, just not declare it...

Offline ThatDude

  • Captain
  • ***
  • Posts: 73
    • View Profile
Re: Help Making A Mod
« Reply #3 on: July 31, 2014, 12:27:54 am »
It does crash upon opening the ufopaedia. When I noticed it was crashing I looked at the Shotguns mod for help as to what I was doing wrong, he had a ufopaedia entry for the ammo that was inaccessible, so I did the same thinking it was the problem. I just never took it out.

Offline Aldorn

  • Commander
  • *****
  • Posts: 750
    • View Profile
Re: Help Making A Mod
« Reply #4 on: July 31, 2014, 12:32:05 am »
It does crash upon opening the ufopaedia. When I noticed it was crashing I looked at the Shotguns mod for help as to what I was doing wrong, he had a ufopaedia entry for the ammo that was inaccessible, so I did the same thinking it was the problem. I just never took it out.
So it is an issue with the bigsprite (either rifle or ammo)

Could you upload both gif files ? Perhaps dimensions are not correct ?
Or the mod himself if you have, as suggested by Falko it can help us


Is it possible you use a same file for many resources ? I mean for example Gauss Ammo GIF file ?


Ok I don't need as I make it crash too with correct GIF files, I will have a look
« Last Edit: July 31, 2014, 12:41:35 am by Aldorn »

Offline ThatDude

  • Captain
  • ***
  • Posts: 73
    • View Profile
Re: Help Making A Mod
« Reply #5 on: July 31, 2014, 12:44:15 am »
I attached the mod to the original post.
« Last Edit: July 31, 2014, 01:05:23 am by ThatDude »

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Help Making A Mod
« Reply #6 on: July 31, 2014, 12:50:47 am »
your gifes have an "optimized" pallette (you use 24 colors instead of 255 in the palette)
that at the very least screws with all your colors

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Help Making A Mod
« Reply #7 on: July 31, 2014, 12:59:23 am »
rename your ufopaedia entry from STR_C14_GAUSS_AMMO to STR_GAUSS_AMMO and the crash disappears
Note to myself make a modtester check for that :)

Offline ThatDude

  • Captain
  • ***
  • Posts: 73
    • View Profile
Re: Help Making A Mod
« Reply #8 on: July 31, 2014, 01:04:05 am »
Aaaaah! I feel so stupid, I knew it was something simple that I overlooked...  :(

Offline Aldorn

  • Commander
  • *****
  • Posts: 750
    • View Profile
Re: Help Making A Mod
« Reply #9 on: July 31, 2014, 01:06:02 am »
rename your ufopaedia entry from STR_C14_GAUSS_AMMO to STR_GAUSS_AMMO and the crash disappears
Note to myself make a modtester check for that :)
Nice tool you have

I finally replaced all his stuff with mine (with nice PNG files), nothing more from original ruleset, and it goes on crashing !!!

Aaaaah! I feel so stupid, I knew it was something simple that I overlooked...  :(

Beware to define armor attribute or it will have no resistance to any explosion blast
And using a dropoff of 12 is high... -12% per tile out of the range
And you did not define the range, so have a look at default values

Have a look here, you will find many interesting info for modding, especially weapons

« Last Edit: July 31, 2014, 01:11:25 am by Aldorn »

Offline ThatDude

  • Captain
  • ***
  • Posts: 73
    • View Profile
Re: Help Making A Mod
« Reply #10 on: July 31, 2014, 01:26:48 am »
Well now I only got to fix the sprites, what exactly Is wrong with them? And do I have to completely remake them?

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Help Making A Mod
« Reply #11 on: July 31, 2014, 01:42:27 am »
your grafics program "optimized" the palette of the gif you created
you only have 24 colors in one gif
the pixel that once was colorindex 123 is now colorindex 12 (numbers made up)
the game assigns colorindex 12 a specific color that has nothing to do with what your program "optimized" it should be
some programs have option that avoid this optimization take a look here https://openxcom.org/forum/index.php?topic=2676.0
its likely you have to at least recolor your sprites after fixing the palette

Offline Aldorn

  • Commander
  • *****
  • Posts: 750
    • View Profile
Re: Help Making A Mod
« Reply #12 on: July 31, 2014, 03:11:38 am »
Well now I only got to fix the sprites, what exactly Is wrong with them? And do I have to completely remake them?
Could you post your GIF so that I have a idea of what it looks like ?

Follow Falko's advices, and have a look at this thread too and download palettes provided by Sup
« Last Edit: July 31, 2014, 08:47:48 pm by Aldorn »

Offline ThatDude

  • Captain
  • ***
  • Posts: 73
    • View Profile
Re: Help Making A Mod
« Reply #13 on: July 31, 2014, 08:16:02 pm »
The sprites are fixed but now they all have black backgrounds that I can't remove... I'm clueless. Attached the gun sprite. I'm using Adobe Photoshop CS2 if that helps.
« Last Edit: July 31, 2014, 08:44:29 pm by ThatDude »

Offline Aldorn

  • Commander
  • *****
  • Posts: 750
    • View Profile
Re: Help Making A Mod
« Reply #14 on: July 31, 2014, 08:47:17 pm »
Try this one