Giter VIP home page Giter VIP logo

corescript's People

Contributors

bungcip avatar ivanpopelyshev avatar iyokan-nico avatar krmbn0576 avatar niokasgami avatar nozomi-ikuyama avatar rev2nym avatar rutan avatar seea17 avatar sigureya avatar white-mns avatar wilfrem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

corescript's Issues

Resource re-loading system

RMMV stops when an error occurs. Even a single loading error completely destroys the game! It's very inconvenient. ๐Ÿ˜ข
Therefore, I took some measures to resume the game if a loading error occurred.

  • When loading of images, audio, movie and map data fails, automatically retry loading three times.
  • If it still fails, display a loading error, a failed filename, and a retry button on the screen. If this button is pushed, retry loading again.

See PR #78

Develop a useful core plugin for creators

In order for more people to create games conveniently and freely,
let's provide a useful core plugin in this community!

Features list:

  • Several important parameters manipulate by plugin parameters - cache limit, screen resolution, FPS
  • Provide useful functions for plugin creation - Nio's type conversion (See #39), liply's wrapPrototype, triacontane's getParamXxxxx, etc ...

If you want other features, please tell me!

I Propose new roadmap

The development of Core Script 1.1 was very good thanks to everyone.
We got a lot of feedback while developing it. Therefore we propose change of road map.


NEW roadmap

ver 1.2
Goal: Responding to problems where games can not continue
Retry at load error
Development of a standard plugin for options

ver 1.3
Goal: Assist in game development
AutoSave
Simple conflict check for plugins
Guidelines and sample writing for plugins
Refined bug report

ver 1.4
Goal: Accelerate speed, reduce experience time
High-speed loading of sound source
Progress bar on load screen
Lightweight Save File

ver 1.5

Goal: Improve UI
Multilingual
Multi-touch
Battle system touch compliance
Touch correspondence of basic system such as equipment

Impossible to build the corescripts

Hi peoples,
I tried right now many times to build the corescript for doing some beta testing but nothing seem to work?
Just in case I already have a updated version of Node and all I also followed all the steps
I am using visual studio code.

I can't seem to run any of the command and it's throw me errors.
I also tried to build it manually with a GulpFile and the files also throw errors for some reasons.
Here the error-Log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info prebuild [email protected]
6 info build [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec build script
9 verbose stack Error: [email protected] build: run-p build:*
9 verbose stack Exit status 1
9 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:217:16)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at EventEmitter.emit (events.js:172:7)
9 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at ChildProcess.emit (events.js:172:7)
9 verbose stack at maybeClose (internal/child_process.js:829:16)
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid [email protected]
11 verbose cwd C:\Users\devil\Documents\Test_JS
12 error Windows_NT 10.0.14393
13 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build"
14 error node v4.6.0
15 error npm v2.15.9
16 error code ELIFECYCLE
17 error [email protected] build: run-p build:*
17 error Exit status 1
18 error Failed at the [email protected] build script 'run-p build:'.
18 error This is most likely a problem with the openmv package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error run-p build:

18 error You can get information on how to open an issue for this project with:
18 error npm bugs openmv
18 error Or if that isn't available, you can get their info via:
18 error
18 error npm owner ls openmv
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

Thanks for any further answer.

Fix Utils.isNwjs can't distinguish between nwjs and electron.

This code can not further distinguish between nwjs and electron.

Utils.isNwjs = function() {
    return typeof require === 'function' && typeof process === 'object';
};

We can do more accurate judgments through process.versions.nw.

Utils.isNwjs = function() {
    return typeof require === 'function' && typeof process === 'object' && process.versions.nw != void 0;
};

Make it clear whether to format the code

@liply You formatted the code once, but you remanded it. (d293b78)
However, your PR contains just a few lines just to format the code.
It is hard to see and review.

So we should choose whether to format the code before sending the PR or to give up formatting and remove the formatting of the code from the PR.
Either way, the description about the formatting of the code from PR will disappear.

WebAudio backend doesn't stream audio, but downloads entire piece, decodes entire piece and only then starts playing [infamous audio lag problem]

If you check js/rpg_core/WebAudio.js, you'll find this function which is called every time a sound is created & triggered for playback (including new music pieces):

WebAudio.prototype.initialize = function(url) {
    if (!WebAudio._initialized) {
        WebAudio.initialize();
    }
    this.clear();
    this._load(url);
    this._url = url;
};

You can see it calls _load, which triggers an Ajax request:

