Need someone to explain this script to a novice

Hello, I want to make sure that I understand what this script does before I add it to my game. My goal is to disable preemptive attacks from enemies during random encounters.

module BattleManager #-------------------------------------------------------------------------- # * Processing at Encounter Time #-------------------------------------------------------------------------- def self.on_encounter @preemptive = false @surprise = false endend
Well, if you post a link to the full script, we could help you. If it's a default script only, please confirm it so we can start explaining the parts you don't understand.
Well, if you post a link to the full script, we could help you. If it's a default script only, please confirm it so we can start explaining the parts you don't understand.
This is all they had in the post. I assumed it was a very short script for a minor adjustment to the game. Is it likely missing more parts to it?
Then it's terribly short indeed. It only has 1 function, make sure battles are totally normal, no surprises and no advantages to be expected at the beginning of the fight.
Then it's terribly short indeed. It only has 1 function, make sure battles are totally normal, no surprises and no advantages to be expected at the beginning of the fight.
Then the purpose is correct. That is what I wanted to figure out.

Then it's terribly short indeed. It only has 1 function, make sure battles are totally normal, no surprises and no advantages to be expected at the beginning of the fight.
Apparently, it does not work. Maybe it is not a standalone script.

The problem has been solved. I had to apply this change to the default BattleManager script, in the section under * Processing at Encounter Time

Original thread: https://forums.rpgmakerweb.com/threads/need-someone-to-explain-this-script-to-a-novice.162579/