Author Topic: Can only read RGB or RGBA textures. Couldn't load texture specified in sprite.  (Read 6799 times)

bewt

  • Posts: 22
  • Maggot Crusher.
    • View Profile
Hello all.

I had a working projectile for one of my spider enemies. It slows the player, etc.

It worked early January, I guess last patch. I've been mapping again and upon loading of my old maps in the editor I get resource errors.

Code: [Select]
projectiles/enemy_spider.xml: Can only read RGB or RGBA textures
projectiles/enemy_spider.xml: Couldn't load texture specified in sprite
projectiles/enemy_spider.xml: Already loaded texture
projectiles/enemy_spider.xml: Couldn't load texture specified in sprite
projectiles/enemy_spider.xml: Already loaded texture

It repeats 5 more times, giving a total of 8 couldn't load textures. I am assuming this is for each of its 8 directions. IRRC I have other projectiles too, but I don't think I changed the sprites at all. Additionally I have custom sprites for other entities of my mod. The projectile is the only thing giving me this error.

I also used the maggot sprites and xmls for reference, if that says anything.

Perhaps something has been changed in the syntax since the patch?

Here is the xml for the projectile:

Code: [Select]
<projectile directions="8" collision="0.75" damage="3" speed="1.7" behavior="neutral">
<behavior>
<dictionary>
<string name="buff">buffs/spider_slow.xml</string>
</dictionary>
</behavior>

<sprite scale="16" name="0">
<texture>projectiles/enemy_spider.png</texture>
<origin>4 4</origin> <!-- west -->
<frame time="100">0 8 8 8</frame>
<frame time="100">24 8 8 8</frame>
<frame time="100">0 32 8 8</frame>
<frame time="100">24 32 8 8</frame>
</sprite>
<sprite scale="16" name="1">
<texture>projectiles/enemy_spider.png</texture>
<origin>4 4</origin> <!-- north west -->
<frame time="100">0 0 8 8</frame>
<frame time="100">24 0 8 8</frame>
<frame time="100">0 24 8 8</frame>
<frame time="100">24 24 8 8</frame>
</sprite>
<sprite scale="16" name="2"> <!-- north -->
<texture>projectiles/enemy_spider.png</texture>
<origin>4 4</origin>
<frame time="100">8 0 8 8</frame>
<frame time="100">32 0 8 8</frame>
<frame time="100">8 24 8 8</frame>
<frame time="100">32 24 8 8</frame>
</sprite>
<sprite scale="16" name="3"> <!-- north east -->
<texture>projectiles/enemy_spider.png</texture>
<origin>4 4</origin>
<frame time="100">16 0 8 8</frame>
<frame time="100">40 0 8 8</frame>
<frame time="100">16 24 8 8</frame>
<frame time="100">40 24 8 8</frame>
</sprite>
<sprite scale="16" name="4"> <!-- east -->
<texture>projectiles/enemy_spider.png</texture>
<origin>4 4</origin>
<frame time="100">16 8 8 8</frame>
<frame time="100">40 8 8 8</frame>
<frame time="100">16 32 8 8</frame>
<frame time="100">40 32 8 8</frame>
</sprite>
<sprite scale="16" name="5"> <!-- south east -->
<texture>projectiles/enemy_spider.png</texture>
<origin>4 4</origin>
<frame time="100">16 16 8 8</frame>
<frame time="100">40 16 8 8</frame>
<frame time="100">16 40 8 8</frame>
<frame time="100">40 40 8 8</frame>
</sprite>
<sprite scale="16" name="6"> <!-- south -->
<texture>projectiles/enemy_spider.png</texture>
<origin>4 4</origin>
<frame time="100">8 16 8 8</frame>
<frame time="100">32 16 8 8</frame>
<frame time="100">8 40 8 8</frame>
<frame time="100">32 40 8 8</frame>
</sprite>
<sprite scale="16" name="7"> <!-- south west -->
<texture>projectiles/enemy_spider.png</texture>
<origin>4 4</origin>
<frame time="100">0 16 8 8</frame>
<frame time="100">24 16 8 8</frame>
<frame time="100">0 40 8 8</frame>
<frame time="100">24 40 8 8</frame>
</sprite>



