Module talk:Table of spells

From CrawlWiki
Revision as of 09:22, 27 September 2022 by Predelnik (talk | contribs)
Jump to: navigation, search

Spell Noise script error

I don't know much about using Modules, but as far as I can tell, some templates aren't prepared to accept full text in the Spell Effect Noise field (I dunno if they only accept integers or what). For the most part, this isn't a problem, but Inner Flame and Fulminant Prism both have an initial effect noise of 0 and then make more noise afterwards when their target explodes.
Ge0ff's last edit to this module worked well on Inner Flame's page, but (from what I can tell) broke everything based off of Template:spell table (so also things like Template:spell table by level, Template:spell table by school, Template:spell table by flag, etc.). Given that Template:spell info worked normally, I think the problem lies with those other templates. In any case, I went back to using the old spell template on the Inner Flame page so we at least have accurate information without breaking a whole bunch of spell lists.
Does anybody with more experience in coding wiki Module/Template relationships have a solution for this problem? --spudwalt (talk) 04:18, 14 September 2020 (CEST)

Right, it looks like it was the format_noise method, which was trying to find math.max(noise.casting, noise.effect) in Module:Spell. Switched to grabbing the first consecutive block of digits instead, and it seems to be working now. -LunaeLumen (talk) 21:57, 14 September 2020 (CEST)

Generating

Currently the data is from 0.25, so we need to update it to 0.28. To do this, https://github.com/plampila/crawl-wiki-modules speaks of a tool to generate a data table. It looks like the tool consists of the files changed at this commit. So I'm thinking the process is to download the crawl 0.28 source code, make these file changes and then build and run json-data-main.exe.

One misleading thing is that Ice Magic for example says the page is for 0.21, but the data is from 0.25, so it seems like it should say that instead. Maybe the destination pages could use a different header template that reads: "The spell information is from 0.25 and may not be up to date for the latest stable release of Crawl" where the version number is read from this module. --ScriptFactory (talk) 21:14, 8 February 2022 (CET)

If you can figure out how to automate the process of updating modules like this, go ahead. I've just been updating things manually so far. --spudwalt (talk) 04:20, 9 February 2022 (CET)

Well, that took quite a bit of effort. The C++ code and other files needed heavy revision. I put the new changes on my personal GitHub repo for now. Also I'll add instructions there so that hopefully the process will be a little smoother next time.

In an attempt to avoid C++ compiling, I also tried a different method using only Lua scripts. The downside is that each time, several C++ files must be translated into Lua with a text editor by using search and replace. This is somewhat error-prone. If that sounds easier for other wiki editors, maybe we can move towards that in the future. To me, the important thing is that the wiki can be updated when new versions come out, even if there are errors that need to be cleaned up later. --ScriptFactory (talk) 00:01, 12 February 2022 (CET)

Quotes

I can see that extraction script support quotes as well but they were removed during previous regeneration. Was it intentional, if so why? --Predelnik (talk) 10:22, 27 September 2022 (CEST)