[VX Ace] Is there a way to disable starting with 99 of each item from database when starting a Battle Test?

Just as the title says 😉
There is, but I strongly advice against using the "Battle Test" function as it is not very compatible with a lot of scripts and other stuffs. I always recommend starting the game and adding a battle spawn event right in front of your character starting position.

Doing it like that means that you have access to normal event commands before starting the battle, which allows you to do a lot of other things too.
So, if there is, how to do it then XD
why would you even want to do that?
you can't do balancing work in battletest - it has too many problems on its own like ignoring quite a number of installed scripts that change how the battlesystem works.
It is barely adequate for testing if a battle with all its troop events and enemy action patters works as intended.

and only for balancing work on detail value you would have to limit items.
So, if there is, how to do it then XD
I didn't tell you how to do it on purpose, because, as @Andar said, testing using Battle Test is quite terrible. I strongly advice against it. I mean, if you insist, I am not going to keep the information from you, but you have to know that if you do it like that, it is a VERY bad practice.

If, after knowing that it is an awful practice, you still want to do it, I can tell you, but I recommend to reconsider. Learn how to do things the right way and save yourself some time instead of having to waste hours fixing a bug that does not exist just because you are using the wrong tool for the wrong purpose.
OK, then. NVM

I guess, I'll have to do it the other way (by creating a battle event on the map) :\

Thanks anyway 😉
You can't. You need a battle event to do this.
But to be honest, they are right.
Battle testing is horrible.
It's better to playtest your game (put a teleporter on first room that gives hero whatever you need, exp,items,skills and anything else. This will set up the things, and when you teleport, you can emerge the battle.
Couldnt you just pretend? Like, if you want, say 12 HP potions, and you start with 99, just dont use below 87. Then for items you aren't supposed to have, just don't use them?

As for your question, since everyone else is holding information (I nvr had an issue with battle test, and I have a plethora of scripts pertaining to the battle sysem), here is your answer:

Go to game party line 155 - 163

Code:
#--------------------------------------------------------------------------
  # * Set Up Items for Battle Test
  #--------------------------------------------------------------------------
  def setup_battle_test_items
    $data_items.each do |item|
      gain_item(item, max_item_number(item)) if item && !item.name.empty?
    end
  end

You will take "max_item_numer(item)" and change it to a number like:

Code:
#--------------------------------------------------------------------------
  # * Set Up Items for Battle Test
  #--------------------------------------------------------------------------
  def setup_battle_test_items
    $data_items.each do |item|
      gain_item(60) if item && !item.name.empty?
    end
  end
With this, all items are at 60

Alternatively, if you didn't want ANY generalized amount, you can delete parts of it so it's this:

Code:
#--------------------------------------------------------------------------
  # * Set Up Items for Battle Test
  #--------------------------------------------------------------------------
  def setup_battle_test_items

  end

Or delete all of it. If you do this, you must also delete line 141 "setup_battle_test_items" which resides here:

Code:
#--------------------------------------------------------------------------
  # * Set Up Battle Test
  #--------------------------------------------------------------------------
  def setup_battle_test
    setup_battle_test_members
    setup_battle_test_items
  end

If you do either of the deletion choices, you'll have to manually add in items (armors and weapons will be untouched) through the troop event when battle testing.
Although what @Lord Vectra wrote is accurate, I personally would not get into the habit of altering the default scripts themselves, and indeed most people would recommend against it. You can set yourself up for a lot of grief later on. Much better to ask for a snippet which does the job.
I altered a lot of "Battle Test" scenarios by altering the script because I'm too lazy to put a custom event and do a standard playtest. I don't like when everyone is holding the information. It is up to the how to use the information when they simply just ask for it and not intend to discuss it. So, I think it's nice if someone could point out how to do it. Put this as a new script
Code:
class Game_Battler
  def setup_battle_test_items
  end
end
If you want a few specific items to be added in battle, you can do this
Code:
class Game_Battler
  def setup_battle_test_items
    [1,2,3,4,5,6].each {|id| gain_item($data_items[id]), 99)}
  end
end
If you want a few specific items with a certain amount
Code:
class Game_Battler
  def setup_battle_test_items
    items = {
      1 => 10,
      2 => 30,
      3 => 20,
    }
    items.each {|id, amount| gain_item($data_items[id]), amount)}
  end
end
@TheoAllen I have to disagree here, while it is true that someone who knows how the engine works is able to decide whether or not to use a certain solution, regardless of how bad it is, the average new user just looks for information on google and scrolls the page down until the said information is found.

