Wallpaper Engine

Wallpaper Engine

Neptune Live2D
 This topic has been pinned, so it's probably important
今天的风儿好喧嚣  [developer] Jul 26, 2017 @ 10:13am
[Guide] Live2D Model Adaptation and Customization
A guide for Live2D model adaptation and customization.

This is a complete guide for everything about custom Live2D models, so it may be too long to read. If you've got a model which is already adapted for this app, it would be needless to read this!


Introduction
Neptune Live2D, as its name says, is just a Live2D project for showing Neptune on desktop at first, but later I found that some people would like other characters better, so I made this customization feature for it.

For some reason, the models which aren't in Neptunia series may not work as expected. I'm not guaranteeing it'll be well fixed though, because this project isn't intended to support other kind of models.

To apply any change, you may need to reload the wallpaper by clicking the refresh button or re-select this wallpaper in Wallpaper Engine browser.

You will lose all modifications in this project when it receives an update, please always keep a backup for your custom Live2D models.

The underlined features/properties and the entire subtitle feature are available only in this project, they are not part of the Live2D standard.

When editing JSON files, pay attention to the quotation marks and commas. According to JSON's specification, each string must stay between two double quotation marks, and every two objects or name/value pairs must be separated by a comma. A common mistake is using a " inside a string, the right way would be using \" instead.
If you still get an error with JSON, you can validate your JSON file in here[jsonlint.com].

Preparation
What Live2D is
A 2D character animation engine. Official website[www.live2d.com]

Where you can find models of Neptunia series
Official mobile app[compileheart.com] or google it!
The resources in app are all encrypted, for getting models you have to decrypt them. Alright I know what I've done to them is not right. Feeling guilty.

Tools you may need
You can download them from the download page in the website above.
  • Cubism 2 / Cubism 3: For creating Live2D models.
  • Live2D Viewer: For previewing model and creating simple runtime files.
    • To load a model, drag & drop its model settings file or .moc file to app's window. Also you can do with other resources for addition, such as physics, expressions and motions.


Importing models
See video tutorial.


Model settings file
I didn't find an official tutorial for it, so just wrote one myself. If you've imported your Live2D models and they work perfectly, you can ignore this section.

Model settings file stands for "Live2D Model Setting", usually named *.model.json, it defines all the parameters and related resources.

As an example, here is what Neptune's model.json looks like. I've removed unimportant objects and shortened it for a better look, you can directly open this file in project directory for a full and exact version.
{ "type": "Live2D Model Setting", "name": "ネプテューヌ - ジャージワンピ", "preview": "preview.jpg", "model": "normal.moc", "textures": ["tx1024/0.png", "tx1024/1.png", "tx1024/normal_2.png"], "pose": "../general/pose.json", "physics": "physics.json", "subtitle": "subtitles.json", "layout": {"center_x": 0, "center_y": -0.1, "width": 2}, "hit_areas": [ {"name": "head", "id": "D_REF.PT_HEAD"}, {"name": "body", "id": "D_REF.PT_BUST"}, {"name": "belly", "id": "D_REF.PT_BELL"} ], "expressions": [ {"name": "normal", "file": "exp/normal.json"}, {"name": "happy", "file": "exp/happy.json"} ], "motions": { "idle": [ {"file": "mtn/idle_00.mtn", "fade_in": 2000, "fade_out": 2000} ], "alt_idle": [], "greet": [ {"time": 6, "subtitle": "16", "sound": "snd/021.ogg", "file": "mtn/nep_start_morning_1.mtn"}, {"time": 15, "subtitle": "20", "sound": "snd/025.ogg", "file": "mtn/nep_start_evening_1.mtn"}, {"season": NewYear, "subtitle": "42", "sound": "snd/049.ogg", "file": "mtn/neptune_fullpack_049.mtn"} ], "tap_body": [ {"subtitle": "1", "sound": "snd/001.ogg", "file": "mtn/nep_touch_head_1.mtn"} ], "pinch_out": [], "pinch_in": [], "shake": [], "flick_head": [] } }
model
The main file of Live2D model, which includes textures binding, parameters declaration and other information.

name / preview
Information that will be displayed in character list.

model
The main file of Live2D model, which includes textures binding, parameters declaration and other information.

textures
An array of texture files.

pose
A file that defines visible / invisible parts. If there is no available pose file, just use the default (empty) one as above.

physics
A file that defines physics effects with hairs and other items.

subtitle
A file of subtitles, see the following section of guide.

layout
Setting some parameters' values. Available parameters are: width, height, x, y, center_x, center_y, top, bottom, left, right. I can't explain them because I don't know much. You may have to test them out.

