Releases: yhdgms1/novely
v0.38.0
v0.37.0 — Untitled
Core
getResourseType
function uses cache. Useful when http requests are made. By default file extension is used.preview
function that is passed to renderer now resolves object withassets
array — array of resources that was used in that preview.characterAssetSizes
setting is added. It is used to gave canvas size before image are loaded
const engine = novely({
characters: {
Peter: {
name: 'Peter',
color: '#c04931',
emotions: {
normal: peter_the_great
}
}
},
characterAssetSizes: {
Peter: {
width: 800,
height: 1200
}
}
})
v0.35.0
Custom Actions Update
Some arguments were renamed and regroupped.
// previously
const custom: CustomHandler = ({ preview, get }) => {
const { data, element } = get(true)
}
// now
const custom: CustomHandler = ({ data, flags: { preview }, getDomNodes }) => {
const { element } = getDomNodes(true)
}
Custom Actions to Core!
Some internal code was moved into @novely/core package instead of being necessary to write in renderers.
0.33.0
Extend Action
Extend action is a new functionality. Extending 0.31.0 version's engine actions functionality, now you can declare you'r own actions.
import { novely, extendAction, EN } from '@novely/core'
import { particles, hide as hideParticles } from '@novely/particles'
const engine = novely({ ... });
const action = extendAction(engine.action, {
particles: (options: Parameters<typeof particles>[0]) => {
return ['custom', particles(options)]
},
hideParticles: () => {
return ['custom', hideParticles()]
}
})
engine.script({
start: [
// using action object !
action.particles(config)
]
})
Extend Action creates a wrapper Proxy around original engine.action.
Fix GoingBack
Sometimes goingBack
flag was not set properly leading to unexpected behavior.
Optimized clearing of some actions
Before renderer should have been clear dialog or some other things by itself. This was made just before calling resolve
function which will make next actions execute. And this means, when two dialogs were going one after another, after first dialog is closed, it would be cleared, and then drawn again. Right now when action that requires user action is ran, other actions will be cleared.
v0.32.0
Multilingual Voices
engine.script({
start: [
engine.action.voice('./hello-en.mp3'),
// New !!
engine.action.voice({
en: './hello-en.mp3',
ko: undefined // may be undefined
})
]
})
You can pass empty object — then sound will not play. You can ignore audio for some languages.
v0.31.0
v0.30.0
Default emotions for characters
const engine = novely({
characters: {
Yuki: {
name: 'Yuki',
color: '#f595f6',
emotions: {
normal: './normal.png'
}
}
},
defaultEmotions: {
Yuki: 'normal'
}
})
engine.script({
start: [
// Without emotion!
engine.action.showCharacter('Yuki')
]
})
v0.28.0
Fix Saves
Before if the story was set to the following
script({
start: [
a.say('Character', 'Lyric One'),
a.say('Character', 'Lyric Two'),
]
})
When, however being on lyric two, player exit the game using exit button, game will be saved at lyric one.
Now game will be saved on lyric two. There were also some minor changes to the saves logic. Now Novely itself decides should save been overwritten or not.
Fix Action Double Call
Same story is used in this example.
script({
start: [
a.say('Character', 'Lyric One'),
a.say('Character', 'Lyric Two'),
]
})
Player save on lyric two. Basically you should expect, when restoring, first lyric one to run, and then lyric two to run.
But things was working differently. Firstly, lyric one was called, then lyric two, and then lyric two was called again, this time variables goingBack
and restoring
was false.
Now restoring working in expected way
v0.27.0 — Don't give up
Replacement of loading screen with overlay loading screen
Previously there was a choice either show loading or either show some another screen. Now renderer should provide ui.showLoading
and ui.hideLoading
methods. This was made to allow dynamic script
call inside a game don't break or make game restore when completely not needed. However, this is not a recommended way of using a script
function, it could be supported partially.
v0.25.0 — Red Exclamation
New State
Previously novely would return a state function that is used to receive and set state.
const { action, state } = engine;
engine.script({
start: [
action.function(() => {
// Set state
state({ weather: 'Sunny' })
// Receive state
console.log(state())
})
]
})
Now state is passed directly into actions
const { action } = engine;
engine.script({
start: [
action.function(({ state }) => {
// Set state
state({ weather: 'Cloudy' })
// Receive state
console.log(state())
})
]
})
New Say Action
New Say action, unlike of Dialog, that was used to make characters say their lyrics, does not allow non-characters to say lyrics, also it does not provide functionality to show mini-character near the text.
engine.script({
start: [
action.say('Character', 'Hello')
]
})
Rename of unwrap
to templateReplace
Unwrap used to be a function that is used internally, but exported to use with global data instead of local state. Now it is just renamed to have a more descriptive name.
engine.data({ tea: 'Strawberry' })
// Before (deprecated)
engine.unwrap('I like tea with {{tea}}')
// After
engine.templateReplace('I like tea with {{tea}}')