Wow, nobody answered those...
@10theodie10
It's very complicated.
If you want to set move route you would use
Code:
$gameMap.refreshIfNeeded();
$gameMap._interpreter.character(character_id).forceMoveRoute(object)
where character_id is :
- lesser than 0 you want to move the player
- 0 if you want to move this event
- event iD of specific event if you want to move specific event
And example of an "object" is
Code:
{
list : [ // This is list of actions
{code: 1, indent: null}, // code is iD of an action
{code: 2, indent: null}, // And I have no idea what indent is
{code: 0} // At the end, there should always be a code: 0
],
repeat: true, // If repeating the action
skippable: true, // "Skip If Cannot Move"
wait: false, // You don't really need this.
}
If you want event to "Wait for Completion" you would do :
Code:
$gameMap._interpreter.setWaitMode('route');
@Milena
I think you already got your answer, but you should use $dataMap.meta.your_note_name
@matthew30903
I think
Code:
yournumber - (yournumber % 5)
should work.
@TheGamedawg
There is a simple way to do such things.
For example, you can find a method where critical is executed by searching "critical" through code.
First occurence should be (at least when searching through Zalerinian's DevKit) in TextManager, where the line is
Code:
criticalToEnemy : TextManager.getter('message', 'criticalToEnemy'),
And then search for TextManager.criticalToEnemy .
First occurence : Window_BattleLog.prototype.displayCritical
Hmmm... Window is not a good place to do thing you requested, especially if some plugins remove it.
So let's look where Window_BattleLog.prototype.displayCritical is called.
First occurence : Window_BattleLog.prototype.displayActionResults
Hmmm... again, that not a good place.
Let's search where is Window_BattleLog instantiated.
You do that by searching for "new Window_BattleLog()"
First occurence : Scene_Battle.prototype.createLogWindow, line
Code:
this._logWindow = new Window_BattleLog();
So, that means we should search for
Code:
this._logWindow.displayActionResults
It's called on three places : BattleManager.invokeNormalAction, BattleManager.invokeCounterAttack and BattleManager.invokeMagicReflection.
I suppose you'll need something else then, this is still not the place either.
Look at line above this._logWindow.displayActionResults in BattleManager.invokeNormalAction : it's
Code:
this._action.apply(realTarget);
So, what is this._action?
You don't need to guess, we'll search for "this._action =".
First occurence : this._action = null.
Nah, it's not that.
Second occurence : this._action = action in BattleManager.startAction
What is "action"?
Several lines above :
Code:
var action = subject.currentAction();
What is "subject"?
One line above :
Code:
var subject = this._subject;
What is this._subject?
Search for "this._subject =" will have 4 results : in BattleManager.processTurn, BattleManager.processForcedAction, BattleManager.initMembers and BattleManager.updateTurn
BattleManager.processForcedAction is called when action is forced, so you might not need that.
BattleManager.processTurn is called when turn starts.
BattleManager.updateTurn is called between two actions
BattleManager.initMember is called when battle starts.
In this case, you'll need BattleManager.processTurn and BattleManager.updateTurn
In both there is a line :
Code:
this._subject = this.getNextSubject();
And what does this.getNextSubject(); do?
...
Do you understand it now?
Let me shorted your time, you are searching what this._action is, right?
It's instance if Game_Action, and in Game_Action.prototype.apply first line is :
Code:
var result = target.result();
target.result() is instance of Game_ActionResult, and Game_ActionResult has a property named "critical", so you can alias Game_Action.prototype.apply and add at the end :
Code:
if(result.critical)
{
// Do your things here
}
@gloopmaster
When are you accessing it?
Try to add console.log("something"); in Window_ActorCommand.prototype.setup and check if "something" is logged to console before you access it.