Help:Style

From Luanti Wiki
Revision as of 21:39, 28 October 2024 by Wuzzy (talk | contribs) (→‎Text and templates: add language links)
Jump to navigation Jump to search
Languages Language: English • Deutsch

This article is aimed at wiki editors to provide hints and loose guidelines on the several style-related conventions used on this wiki.

Languages Language: English • Deutsch

Text and templates

A few useful templates used in this wiki.

Language links

At the top of every page, a {{Languages}} template should be placed to generate links to translated versions of this page.

You may use {{Languages|nocat=1}} to prevent the page from being added to Category:Languages pages.

(See also: Template:Languages)

Meta text

For any text in an article that is about that article itself, put it in an Mbox template. Example:

{{Mbox|type=info|text=This section contains information about the Mbox template.}}

Incomplete page

If a page is incomplete, add {{Incomplete}} at the top. (see also: Template:Incomplete)

Propose a page for deletion

If you want to propose a page for deletion, add {{Delete|<your reason here>}} to it. (see also: Template:delete)

Luanti version

To insert the current Luanti version, use {{Version}}. (see also: Template:version)

Images

This section discusses style with regards to images as used in this wiki.

Blocks

Items

  • Items (e.g. Apple.png) are displayed on the wiki as 2D images ranging from 20×20 to 160×160 pixels.
  • It is advised to create a unique version of 160×160. If you use a 16×16 image, browsers will scale up the image using interpolation and the result will not look very clean.
  • Create images by extracting the 16×16 version available in the GitHub repository and scale them to 160×160. Use no scaling interpolation, or nearest neighbor, so that the pixelized appearance is maintained. For this task, you can use one of the following:

Screenshots

Please use PNG for screenshots, not JPEG (JPEG provides lossy compression).

Creating transparent mob pictures

Blender

  • Move to the default 3D view.
  • Go to Object Mode, right-click a bone if there is any, and press M to move them to another layer.
  • Go under the Camera tab, expand Shading, and change Alpha from Sky to Transparent.
  • Press Shift + C to reset the camera and render the picture.

In-game

  • Use the Green Screen mod to make a wall out of white screen blocks.
  • Add this code to the init.lua file in the mobs mod, change modname to the mod's name, and change any character text to the corresponding text of the mob that you want to take a picture of.
core.register_node("modname:character_statue", {
   description = 'Character Statue',
   drawtype = 'mesh',
   mesh = 'character.b3d',
   tiles = {'character.png'},
   inventory_image = 'character.png',
   groups = {not_in_creative_inventory=0},
   paramtype = 'light',
   paramtype2 = 'facedir',
   groups = {cracky=3, stone=1},
   selection_box = {
      type = 'fixed',
      fixed = {-1, -0.5, -1, 1, 3, 1}, -- Right, Bottom, Back, Left, Top, Front
   },
   collision_box = {
      type = 'fixed',
      fixed = {-1, -0.5, -1, 1, 3, 1}, -- Right, Bottom, Back, Left, Top, Front
   },
})

OR

  • Change the mob's walk velocity in the Lua code to 0.0000001, which will virtually stop the mob from moving.
  • Disable damage, spawn the mob with its egg, and take screenshots with F12.

GIMP (making the picture transparent)

  • Press Shift + O for the color picker and click on the background.
  • Then under Layer → Transparency → Color to Alpha, choose the right color, and click OK. Now the picture is transparent.