<sprite scale="16" name="d0">
<texture>effects/hit_projectile_spider.png</texture>
<origin>4 4</origin>
<frame time="100">0 8 8 8</frame>
<frame time="100">24 8 8 8</frame>
<frame time="100">48 8 8 8</frame>
</sprite>
<sprite scale="16" name="d1">
<texture>effects/hit_projectile_spider.png</texture>
<origin>4 4</origin>
<frame time="100">0 0 8 8</frame>
<frame time="100">24 0 8 8</frame>
<frame time="100">48 0 8 8</frame>
</sprite>
<sprite scale="16" name="d2">
<texture>effects/hit_projectile_spider.png</texture>
<origin>4 4</origin>
<frame time="100">8 0 8 8</frame>
<frame time="100">32 0 8 8</frame>
<frame time="100">56 0 8 8</frame>
</sprite>
<sprite scale="16" name="d3">
<texture>effects/hit_projectile_spider.png</texture>
<origin>4 4</origin>
<frame time="100">16 0 8 8</frame>
<frame time="100">40 0 8 8</frame>
<frame time="100">64 0 8 8</frame>
</sprite>
<sprite scale="16" name="d4">
<texture>effects/hit_projectile_spider.png</texture>
<origin>4 4</origin>
<frame time="100">16 8 8 8</frame>
<frame time="100">40 8 8 8</frame>
<frame time="100">64 8 8 8</frame>
</sprite>
<sprite scale="16" name="d5">
<texture>effects/hit_projectile_spider.png</texture>
<origin>4 4</origin>
<frame time="100">16 16 8 8</frame>
<frame time="100">40 16 8 8</frame>
<frame time="100">64 16 8 8</frame>
</sprite>
<sprite scale="16" name="d6">
<texture>effects/hit_projectile_spider.png</texture>
<origin>4 4</origin>
<frame time="100">8 16 8 8</frame>
<frame time="100">32 16 8 8</frame>
<frame time="100">56 16 8 8</frame>
</sprite>
<sprite scale="16" name="d7">
<texture>effects/hit_projectile_spider.png</texture>
<origin>4 4</origin>
<frame time="100">0 16 8 8</frame>
<frame time="100">24 16 8 8</frame>
<frame time="100">48 16 8 8</frame>
</sprite>

</projectile>

Any help would be appreciated. I might just tear it down and rebuild it.

Myran

  • Developer
  • Posts: 183
    • View Profile
Ah, I'm sorry, in the patch we changed the png loader and the new one will only load full color png files, so no indexed png-8. It should be a simple matter of just resaving the pngs to 32-bit, what program do you use?

bewt

  • Posts: 22
  • Maggot Crusher.
    • View Profile
paint.net, my friends think I'm an idiot, but it does what I need it to do for pixel art. I was assuming that it was something like that. I think I tried re-saving before but I'll try it again.

Errors aside, Could illustrator work better for pixel art? I just make placeholder sprites and get my art friends to fix them.

bewt

  • Posts: 22
  • Maggot Crusher.
    • View Profile
Update: Just re-saved the sprite forcing it to 32 bit. Did not work.

I'm going to save a blank image and load that and see if it works.

bewt

  • Posts: 22
  • Maggot Crusher.
    • View Profile
I tried it with a blank sprite and noticed that it doesn't actually affect gameplay. My spiders worked as well as they ever did. It's just an editor error message.

I'm really not sure what the deal is. My pngs are 32 bit.

MadMan

  • Posts: 96
  • Faggot Crusher.
    • View Profile
I use paint.net, and i saved it as 32bit, it works fine for me.