I thought of making a new thread for this query instead...
I always wanted to make a battle of my own... so I tried making a class named NewBattle and placed this script afterwards:
BattleManager.setup(2, true, true) BattleManager.event_proc = Proc.new {|n| @branch[@indent] = n } $game_player.make_encounter_count SceneManager.call(Scene_Battle)but it gives me an error about replay BGM. how can i resolve the issue since the bgm since its on battlemanager?
Whenever you encounter an error, screenshot it and post it here... it also comes with a description on which script and line caused the error so you should also post the full script too (if you made it) or a link...
that solved my problem, thanks!
though, why not just simply call the Battle Processing Event Command? or you'd like to do call it inside another script?
There are lots of reasons. I wanted to do conditional battles that only happens when some events actually happen, a time, a region...etc.
And its a way to learn how they work and how scripts are working 🙂
You can say I am tired eventing and I just want to learn how to script everything.
I would highly recommend subclassing your custom scene from either Scene_Battle or Scene_Base and overwrite the methods that you need to change as needed instead of copy pasting everything.
I don't think he's modifying anything really, he just wants to call Scene_Battle from other places...
I wanted to call a battle process on a new class, as to the reason of...
say I wanted to engage battle into a boss rush...
rather than eventing it, I want to do it via scripting to set up advanced conditions...
so does making it class NewBattle < Scene_Battle more appropriate rather than making a module or a new class without a subclass?
nah, since you're not modifying anything on the battle scene itself, you won't really need to do that
there's no data troops, since it is $data_troop... what's the exact line?
well, you don't have @branch defined anywhere in there so that's bound to error...
remove that line, it seems to be used as a callback to the event, I don't think you need it...
Great! It worked 🙂
That saved a lot.
Any mods can lock this thread now. The issue is solved 🙂