hit_areas
Naming the hit areas, which are used for interactions. The ids can be found with the Live2D Viewer. In this project, hitting head is bound with expression switching, hitting body or belly is a "tap_body" event.

expressions
Expression files and names. The name does not matter.

motions
Motion groups with events. When an event is triggered, its motions will be randomly activated. If a group has no motions, just leave it with an empty array, otherwise it may cause issues.
  • motion properties
    • file / sound: File.
    • fade_in / fade_out: Time in millisecond, omit it for a default value 500.
    • subtitle: The subtitle's name declared in your subtitle file.
    • time: (For greet motions only) The start of available time span of this motion.
    • season: (For greet motions only) The season for special greetings.
      • Currently available values:
      • NewYear: 01/01 - 01/10
      • Halloween: 10/25 - 11/05
      • Christmas: 12/20 - 12/31

  • idle
    Triggered when character is idle, means none of the other motions is running.

  • greet
    Triggered right after wallpaper launches. If there are two or more motion with the same time span, it'll make a random select.
    E.g. the two greet motion examples above define that, a morning greeting starts from 6 to 14 and a evening greeting 15 to 5 (the next day), so a wallpaper launch between 6 and 14 will trigger the morning greeting. (Obviously the time around 14 is not "morning"... never mind)

  • pinch_out / pinch_in
    Triggered when character is scaled to the max / min.

  • tap_body / flick_head
    As the words say.

  • shake
    Shake detection needs the accelerometer sensor.

The pinch_in / pinch_out / flick_head / shake events are not yet supported in this project.

The "../" in file path is to access the parent folder. For further upper levels, you can use "../../", "../../../", etc.

Subtitles
When a motion with dialogue starts, its subtitle (if exists) will pop up with a dialog. I used JSON as the format of subtitle files for a clear structure and better extensibility.

Here's Neptune's simplified subtitles.json.
[{ "locale": "default ja-jp", "name": "日本語", "description": "Any help with translation will be appreciated!", "font":"MS Gothic", "subtitles": [{ "name": "1", "text": "なにか面白いことでもあった?" }, { "name": "8", "text": "わっ!びっくりしたなー、もう。" }] },{ "locale": "en-us", "name": "English", "author": "Shiro\nR3M11X(ΦωΦ)", "font":"Trebuchet MS,Segoe UI", "style":"color:red;font-size:24px", "subtitles": [{ "name": "1", "text": "Was there something interesting?", "style":"font-weight:bold" }, { "name": "8", "text": "Wow! I was surprised." }] }]

Structure

file
├───language object (1)
│  ├───locale
│  ├───name
│  ├───author?
│  ├───description?
│  ├───font?
│  ├───style?
│  └───subtitles
│      ├───subtitle object (1)
│      │  ├───name
│      │  ├───text
│      │  └───style?
│      └───subtitle object (2)
└───language object (2)

Properties end with "?" are optional.

