Echizen-ham / SRPGcore

Tactical battle system for RPGtkool MV
http://www.lemon-slice.net/index.html
MIT License
20 stars 14 forks source link

Show skill info on map battle. #7

Closed ShoukangHong closed 2 years ago

ShoukangHong commented 2 years ago

Add log window to the map scene:

   var _SRPG_SceneMap_createAllWindows = Scene_Map.prototype.createAllWindows;
    Scene_Map.prototype.createAllWindows = function() {
        this.createLogWindow();
        _SRPG_SceneMap_createAllWindows.call(this);
    };

    Scene_Map.prototype.createLogWindow = function() {
        this._logWindow = new Window_BattleLog();
        this.addWindow(this._logWindow);
        this._logWindow.hide();
    };

    var _Scene_Map_srpgAfterAction = Scene_Map.prototype.srpgAfterAction;
    Scene_Map.prototype.srpgAfterAction = function() {
        this._logWindow.clear();
        this._logWindow.hide();
        _Scene_Map_srpgAfterAction.call(this);
    };

Also, in Scene_Map.prototype.srpgInvokeMapSkill, under user.useItem(action.item());, add this:

        if (!action._editedItem){ //this check is just for my AoE animation plugin, AoE and Agi attack message won't show up repeatedly
            this._logWindow.show();
            this._logWindow.displayAction(user, action.item());
        }

I'm not sure how where to add damage and state message and am not willing to do so... This looks good enough to me. It's compatible with simple MSG side view, and I don't think that plugin would have any effect on this. If you would like to use this solution please feel free to take the code.

DopanPlugins commented 2 years ago

if this is about showing the used skill name like "attack".. my edited core seperated the mapbattle "Scene_Map.prototype.srpgBattleStart" into several scenes , in order to Fix the preaction phase timing.(one scene happens after the other ,this fixes the codechain issue that broke the timing and let the preaction happen to late)

i also added a "gamemessage" function which always shows the name of the used skill or item

Echizen-ham commented 2 years ago

Thank you for the code! I am very interested in this feature. Personally, I think that processing with logWindow is more applicable, so I think it's better to replace it with the function I made. I'm also very interested in Dopan Plugins' plugins. Please give me some time to consider.