When that happens the information you shared might be used by somebody who does not have enough knowledge to handle it. Knowledge is power, but power without awareness is dangerous. Not only that, the very fact that the internet is already filled with bad practices makes looking for good practices not so easy, adding extra bad practices that can easily be reached with a google search is not exactly a positive contribution in my opinion.

My point is not that we should not share information, my point when keeping the information is that sharing such information brings more harm than good to the community, regardless of what the OP decides to do with it. In my opinion it is an information that you should treat the same as you treat links to websites that host stolen games (even if it not that bad). If something is a bad thing overall and the same thing can be achieved with a good practice, why sharing the bad practice at all?
@Heirukichi
1. You don't even know if the user is new. You don't have this information.
2. This forum is particularly "how to get things done"
3. There's a separate forum to discuss "Should this thing done this way?"
4. You're forcing your point of view in point 2, while we are not in the point 3.
5. My point is, you can share the "bad" practice and it probably won't be bad to someone else. While still putting advice "but, you can do it easier by setting up event". (tho, I don't find it easy for various reason that I probably share the same reason as the OP).

EDIT:
This probably a little bit out of topic. If a mod wants to stop this, I will stop.
This probably a little bit out of topic. If a mod wants to stop this, I will stop.
The same goes for me, of course. What I am writing here is only partially related to the thread and mostly off-topic. Should moderators decide to close this thread that's perfectly fine.

@TheoAllen your reply underlined how I have been completely unable to express my point. My point is not "I am keeping the information because the user who wants it is new", my point is "if I write this information it is out there for anyone, even (and especially) new users, who look for information without filters because they lack the required knowledge to filter information themselves".

The whole forum structure is irrelevant when you see it that way: any new user who searches things on google couldn't care less if a different place exists where you can read if something is a good or bad practice. Users just want a quick answer that makes things work, and I think that we both know how many problems certain answers imply.

I can see your point perfectly, I got it from your very first post, what I was trying to highlight is the fact that it can bring more harm than good and, on top of it, there are other ways to do it that involve less problems in the long run. Why resorting to something that can spell trouble in the future if something else can be done in a safe way? Laziness? Forgive me, but I don't think it is a valid excuse, if it were we would have a lot of people still going for goto spaghetti code even in the 21st century. Luckily that is no longer happening and maintaining code became much easier, but it was only possible because everybody decided to code in a way that was easy to understand and maintain for everybody.

These are the kind of things that we should share, at least in my opinion, and that is the kind of mindset that we should help spreading. Well structured and planned games, easy to maintain and to work with to have a more efficient working environment regardless of the turnover.

From my standpoint this forum should be a place where new and experienced people can learn, develop a mindset that helps them work on their games while having fun, doing what they want, but, at the same time, staying away from troubles and avoiding frustration. Frustration does not apply to those who design the game, but to everyone who contributes. If you make things much harder for a contributor, in the end you are still somewhat harming the community, even if you are willing to pay for the time lost, because in that case you are harming your own pocket, and thus you are harming yourself.

Good practices can prevent that and, as such, we should spread them far and wide. This was my point. As you can see, it has nothing to do with the forum structure or with how new/experienced the OP is, it is a completely different thing that factors in a lot of different elements that are completely foreign to the discussion itself.
Although what @Lord Vectra wrote is accurate, I personally would not get into the habit of altering the default scripts themselves, and indeed most people would recommend against it. You can set yourself up for a lot of grief later on. Much better to ask for a snippet which does the job.

True. I should probably add that he could copy game_party then paste it where you put the rest of the custom scripts then edit it then. I am not skilled in creating snippets, so I'm a bad person to ask for that which is always why I didn't include it in my solution. However, TheoAllen just did, and I am grateful as I wouldn't be able to provide that solution myself.

I know how to deal with default scripts and never had an issue doing so.


@TheoAllen I have to disagree here, while it is true that someone who knows how the engine works is able to decide whether or not to use a certain solution, regardless of how bad it is, the average new user just looks for information on google and scrolls the page down until the said information is found.

When that happens the information you shared might be used by somebody who does not have enough knowledge to handle it. Knowledge is power, but power without awareness is dangerous. Not only that, the very fact that the internet is already filled with bad practices makes looking for good practices not so easy, adding extra bad practices that can easily be reached with a google search is not exactly a positive contribution in my opinion.

My point is not that we should not share information, my point when keeping the information is that sharing such information brings more harm than good to the community, regardless of what the OP decides to do with it. In my opinion it is an information that you should treat the same as you treat links to websites that host stolen games (even if it not that bad). If something is a bad thing overall and the same thing can be achieved with a good practice, why sharing the bad practice at all?
Actually, what I showed could not be found via google. I had to use my scripting knowledge and make an educated guess on where battle testing related stuff would be located. I don't know what you believe to be as "bad practices" as, if it gets things done, it gets it done. Eventing and scripting alike has a problem and a closed solution (I used the term "closed" for a reason).

