Dine2017

Joined September 2, 2017
Line 22: Line 22:


==Minor NPC project==
==Minor NPC project==
I have mostly finished the [[List of minor NPCs in Paper Mario]]. The quotes come from the [http://www.romhacking.net/community/3078/ Paper Mario Text Dump] by Rew. The layout of the article is not very satisfactory, and I don't know how to improve it.
I have mostly finished the [[List of minor NPCs in Paper Mario]]. The quotes come from the [http://www.romhacking.net/community/3078/ Paper Mario Text Dump] by Rew. I have verified some of them by actually playing the game, but the others (for example the Toad Town ones) are simply copied over and have not been scrutinized.


My next project might be:
Also, I'm not satisfied with the layout of the page as it currently stands, but I don't know how to improve it with my crude HTML/CSS skills.
 
* [[List of minor NPCs in Super Paper Mario]] (most of the minor NPCs in this game have official names, so this article won't be long)
* [[List of minor NPCs in Mario & Luigi: Superstar Saga]]
 
'''Contrary to [[MarioWiki:Courtesy#Ask|MarioWiki:Courtesy]], I don't mind if you do them ahead of me, though.'''
 
{| class="wikitable mw-collapsible mw-collapsed"
!Mysterious code – PM
|-
|
<pre>
line = s => `* "''${s}''"`
 
function block(l) {
    [title, tattle, ...quotes] = l;
    return `|-\n|style="text-align:center"|[[File:PM Bob-Omb Red.png]]<br>${title}\n|data-label="Quotes" style="font-size:90%"|\n${quotes.map(line).join('\n')}\n|data-label="Goombario's Tattle" style="font-size:90%"|\n${line(tattle)}`
}
 
function f(s) {
    blocks=s.split('\n\n').map(x=>x.split('\n')).map(block).join('\n')
    console.log(blocks)
}
 
 
f(`Character A
Tattle
Quote 1
Quote 2
 
Character B
Tattle
Quote 1
Quote 2`)
</pre>
|}
 
{| class="wikitable mw-collapsible mw-collapsed"
!Mysterious code – MLSS
|-
|
<pre>
function block(l) {
    [pic, desc, ...quotes] = l;
    desc = desc.trim();
    if (desc === '-') desc = '';
    if (desc !== '') desc = '<br>' + desc;
    return `|-\n|style="text-align:center"|[[File:MLSS ${pic}.png]]${desc}\n|\n${quotes.map(s => `* ''${s}''`).join('\n')}`
}
 
template = `{|style="width: 100%; margin: 0 auto; border-collapse: collapse;" border="1" cellpadding="1" cellspacing="1"
|-style="background: #ABC;"
!width="20%"|Character
!width="80%"|Quotes
INSERT HERE
|}`
 
function f(s) {
    s = s.trim();
    blocks = s.split(/\n\n+/).map(x => x.split('\n')).map(block).join('\n');
    result = template.replace('INSERT HERE', blocks)
    console.log(result);
}
 
 
f(`
 
Joke's End NPC
-
As a meteorologist, I am particularly interested in the whirlwinds that appear in the seas in this area. When rotational energy is added to warm updrafts of air, whirlwinds occur. It's quite fascinating. ...I would love to research this mechanism further and test it out somewhere.
 
`)
</pre>
|}
5,697

edits