FORUM ARCHIVED

Graphics troubles - even with official sprites?

Discussion in 'Modding' started by nivomi, Sep 11, 2012.

  1. nivomi

    nivomi Member

    A while back I had an issue where my game would crash pretty fatally when I tried to make a polymorph spell with custom sprites. [link to thread] "Oh well," I thought, "I'll cut my losses and replace it."

    Now, I'm making a spell that involves placing traps. At first, I tried making some custom graphics (by taking an existing trap, editing the colors in Photoshop, and re-saving. Original, I know.) and plopped a reference to them into my XML. When the game tried to load the image, this familiar message popped up.

    I decided I would just try with the game's default caltrop image (sprites/sfx/caltrops.png). This crashed in much the same way. What's the deal with that? Code for the reference is here, but I'm pretty sure there are no problems with it:
     
  2. codebracker

    codebracker Member

    The thing is that even the most similar sprites (like traps) sometimes have different sprite size, hoover over the sprite that was originally used by your spell, and copy those to use/edit them or resize yours to those exact dimensions, otherwise it doesn,t detect them. I had a lot of trial and error before - figured it out.
     
  3. nivomi

    nivomi Member

    I'm using the official sprite and still getting crashes.
     
  4. codebracker

    codebracker Member

    Yes but is it the same sprite that was originally used for animation of said spell (ore base spell you modified)?
    Because certain sprites are specially sized for speciall spells, for instance you can't use whilling blades sprite for traps etc.
     
  5. nivomi

    nivomi Member

    The sprite is being used for a trap placed on a floor. It's not an animation, it's just the item's "sitting on the floor" icon. It's the exact same sprite used for caltrops in the vanilla game.
     
  6. Kazeto

    Kazeto Member

    Just post the code and let us take a look at it, nivomi.

    Trying to troubleshoot something without knowing what exactly went wrong is kind of difficult, really.
     
  7. nivomi

    nivomi Member

    The entire whole itemDB is as follows:
    Code:
    <itemDB>
    <item name="Jungle Thorns" iconFile="sprites/sfx/caltrops.png" special="1" >
        <trap trigger="once" casts="JungleThornStab" level="0" />
        <price amount="0" />
        <description text="Look out! These things are dangerous with a lower-case 'd' and an exclamation point!" />
    </item>
    </itemDB>
     
  8. Kazeto

    Kazeto Member

    Are you copying the sprites by any chance?

    If you do, then change their name of the copied one slightly (I think there was some kind of issue with game going haywire when some more referenced a sprite name that existed both in the core game and in this mod).
     
  9. nivomi

    nivomi Member

    I am referring directly to the sprite in the game's files, nothing is copied or duplicated. In the case of the modified sprites, they were not named anything that shared a name with core files.
     
  10. Kazeto

    Kazeto Member

    Ugh, right.

    And I'm blind for not having noticed the link to the code in your opening post (sorry about that, I got used to links that are slightly more noticeable than that but it's not a good excuse).

    So, a different kind of question. Are you certain that your copy of the game is up-to-date?
    Because there was this sort of problem with another thing in the past, and I can't think of another reason now.
     
  11. nivomi

    nivomi Member

    I ran a game cache validation through Steam, it said everything was OK.