How various things work, as determined by debugger, Part 2

#151Zaraktheus(Topic Creator)Posted 9/29/2010 6:03:33 AM
I've uploaded version 1.41 of my Data/Mechanics Guide to GameFAQs. Changes include:

-Added PsychicPrison/BackFire vulnerability to the Ability Elements & Evasion
Data Chart.
-in [AVOID02], explained the bug that causes some Abilities that are supposed
to be vulnerable to certain Evade/Counters to not be.
-updated PsychicPrison/BackFire entry in Evasions Summary section.
-updated Dodge Abilities section; added Dodge Ability Protection List.
-updated some entries in Explanations of Common Variables section.
-updated Effects of Comboing section, most notably including the list of
potential protective effects bypassed by Subsequent Abilities in a Combo.
-added Dodge Ability Sparking section.
-re-wrote most of The HugeSlime Method section to reflect my recent findings
regarding the Fortune bytes, improve clarity, and add a useful variation.
-minor revisions.

There's a lot that still needs to be updated and revised, and I still have tons more to add, but this is enough for now.

One of the goals of this update was to answer Last_Arm's question:
Zarak, is any more known about dodge techs than what's in your guide? Aside from the fact that DodgeGaze is bugged?

[AVOID05] explains the conditions for Dodge Abilities to activate once Equipped, and includes my new Dodge Ability Protection List.

[DSPRK01] is the beginning of the new section explaining all about Dodge Ability Sparking.

Hope it helps!
#152Skankin GarbagePosted 9/30/2010 11:30:09 AM
Hey Zarak, I was wondering if you could tell me which rings opened which doors at VIrgil's Palace. I've been wanting to add that information to my walkthrough for as long as I can remember, but there's technically no way to know for sure which doors the first few rings open by just checking normally (that I can tell).
---
The SaGa Maniac Community! Hosted by RPGClassics.com! Come around, kids, and join up!
http://agora.rpgclassics.com
#153Mir_VimesPosted 10/11/2010 8:15:54 AM
Bump.
---
There is absolutely no thanks to one vicious forumer that generally posts on these boards (you know who you are).
#154Zaraktheus(Topic Creator)Posted 10/11/2010 12:24:31 PM
@ Mir_Vimes:

1. A code that allows a shop to work just like the GoldIngot shop in Koorong; let it allow you to buy and sell inventory on the same screen.

Even in the Koorong Currency Exchange, you can't Buy and Sell on the same screen. You have to choose either "Buy gold" or "Sell gold", then you'll be directed to a Menu that lets you only Buy or only Sell, respectively. The two Menus are two different Shops; they just happen to both be accessed by talking to the same person.

Without going into excessive detail, Shops are controlled by what I call the "Scenario Scripting System" (SSS, for short), which is a tremendously convoluted system presumably designed to save on the number of specific subroutines that had to be written and the amount of space they would take up, at the expense of vastly decreased computational efficiency, and vastly increased difficulty for anyone like me who might try to translate and make sense of it.

I can work with the SSS and have already done so in a few cases, but it takes much longer to accomplish the same amount. Even relatively simple operations that I could normally translate in just a few minutes take several hours in the SSS. That's why this request has taken so long, and because of this greatly decreased benefit : time ratio, I'm probably going to have to turn down (or at least de-prioritize) any future requests that involve the SSS. Translating the SSS is just not an efficient use of my limited time.

Anyway, the data (or Scripts) that controls the SSS is packed in with no extra space. Even moreso than elsewhere in the program, there is simply no room to add any functionality without removing something equally large from the same immediate area (which will almost always result in breaking important functions). For any given Shop Menu, you can normally only Buy or Sell--one or the other--and there is no room to add the other option and make it fully functional.

By altering several inhibitors and piggy-backing on the "reverse-Transaction" function (i.e. what allows you to decrease your Quantity even when Buying, but no farther than back to its pre-Transaction value, or increase it likewise when Selling), I can almost do it, but in either case, there's an important check that's needed and no room to add it.

