DRL > Discussion

Quick questions thread!

<< < (59/237) > >>

ZicherCZ:

--- Quote from: bardysya on February 28, 2012, 09:16 ---Why on AoB 0.9.9.5. large healing globes don't give any berserk, and in challenge description is written that they work as berserk packs?

--- End quote ---
A bug, long known about and fixed for 0.996.

Uranium:
Not sure if this should go in the Modding forum, but it seemed too small to warrant a new thread.
Is there any way to find out what sprite number each item uses, or is it just trial and error to find the ideal number?

Game Hunter:

--- Quote from: Uranium on February 28, 2012, 15:28 ---Not sure if this should go in the Modding forum, but it seemed too small to warrant a new thread.
Is there any way to find out what sprite number each item uses, or is it just trial and error to find the ideal number?

--- End quote ---
Nothing other than trial and error for now, correct. I'll try to include a page on the modding section of the wiki that has all of the sprites and their corresponding sprite number.

tinyrodent:

--- Quote from: Uranium on February 28, 2012, 15:28 ---Not sure if this should go in the Modding forum, but it seemed too small to warrant a new thread.
Is there any way to find out what sprite number each item uses, or is it just trial and error to find the ideal number?

--- End quote ---

For this I would recommend something like:Spoiler (click to show/hide)
--- Code: ---local function dump(o,indent)
if type(o) == 'table' then
if indent == nil then indent = "" end
indent = indent .. "  "
local s = '{\r\n'
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
s = s .. indent .. '['..k..'] = ' .. dump(v,indent) .. '\r\n'
end
return s .. indent .. '} '
elseif type(o) == 'nil' then
return "<nil>"
else
return tostring(o)
end
end
--- End code ---

Then in the .run function of your module:
--- Code: ---core.log(dump(items))
--- End code ---

It will dump out all of the properties of all of the items in log.txt. So you'll see stuff like:Spoiler (click to show/hide)
--- Code: ---  ["rarmor"] = {
    ["durability"] = 100
    ["nid"] = 6
    ["res_acid"] = 0
    ["res_bullet"] = 0
    ["color"] = 4
    ["overlay_blue"] = 0
    ["res_shrapnel"] = 0
    ["is_exotic"] = false
    ["overlay_green"] = 0
    ["overlay_red"] = 1
    ["is_unique"] = false
    ["weight"] = 150
    ["armor"] = 4
    ["level"] = 9
    ["res_plasma"] = 0
    ["overlay_alpha"] = 1
    ["flags"] = {
      [1] = 191
      }
    ["type"] = 3
    ["res_melee"] = 0
    ["rechargeamount"] = 1
    ["id"] = rarmor
    ["flag_set"] = {
      }
    ["movemod"] = -20
    ["desc"] = Nice, red and shiny. Look out for it, because if it's gone, you're gone.
    ["coscolor"] = {
      [1] = 1
      [2] = 0
      [3] = 0
      [4] = 1
      }
    ["ascii"] = [
    ["name"] = red armor
    ["dodgemod"] = 0
    ["knockmod"] = 0
    ["sprite"] = 33
    ["rechargedelay"] = 5
    ["res_fire"] = 25
    }

--- End code ---
which of course includes the "sprite" property.

Kornel Kisielewicz:
however, that is unwise. Internally the sprites are referenced by names and not numbers -- and once GH has a moment he'll post the name list to the wiki.

This will make it way easier to keep compatibility if the spritesheets change.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version