The VNDev Wiki underwent maintenance on March 14th, 2025, which is now complete. Semantic MediaWiki and associated extensions have been updated, and Scribunto and Semantic Scribunto have been installed. If you encounter any bugs or unexpected behavior, especially with VN jam statistics pages, please let the wiki admins know via the DevTalk Discord server.

Module:Jam series detailed stats: Difference between revisions

From VNDev Wiki
hm
m okay building on this finally
Line 12: Line 12:
     local maxCount = mw.smw.ask( q )
     local maxCount = mw.smw.ask( q )


     return maxCount[1].count
     local numIntervals = math.ceil( maxCount[1].count / width )
      
     return numIntervals
 
    --local numIntervals = math.ceil(  )


end
end


return p
return p

Revision as of 13:48, 16 March 2025

Documentation for this module may be created at Module:Jam series detailed stats/doc

local p = {}

function p.prepHistData( frame )

    local statType = frame.args['statType']
    local width = frame.args['width']
    local q = { '[[Jam occurrence:+]]', '?Has ' .. statType .. '=count' }
    q.sort = 'Has ' .. statType
    q.order = 'descending'
    q.limit = 1
    q.mainheader = '-'
    local maxCount = mw.smw.ask( q )

    local numIntervals = math.ceil( maxCount[1].count / width )
    return numIntervals

end

return p