WebAudio.prototype._load = function(url) {
    if (WebAudio._context) {
        var xhr = new XMLHttpRequest();
        if(Decrypter.hasEncryptedAudio) url = Decrypter.extToEncryptExt(url);
        xhr.open('GET', url);
....

In the receive callback of the Ajax request, _onXhrLoad simply decodes the received audio after the Ajax request completed in its entirety (full download required first):

WebAudio.prototype._onXhrLoad = function(xhr) {
    var array = xhr.response;
    if(Decrypter.hasEncryptedAudio) array = Decrypter.decryptArrayBuffer(array);
    this._readLoopComments(new Uint8Array(array));
   WebAudio._context.decodeAudioData(array, function(buffer) {
...

.. and only after that, WebAudio.prototype._onLoad is called which finally informs all load listeners.
As you can see in the play function, the load listeners are used to start playing the actual sound, so before reaching this stage no audio can be heard:

WebAudio.prototype.play = function(loop, offset) {
    if (this.isReady()) {
        offset = offset || 0;
        this._startPlaying(loop, offset);
    } else if (WebAudio._context) {
        this._autoPlay = true;
        this.addLoadListener(function() {
            if (this._autoPlay) {
                this.play(loop, offset);
            }
        }.bind(this));
    }
};

In conclusion, this means any sound or music piece is first download as a whole, then decoded as a whole and only then it starts playing. This process can take many actual seconds, I observed delays up to 6-7 seconds for a song to start playing even in a local(!) game where no download and only decoding is required. In HTML5-delivered web games, the problem is obviously potentially a lot worse.

This is the infamous audio lag problem that plagues RPG Maker MV for all things audio. Therefore, as a conclusion this code really should be changed so that:

  1. decoding starts before the download is completed
  2. playback starts before decoding is completed

Then, all audio lag problems with sounds and music should be solved, except for cases with a really sluggy internet connection in HTML5 games. Those can only ever work nicely if everything is preloaded completely, which is by the way also what this plugin workaround hack does: https://forums.rpgmakerweb.com/index.php?threads/webaudio-cache-experimental.51422/ but obviously this is bad for regular desktop games since it will need more memory and increase loading time by a lot, so this isn't a good solution.

Spelling errors in comments #Game_BattlerBase.js

e.g. DEFense CouNTer GuaRD...

    // Hit Points
    hp: { get: function() { return this._hp; }, configurable: true },
    // Magic Points
    mp: { get: function() { return this._mp; }, configurable: true },
    // Tactical Points
    tp: { get: function() { return this._tp; }, configurable: true },
    // Maximum Hit Points
    mhp: { get: function() { return this.param(0); }, configurable: true },
    // Maximum Magic Points
    mmp: { get: function() { return this.param(1); }, configurable: true },
    // ATtacK power
    atk: { get: function() { return this.param(2); }, configurable: true },
    // DEFense power
    def: { get: function() { return this.param(3); }, configurable: true },
    // Magic ATtack power
    mat: { get: function() { return this.param(4); }, configurable: true },
    // Magic DeFense power
    mdf: { get: function() { return this.param(5); }, configurable: true },
    // AGIlity
    agi: { get: function() { return this.param(6); }, configurable: true },
    // LUcK
    luk: { get: function() { return this.param(7); }, configurable: true },
    // HIT rate
    hit: { get: function() { return this.xparam(0); }, configurable: true },
    // EVAsion rate
    eva: { get: function() { return this.xparam(1); }, configurable: true },
    // CRItical rate
    cri: { get: function() { return this.xparam(2); }, configurable: true },
    // Critical EVasion rate
    cev: { get: function() { return this.xparam(3); }, configurable: true },
    // Magic EVasion rate
    mev: { get: function() { return this.xparam(4); }, configurable: true },
    // Magic ReFlection rate
    mrf: { get: function() { return this.xparam(5); }, configurable: true },
    // CouNTer attack rate
    cnt: { get: function() { return this.xparam(6); }, configurable: true },
    // Hp ReGeneration rate
    hrg: { get: function() { return this.xparam(7); }, configurable: true },
    // Mp ReGeneration rate
    mrg: { get: function() { return this.xparam(8); }, configurable: true },
    // Tp ReGeneration rate
    trg: { get: function() { return this.xparam(9); }, configurable: true },
    // TarGet Rate
    tgr: { get: function() { return this.sparam(0); }, configurable: true },
    // GuaRD effect rate
    grd: { get: function() { return this.sparam(1); }, configurable: true },
    // RECovery effect rate
    rec: { get: function() { return this.sparam(2); }, configurable: true },
    // PHArmacology
    pha: { get: function() { return this.sparam(3); }, configurable: true },
    // Mp Cost Rate
    mcr: { get: function() { return this.sparam(4); }, configurable: true },
    // Tp Charge Rate
    tcr: { get: function() { return this.sparam(5); }, configurable: true },
    // Physical Damage Rate
    pdr: { get: function() { return this.sparam(6); }, configurable: true },
    // Magical Damage Rate
    mdr: { get: function() { return this.sparam(7); }, configurable: true },
    // Floor Damage Rate
    fdr: { get: function() { return this.sparam(8); }, configurable: true },
    // EXperience Rate

Additional Feature System

community-1.3 added some new features.
However, some of them include "destructive" changes.
This may cause destruction of old plugins.

So, we made it possible for creators to turn on and off new "destructive" features freely.
They can be enabled from Community_Basic.js or other plugins.

See #120

Performance boost when there are many actors

FPS drops when there are many(<100?) actors. It is caused by z-sorting.

We consider to change sorting algorithm.

Suggestion 1: insertion sort
Suggestion 2: roughly sort by bucket sort, and quick sort.

any ideas?

Extending the PluginManager functions

So since MV got out it's offered a lots with the PluginManager
Although the way it's approach kinda make it Messy? and sometime it's cluther the plugin with TONS of codes peoples might not always understand.
on a more precise point it's lacks some functions who would shorten the plugin dev (e.g Boolean or array in plugin parameters) or sometime they aren't really clear in what they do.

So I worked on a pluginManager extender plugin who extends the current PluginManager for offers "shortening" methods who make the code more clear and simplify the plugin dev job in my opinion

I would like to offers that the functions I created would be merged with the original PluginManager so people can use them for shortening their workload and make them more clear.

OBVIOUSLY I wouldn't ask credit for it and you guys are REALLY up to edit the codes for make them more performant. I want to contribute for make MV betters!

then here the link of my original plugin :
https://github.com/niokasgami/EmojiEngine/blob/master/Emoji_Dev/Emoji_Dev/bin/Tool%20Plugin/PluginManagerExtender.js

thanks for your further answer!

Fix box calculation

When default screen resolution changed, status window shows incorrect.

This was fixed in my branch.
I'll make PR and notice here.

Graphics._setupCssFontLoading Issue when deployed to Android

If we deploy to Android, the following issue appears:

pixi.js:26471
TypeError: undefined is not a function
at Function.Graphics._setupCssFontLoading (http://localhost:58900/js/rpg_core.js:1777:30)
at Function.Graphics.initialize (http://localhost:58900/js/rpg_core.js:1771:10)
at Function.SceneManager.initGraphics (http://localhost:58900/js/rpg_managers.js:1822:14)
at Function.SceneManager.initialize (http://localhost:58900/js/rpg_managers.js:1811:10)
at Function.SceneManager.run (http://localhost:58900/js/rpg_managers.js:1802:14)
at window.onload (http://localhost:58900/js/main.js:8:18) rpg_managers.js:1949

From our understanding, this is caused by the Graphics.js. We checked the code and could not find what could be causing it. Any thoughts?

duplicate _renderWebGL function in TilingSprite.js

I noticed that TillingSprite have 2 _renderWebGL method on line 59 and 200.

line 59:

TilingSprite.prototype._renderWebGL = function(renderer) {
    if (this._bitmap) {
        this._bitmap.touch();
    }
    if (this.texture.frame.width > 0 && this.texture.frame.height > 0) {
        if (this._bitmap) {
            this._bitmap.checkDirty();
        }
        this._renderWebGL_PIXI(renderer);
    }
};

line 200:

TilingSprite.prototype._renderWebGL = function(renderer) {
    if (this._bitmap) {
        this._bitmap.touch();
        this._bitmap.checkDirty();
    }

    this._speedUpCustomBlendModes(renderer);

    this._renderWebGL_PIXI(renderer);
};

it is intended?

Performance drop

There is noticeable performance drop between stable 1.4.0 version and OSS
I have create new project with RMMV 1.4.0 PC version and start playtest. Test map contains only player and 1 event who does nothing, without any plugins. Performance was great stable 60 fps. After that i compile OSS project like instruction says with node.js. Then add OSS files to project, what i create earlier, with replacement. Playtest starts with no problem, but i noticed that performance is different then before. Now average fps is ~48, i wait some time and call menu few times, and average fps on map goes up to ~54.
Is this normal for this stage of development?
Sorry if i create this topic in wrong place. I'm not familiar with github.

Need more details about test at README.md

README.md says

To test, place MVโ€™s project in game/ and type
npm test

I copy all files from project folder (contains Game.rpgproject) to ./game/ directory.
But error occurs (TypeError undefined is not a function(TestPlay in Editor) or TypeError WebAudio.Initialize is not a function(Open Index.html at firefox) ).

Is this method correct or something wrong?

[Mechanic] HP/MP rounding error with equipment

Reproducible: Yes
Impact: Low

When changing equipment, it is possible to lose/gain HP/MP due to the underlying data being stored as an integer instead of a float. RMMV recalculates the new stat value (after equipment change) to be as close to the previous percentage as possible, but then stores the new rounded value instead of the intended percentage. Because of this, undoing the most recent equip can cause the player to lose or gain HP/MP until either 1 HP or full HP is achieved (depending on the value change of the equipment and the starting values of the characters HP/MP).

I'm afraid you addressed the very problem that plagues most RM users. Because it's stored as an integer and not a float, HP gets continuously lost. I'm afraid there's not a valid solution to it that prevents abuse of unequipping repetition other than reducing HP each time without rewriting the base structure of MV. Sorry I couldn't be of more help here.
-Yanfly

67ad1f4e-255b-11e7-8358-c42a5268626d

Licesing Questions

ใ“ใ‚“ใซใกใฏใ€MIT License ใงใƒชใƒชใƒผใ‚นใ•ใ‚ŒใŸcorescriptใฎ
ใƒฉใ‚คใ‚ปใƒณใ‚นไธŠ่จฑๅฏใ•ใ‚Œใ‚‹ไบ‹้ …ใซใคใ„ใฆ่ณชๅ•ใŒใ‚ใ‚Šใพใ™ใ€‚

[1]
RPGใƒ„ใ‚ฏใƒผใƒซMVใงใ‚จใƒ‡ใ‚ฃใƒƒใƒˆใ•ใ‚ŒใŸใ‚ฒใƒผใƒ ใฎใ‚นใ‚ฏใƒชใƒ—ใƒˆ้ƒจๅˆ†(RTP็ด ๆใชใฉใ‚’ใ‚‚ใกใ‚ใ‚“้™คใ)ใ‚’MIT Licenseใชใฉ(Apache 2.0, BSDL, GNU GPLใชใฉใธใฎใ‚ตใƒ–ใƒฉใ‚คใ‚ปใƒณใ‚นใ‚‚ๅซใ‚€)ใฎไธ‹ใงใ‚ฒใƒผใƒ ใจใ—ใฆๅ…ฌ้–‹ใ™ใ‚‹ใ“ใจใฏๅฏ่ƒฝใงใ™ใ‹๏ผŸ
ใ“ใ“ใงใ„ใ†ใ‚นใ‚ฏใƒชใƒ—ใƒˆใจใฏ(ใ“ใฎใƒชใƒใ‚ธใƒˆใƒชใงๅ…ฌ้–‹ใ•ใ‚Œใฆใ„ใ‚‹)corescript + ๅ…ฌ้–‹่€…ใŒ่‡ชใ‚‰ๆ›ธใ„ใŸใ‚ณใƒผใƒ‰ใจใƒฉใ‚คใ‚ปใƒณใ‚นใซใ‚ˆใ‚‹่จฑ่ซพใ‚’ๅพ—ใฆไฝฟใฃใฆใ„ใ‚‹ใ‚ณใƒผใƒ‰ใ‚’ๆŒ‡ใ—ใพใ™ใ€‚

[2]
ใƒ„ใ‚ฏใƒผใƒซใ‚ทใƒชใƒผใ‚บๅˆฉ็”จ่จฑ่ซพใซใฏไปฅไธ‹ใฎใ‚ˆใ†ใช่จ˜่ฟฐใŒใ‚ใ‚Šใพใ™ใ€‚
https://tkool.jp/support/guideline

็ด ๆๅˆฉ็”จใฎๅˆถ้™
ใŠๅฎขๆง˜ใฏไธŠ่จ˜ๅฏพ่ฑก่ฃฝๅ“ไธ€่ฆงไธญใฎใ€Žใƒ„ใ‚ฏใƒผใƒซใ‚ทใƒชใƒผใ‚บใ€ใฎใ‚ฝใƒ•ใƒˆใ‚ฆใ‚งใ‚ขใซๅŽ้Œฒใ•ใ‚Œใฆใ„ใ‚‹้Ÿณๆฅฝใ€็”ปๅƒใ€ๆ–‡็ซ ใชใฉใ€ใ™ในใฆใฎใƒ‡ใƒผใ‚ฟใ‚’ใ€ๅŒใ˜ใไธŠ่จ˜ๅฏพ่ฑก่ฃฝๅ“ไธ€่ฆงไธญใฎใ€Žใƒ„ใ‚ฏใƒผใƒซใ‚ทใƒชใƒผใ‚บใ€ใงใ‚ฒใƒผใƒ ใ‚’ไฝœๆˆใ™ใ‚‹ๅ ดๅˆใซใŠใ„ใฆใฎใฟๅˆฉ็”จใงใใพใ™ใ€‚ๆ ชๅผไผš็คพKADOKAWA๏ผˆไปฅไธ‹ใ€ŒๅผŠ็คพใ€ใจใ„ใ†๏ผ‰ใ‹ใ‚‰ใฎๆ–‡ๆ›ธใซใ‚ˆใ‚‹ๆ‰ฟ่ซพใ‚’ๅพ—ใšใซใ€่‡ชไฝœใƒ—ใƒญใ‚ฐใƒฉใƒ ใ€ใŠใ‚ˆใณไป–็คพใฎใ‚ฒใƒผใƒ ไฝœๆˆใƒ„ใƒผใƒซใชใฉใงไฝœๆˆใ—ใŸไฝœๅ“ใซใƒ‡ใƒผใ‚ฟใ‚’ๅŽ้Œฒใ€ๅˆฉ็”จใ™ใ‚‹ใ“ใจใ‚’ไธ€ๅˆ‡็ฆๆญขใ—ใพใ™ใ€‚

็ด ๆใฎๆ”นๅค‰
ไธŠ่จ˜ๅฏพ่ฑก่ฃฝๅ“ไธ€่ฆงไธญใฎใ€Žใƒ„ใ‚ฏใƒผใƒซใ‚ทใƒชใƒผใ‚บใ€ใฎใ‚ฝใƒ•ใƒˆใ‚ฆใ‚งใ‚ขใซๅŽ้Œฒใ•ใ‚Œใฆใ„ใ‚‹้Ÿณๆฅฝใ€็”ปๅƒใ€ๆ–‡็ซ ใชใฉใฎใƒ‡ใƒผใ‚ฟใ‚’ใ€ๅŒใ˜ใไธŠ่จ˜ๅฏพ่ฑก่ฃฝๅ“ไธ€่ฆงไธญใฎใ€Žใƒ„ใ‚ฏใƒผใƒซใ‚ทใƒชใƒผใ‚บใ€ใงใ‚ฒใƒผใƒ ใ‚’ไฝœๆˆใ™ใ‚‹ๅ ดๅˆใซใŠใ„ใฆๆ”นๅค‰ใ—ใฆๅˆฉ็”จใ™ใ‚‹ใ“ใจใŒๅฏ่ƒฝใงใ™ใ€‚ใพใŸใ€็‰นๅฎšใฎ่ฃฝๅ“๏ผˆโ€ป๏ผ’๏ผ‰ใ‚’้™คใใ€ใ“ใ‚Œใ‚‰ใฎๅŽ้Œฒ็ด ๆใ‚’ๅ…ƒใซไฝœๆˆใ—ใŸ็ด ๆใซใคใ„ใฆ้…ๅธƒใ™ใ‚‹ใ“ใจใ‚‚ๅฏ่ƒฝใงใ™ใ€‚ใŸใ ใ—ใ€ๆ”น้€ ใ—ใŸ็ด ๆใ‚’ใ€ๅ˜ไฝ“ใงๆœ‰ๅ„Ÿ้…ๅธƒ๏ผˆ่ฒฉๅฃฒ๏ผ‰ใ™ใ‚‹ใ“ใจใฏ่ชใ‚ใ‚‰ใ‚Œใพใ›ใ‚“ใ€‚ใใ‚Œไปฅๅค–ใงใฎไฝฟ็”จใ‚’็›ฎ็š„ใจใ™ใ‚‹ๆ”นๅค‰ใฏ็ฆๆญขใ—ใพใ™ใ€‚ใชใŠใ€ไธ€้ƒจใฎใ‚ตใƒณใƒ—ใƒซใ‚ฒใƒผใƒ ใซใคใ„ใฆใฏใ€ๅˆถไฝœ่€…ใจใฎๅฅ‘็ด„ไธŠใ€็ด ๆใฎ๏ผ’ๆฌกๅˆฉ็”จใŒ่ชใ‚ใ‚‰ใ‚Œใพใ›ใ‚“๏ผˆโ€ป๏ผ‘๏ผ‰ใ€‚
้…ๅธƒๅฏ่ƒฝใชไพ‹๏ผ‰RPGใƒ„ใ‚ฏใƒผใƒซVXใฎRTPใซๅ…ฅใฃใฆใ„ใ‚‹ใ‚ญใƒฃใƒฉใ‚ฏใ‚ฟใƒผใ‚ฐใƒฉใƒ•ใ‚ฃใƒƒใ‚ฏใฎ้ซชใฎๆฏ›ใฎ่‰ฒใ‚’ๅค‰ใˆใŸ็ด ๆใ‚’ใ€่‡ชๅˆ†ใฎใ‚ตใ‚คใƒˆใงใƒ„ใ‚ฏใƒผใƒซ็”จ็ด ๆใจใ—ใฆ้…ๅธƒใ™ใ‚‹ใ€‚

ใƒ„ใ‚ฏใƒผใƒซ้–“ใฎ็ด ๆใฎๆต็”จ
ๅผŠ็คพใƒ„ใ‚ฏใƒผใƒซใ‚ทใƒชใƒผใ‚บใ‚’่ค‡ๆ•ฐ็ต„ใฟๅˆใ‚ใ›ใฆใ‚ฒใƒผใƒ ไฝœๅ“ใ‚’ไฝœๆˆใ™ใ‚‹ๅ ดๅˆใฏใ€ไฝฟ็”จใ™ใ‚‹ใƒ„ใ‚ฏใƒผใƒซใ‚ทใƒชใƒผใ‚บใ™ในใฆใซใคใ„ใฆใ€ๅ„่ฃฝๅ“ๆ‰€ๅฎšใฎๆ–นๆณ•ใงๆญฃ่ฆใฎใƒฆใƒผใ‚ถใƒผ็™ป้ŒฒใŒๅฎŒไบ†ใ—ใฆใ„ใ‚‹ใ“ใจใŒๆกไปถใจใชใ‚Šใพใ™ใ€‚ใชใŠใ€ไธ€้ƒจใฎใ‚ตใƒณใƒ—ใƒซใ‚ฒใƒผใƒ ใซใคใ„ใฆใฏใ€ๅˆถไฝœ่€…ใจใฎๅฅ‘็ด„ไธŠใ€็ด ๆใฎ๏ผ’ๆฌกๅˆฉ็”จใŒ่ชใ‚ใ‚‰ใ‚Œใพใ›ใ‚“๏ผˆโ€ป๏ผ‘๏ผ‰ใ€‚

ใ‚‚ใกใ‚ใ‚“RPGใƒ„ใ‚ฏใƒผใƒซMVใฎๅ…ฌๅผใซ่ฒฉๅฃฒใ•ใ‚Œใฆใ„ใ‚‹ใ‚จใƒ‡ใ‚ฃใ‚ฟใ‹ใ‚‰ไฝœใ‚‰ใ‚ŒใŸใ‚ฒใƒผใƒ ไฝœๅ“ใฏ
ใ“ใ“ใงใ„ใ†ใƒ„ใ‚ฏใƒผใƒซใ‚ทใƒชใƒผใ‚บใซ่ฉฒๅฝ“ใ™ใ‚‹ใจๆ€ใ‚ใ‚Œใพใ™ใŒใ€ไปฅไธ‹ใฎๅ ดๅˆใƒ„ใ‚ฏใƒผใƒซใ‚ทใƒชใƒผใ‚บใซ่ฉฒๅฝ“ใ—ใ€
RTPใƒ‘ใƒƒใ‚ฑใƒผใ‚ธใชใฉใฎ้…ๅธƒใƒปๅˆฉ็”จ่ฆ็ด„ใ‚’ๆบ€ใŸใ™ใงใ—ใ‚‡ใ†ใ‹๏ผŸ

  1. RPGใƒ„ใ‚ฏใƒผใƒซMVใฎๅ…ฌๅผใ‚จใƒ‡ใ‚ฃใ‚ฟใ‹ใ‚‰ๅ‡บๅŠ›ใ—ใŸไฝœๅ“ใฎcorescriptใฎ้ƒจๅˆ†ใ‚’GitHubไธŠใฎcorescriptใง็ฝฎใๆ›ใˆใŸๅ ดๅˆ (ใƒ†ใ‚นใƒˆ็›ฎ็š„ใ‚„ๆ–ฐๆฉŸ่ƒฝใ‚’ไฝฟใ†็›ฎ็š„ใงDevelopใƒ–ใƒฉใƒณใƒใ‚’่ฝใจใ—ใฆใใฆ็ฝฎใๆ›ใˆใ‚‹ใ“ใจใชใฉใŒๆƒณๅฎšใ•ใ‚Œใ‚‹)

  2. corescriptใ‚’่‡ชๅˆ†ใฎ็”จ้€”ใ‚’ๆบ€ใŸใ™ใ‚ˆใ†ใซใƒ•ใ‚ฉใƒผใ‚ฏใ—ใฆใ€1ใจๅŒๆง˜ใซ็ฝฎใๆ›ใˆใŸๅ ดๅˆ
    (ใ“ใฎๅ ดๅˆใ€rpgtkoolmv/corescriptใซใƒ‘ใƒƒใƒใŒใƒžใƒผใ‚ธใ•ใ‚Œใฆใ„ใ‚‹ใจใฏ้™ใ‚‰ใชใ„)

  3. rpgtkoolmv/corescriptใ‚’ใƒ•ใ‚ฉใƒผใ‚ฏใ—ใฆๅˆฅใฎใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใŒ็ซ‹ใกไธŠใŒใฃใฆใ„ใฆใ€ใใฎใ‚นใ‚ฏใƒชใƒ—ใƒˆใ‚’ไฝฟใฃใŸๅ ดๅˆ
    (ๅคงๅน…ใซๆ”นๅค‰ใŒใ•ใ‚Œใ€ใปใจใ‚“ใฉๅˆฅ็‰ฉใซใชใฃใฆใ„ใ‚‹ๅ ดๅˆใ‚‚ๆƒณๅฎšใ•ใ‚Œใ‚‹)

  4. RPGใƒ„ใ‚ฏใƒผใƒซMVไปฅๅค–ใฎใ‚จใƒ‡ใ‚ฃใ‚ฟใ‚’ไฝฟ็”จใ—ใ€ไฝœๆˆใ•ใ‚ŒใŸใ‚ฒใƒผใƒ ไฝœๅ“ใ ใŒ
    corescriptใงใ‚‚ๅ‹•ไฝœใ™ใ‚‹ใ‚ˆใ†ใซไบ’ๆ›ๆ€งใŒใ‚ใ‚‹ๅ ดๅˆ

Auto Save System

In browser version of RMMV games, resources are downloaded via the network.
So, the game may be interrupted suddenly out of the coverage area. (especially on mobile phones)
Therefore, it is convenient if the game is autosaved regularly.

This is a new "destructive" feature, so it is implemented as an Additional Feature System.
See #120

Let's use WebGL on all devices!

In the previous RMMV, we have used Canvas or WebGL mode properly.
Especially in mobile devices, Canvas mode has always been used.
This is because memory is not managed in the WebGL mode, eventually OutOfMemoryError occurs.
However, since WebGL operates at high speed and has advanced functions like filter, it was a waste not to use it.

Right now, "fix memory bloat" (#13) is proposed and RMMV is trying to get memory management.
Therefore, there is no longer any obstacle to using WebGL mode.
Now, let's take full advantage of WebGL mode and bring better RMMV to all users!

See PR #29

conflict check for plugins Proposal (with code)

I wrote a plugin that uses ES6's Proxies to observe many game objects and all managers.

You can find it here

My idea is to improve on it until it is able to show common conflicts and eventually suggest solutions. The best part about it is that plugin makers wouldn't be forced to implement any new code. Then again, eventually, a more structured and mature dependency tree could be suggested.
I know that this is not the priority of the engine right now, but I'd love to hear your thoughts on it.

Cons of my idea: At the time being, only modern browsers are supported and the shipped NW.js version of MV does not have support for ES6 Proxies. This could (eventually) be solved.

Unable to preventDefault inside passive event listener due to target being treated as passive.

On Chrome for Android 61, when user click anywhere inside screen, there will be a warning displayed:

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080
TouchInput._onTouchStart @ rpg_core.js:3320

Meanwhile, the click will be trigger 2 times, you will here 2 times SE and your switch will changed twice.

According to https://www.chromestatus.com/features/5093566007214080, ontouchstart listener become passive by default after Chrome 56, which means you cannot preventDefault inside it.

makeVideoPlayableInline is not defined

After replacing the scripts in my project folder with the ones from here, I get this error appear when trying to run my project. Commenting out the call to makeVideoPlayableInline() in the scripts fixes this issue.

RMMV: 1.4.0
corescript: 1.2c
OS: Windows 10 x64 (Creators Update)

Typescript conversion

First of all before peoples misunderstand I am not asking to convert MV to typescript
I am just asking if it's possible to allow me to make a d.ts or a definition files for MV corescript (and later to make a version in typescript who follow the corescript dev alongside.)

Obviously, the reason I say this is that sometime some game dev like me wish to have access to a more strict coding environnement for their game (and obviously are not using plugin because...I know how typescript doesn't like when you edit a class)

so for being simple I would like to make a conversion of the CoreScript (or a definition file ups to you) for the peoples who enjoy programming with typescript.

I will obviously not ask you guys to do it I can Happily do it myself and pull it as a new branch.

The Pros of this are the fact it's offers a stable strict environnment and good debugging
The cons are probably it's may be a little strict when it's come to plugin although it's perfect for Standalone dev
I hope you will like the idea :3

Versioning Scheme in Utils.RPGMAKER_VERSION

Some says It's not preferable to edit Utils.RPGMAKER_VERSION.

Suggestion is:
Make Utils.RPGMAKER_ENGINE parameter, and edit it.

I think this suggestion is good.
Like this:
Utils.RPGMAKER_ENGINE = 'dev-1.1';

I want to follow this suggestion, Is there any ideas?

NPM package for the corescript

I do know this supposed to be used under the licenses of MV,
but wouldn't be nice to have access to the NPM package of the MV corescript for add them as dependencies for some plugin projects? so peoples can install them easily (or avoid to having to like go fetch the files directly from the github each time).

But on another side you also just want to have it as a module and not a in the whole projects (e.g dev a plugin for it)

I hope this could be a good idea for it!

Review PAST changes before proceeding

This core script has already been largely changed from the original core script.
So, we should review these changes first and foremost.

Suggestion: Re-push the original core script and send PR of past changes

ShaderTilemap, very hard to manage, how add child in ZLayer or befor ?

how and when to add layers when map build?
I try in several classes, but impossible.
I want to avoid rewriting the pixi code, but I want to add child to this place.
did you have triks ?

//TODO: faire un scan de tous les layer possible, et ajouter de haut en bas. Le scan peut etre fait au debut dans le plugin parameter
Scene_Map.prototype.addPictureAniLayers = function(aniLayersContainers) {
    var tilemap = this._spriteset._tilemap;
    //create all layer, but need check if we assign special rmmv layer
    for(layer in aniLayersContainers){
        if( aniLayersContainers[layer]._asignedRmmvLayer ){ // if assigned rmmv zLayer
            var layerGameName = aniLayersContainers[layer]._asignedLayerGame;
            if(layerGameName==='belowEvents'){ // couche sous Event dans lowerZLayer
                var Z = tilemap.lowerZLayer.z;
                tilemap.addChildAt(aniLayersContainers[layer],0); // why i can no add all child to 0
            }
            
        }else{ // default Top Picture ZLayer
            this.addChild(aniLayersContainers[layer]);
            
        }
        
    }
   
};

the addChildAt work one time , but after , they go in middle ???

MadeWithMV.js hides "Scene_Splash" definition inside (function() { ... }) block, therefore makes it unmoddable

I know this plugin isn't contained in the repository right now, but this seems to be one of the best places to report such issues:

MadeWithMV.js hides "Scene_Splash" definition inside (function() { ... }) block, therefore makes it unmoddable. This is how the code looks like now:

(function() {

// ...

    //-----------------------------------------------------------------------------
    // Scene_Splash
    //
    // The scene class for dealing with the splash screens

    function Scene_Splash() {
        this.initialize.apply(this, arguments);
    }

    Scene_Splash.prototype = Object.create(Scene_Base.prototype);
    Scene_Splash.prototype.constructor = Scene_Splash;

    Scene_Splash.prototype.initialize = function() {
        // ...
    }
// ...

})();

This means Scene_Splash is hidden in the inner scope, and cannot be changed by any later plugin that wants to modify its behavior by wrapping some of the functions (which is what most plugins do).

Instead, it should be written like this (or similar):

//-----------------------------------------------------------------------------
// Scene_Splash
//
// The scene class for dealing with the splash screens.
// This is just the constructor, implementation is defined below.

function Scene_Splash() {
    this.initialize.apply(this, arguments);
}

(function() {

// ...

    //-----------------------------------------------------------------------------
    // Scene_Splash
    //
    // The scene class for dealing with the splash screens.
    // Constructor is above, this is the rest of the implementation.

    Scene_Splash.prototype = Object.create(Scene_Base.prototype);
    Scene_Splash.prototype.constructor = Scene_Splash;

    Scene_Splash.prototype.initialize = function() {
        // ...
    }
// ...

})();

Custom JSON data Path loading for Plugins creators

Hi,
so here a proposal I would like to make who might a little break the current code but WOULDN'T make all codes invalid for older plugins.

it's the : Custom Loading path for data json
As MV comes with a way of loading JSON or data it's all cluther in one place wich is goodfor the default MV data, but what when you have to load plugin JSON? one is fine...but what about when you have like 20 of them? it's can get a little messy and especially if you have TONS of json for the same plugin.

so my proposal was to implement a possibilities to let create custom subFolders paths to the data folder.

why? simply for allow more organisation and keep the sanity of some users who don't want to have to search in bazillions of JSON files so keeping them organized would help them.

So without further word here a sample of how we could aproach it.

/**
 * Implement a new optionnal property syntax for the databasefile array
 * named "path" who permit to load the json in a different subfolders.
 * it's may not working for native json though well for loading in editor.
 * 
 * the syntax is path : 'SomePath/OtherFolder/'
 */
DataManager._databaseFiles = [
    { name: '$dataActors',       src: 'Actors.json'       },
    { name: '$dataClasses',      src: 'Classes.json'      },
    { name: '$dataSkills',       src: 'Skills.json'       },
    { name: '$dataItems',        src: 'Items.json'        },
    { name: '$dataWeapons',      src: 'Weapons.json'      },
    { name: '$dataArmors',       src: 'Armors.json'       },
    { name: '$dataEnemies',      src: 'Enemies.json'      },
    { name: '$dataTroops',       src: 'Troops.json'       },
    { name: '$dataStates',       src: 'States.json'       },
    { name: '$dataAnimations',   src: 'Animations.json'   },
    { name: '$dataTilesets',     src: 'Tilesets.json'     },
    { name: '$dataCommonEvents', src: 'CommonEvents.json' },
    { name: '$dataSystem',       src: 'System.json'       },
    { name: '$dataMapInfos',     src: 'MapInfos.json'     },
    {name: '$globalDummy', src: 'Dummy.json', path: 'dummyFolder/OtherDummyFolder/'} 
// purely a example
];

/**
 * Overwrite the current loadDatabase function for add a new local variable named : path.
 * who merelly push the path data inside loadDataFile
 */
DataManager.loadDatabase = function() {
    var test = this.isBattleTest() || this.isEventTest();
    var prefix = test ? 'Test_' : '';
    for (var i = 0; i < this._databaseFiles.length; i++) {
        var name = this._databaseFiles[i].name;
        var src = this._databaseFiles[i].src;
        var path = this._databaseFiles[i].path; 
        this.loadDataFile(name, prefix + src, path);
    }
    if (this.isEventTest()) {
        this.loadDataFile('$testEvent', prefix + 'Event.json');
    }
};

/**
 * This method is overwrited the most for change is arguments paths ALTHOUGH,
 * the path param is optionnal and can be ignored if the path value is not entered.
 * Shouldn't provoke any bug.
 * @param {String} name The name of the global variable.
 * @param {String} src The Json name.
 * @param {String} [path] The json path.
 */
DataManager.loadDataFile = function(name, src,path) {
    var xhr = new XMLHttpRequest();
    var url;
    if(!path || path !== undefined){
        url = 'data/' + path + url;
    } else {
        url = 'data/' + url;
    }
    xhr.open('GET', url);
    xhr.overrideMimeType('application/json');
    xhr.onload = function() {
        if (xhr.status < 400) {
            window[name] = JSON.parse(xhr.responseText);
            DataManager.onLoad(window[name]);
        }
    };
    xhr.onerror = function() {
        DataManager._errorUrl = DataManager._errorUrl || url;
    };
    window[name] = null;
    xhr.send();
};

Bitmap.prototype.getAlphaPixel return the wrong type

Hello,
I noticed meanwhile working on the typescript conversion I noticed that
Bitmap.prototype.getAlphaPixel is supposed to return a String although my linter show it's return an Uint8ClampedArray

wich is making the documentation wrong.

I suggest for fix this to either change the return type from the comment from String to Uint8ClampedArray or to do this :

    Bitmap.prototype.getAlphaPixel = function(x,  y) {
        var data = this._context.getImageData(x, y, 1, 1).data;
        return data[3].toString();
    };

thanks for your time!

Picture delay, difference between OSS releases

There is difference between OSS release v1.2b and v1.2c
And i mean not good difference for user.
v1.2b fix pictures delay when they shows for the first time and it was great.
But in v1.2c delay appear again and delay present in new RMMV 1.5.0 version.
It was done for a reason or its just a bug?
Sorry for my bad English. Here is some examples to make it more clear:
How its look like in v1.2b - link
How its look like in v1.2c - link

add master volume control for RPG Atsumaru

Probrem

Currently, default tkool engine volumes(BGM BGS, ME, SE) are all 100%.
So, when we open a game, we hear the noisy title sound many times.
We just want to turn down default volume, but KADOKAWA says it's by design.

Idea(draft)

I want to put two new master volume control APIs to RPG Atsumaru API (atsumaru.js).
First API will be to get current volume, other API will be to subscribe volume change event.
This volume will be changed by volume control ui at RPG Atsumaru site (like Niconico Douga or Youtube)

Master volume will take effect on that 4 volumes. For example, if BGM volume will be 60% and master volume is 50%, so this game will play BGMs 30% volume.

Volume control ui will be displayed when corescript subscribe the API, because I think it's not good to display when playing a game not supported volume control APIs.

Where to discuss version 1.2

Goal: Responding to problems where games can not continue

  • Retry at load error
  • Development of a standard plugin for options

New Plugin Command Proposal

New Plugin Command Proposal

I'm going to make this proposal over at the forums on rmweb but I figured I would also create a feature issue here and see what developers think about it. Maybe you have other ideas for a way to handle everything, either way, we can brainstorm together. Maybe it's just not possible on the editor side of things but it's worth the proposal either way.

The Plugin Command Parameter Tags

New Plugin Command Selection Window

@command Layers

@action add
@text Add Layer
@parent Layers
@type struct<LayerAdd>
@desc Add layer to the map.

@action refresh
@text Refresh Layer
@parent Layers
@desc Remove and re-add all layers

@param Quest

@action start
@text Start
@parent Quest
@type number
@desc Start a quest and add to journal.
@default 0

@action complete
@text Complete Quest
@parent Quest
@type number
@desc Complete a quest
@default 0

PluginManager Handling

All pseudo code, was kind of rushed but general idea is here.
We will need a few extra methods in the PluginManager to register, retrieve and check existence

PluginManager.registerCommand(command, actions) {
  this._commands[command] = actions
}
PluginManager.isCommand(command) {
  return typeof this._commands[command] !== 'undefined'
}
PluginManager.retrieveCommand(command) {
  if  (this.isCommand(command)) {
    return this._command[command]
  }
}

All commands are registered by the plugin developer, and it's simply an object with functions. They're always a function which has the arguments passed into them.

  PluginManager.registerCommands('layer', {
    add: function (data) { /* Do Stuff */ },
    refresh: function (data) { /* Do Stuff */ },
    remove: function (data) { /* Do Stuff */ }
  })

Game Interpreter Handling

When calling a plugin command from an event, clicking okay will simply add the plugin command to the event list just like a plugin parameter.

layers add {"type":"static","mapId":"1","x":"0","y":"0","z":"1","opacity":"255","blend":"1"}

Rather than the developer alias Game_Interpreter.prototype.pluginCommand method, RMMV would simply handle the command. But, for backward compatibility aliasing is still possible.

For further backward compatibility, we still use the pluginCommand() args argument to determine which action should be applied.

Game_Interpreter.prototype.pluginCommand = function(command, args) {
    var actions = PluginManager.retrieveCommand(command)
    if (actions) {
      var action = actions[args[0]]
    if (typeof action === 'function') {
    //Upon apply of function, we can add important information from the event for use with all plugin commands.
      command.apply(null, {
        // We can pass all args or just the 3rd element args[3]
        args: args[3]
        mapId: this._mapId,
        eventId: this._eventId,
        list: this._list
      })
    } else {
      throw new Error('Plugin command action must be a function')
    }
  }
};

For a plugin developer to use the information passed in you'd simply tap into the data object passed in from Game_Interpreter which also contains an args property. This args property is in JSON format just like plugin parameters and can be parsed using JSON.parse(data.args)

  PluginManager.registerCommands('layer', {
    add: function (data) {
      const args = JSON.parse(data.args)
      Layers.createConfig(data.mapId, args.id, {
        x: args.x,
        y: args.y,
        z: args.z
      })
     },
    refresh: function (data) { /* Do Stuff */ },
    remove: function (data) { /* Do Stuff */ }
  })

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.