Potion Recipe
Posted: Mon Aug 01, 2016 10:00 am
I've added new potions (a fire/earth/cold/shock shield)
I created a gfxAtlas thanks to an external software "gfx atlas toolkit" : http://www.johnwordsworth.com/legend-of ... s-toolkit/
I used it beacause I don't have photoshop (I use GIMP). It created a dds file with the 4 icons for my potions.
The potions can be used in game, they render well as game objects and as item in the inventory.
So the next step was to create a recipe. I added that
(Do the order of ingredients matter ? Is 231 the same as 123 ?)
It seems to work well until... I tried to create a potion : I got an exception saying "bad argument #1 to 'drawImage' (renderableTexture expected, got string)
The exception is thrown at the moment I put the ingredients and the game try to show which potion will be created. But the 'preview" of the potion throws that exception.
What can I do ?
PS: I explained all the steps I did to be sure I didn't do something stupid when exporting the png file into dds.
I created a gfxAtlas thanks to an external software "gfx atlas toolkit" : http://www.johnwordsworth.com/legend-of ... s-toolkit/
I used it beacause I don't have photoshop (I use GIMP). It created a dds file with the 4 icons for my potions.
The potions can be used in game, they render well as game objects and as item in the inventory.
So the next step was to create a recipe. I added that
Code: Select all
defineRecipe{
potion = "potion_shock_shield",
level = 2,
ingredients = 234,
}
defineRecipe{
potion = "potion_fire_shield",
level = 2,
ingredients = 231,
}
defineRecipe{
potion = "potion_ice_shield",
level = 2,
ingredients = 232,
}
defineRecipe{
potion = "potion_earth_shield",
level = 2,
ingredients = 233,
}It seems to work well until... I tried to create a potion : I got an exception saying "bad argument #1 to 'drawImage' (renderableTexture expected, got string)
The exception is thrown at the moment I put the ingredients and the game try to show which potion will be created. But the 'preview" of the potion throws that exception.
What can I do ?
PS: I explained all the steps I did to be sure I didn't do something stupid when exporting the png file into dds.