As long as your problem is solved with a closed solution, that problem is not open to cause other problems. An open solution is like a bandaid. Ye, it's gone, but it may cause other issues later.

For example, parallel processes (common events) are considered "bad practices" because it can slow down the performance. You want the game to actively check player's X and Y-coord? Try parallel process. So, now we have a template:
Problem: Dev wants the location of the player at all times (for whatever reason)
"Open" Solution: Make it a parallel Process

You could argue that new folks might take this and use it for everything, and you'd be right. This is why you add on "make sure to not have too many parallel processes as it can have negative effects on game performance" and now you have a "Closed" solution. The Dev is equipped with knowledge to not suffer the consequences. I have about 10 parallel proccesses on one of my work-in-progresses, but I know how to deal with them. Made a tutorial on it but was considered too short and not worthwhile to be approved (feelsbadman).

To go on this context of 99 items on battle test, there is no reason to hold this information from him. If battle test isn't working with a script he is using, he can switch to on-map. The first-responders of this post could've given him the warning but still given him the information he was looking for. I don't consider battle testing bad practice as the issues seems to be PURELY related to the scripts you add. If some scripts made it so "transfer player" gave errors, is "transfer player" command suddenly bad practice? IF you use those scripts, yes. If you don't, no.

Mid-Typing: It seems I have been ninja'd and must make a double response

I can see your point perfectly, I got it from your very first post, what I was trying to highlight is the fact that it can bring more harm than good and, on top of it, there are other ways to do it that involve less problems in the long run. Why resorting to something that can spell trouble in the future if something else can be done in a safe way? Laziness? Forgive me, but I don't think it is a valid excuse, if it were we would have a lot of people still going for goto spaghetti code even in the 21st century.

From my standpoint this forum should be a place where new and experienced people can learn, develop a mindset that helps them work on their games while having fun, doing what they want, but, at the same time, staying away from troubles and avoiding frustration. Frustration does not apply to those who design the game, but to everyone who contributes. If you make things much harder for a contributor, in the end you are still somewhat harming the community, even if you are willing to pay for the time lost, because in that case you are harming your own pocket, and thus you are harming yourself.

Good practices can prevent that and, as such, we should spread them far and wide. This was my point. As you can see, it has nothing to do with the forum structure or with how new/experienced the OP is, it is a completely different thing that factors in a lot of different elements that are completely foreign to the discussion itself.

It appears I have to say nothing new. Tho I will add that "bad practices" are sometimes subjective to the person. People have trouble creating games with 6 parallel processes and it's choking. I give them an encrypted version of mine with 10 and it works flawlessly.

Actually, I will say something new:
My opinions may be skewed due to where I came from. I was in a forum ran by scripters (essentially) and eventing, as a whole, was considered bad practice. For a gist, I rose up as #1 eventer there and showed things that were traditionally seen as impossible with eventing. So while I understand your concerns and your point, I find them merely subjective. Some believe editing default scripts at all is bad practice while others believe it's fine as long as you copy/paste it with the custom scripts so your "real" default is untouched (this is where I reside).

