Jump to content

Photo

Issue using Tiled map and palette not found


5 replies to this topic

#1 asdronin OFFLINE  

asdronin

    Space Invader

  • 26 posts

Posted Fri May 10, 2019 12:26 AM

Hi all,

Im using a image I already tested with plotmap and so should be correct with its palette and everything configured for the 7800basic, just I decided to try Tiled maps with same image, Im just experimenting you know to see what I can do. And the tmx file imports correctly but then when I call to plot it it doesnt compile and gives this error like the image Im using has no palette, as said is the same I used before and worked so it should be ok

 (70): ERROR, plotmapfile didn't find a palette for tilesetchar2
Compilation failed

In that line there is the plotmapfile call, then I wonder how can I make the palette be recognized after I save the tmx file? Im sure I clicked on embed file in the Tiled options and followed all the guidelines by Atarius Maximus, thanks for any clue about fixing this =) 



#2 RevEng OFFLINE  

RevEng

    Bit Player

  • 5,213 posts
  • Location:bottom of the stack

Posted Fri May 10, 2019 6:05 PM

Here's the relevant excerpts from the guide...
 

It's important to note that when you import images for use with plotmapfile, you need to define their "palette" parameter, so plotmapfile will know which palette to use for areas of the screen that use that image. See the incgraphic entry for more information.


The palette parameter needs to be defined if you plan to use your image as part of a map to be displayed with the plotmapfile command. It tells plotmapfile which palette number it should use when drawing any tile from the image.



#3 asdronin OFFLINE  

asdronin

    Space Invader

  • Topic Starter
  • 26 posts

Posted Fri May 10, 2019 6:37 PM

I see, thanks a lot for mentioning this RevEng =), I had no idea it has to do with the moment we load the image, I was only seeing the part where we plot the map or load the map. However for some reason its giving me the same error, Im sorry to be confused about this, its very different way of coding than any I have seen before. My current lines around the error are these

 incgraphic tilesetchar2.png 0 1 2 3 3

 incmapfile asddsa.tmx

main
 clearscreen
 plotmapfile asddsa.tmx asddsa 0 0 20 50 

The error comes when I try to plot the map, the incgraphic call should be correct now based on the help section you mentioned, I mean Im not swapping any colors so 0 1 2 3 and Im using palette number 3 (defined before these lines just ommitted for clarity) then if the palette is not found I assume Im making something really wrong as its probably not looking for palette number 3 but something else or nothing at all, or I understood wrong how to load the image before loading the map for later plotting it



#4 Mord OFFLINE  

Mord

    River Patroller

  • 2,697 posts
  • Location:Canada

Posted Sat May 11, 2019 5:06 AM

When you created your tiled map in Tiled, did you make sure the tile sets used by the map were embedded when you added them? Can't remember if the errors you're getting are the same ones I had originally when trying to work with Tiled.



#5 RevEng OFFLINE  

RevEng

    Bit Player

  • 5,213 posts
  • Location:bottom of the stack

Posted Sat May 11, 2019 9:12 AM

You're missing the graphics mode parameter. Change this...
 
 incgraphic tilesetchar2.png 0 1 2 3 3

...to this...
 
 incgraphic tilesetchar2.png 160A 0 1 2 3 3

The error comes when you try to plot the map, because the incgraphic "palette #" parameter is optional. 7800basic doesn't know you'll use that incgraphic with a plotmapfile, so it can only error during the plotmapfile step.

#6 asdronin OFFLINE  

asdronin

    Space Invader

  • Topic Starter
  • 26 posts

Posted Sat May 11, 2019 1:35 PM

Thanks a lot Mord, you are right, at first I missed that step of embedding the images and later I had to redo that map (was a test map anyway) to make sure everything was correct, after that the palette error arose, so I had no idea what it was. 

 

RevEng, thanks a lot, you are right, after adding the mode the code works, well it crashes when I try larger maps (those that go off the screen) but thats an issue I have asked and surely its resolved in other thread just I need to try and see for myself how it works before posting on that. Well back into this subject, yes I see what you mean, because when we import the graphic it can be used anywhere and not just maps the error comes in when the map is plotted, so as said thanks a lot =)






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users