For the last day or so the battle test on the troops tab in the data base seems to have broken down in some way. Several issues all appeared at the same time.
I have a mini-script as a common event which I call up on turn 0 (i.e. so that it runs before anyone's turn). It gives the party TP so that I can test their special skills straight off. This has stopped working. No TP appears and they only get it the time honored way of giving and receiving damage in the battle.
Both the exp and gold given at the end is precisely half what it should be. So, if I have 4 enemies with 40HP and 5 gold (I'm at the beginning of a new game), that should be 160 exp and 20 gold. Instead it shows up as 80.0 (yes, with the decimal place) and 10.0 respectively.
I suspect that the enemies' ATK and DEF stats have been halved as well, because they are unable to inflict any damage and a couple of swipes by the party knocks them out.
All elements work as normal in game, it's just in the battle test - which makes using it pretty pointless.
Does anyone have any idea what might be going on and how to fix it?
Thanks.
Reproduce it in a new project.
Sorry, should have said, I tried out a new project with all the battle scripts I'm using in case it was something there, and no problem came up.
Start adding your other scripts.
So, some where that project it is reading a setting wrong, take the script data file and copy it over. If it still errors, then it is a script problem. If its clean, then another setting in your data is affecting it. Another thing that happens is a ram bug. The computer itself remembers deleted settings that wont go away until a computer restart. I have that happen twice a week.
I do believe that scrip defaults to "easy or "enemy.stats * 0.5" (hense the decimal) that script needs some changes that adds .to_i to it to get rid of those decimals.
To be honest I'm not bothered by the decimal points in the battle test; that's the result of 'Easy' mode halving all battle rewards. What is much more my concern is the halving of all enemy stats so that my battle test is rendered useless.
I've posted a query on the script thread in the hope that Todd will see it and respond. However, I'm going to leave this thread open in case there is someone who has had this problem and sorted it out.
My previous project didn't have this problem as the earlier version of the script didn't have the same adjustments. If absolutely necessary I suppose I could use the older version during game development and put the newer one in once I've finished, but I'd prefer to work with the actual version the player has, in case there are any other issues.
Stats are also halved in easy mode.
In the script thread you indicated that you set it to normal. How are you doing this?
If you are doing it as an event, then the enemies have already been created, with halved stats.
You should go into the script and look for class Game_System and one of the lines sets the difficulty to 0. Change that to 1. If you did that and it's still being halved, then I think it is a bug in the script.
I selected Normal at the very beginning of the game in play test in the same way that the player would, so through an event with a script call. This was actually done before many of the enemies had been put into the data base, so that should not have affected them in any way.
I've had a look at the section you suggested and it is 0 for Easy, 1 for Normal, 2 for Hard and 3 for Legendary (those are the names I've chosen). As I selected Normal, the script should be using 1 for all its calculations. If I change the 0 to a 1 then, as far as I can see, I would eliminate the Easy option from the game, which isn't something I want to do as some players would prefer to choose that difficulty level. But perhaps there is something I have not understood.
playtest and battletest are separate entities:
When you battletest in the troop section, it defaults all scripts, despite saves.
I can write a quick debug depending on the version of the script.
@ deilin Sorry to be so ignorant, but does that mean that the way the script has been set up is the root of the problem in battle test, rather than it being a bug as Tsukihime suggested?
correct.
the scripts defaults to easy when it initially reads, so the battletest reads it at easy.
Hmm, so what do I need to do so that it defaults to Normal in the battle test without mucking it up for the player's choice when s/he comes to play it?
the quickest is to set the 0.5 in the script to 1 when you need to test it, then change it back to 0.5 after.
For me that works since I work on multiple enemies at once.
another, if you show me the specific form of the script you are using, I can put in a TEST line that will put it to run at normal when in battle test, or running the game from the maker. (running the game from the game file directly, will run it under normal conditions)
class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # * Get Base Value of Parameter #-------------------------------------------------------------------------- alias todd_difficulty_gmen_param_base param_base def param_base(param_id, *args) n1 = todd_difficulty_gmen_param_base(param_id, *args) $game_system.todd_difficulty = 1 if $TEST n2 = case $game_system.todd_difficulty when 0 then TODDDIFFICULTY::EASYM when 1 then 1 when 2 then TODDDIFFICULTY::HEROICM when 3 then TODDDIFFICULTY::HARDM end return n1 * n2 end #-------------------------------------------------------------------------- # * Get Experience #-------------------------------------------------------------------------- def exp $game_system.todd_difficulty = 1 if $TEST case $game_system.todd_difficulty when 0 enemy.exp * TODDDIFFICULTY::EASYEXPM when 1 enemy.exp when 2 enemy.exp * TODDDIFFICULTY::HEROICEXPM when 3 enemy.exp * TODDDIFFICULTY::HARDEXPM endend #-------------------------------------------------------------------------- # * Get Gold #-------------------------------------------------------------------------- def gold $game_system.todd_difficulty = 1 if $TEST case $game_system.todd_difficulty when 0 enemy.gold * TODDDIFFICULTY::EASYGOLDM when 1 enemy.gold when 2 enemy.gold * TODDDIFFICULTY::HEROICGOLDM when 3 enemy.gold * TODDDIFFICULTY::HARDGOLDM end end #-------------------------------------------------------------------------- # * Create Array of Dropped Items #-------------------------------------------------------------------------- def make_drop_items $game_system.todd_difficulty = 1 if $TEST case $game_system.todd_difficulty when 0 @DropMulti = TODDDIFFICULTY::EASYDROPM when 1 @DropMulti = 1 when 2 @DropMulti = TODDDIFFICULTY::HEROICDROPM when 3 @DropMulti = TODDDIFFICULTY::HARDDROPM end enemy.drop_items.inject([]) do |r, di| if di.kind > 0 && rand * di.denominator < drop_item_rate * @DropMulti r.push(item_object(di.kind, di.data_id)) else r end end endend replace the class "Game_Enemy < Game_Battler" section of the script with the above.
Now, when battle testing or play testing, it will run at normal mode battle wise.
If you want to be able to test the game as a player, use the game.exe application from the folder and it will run with what settings the player chooses.
fairly sure you need to use $BTEST instead of $TEST
@deilin
Is Xypher correct? I don't want to insert anything until you've had a chance to comment.
battletest is $BTEST
also, it's just a 1 letter addition to the script, you don't really need to fear anything...