Player (159)
Joined: 5/20/2010
Posts: 295
Making a tas of this game seems to be difficult. There are no other RTA. One of the best walkthrough sites the name of which is "阿修羅幻想館" is no longer available. Other walkthrough sites are imperfect. So we have to research a lot of things, especially hidden chests and enemy drop items. There are a lot of hidden chests behind objects in this game. Enemy drop items depend on enemy parties, but there seems to be no address that points enemy parties. We have to check them manually. Each HP, Str, Def, Agi and Faith has its own exp. So far, it is not clear how many exp you get after a battle, but I finally have clarified it. I am not good at using a debugger, so the result is gotten by just watching WRAM through trial and error. N: turns taken in the battle Val: total exp set in each enemy in the battle exp of HP = Val*(7/24-(1/6-1/(N+5))) exp of the other stats except when you try to run away = Val*1/(N+5)*(counter+1) Note: counter starts from zero and is added by one by one action. For example, if you attack, your attack action counter is added by one. Even though your attack misses, the counter is added. If you defend, your defend action counter is added by one. If you use magic, your faith action counter is added by one. What you can understand from the above formula are: -If you would like to get higher HP, you should not take many turns in one battle. -If you would like to get one higher stat, you should not take a different type of actions in one battle. -If you would like to get more exp in total in one battle, you should take a different type of actions and finish the battle by the slowest character. Agility action counter is isolated from attack, defend, and faith action counter in the WRAM, and a formula written above is not applied when you try to run away. If you succeed in running away, a quarter of total exp is gotten in the exp of Agi. If you fail in running away, agility action counter is added by five and then if you win the battle, exp of Agi is added by Val*1/(N+5)+counter. If you fail in running away and then succeed in running away, exp of Agi is added by Val*1/4+counter. In that case, exp of the other stats including HP you can get is zero. Note: For those who do not know this game, not all the party members can run away all at once but each character runs away when you command in this game. The battle system itself is turn-based, but you command when each character's turn comes, which is similar to the battle system of super mario rpg or dragon warrior/quest xi. You cannot get any exp by using a smoke bomb even though you earn a lot of counter values. When your stat level goes up, excessive exp are truncated. The actual value added when your stat level goes up is random. TAStudio or LuaScript are powerful tools to manipulate it.
Player (159)
Joined: 5/20/2010
Posts: 295
Further research reveals that when you are attacked. Each time you are taken a physical attack, 1/8 of exp of the attacking enemy is accumulated. Then if you win the battle, the accumulated value is directly added into exp of def. Each time you are taken a magic attack, three or five or some small points are accumulated. Then if you win the battle, the accumulated value is directly added into exp of faith. So the final result is below: [ ]: floor function N: turns taken in the battle Val: total exp set in each enemy in the battle (mod 0x10000) hpExp = [Val*(7/24-(1/6-1/(N+5)))] otherStatsExp = [Val*1/(N+5)]*(counter+1)+(accumVal) If you succeed in running away, agiExp = [Val*1/4]+(accumVal)
Player (159)
Joined: 5/20/2010
Posts: 295
There are npc and magic that enable you to get a little more money after the battle in this game. The correct amount has not been clear so far. I have just got found this. [ ]: floor function M: sum of the money all of the enemies you encountered have If either npc or magic is available, M+[M*1/10]+1. If both npc and magic are available, M+[M*1/10]*2+1. (So far, no one has mentioned that plus one.) The magic that makes item drop rate twice does not exactly make it twice. Its correct effect is halving the denominator of the item drop rate, rounding down to the nearest decimal. There is an address that points the denominator of the item drop rate in the WRAM. If the value is 255, each time you use that magic, it changes 127, 63, 31, 15, 7, 3, 1, 1, ..., 1, .... (Of course, you do not need to use the magic after the rate reaches one.)
Player (159)
Joined: 5/20/2010
Posts: 295
I have found a lot of things. I will two or three posts continuously, so please forgive me. Total exp you can get after the battle are 2 bytes of unisigned int. If you get more than 0xFFFF exp, they get overflowed and you get less exp. totalExp ≡ totalExp (mod 0x10000) This can only happen in the final boss battle and the secret boss battle. Lvl up motion is cancelled after the final boss battle but exp are counted in the WRAM. Of course, it is meaningless for you cannot save the game after the final battle. There are some glitches about Lvl 99. Although they are irrelevant with speedruns, they have not been mentioned anywhere, so I will written them. After you reach Lvl 99, doping items except for maximum HP can no longer work properly. Maximum MP boosters will not boost them at all. Other stats boosters make the demanded exp for the next Lvl zero, but the Lvl is already maximized and can no longer go up. Stats will not go up, too. When you use doping items when your Lvl is less than 99, your Lvl corresponging with the items goes up by one. It does not change the demanded exp for the next Lvl. That is the proper function of the doping items. And you will reach the conclusion that doping items should be used just before your Lvl goes up. The actual maximum HP or maximum MP goes up by eight and the actual stats goes up by four by using the items. It may make the player stronger or weaker. The value of the stats by ordinary leveling up is random. Note: Lvl of HP and exp of HP cannot be seen without RAM watch unlike other stats. You can get exp by winning the battle and the exp you got are counted even after you reach Lvl 99. The exp only repeat from 65535 to 0. Game time also loops. After it reaches 99 hours and 59 minutes, seconds or framecounts repeat from 0 to 3599. Note: Framecounts in the game cannot be seen without RAM watch and game time can be seen only when you save or load the save data. The only way to get more stats after you reach Lvl 99 is random boosts by NPC, but I have not seen them after I reached Lvl 99. Maybe it did not take much time to check it. The only thing I identified is that Hokutomaru's maximum MP is going up after his faith Lvl reached 99. And they continue going up over 999. Money can be over 999999. If you win and win the battles, you will continue getting money. If your money is over 999999, hundred-thousands digit looks glitched. If you try to get more than 0xFFFFFF(=16777215) money by winning a battle or by selling an item or items, it overflows and sharply drops. If you sell an item or items when your money is over 999999, your money is cut down to 999999 if the money after you sell is more than 999999 and less than 16777216. Turns in the battle cannot be counted over 255. 256th turn is 0th turn and exp you can get increase markedly in that case.
Player (159)
Joined: 5/20/2010
Posts: 295
There are other facts that I have found and that have not been mentioned anywhere. Whether NPCs can join in your party again or not is not mentioned anywhere. Three NPCs, Hyoutoku, Yamako and Kiyomasa should be paid attention to. These three persons can join only once. If you fire them, they will never join again. Yamako cannot be fired freely, though. Hyoutoku and Yamako can be joined either before or after you go to the Nether World. If your NPC member slots are full, events where those NPCs join will not happen. Kiyomasa can be joined only before you go to the Nether World. Even if you did not employ him, he disappears after you return from the Nether World. Seimei might be paid attention to. His house cannot be accessed just by going a little forward in the game. Scrolling text messages can be done automatically by luascript. Which character can move faster in a battle is determined by Agi. If multiple characters have the same Agi, the priority is the 1st ally, the 2nd ally, ..., the 1st enemy, the 2nd enemy, ....
Player (159)
Joined: 5/20/2010
Posts: 295
I researched about encounters by a primitive way as I could not find significant addresses especially about enemy parties in the ram and rom. The way of researching is by a luascript that repeats saving savestates, walking automatically until starting random battles, and then read and output the number of steps until you encounter, step RNG(7E0032) when you encounter, drop item ID, the number of the drop item, drop rate, enemy ID, total exp, calculated exp and money by print or io.write, loading savestates while inserting a blank frame before starting walking. I found 7E1046 points event battle ID and 7E1047 points the region where you are. If you change 7E1047, the enemies you encounter change, but the value of 7E1047 did not change through casual playthrough. While inserting a blank frame and changing the value of 7E1047, 25600 battles (100 battles in each value of 7E1047) are output. However, they does not seem to cover the whole enemy party and to make matters worse, glitched enemies appeared in some cases. The number of steps before you encounter is from 10 to 98. Step RNG when you encounter is from 2F to 33 and from 95 to 99 in hexed. If step RNG is other value, you seem to encounter glitched enemies. Drop items seem to be mainly consumable items and doping items. 7E0C5E-F and 7F0000-1 seem to point a current location, but the values are different from each other. Screen transition while fixing the value or the values does not seem to work properly. Fixing the X or Y position does not change the back ground image. If you would like to test some things, basically, you have to walk to the place manually. From 7F0002- seem to point map tile information, but if you fix the value of 7F0002, not the tile of (0, 0) but all the tiles whose X is 0 change.