Its been figured it out. See edit at bottom if curious.
So I have every other obtain item setup to show the icon and the name of the item when it is gotten from a chest/breakable/searchable place. I'm trying to write a plugin that modifies the battle obtain item since its the only place that wont show an icon with the \I[x] type command.
I found this:
BattleManager.displayDropItems = function() {
const items = this._rewards.items;
if (items.length > 0) {
$gameMessage.newPage();
for (const item of items) {
$gameMessage.add(TextManager.obtainItem.format(item.name));
}
}
};
Im assuming based on my limited understand of Javascript that the $gameMessage.add is where I would need the add code but I cant seem to find the correct code to add the icon. Does anyone now where i can find mesage code formats I can look at?
Thanks
Edit:
For those who are curious, what I did was create a plug in with this change.
BattleManager.displayDropItems = function() {
const items = this._rewards.items;
if (items.length > 0) {
$gameMessage.newPage();
for (const item of items) {
$gameMessage.add(TextManager.obtainItem.format(item.iconIndex, item.name));
}
}
};
In the Database > Terms section I changed the Obtain Item message to \I[%1]%2 was found! The was found can be what ever you want your obtain item message to be.
So I have every other obtain item setup to show the icon and the name of the item when it is gotten from a chest/breakable/searchable place. I'm trying to write a plugin that modifies the battle obtain item since its the only place that wont show an icon with the \I[x] type command.
I found this:
BattleManager.displayDropItems = function() {
const items = this._rewards.items;
if (items.length > 0) {
$gameMessage.newPage();
for (const item of items) {
$gameMessage.add(TextManager.obtainItem.format(item.name));
}
}
};
Im assuming based on my limited understand of Javascript that the $gameMessage.add is where I would need the add code but I cant seem to find the correct code to add the icon. Does anyone now where i can find mesage code formats I can look at?
Thanks
Edit:
For those who are curious, what I did was create a plug in with this change.
BattleManager.displayDropItems = function() {
const items = this._rewards.items;
if (items.length > 0) {
$gameMessage.newPage();
for (const item of items) {
$gameMessage.add(TextManager.obtainItem.format(item.iconIndex, item.name));
}
}
};
In the Database > Terms section I changed the Obtain Item message to \I[%1]%2 was found! The was found can be what ever you want your obtain item message to be.