I don't see any way to do so from within DM. You could write a DLL to parse the PNG comments and find the delay, though. That said, it might be easier just to store that data within your code somewhere.
Unless I am misunderstanding, you are wondering how long a frame within an icon lasts?
If you are using DM to make the icon, then at the top of the column of pictures for the video there should be a number. That number would be about 1/10th of a second.
As in:
1 = 1/10 of a second
5 = 5/10 of a second or 1/2 of a second
15 = 15/10 of a second, or 1.5 seconds.
DM doesn't support this, no, DC is quite right. I believe that the length of each frame is dependant on the tick speed of your world, too, so you can't rely on breaking it into seconds either.
I think the OP probably knows what's up, but Phits seems a little confused about the question, and you've kind of bounced off it.
The issue he's having isn't to do with tick rates, frame length in seconds, or any of that. The issue is he cannot access the "frame delay" details you can add to frames in the DMI editor, in his BYOND world, which is counted in ticks.
If he could do so, he'd be able to answer the question of "how long does this take in seconds", because he knows the tick_lag and how long it takes in ticks.
The information he's after, is embedded in the zTxt blocks of the DMI file, which is basically just a regular PNG file with these specifically formatted comment blocks in them. So DarkCampainger is just proposing you write a DLL that reads these comments blocks, probably using something like libpng to do all the heavy lifting for you. It's not ridiculously difficult to do as such, but you suffer the problem of needing trusted mode execution, and all that jazz.
Kinda makes me wish I'd kept the PNGImage library I'd made, as it would be handy here.
To be specific I wrote a proc that copies the minor adjustments [pixel offsets most the states] of the 100 icons states in one file and applies it to the 5 other icons.[Which each need to have the minor adjustments]. However the other icons need to have the same delays as the original for this to not waste all of my time. [I will be adding more icons later]
Now I know I'm asking for alot but is it possible in this lib to tell the difference between moving states and non-moving states witht eh GetStateDelay? ATM my project does not need it, but I could see this becoming a problem in the future.
I'm sure it's possible with a .dll (not sure if this one does it) but I know it's possible to determine if an icon state is a movement state using DM's icon() proc. I forget exactly how, but it's possible. You can use its last parameter ("moving") to make it only fetch movement states, then either check if the return value is null or a valid icon - or something like that.
#10 Jun 3 2012, 4:49 pm (Edited on Jun 3 2012, 5:11 pm)
The data is all there, but there wasn't really an accessor to filter it directly. What you would have needed to do was loop through the dmi_info's states list, looking for a state with the name and movement settings you want, then you can grab its delay list.
However, I just wrote a search process that will do it for you; I'll upload it in a minute.
<edit>
Updated version is up. There's an example in the demo of how to search for states. In your case, you would do something like this:
// Search for states with matching name and movement setting var/query = list2params(list("name"=targetState, "movement"=1))
// Run the search var/list/states = info.SearchStates(query) if(states.len) var/dmi_info/dmi_state/state = states[1] var/list/delays = state.delay
What do you need it for?