User talk:Bcode

From NetHackWiki
Revision as of 18:53, 25 January 2013 by Bcode (talk | contribs) (Monsters with non-unique appearance: Well, here it is...)
Jump to navigation Jump to search

Welcome!

Welcome!

Hi, Bcode! Welcome, and thanks for joining NetHackWiki!

  • The How to help and Style guide pages are excellent starting points.
  • Special:Recentchanges is a great first stop, because you can see what other people are editing right this minute, and where you can help.
  • Questions? Need help? You can ask at the Community Portal, the forum, or on the discussion page associated with each article! Just remember to sign those posts with four tildes: ~~~~. That will expand to create a signature.

You can put {{NAOplayer|NAO player account}} on your user page to link to your NAO player account. Capitalization matters.

We are really happy to have you here, and look forward to working with you!

This is an automated greeting. -- The Welcome Bot 18:47, 4 May 2024 (UTC)

Sorry about that

Sorry about accidentally reverting your first article edit; I didn't mean to, I was trying to hit the diff button and hit rollback instead. Happy editing! -Ion frigate 22:52, 20 December 2011 (UTC)

Monsters with non-unique appearance

Is it auto-generated? If yes - can you provide code used to do this? Bulwersator (talk) 17:07, 23 January 2013 (UTC)

I queried an SQL database of monsters. Here's the query, IIRC:
SELECT DISTINCT m1.name FROM monsters m1 INNER JOIN monsters m2
WHERE m1.glyph = m2.glyph AND m1.color = m2.color AND m1.monid != m2.monid
ORDER BY m1.glyph ASC, m1.color ASC, m1.baselev ASC, m1.name ASC;
I then pasted the output into the edit field and did some s/// in vim.
As for the database, I think I wrote some quite dirty scripts to read monst.c and write the database (I used an SQLite database, but it should work with anything supported by DBIx::Class, IIRC). If you want me to, I can pastebin these somewhere. (Be warned: it involves 40-line regexes…) —bcode talk | mail 17:28, 23 January 2013 (UTC)
I would be grateful, I prefer to use 40-line regexes than write new ones. Bulwersator (talk) 10:40, 24 January 2013 (UTC)
Here it is. Don't say I didn't warn you. —bcode talk | mail 18:53, 25 January 2013 (UTC)