I can allow you to "Sell" while in a Buy Menu by dis-inhibiting the reverse-Buy Transaction even when your Current Quantity <= your pre-Transaction Quantity, but unlike a normal Sell Transaction, the reverse-Buy Transaction doesn't have a check to prevent you from reverse-Buying when your Current Quantity = 0 (because that wouldn't normally be possible anyway). There's no room to add that check, and as a result, if I allow you to "Sell" while in a Buy Menu, I must also allow you to "Sell" even when you have 0 of the Item. This allows you to gain Credits equal to the Item's Cost even without having or losing any of the Item, and you can do it as many times as you want, which obviously would allow for an easy exploit resulting in infinite Credits. This flaw could be acceptable if the player adheres to the honor system and only Sells Items they actually have, but it is still a major flaw, and there's no reasonable way to fix it, because of the space constraints.
#155Zaraktheus(Topic Creator)Posted 10/11/2010 12:25:01 PM
Likewise, I can allow you to "Buy" while in a Sell Menu by dis-inhibiting the reverse-Sell Transaction even when your Current Quantity >= your pre-Transaction Quantity, but unlike a normal Buy Transaction, the reverse-Sell Transaction doesn't have a check to prevent you from reverse-Selling when your Current Credits are insufficient to afford the Item in question (because that wouldn't normally be possible anyway). There's no room to add that check, and as a result, if I allow you to "Buy" while in a Sell Menu, I must also allow you to "Buy" even when you can't afford the Item. This allows you to add the Item to your Inventory for free (as long as you couldn't afford it), and you can do it as many times as you want, which obviously would allow for an easy exploit resulting in lots of free Items. Again, this flaw could be acceptable if the player adheres to the honor system, but it's still a major flaw, and there's no reasonable way to fix it, because of the space constraints.

There's simply no getting around either of those flaws, because there isn't any room to work with. It might theoretically be possible to do it by shifting tons of data around to make room, but there are pointers used liberally throughout the Scripting Data and scattered across the entire game program that rely on that data to be exactly where it is. If you shift the data, you also have to fix every pointer that pointed to the shifted data (which would be a huge task in itself, requiring at least dozens-to-hundreds of codes), and in order to find all the pointers, you'd first have to translate the entire game program (which would take many years, at a minimum). It might be theoretically possible, but it's not something that can be done in a reasonable time-frame.

Further, every Shop Menu is implemented separately, so even the flawed changes that I can reasonably accomplish must be done separately for each Shop. I've made two examples--one "Sell" through a Buy Menu, and one "Buy" through a Sell Menu--and even just these two took many hours to research and create. Now that I've worked out how to do it, I could probably create code sets for other Shop Menus in less time than these two took, but each would still probably take a few hours. Given that the product would inevitably be flawed anyway, that wouldn't be time well spent.

Here are the examples:

---

Allow the Player to "Sell" Items from the Buy Menu of the Koorong Potions Shop:
d0130422 3c01
30130422 00ad
d0130709 fc01
30130709 005e
d0130977 7d00
30130977 0080

This applies to all Items in the Menu and will work even when you have insufficient Credits to Buy the Item in question or even to Buy any Item in the Menu.

However, it also (unavoidably) allows you to "Sell" Items even when you have 0 of them. Just don't Sell Items you don't have (unless you want to).

---

Allow the Player to "Buy" Items from the Sell Menu of the Scrap Junk Shop:
d0130f7c 000c
30130f7d 00fd
d01310a5 000d
301310a6 0080

This applies to all Items in the Menu and will work even when you have none of the Item in Inventory beforehand.

However, it also (unavoidably) allows you to "Buy" even with insufficient Credits. Just don't Buy Items you can't legitimately afford (unless you want to).

---

WARNING: These code sets are best used by activating them only while on the screen containing the indicated Shop. Although I have used defensive conditionals to try to prevent them from activating at undesired times, there is a small but real chance that they could cause serious problems if they are active on any other screen.

As with any of my codes, use them at your own risk.

---

Added bonus if you also make shop prices fluctuate depending on how much inventory you sell.

As above, there's no room to add this extra functionality.
#156Zaraktheus(Topic Creator)Posted 10/11/2010 12:25:47 PM
2. Fix the Takonomics bug?

Let me start by explaining what causes the Takonomics bug. I'm not endorsing its use (nor specifically opposing it for anyone who enjoys it); I'm just explaining how it works.

The game always keeps track of the current Price to Buy Gold at the Koorong Currency Exchange, beginning at $1000 in a new Scenario. The current Price to Sell Gold is derived as 0.8 * the Price to Buy (i.e 80%). This gives an initial Buy Price of $1000 and Sell Price of $800.

While deciding how many GoldIngots to Buy/Sell from the Currency Exchange:
-Every GoldIngot you add to your Inventory (plan to Buy or un-plan to Sell) increases the Buy Price by $50 (and Sell Price by $40), to a maximum of $2550.
-Every GoldIngot you remove from your Inventory (plan to Sell or un-plan to Buy) decreases the Buy Price by $50 (and Sell Price by $40), to a minimum of $0.

The Takonomics bug is caused by the combination of several facts, including:

1. The Price cannot decrease below $0.

2. You can continue to plan to Sell GoldIngots even after the Price has reached the minimum of $0.

3. You can reverse the Transaction without canceling it.

4. GoldIngots can also be purchased in Nelson at a stable price of $500.

As a result, if you have enough GoldIngots in your inventory, you can get the Price down to $0, then continue to plan to Sell further Ingots without further reducing the Price. When, without actually Selling them yet, you then reverse the Transaction by un-planning to Sell those GoldIngots, all of them will increase the Price, not just the ones that originally decreased the Price, and as a result, the final Price upon un-planning to Sell them all will be higher than the original Price. You can then Sell GoldIngots until the Sell Price drops to $480, finally confirm the Transaction, and end up having made a profit (assuming you bought your GoldIngots from Nelson).

Note also that you will make more profit if you go in with as few Credits as possible. The game will charge you for each GoldIngot as you reverse the Transaction, and since the Price will be increasing more than it originally decreased, you'll end up paying more to reverse the Transaction than you made from it in the first place, which ultimately cuts into your profits. Remember though, the game can't charge you for a reverse-Sell Transaction if you don't have enough Credits left, so if you start the process with no extra Credits, you can walk away with the full profit. Again, that's just an observation, not a recommendation.

Changing any of the above four facts could fix the bug. Fixing either of the first two would be preferable, but would require adding something, and since we're dealing with the SSS again, there is of course no room for that. Fixing the fourth is undesirable because it would also interfere with Buying GoldIngots at what is usually the most reasonable price in order to satisfy the Gnomes during the Gold Card Quest.

However, fixing the third can be accomplished simply by disabling an existing and unnecessary feature. Given that you can always cancel any Transaction simply by pressing "X", there's no real need for the reverse-Transaction function--it's merely a convenience. The Takonomics bug can be fixed within the existing space constraints and with no serious repercussions by simply disabling the reverse-Transaction function in the "Sell gold" Menu.

---

Fix the Takonomics (aka GoldIngot) bug by disabling the reverse-Sell function in the "Sell gold" Menu:
d01306e8 000d
801306e8 800c

---

Of course, this is really just a thought exercise. The most appropriate solution to the Takonomics bug is simple self-restraint. Anyone who knows about the bug can very easily avoid it, so there's no need for a code-based solution. Anyone who doesn't know about the bug, by definition, also won't know about or use the code-based solution, so it's pointless.
#157NeoElfboyPosted 10/12/2010 12:28:55 PM
Hi Zaraktheus, long-time RPG mechanics fan and recent Saga Frontier convert here. I've found your FAQ and these two topics a great read.

I'm curious as to how the fight to understand the various effect processes is going. Are there any others you've found out that you can share with us, like the mystic/martial arts coup de grace check (which was certainly inofrmative on how best to use such moves)? I'm particularly curious in how, say, Implosion's death rate is calculated (I use that one a lot) but am also very interested in the general physical damage formulas for things like sword/fist techs, and gun techs (though those seem to use different formulas?). I know there's probably a lot, granted. Silly game. :p
---
The RPG Duelling League: www.rpgdl.com
An unparalleled source for RPG information and discussion
#158Zaraktheus(Topic Creator)Posted 10/13/2010 12:06:03 PM
@ Skankin Garbage:

Hey Zarak, I was wondering if you could tell me which rings opened which doors at VIrgil's Palace. I've been wanting to add that information to my walkthrough for as long as I can remember, but there's technically no way to know for sure which doors the first few rings open by just checking normally (that I can tell).

Sure, I can do that.

RING/Fighter: 1st Floor West, near-North Door: Tournament Bracket room.
RING/Guardian: 1st Floor West, far-Northwest Door: Graveyard.
RING/Merchant: 1st Floor East, near-North Door: Super High and Low Gameshow.
RING/Healer: 1st Floor East, far-Southeast Door: MagmaSlimes.
RING/Thief: 2nd Floor West, North Door: Money-maze room.
RING/Hermit: 2nd Floor West, West Door: Mouse in the Barrel room.
RING/Schemer: 2nd Floor East, South Door: Switches and Chutes room.
RING/Hero: 2nd Floor East, East Door: Lady in the Spikes room.

If you want to use that information in a walkthrough, please just give credit where appropriate.
#159Zaraktheus(Topic Creator)Posted 10/13/2010 12:22:23 PM
@ NeoElfboy:

Welcome to SaGa Frontier! I'm glad you've found things here to interest you.

I'm curious as to how the fight to understand the various effect processes is going.

I've made a lot of good progress, but there's tons more to do. This is an enormous project.

As I've mentioned before, in order to help ensure accuracy and save myself the wasted work of constantly re-writing the explanations, I don't plan to explain any more about the EPs until I've finished everything I think should be done first, which is a staggering amount of work.

Further, my free time is very limited, and as a natural consequence of answering requests in here, I have far less time to spend on the EPs than I otherwise would.

As always, I will continue to do what I can as time permits. This project will take a very long time.
#160Zaraktheus(Topic Creator)Posted 10/13/2010 12:25:24 PM
Alright, I've got family visiting for the rest of the week. I'll be back next week.

Have fun, everybody!