merchant enemy/battler? [SOLVED]

1700534026612.png

ive tried shop processing but it doesn't seem to work in battles
ive also tried setting a common event for when player has "x" status- open shop processing- & upon "yes"- applied the status & aborted the battle but that didnt seem to work either

i almost gave up on it but i still really love the idea of a merchant that you can attack if you wish
any ideas?

EDIT: I FOUND A WAY TO OPEN SHOP PROCESSING IN-BATTLE!
the method i used was this script call in the troop eventing
Spoiler: script call
goods = [[type, id, price_override_flag(, price)]]
SceneManager.call(Scene_Shop)
SceneManager.scene.prepare(goods, true)

# Example Script Call:
goods = [[0,1,1,25],[0,2,0]]
SceneManager.call(Scene_Shop)
SceneManager.scene.prepare(goods, true)
You could have the "Attack" option end the battle and take you to a shop processing screen once it fades out.
2 things about that...
1stly i cant get the shop processing to open through troop events before or after aborting a battle
2ndly the mechanics purpose is if you attack the merchant you should no longer be able to trade with him since you attacked him
ive tried shop processing but it doesn't seem to work in battles
ive also tried setting a common event for when player has "x" status- open shop processing- & upon "yes"- applied the status & aborted the battle but that didnt seem to work either

i almost gave up on it but i still really love the idea of a merchant that you can attack if you wish
any ideas?
Are you asking to do shop purchasing while you are in the middle of a battle with the merchant?
That is quite odd.
I would have thought that you would do an event interaction for shop processing and want to attack him during the shop processing or after finishing doing your shopping.

Why can't you talk to the merchant event before you do battle with him?
you could add the buy window to the battle scene as a copy of the original window.
manually opening windows across scenes is somewhat possible, but I don't remember if the buy window has code that runs after exiting it's own scene.
Are you asking to do shop purchasing while you are in the middle of a battle with the merchant?
That is quite odd.
I would have thought that you would do an event interaction for shop processing and want to attack him during the shop processing or after finishing doing your shopping.

Why can't you talk to the merchant event before you do battle with him?
im trying to have the majority of interactions be through random encounters because im using the 1st person labyrinth explorer script so too many map events can cause it to crash so im trying to keep map events reserved for objects like chests and doors

also "wizardry" (that the game is inspired by) has a similar feature- where you can randomly encounter merchants like you would enemies
you could add the buy window to the battle scene as a copy of the original window.
manually opening windows across scenes is somewhat possible, but I don't remember if the buy window has code that runs after exiting it's own scene.
is there a way to do that?? im curious to try but a little worried it might not work with the "FPLE"script

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/merchant-enemy-battler-solved.163122/