Multi-language
Properties in a language object:
  • locale: Notation(s) for language.

    • You can check Steam\steamapps\common\wallpaper_engine\locale to find it for your language. (If you can't recognize which is, please check this website[www.science.co.il].

    • Multiple locales should be separated by spaces, e.g. "zh-chs zh-cht".

    • Note that "default" is also treated as a locale. When searching for a subtitle, if no language is selected or the selected language doesn't contain this subtitle, the app will search the language with "default" locale.

  • name / author / description: Information that will be displayed in language selector.

  • style: CSS styles.

  • font: A shorthand for font(s) that subtitles in this language will be displayed as. It's equal to style: "font-family:<FONTS>"[developer.mozilla.org].

    • Multiple fonts should be separated by commas, e.g. "Trebuchet MS,Segoe UI".

    • Please don't use a special font that only you have it installed because most of the other people can't see it. Instead, you may use "safe fonts", i.e. built-in fonts of (most of) Windows, they can be found in C:\Windows\Fonts. For more information, you can search them in Google: "English safe fonts", "Russian safe fonts", etc.

    • If you don't know the exact name of a font, you can open it from C:\Windows\Fonts, then its name will show at first line.

  • subtitles: Subtitle objects.

Adding a subtitle
// subtitles.json { "name": "blahing", "text": "Blah blah" } // model.json {"subtitle": "blahing", "sound": "blah.ogg", "file": "blah.mtn"}
  1. Replicate a subtitle object, fill the text.
  2. Specify a name, can be any value except duplicates.
  3. Use the name as the value of subtitle of related dialogue definition.


Feel free to ask any questions!
Last edited by 今天的风儿好喧嚣; Jan 10, 2020 @ 3:09am
< >
Showing 16-30 of 30 comments
ArcMat0r Jul 20, 2020 @ 11:05am 
Can you tell me to get the audio tracks? I know I am years late, but I really want to add Vert to my desktop. I tried decrypting the game, but I only get a lot of .bin files
Mélenchon_Gaming Feb 28, 2021 @ 12:19pm 
Do you know where we could find a list of the functions? Because i would like to create some special case to trigger event, or just try some funny things with my own live2d.
thx in advance
今天的风儿好喧嚣  [developer] Feb 28, 2021 @ 9:07pm 
There's no such list, you can find the functions by checking the source code[github.com]. To customize the app, you can modify the
custom.js
in the root folder of this wallpaper.
Mélenchon_Gaming Mar 1, 2021 @ 10:30am 
ok thank you for answering quickly
Mélenchon_Gaming Apr 26, 2021 @ 1:41pm 
Does the wallpaper work with .moc3 files?
今天的风儿好喧嚣  [developer] Apr 27, 2021 @ 4:33am 
No, but at some point it will
Mélenchon_Gaming Apr 27, 2021 @ 9:40am 
Do you think it will be possible soon? Or do you know a way to bring moc3 files to moc? I have already tried several things so if you have any idea just tell me because i really spend a lot of time on my live2d and would like to use it with your wallpaper.
今天的风儿好喧嚣  [developer] Apr 27, 2021 @ 3:01pm 
A few months later, maybe? It depends on when I will have time for it... Adding moc3 support is not an easy job.

As far as I know there's no way to convert moc3 to moc. If you can't wait for the update, you can try my latest wallpaper, which just has very basic features but supports both moc and moc3.

https://steamcommunity.com/sharedfiles/filedetails/?id=2427596211

To change the live2d model of that wallpaper, just put your live2d model in its folder and modify the config.json.
Mélenchon_Gaming Apr 27, 2021 @ 4:35pm 
Okay thanks a lot for answering that quickly! I will try this wallpaper and if it doesn't work i'll just do it again as .moc so don't worry and take your time
i'm sorry to disturb you again but i would like to have the wallpaper to change with time like having nep for the day and another live2d for the night.

I tried to put the presets in a playlist but when i modify one preset it changes the others on the same screen.

It only works when the preset is on another screen.
do you have any idea of how i could do that? thanks in advance.
今天的风儿好喧嚣  [developer] May 6, 2021 @ 1:36pm 
No problem. Did you mean the workshop presets? I don't think they would ever work because this wallpaper is incompatible with workshop presets, all settings are locally stored inside the wallpaper.

A possible route is to save what you want as themes, then start a timer in custom.js and programmatically change the theme according to the time.

If I'm not mistaken, the code to change the theme is
app.modules.Config.setConfig('theme.selected', index);
where index is a number greater than 100, you can check it out.
I saved my theme but I can't change the theme with the custom.js.

Maybe it's just that i'm too bad at programimng so could you send me the code i'm supposed to write if my theme is named "rin" please?

if it bothers you don't worry i can just give up on that idea it's not that important
今天的风儿好喧嚣  [developer] May 8, 2021 @ 10:26am 
Okay, this is the full example of custom.js, all you need to do is modify the time and the name of your expected theme.

const timerInterval = 30 * 1000; // 30 seconds let timerID = 0; function setup(app) { app.on('configReady', () => { clearInterval(timerID); timerID = setInterval(() => { const date = new Date(); // assume you want to change the theme at 20:00 pm if (date.getHours() === 20 && date.getMinutes() === 0) { setCustomTheme(app, 'rin'); } }, timerInterval); }); } function setCustomTheme(app, name) { const customThemes = app.modules.Config.getConfig('theme.custom', []); const currentThemeIndex = app.modules.Config.getConfig('theme.selected', -1); let themeIndex = customThemes.findIndex(theme => theme.name === name); if (themeIndex === -1) { console.warn('Could not find theme by name', name); return; } // remember to plus 100 for custom themes themeIndex += 100; if (currentThemeIndex !== themeIndex) { console.log('Theme changed to', themeIndex); app.emit('config', 'theme.selected', themeIndex); } }
Wow thanks a lot!
It's really kind of you :steamthumbsup:
k?K? Σ ?XH Feb 18, 2024 @ 4:39am 
Sorry I know I am late but I have tried to download a 2D model from Spriters Resources but when I extract it it's JSON, and Live2D (both Viewer and Editor) refuses to open it because it's not in model3json format. I have tried Live2D 3.3 and 4.3. Any help?
< >
Showing 16-30 of 30 comments
Per page: 1530 50