And yes, I think we been a bit off topic for a while now. Moderators might not even be online right now. I just came on to respond to Kaz and saw this was going on (notifications don't like to alert me on things sometimes - it goes through the moods. I heard if you insult it, it cries and stops working for a bit.)
My point is not "I am keeping the information because the user who wants it is new", my point is "if I write this information it is out there for anyone, even (and especially) new users, who look for information without filters because they lack the required knowledge to filter information themselves".
Any information on the internet can be taken the wrong way. Like, literally everything. That doesn't mean we should keep the information on our own when it doesn't harmful to itself or misleading. In this particular case, "how to disable 99 items on the battle test". And what you get is "Don't use battle test".

It is like asking "How to implement equipment durability?"
Then what you get is "Don't implement it, it sucks".

I mean, I see your point about "Providing information to the internet for many people based on the question". Me? I don't. I see the person who is asking, and I provide the information they need. Anyone who is reading the conversation should be responsible for their own judgment. I don't feel like I'm responsible for that. As long as I don't spread misinformation. I see a question, I answer, based on my knowledge.

The whole forum structure is irrelevant when you see it that way: any new user who searches things on google couldn't care less if a different place exists where you can read if something is a good or bad practice. Users just want a quick answer that makes things work, and I think that we both know how many problems certain answers imply.
Excuse me, but no.
A forum structure is relevant. Again, not for people who searched through the internet. But for people who asked their question. Questions will be answered depends on whether a particular question is asked in RGSS3 Request or Learning Ruby & RGSSx. If it's the former, they want an easy answer. If it's later, they want to learn.

In this particular case, the question asked is how to disable 99 items in the battle test. I don't know the context of why the OP wants it this way, and they didn't provide any information. And I don't need extra information to answer this particular question. I don't like snooping around to see what they are actually doing.

Once I asked in a certain discord on how to code in MV, I asked on how to make everything from scratch, like showing up a sprite and all. And a particular member just said "why bother? you just want to show a sprite, so just add a child sprite on the Scene_Map or something". Honestly? I don't like this kind of response.

I can see your point perfectly, I got it from your very first post, what I was trying to highlight is the fact that it can bring more harm than good and, on top of it, there are other ways to do it that involve less problems in the long run. Why resorting to something that can spell trouble in the future if something else can be done in a safe way? Laziness? Forgive me, but I don't think it is a valid excuse, if it were we would have a lot of people still going for goto spaghetti code even in the 21st century. Luckily that is no longer happening and maintaining code became much easier, but it was only possible because everybody decided to code in a way that was easy to understand and maintain for everybody.
The maintainable code you mention usually works when you want to make whatever the apps you're working with will have a collaboration with several people. If you're going solo, you can even use all global variables, ditch all the encapsulation, and all "bad practices" as long as you know what you're doing. Why? because you're the only person that is working with that code. Make it easier for you to maintain using whatever the means you have.

These are the kind of things that we should share, at least in my opinion, and that is the kind of mindset that we should help spreading. Well structured and planned games, easy to maintain and to work with to have a more efficient working environment regardless of the turnover.
I mean I can agree with this, but when we discuss it in a proper topic.

From my standpoint this forum should be a place where new and experienced people can learn, develop a mindset that helps them work on their games while having fun, doing what they want, but, at the same time, staying away from troubles and avoiding frustration. Frustration does not apply to those who design the game, but to everyone who contributes. If you make things much harder for a contributor, in the end you are still somewhat harming the community, even if you are willing to pay for the time lost, because in that case you are harming your own pocket, and thus you are harming yourself.
I can agree with the first half. The second half is a little bit shooting in the dark.

Let's drag this particular point to this case. In your first response, it is like asking "Where can I eat meat" ended up getting a response "Don't eat meat because <various response>, be a vegetarian instead". That doesn't answer the question. It isn't a perfect analogy, but, you get my point.

In my opinion, your answer could be rewritten as
"There is, here is how... Out of curiosity, why can't you just use a normal playtest and use the event to set up the battle test? That works the same". It is politely asking if the OP had a particular in mind while it didn't seem like you put yourself above them (like pretending you know everything). The answer you will likely get
1. The OP didn't think of that and their response be like "Wait, you're right!"
2. The OP had a particular reason, "Oh, that's because I ... <insert reasons>"

Good practices can prevent that and, as such, we should spread them far and wide. This was my point. As you can see, it has nothing to do with the forum structure or with how new/experienced the OP is, it is a completely different thing that factors in a lot of different elements that are completely foreign to the discussion itself.
If I were to spread the good practice, I will spread it passively. Such as writing an article for people to read. I don't run into people telling them how to do good practice when they didn't ask for it.
Geez, that's a nice talk you two have he3r3 😀

Anyway, @Heirukichi changed my mind. Thank you, the thread may be closed now 🙂
the thread may be closed now
to close the thread, click on the report text in your first post.
at the bottom left of the message window
You will take "max_item_numer(item)" and change it to a number like:

.......or, you can go to the actual method and make it return another number, which is the main reason why that section is written as the result of another method: so you can go into it and change that thing only.
¯\_(ツ)_/¯

Code:
#--------------------------------------------------------------------------
# * Get Maximum Number of Items Possessed
#--------------------------------------------------------------------------
def max_item_number(item)
  return 2
end
to close the thread, click on the report text in your first post.
at the bottom left of the message window
Why would I want to report my own post? If this is really a way to close a thread, then it IS REALLY weird...
Why would I want to report my own post? If this is really a way to close a thread, then it IS REALLY weird...
The report button is to get mod attention. For every matter that requires moderation (thread closing, re-opening the thread, etc). If not, the thread would just be lost buried with other new topics. And the mod probably going to miss this. They don't check all the topics 24/7. So you "help" them.

Original thread: https://forums.rpgmakerweb.com/threads/vx-ace-is-there-a-way-to-disable-starting-with-99-of-each-item-from-database-when-starting-a-battle-test.121594/