This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: [1] 2
1
Chrono Trigger Modification / Re: Simple way to map enemies to the techs they use?
« on: February 04, 2016, 08:27:28 am »
Tyvm sir, I will echo anything I figure out about those wander modes and attack unknown 3.
In fact here are the (purely observation, not proven via disassembly) notes I got out of testing wander modes for Gato, which I'm sure you've been over, but just in case. The first two columns are not nearly comprehensive.
In fact here are the (purely observation, not proven via disassembly) notes I got out of testing wander modes for Gato, which I'm sure you've been over, but just in case. The first two columns are not nearly comprehensive.
Wander Mode Value | Monsters that use it | Description | |||||||
00 | Just about everything; the null counterattack | Does nothing, no animation, no turn consumed returns to previous mode? | |||||||
01 | Yakra after his "drooo" tech | Stationary, walk animation | |||||||
02 | Not observed yet | Stationary, walk animation | |||||||
03 | Not observed yet | Walk toward target - forever. Never proceeds with its next turn | |||||||
04 | Can't recall, but probably bosses | Stationary, but uses a different animation than walking. | |||||||
05 | Hench | Stationary, face target, slowly loop a non-walking animation | |||||||
06 | Gato | Walk directly away from target. Possibly as far as he can get during his turn, possibly turns around due to obstacle, possibly wants to keep a precise distance | |||||||
7 & 8 | Not yet observed | Stationary, walk animation | |||||||
Obviously this is not a complete list, but I hope it helps. |
2
Chrono / Gameplay Casual Discussion / Re: What if... (Gameplay Questions)
« on: February 03, 2016, 07:59:35 am »
I used to play an MMO called Blade Hunter. You shouldn't look it up yourself, it's dying, and the devs/owners (and many of its players) are cretins. It was a pretty run-of-the-mill side scrolling brawler, like being in an early 90's arcade with a bunch of southeast asians you never would have met. My point in bringing this up is that the most rewarding thing about playing this game was coming up with double and triple techs to do with my party mates. Sure, lag and/or human error would screw things up once in a while. But man, was it satisfying to dash across a room with my buddies and use my tech to suck up all the mobs into my filipino bro's massive slash attack. Or for me & my thai friend to play volleyball with a boss with jump attacks after running out of MP so that he couldn't counter when he hit the ground. There was no preset combinations of techniques, we just came up with them, and it was an absolute blast.
Therefore, I don't thing it would necessarily be broken to have multiplayer CT. In fact I have thought about doing something like this with HTML5/ES6 since I need to master them and I have some detailed knowledge of how CT works. You're right that it would be difficult to perform double and triple techs (god help you if you are playing with people who don't speak your language) but it would be practicable, therefore masterable, and therefore an awesome experience.
Therefore, I don't thing it would necessarily be broken to have multiplayer CT. In fact I have thought about doing something like this with HTML5/ES6 since I need to master them and I have some detailed knowledge of how CT works. You're right that it would be difficult to perform double and triple techs (god help you if you are playing with people who don't speak your language) but it would be practicable, therefore masterable, and therefore an awesome experience.
3
Chrono Trigger Modification / Re: Simple way to map enemies to the techs they use?
« on: February 03, 2016, 07:31:50 am »
My target medium is a database or appendix to my (ongoing efforts toward a) mechanics FAQ, so all the offsets and bit identities used by FiendCrafter are what I would most appreciate. HiTech consists of stuff I already know and stuff that is interesting but doesn't quite fit the DB/appendix format. That is, I don't intend to list all of the animation instructions or the graphics pattern header. The offsets of enemy normal attacks and PC normal attacks I do not have, or I would have to go digging for them, so if you have those handy, that would be good. While I do find EnemyAId and its results to be really fascinating, I can't see it in a DB/appendix. If anything, I would want to write up a grammar in PEG.js to compile a "chrono-script" to the binary the game wants, and in reverse as well. Might go the same way for the animation instructions, but both of those are beyond the scope of my project and my free time.
My point about the relationship between attack unknown 3 and wander mode is that I can't see where else the information would come from; the enemy has to know what it's supposed to be doing before and/or after the attack animation plays until it gets its next turn. When I changed Gato's second unknown 3 to its wander mode after its tech, it walked directly away as it normally does, then did its attack animation from afar. In other words, the tech data for his normal attack does not specify that Gato should approach the target during the animation or where he needs to be in order to use it, so... where is that information? Both appear to be influenced by unknown 3 due to the above.
My point about the relationship between attack unknown 3 and wander mode is that I can't see where else the information would come from; the enemy has to know what it's supposed to be doing before and/or after the attack animation plays until it gets its next turn. When I changed Gato's second unknown 3 to its wander mode after its tech, it walked directly away as it normally does, then did its attack animation from afar. In other words, the tech data for his normal attack does not specify that Gato should approach the target during the animation or where he needs to be in order to use it, so... where is that information? Both appear to be influenced by unknown 3 due to the above.
4
Chrono Trigger Modification / Re: Simple way to map enemies to the techs they use?
« on: November 24, 2015, 12:52:55 am »If you think a bunch of lines like this would help you, I can share what I have.Code: [Select]MPRegenCheck.Checked = ((CharacterData[0x26] & 0x20) == 0x20);
You'll probably need the notes on the Temporal Flux Plugin Architecture as well... or I could actually comment my code. I've got a few lines like:Code: [Select]if (G.nRomType == 2)
That one's a prerelease check.
That's pretty much what I'm looking for. Don't worry about comments if you don't have them; I read disassembly all the time, so even just variable names are pretty cushy.
Temporal flux is really a heck of a thing. I'll bet it's competitive with whatever square non-coder designers used to build the game in the first place, if not nicer. As a rule, reverse engineering projects generate dead-end, disposable code, not editing suites with a plugin architecture. It's almost too good to just work on one game. And needs more plain text support. But I digress.
I'm still poking around at those wander modes, by the way. A few things I came across:
- $7EAEE2 is an array of wander modes
- $7E5E0D is an array of wander modes
- $7E974A is an array of wander modes
- $7E9897 is an array whose elements are decremented each frame like a timer if the corresponding NPC has a non-zero wander mode that has not changed since the last frame
- $7EA2B5 is the current wander mode for some procedures
- $C13760 is an array of near pointers to subroutines that deal with wandering behavior on a regular basis; the one that is called for an object in wander mode W is indexed by the byte array $CCFBAB[W]
- $CCFB91 is a byte array of small integers (0-2?) indexed by wander mode that determine the offset of some 8-byte structure in a larger structure (could be up to 0x40 bytes?) that gets copied from the rom, but there are a lot of layers of indirection. The destinations are arrays at $7E9799 and $7E97D9, the procedure includes $C133B2, and I am gonna go cross eyed if I try to look at it again.
Is it possible that the last byte of the attack instruction in AI scripts (Unknown 3 in AId) corresponds to a wander mode in some way? If I set Gato's to the same value as his wander mode, he attacks from the same position that he wants to wander to before using his tech. Just a thought.
5
Chrono Trigger Modification / Re: Simple way to map enemies to the techs they use?
« on: November 21, 2015, 05:09:33 am »i
My programs aren't that fancy - what I have basically copies the data from a byte array to the various form elements on load, then back to a byte array on save.
Most of what I have comes from Geiger's Chrono Trigger Database. I'll try to bump up the updating of that at some point - Note to self, email Geiger about how to record some of the offsets - but it won't be until after the week of Thanksgiving.
No need to be humble, the wealth of data alone is impressive. No matter what you're doing in there you never have to have memorized a tag or enum or bit flag value, every data type is logical instead of binary. No head math, no cross-referencing. And having written code working with the same structures, I know there's more logic to it than throwing the data at a form; without examining the tags, you don't even know what the output format is going to look like because the types are all different. It's possible to imagine far less elegant and robust tools and difficult to imagine improvements, so I think this is a job well done.
6
Chrono Trigger Modification / Re: Simple way to map enemies to the techs they use?
« on: November 21, 2015, 04:48:43 am »Here you can see #FB's AI script:
http://datacrystal.romhacking.net/wiki/Chrono_Trigger/Enemy_AI_Documentation
The name Magus may be misapplied (dunno who attached the names), but the script is definately Magus-like since it spams the big 3 and has specific Masamune react-scripts, but not against Masamune II. It only uses physical attacks on its turn, and counters with full-screen elemental mayhem.
I noticed how enemy HP-draining attacks seem to scale with character's level. Are they percentage-based?
I got this one! Yes. The damage caused by drain attacks is encoded as a fraction of maximum hp or mp, in 1/20th increments. So for a drain tech of power p against a target with maximum hp m , minimum damage is d = m × p ÷ 20 with a random 0 to (d ÷ 10) + 3 added.
7
Chrono Trigger Modification / Re: Simple way to map enemies to the techs they use?
« on: November 19, 2015, 08:36:36 am »
Oy mauron, this is going to sound pretty goofy, but if that disassembly I posted seems less complete than advertised, it's due to a really catastrophic crash-related data loss that I completely forgot about for months . Thank you, ambien, shoddy hard drives, and open office backward compatibility! Sadly this also affected my dump of techs (to a relatively minor degree) and the script I used to dump it in the first place. Long story short, I find myself very much wanting plain-text, byte-by-byte data structures and union tags for just about everything. The tech-related stuff I have mostly retained and/or can put back together with what I have, but the npc stats and ai scripts would be absolutely priceless. Is there any chance I can scrape the source to those editors, or get offset listings for the data they're accessing e.g. byte foo enemy hp, byte bar bit baz can't be thrown, etc? The editors are really slick, but sometimes you need something you can copy-paste, automated-analyze, scrape, convert to json or xml - plain text stuff =D. If it will be a big hassle, don't worry about it, just thinking it's probably laying around somewhere if it's in the editor.
8
Chrono Trigger Modification / Re: Simple way to map enemies to the techs they use?
« on: April 12, 2015, 04:35:17 pm »Here's the limited code I have on wander modes.Code: [Select]Disassembly: AI Action 00, set 1.
$C1/9810 AE D2 B1 LDX $B1D2 [$7E:B1D2]
$C1/9813 E8 INX
$C1/9814 8E D2 B1 STX $B1D2 [$7E:B1D2]
$C1/9817 20 14 AC JSR $AC14 [$C1:AC14] // Routine for targeting.
$C1/981A AE D2 B1 LDX $B1D2 [$7E:B1D2]
$C1/981D E8 INX
$C1/981E 8E D2 B1 STX $B1D2 [$7E:B1D2]
$C1/9821 BF 00 00 CC LDA $CC0000,x[$CC:0000] // Wander mode value.
$C1/9825 8D E5 AE STA $AEE5 [$7E:AEE5]
$C1/9828 7B TDC
$C1/9829 AD 52 B2 LDA $B252 [$7E:B252] // Enemy index - 3
$C1/982C AA TAX
$C1/982D AD E5 AE LDA $AEE5 [$7E:AEE5]
$C1/9830 9D 0D 5E STA $5E0D,x[$7E:5E0D]
$C1/9833 AD CC AE LDA $AECC [$7E:AECC]
$C1/9836 9D 15 5E STA $5E15,x[$7E:5E15]
$C1/9839 60 RTS
Disassembly: AI Action 00, set 2.
$C1/99B8 A9 02 LDA #$02
$C1/99BA 8D B8 B3 STA $B3B8 [$7E:B3B8]
$C1/99BD 60 RTS
Let me know what you find.
Alright, I'll start with a read breakpoint on $7E5E0D. M and X flags are set and clear in that code, respectively, in case I need to disassemble $C1AC14? Any chance the screen or world coordinates of the enemies are at some known offset?
EDIT: Better make that $5E10; didn't realize $B252 was the index among all battle participants & not just enemies.
9
Chrono Trigger Modification / Re: Simple way to map enemies to the techs they use?
« on: April 11, 2015, 06:14:16 pm »Here's a link to the old research thread on AI. Most of what I have is built up from there.
For enemy immunities, you can check out my enemy stats plugin, along with my other plugins, except for Enemy AId and Hi-Tech.
Wander mode definitely takes up a turn. Let's use Gato's action section as an example.Code: [Select]Default
- Attack 1 to random PC - this is where Gato use his single punch attack.
- Wander mode, related to nearest PC. On his first wander turn, Gato will move up to the upper left corner, then back to the middle.
- Tech 10, Gato's sing attack.
After that it loops back to his punch.
I'll look back at this tomorrow when I'm less tired.
If there isn't a table of wander modes and what they do somewhere, I might have to bite; my disassembler is hungry, and I hate not knowing stuff. Any breakpoints I should be aware of?
10
Chrono Trigger Modification / Re: Simple way to map enemies to the techs they use?
« on: April 10, 2015, 08:16:06 pm »This sounds like exciting work. As a CT speedrunner, I would love to learn as much as I can about the battle mechanics, and anything else really. I saw your post the other day and figured it was way beyond me... But then I remembered, couldn't you extract this out of the AI? By picking out the Action 02's... http://datacrystal.romhacking.net/wiki/Chrono_Trigger/Enemy_AI_Documentation
Perhaps there's a more straightforward way, I'm not sure =)
I looked at that link, and it's a lot of the same info that Mauron's provided. And yeah, that was sort of my last ditch non-simple tedious plan. When my mechanics guide is done, I do hope it will be useful to you, but when I try to put together tactics using what I've learned, it's a lot of the same stuff we've all been doing intuitively forever. Like using Ayla all the time. You can tell she's awesome at upper levels even if I haven't yet told you that her base damage grows with her level squared. If you use Lucca, you're probably feeding her magic tabs even if I haven't yet told you that her chance to inflict sleep with hypnowave is increased by her magic stat. I know, speed runners don't use Lucca a lot, it's just an example .
One fun insight that probably won't improve your time is that Lucca's Wondershot's damage multiplier is based on the seconds digit of your play time, so you could theoretically use a stopwatch or metronome or something to get it to do 3x damage every time.
EDIT: it's 3x damage, not 10x as I originally goofed.
11
Chrono Trigger Modification / Re: Simple way to map enemies to the techs they use?
« on: April 10, 2015, 07:55:58 pm »
Offset is 1, the byte right after the performance group index.
One more thing I noticed: In HiTech, the enemy physical attack damage formula appears to use the enemy's level instead of its attack attribute. Not sure if you know this already or not, or if it's relevant for what you're doing, but these are the formulas for the maximum random damage added, since I didn't see it in any of the info you provided:
Random damage is added after defense is applied, but before status modifications and modifiers / hit effects are applied.
You can credit me as sqykly if you like, but it looks like I've contributed just 2 bits you can use, so don't worry about it.
A few questions about the AI scripts. You said earlier that the first section (the one that isn't counters) will only run one thing per enemy turn. Does that apply to techs and attacks (actions that traditionally take up a turn) only, or is there also a wait for other stuff? In particular, I keep seeing the set wander mode both before and after a tech, and in some cases several set wander modes in a row. Some of those cases seem to correspond to stunned enemies, e.g. reptites hit with lightning set their custom byte to remember they're stunned, and the script that catches that condition is just a sequence of wanders and/or messages, followed by clearing the custom byte at the end. If wanders did not have an interval between execution, it seems like the stun would end immediately and not be very useful. However, if all wander modes consumed a turn, most enemies would only be attacking every 3 turns as their attacks are sandwiched between wander instructions. Can you clarify what wander modes mean & how they interact with turns? Or point me at something that can enlighten me? Thanks.
EDIT: Just one more question! I've seen plenty of bestiaries for CT in varying states of completeness, but never one that lists status immunities. I know I've seen the game checking for them. Is there a convenient source for this, or should I just dump it out of the rom like most everything else?
Bits | Meaning |
$07 | If none of these bits are set, the 2nd and 3rd effect headers are ignored. It looks like most double techs have this field set to 1 and triple techs have it set to 2, but I can't seem to find this being decremented or compared to an index at the moment, so I'm not ready to conclude that it's the number of effect headers to use beyond the first. |
$18 | Not known to be used (by me, anyway) |
$20 | If set, overrides bit $10 of all effect headers' flags at offset 7, causing the tech to disregard the effect header's failure conditions. |
$40 | If set, overrides bit $20 of all effect headers' flags at offset 7, bypassing evasion even if the effect header allows it. |
$80 | Not known to be used (by me, anyway) |
One more thing I noticed: In HiTech, the enemy physical attack damage formula appears to use the enemy's level instead of its attack attribute. Not sure if you know this already or not, or if it's relevant for what you're doing, but these are the formulas for the maximum random damage added, since I didn't see it in any of the info you provided:
Mode/tag | Maximum Random Damage added |
1 : PC melee weapon | PWR/3 + 1 |
2 : PC ranged weapon | HIT*77/256 + 1 |
3 : Magic | MAG*77/256 + 1 |
4 : Enemy physical | ATK*205/1024 + 2 |
5 : Ayla's fist | LVL/3 + 1 |
6 : Desperation / Summons | (MAXHP - HP)*103/1024 + 1 |
7 : Possibly unused attack with someone else's weapon | PWR*77/256 + 1 |
8 : Attack hackers with spaghetti code | Hours of time |
9 : Possibly unused weapon attack | PWR*77/256 |
10 : Variable attribute | ATTR*77/256 + 1 |
Random damage is added after defense is applied, but before status modifications and modifiers / hit effects are applied.
You can credit me as sqykly if you like, but it looks like I've contributed just 2 bits you can use, so don't worry about it.
A few questions about the AI scripts. You said earlier that the first section (the one that isn't counters) will only run one thing per enemy turn. Does that apply to techs and attacks (actions that traditionally take up a turn) only, or is there also a wait for other stuff? In particular, I keep seeing the set wander mode both before and after a tech, and in some cases several set wander modes in a row. Some of those cases seem to correspond to stunned enemies, e.g. reptites hit with lightning set their custom byte to remember they're stunned, and the script that catches that condition is just a sequence of wanders and/or messages, followed by clearing the custom byte at the end. If wanders did not have an interval between execution, it seems like the stun would end immediately and not be very useful. However, if all wander modes consumed a turn, most enemies would only be attacking every 3 turns as their attacks are sandwiched between wander instructions. Can you clarify what wander modes mean & how they interact with turns? Or point me at something that can enlighten me? Thanks.
EDIT: Just one more question! I've seen plenty of bestiaries for CT in varying states of completeness, but never one that lists status immunities. I know I've seen the game checking for them. Is there a convenient source for this, or should I just dump it out of the rom like most everything else?
12
Chrono Trigger Modification / Re: Simple way to map enemies to the techs they use?
« on: April 08, 2015, 12:47:52 am »
Well if you do know how hit effects work, then the only details I think you'll be interested in are the control header flags $40 and $20, which override each component effect header's flags $20 and $10, respectively. I'll work my symbol table into something readable shortly, and maybe you'll find something else you can use.
At a minimum, you'll need to be fluent in basic, c, and c++ in order to make sense of my notes in the disassembly. I kind of go with whatever suits what I'm looking at best, and it's not particularly consistent. Still, probably more readable than a disassembly.
Thanks for that list, I think that pretty much caps off what I need for what I'm doing. How would you like to be credited when I publish my faq?
At a minimum, you'll need to be fluent in basic, c, and c++ in order to make sense of my notes in the disassembly. I kind of go with whatever suits what I'm looking at best, and it's not particularly consistent. Still, probably more readable than a disassembly.
Thanks for that list, I think that pretty much caps off what I need for what I'm doing. How would you like to be credited when I publish my faq?
13
Chrono Trigger Modification / Re: Simple way to map enemies to the techs they use?
« on: April 06, 2015, 06:45:15 pm »
I looked over your attachments in detail, and they more or less solve my problem. In particular, HiTech has a list that maps, in most cases, a tech index in the table to the enemy that uses it and other identifying information. Is there any way I can get this information in a machine-readable format so I can integrate it with my data automatically? I can just read the contents of the listbox and write the enemy name and tech name in my table manually, but I like to leave anything tedious to a program =D
I did find a few things I've learned from the disassembly that your documents and editor are missing. In case you end up reading any of my notes, here's how my terminology maps to yours:
The trick to understanding some parts of the control header is that it's designed for the re-use of effect headers in double or triple techs. In the control header's flags, for example, bits $20 and $40 are LSR'd and OR'd with every hit effect flag involved, allowing them to override a hit effect's check for failure conditions or force it to hit when it normally would be evadable. Further, setting any of the bits 4, 2, or 1 in the same flag simply indicates that all of the hit effects' damage should be added up after they are calculated separately; otherwise, the 2nd & 3rd effects are ignored.
It seems that your hit effects are treated as atomic in the editor, but they are really indexes of unions of structures in a table, just like effect headers. The offset of said table escapes me at the moment, I'll get it at some point. Again, the purpose is usually to add damage, status, or elements to a double or triple tech without adding a new effect header. It looks like a lot of them are also used to add special effects to weapons, and others are necessary for the normal functioning of single techs as well. The most important one that comes to mind is the two modifier tags that are required for element resistance/weakness to be applied; without that modifier/hit effect, that doesn't happen.
The union is 3 bytes long, and the tag is the first byte. In the effects descriptions, "damage" refers to the damage done by the effect with the corresponding index in the control header only. Target flags refers to the same byte tested by required target flags / failure conditions. Unless otherwise specified, status is the byte with all the common debuffs like slow, poison, etc. RND is a random number 0-100.
I don't totally understand the AI scripts. How often is a condition evaluated? How often is an instruction executed? It seems like there are several actions in sequence, which makes me think it is waiting for its turn between instructions, or maybe I'm misunderstanding something. Also, what do these "switch states" instructions do?
That markup came out a little wacky... but it's a lot to fix... so let me know if you have trouble understanding.
I did find a few things I've learned from the disassembly that your documents and editor are missing. In case you end up reading any of my notes, here's how my terminology maps to yours:
My identifier | Your term |
ComboTechData | Control Header |
TechData | Effect Header |
Modifier | Hit Effect |
ParticipantList | Performance Group |
requiredTargetFlag (field of TechData) | Failure condition |
neverMiss (flag in TechFlags & ComboFlags) | Ignore hit & evade |
piercesProtect (flag in TechFlags) | Ignore shield |
piercesWall (flag in TechFlags) | Ignore barrier |
damageMultiplier (field in DamageTechData) | Tech power |
tag (field in TechData) | Mode |
The trick to understanding some parts of the control header is that it's designed for the re-use of effect headers in double or triple techs. In the control header's flags, for example, bits $20 and $40 are LSR'd and OR'd with every hit effect flag involved, allowing them to override a hit effect's check for failure conditions or force it to hit when it normally would be evadable. Further, setting any of the bits 4, 2, or 1 in the same flag simply indicates that all of the hit effects' damage should be added up after they are calculated separately; otherwise, the 2nd & 3rd effects are ignored.
It seems that your hit effects are treated as atomic in the editor, but they are really indexes of unions of structures in a table, just like effect headers. The offset of said table escapes me at the moment, I'll get it at some point. Again, the purpose is usually to add damage, status, or elements to a double or triple tech without adding a new effect header. It looks like a lot of them are also used to add special effects to weapons, and others are necessary for the normal functioning of single techs as well. The most important one that comes to mind is the two modifier tags that are required for element resistance/weakness to be applied; without that modifier/hit effect, that doesn't happen.
The union is 3 bytes long, and the tag is the first byte. In the effects descriptions, "damage" refers to the damage done by the effect with the corresponding index in the control header only. Target flags refers to the same byte tested by required target flags / failure conditions. Unless otherwise specified, status is the byte with all the common debuffs like slow, poison, etc. RND is a random number 0-100.
Tag value | Tag identifier | Byte 1 | Byte 2 |
What it does | |||
0 | mulIfCritical | multiplier | unused |
If RND < weapon's crit rate, multiply damage by multiplier | |||
1 | noModifier | unused | unused |
Does nothing | |||
2 | mulDiv | multiplier | divisor |
Multiply damage by multiplier, then divide by divisor. In HiTech, instances are referred to as X% Physical damage | |||
3 | multiplyIfTargetBit | targetBits | multiplier |
This tests the same flags byte as the required target flags / failure conditions. If the target has any of the bits in targetBits, multiply damage by multiplier/2. That's how you get stuff like X% damage against magic monsters. | |||
4 | mulByDeadFriendlies | unused | unused |
Multiply damage by (number of dead allies + 1). This is for one of Magus' weapons I think. | |||
5 | randomBySeconds | unused | unused |
Used for one of Lucca's weapons to apply a "random" multiplier to damage. In fact, it is not random at all. It picks a multiplier based on the lowest digit of the current play time. 0: 103/1024 (~10%), 1-2: 1/2, 3-4: 1, 5-7: 3/2, 8: 2, 9: 3 | |||
6 | inflictRandomStatus | unused | unused |
Damage is not effected. Instead, a random status is selected: 40% lock, 25% stop, 25% sleep, 10% poison. If the target is not immune to the chosen status, it is inflicted on the target with 100% probability. | |||
7 | inflictStatusIfTargetFlag | targetFlags | status |
Damage is not affected. Instead, check the target's flags for the specified bits; if any are set, there is an 80% chance to inflict the specified status. | |||
8 | inflictStatusWithProbability | probability | status |
Damage is not affected. Instead, if RND < probability, inflict the specified status on the target. | |||
9 | leaveTargetWith1Hp | probability | unused |
If RND < probability, damage is set to target's current hp - 1. Otherwise, damage is not affected. I think this is Nu's thing. | |||
10 | modifyDamageForElement | unused | unused |
Multiply damage by 4, then divide by the target's resistance to the attack's element. Without a modifier with this tag or the next, resistance to elements is ignored. HiTech refers to modifiers with this tag as Magic Attack. | |||
11 | mulDivAndElement | multiplier | divisor |
The exact effects of tags 2 and 10 are applied. This is used to both add damage and an element to an effect header / tech when it is part of a combo tech. HiTech refers to modifiers with this tag as X% Magic Attack. | |||
12 | setDp1Ato1 | probability | unused |
If RND < probability, set dp address $1A to 1. This is used exclusively with techs that steal items, so I imagine the probability corresponds to a success rate. | |||
13 | maybeFullHealMaybeClearStatus | flags: $80 fullHeal, $40 clearStatus | unused |
If the flags include fullHeal, disregard the previous damage and set it to -targetMaxHp. Otherwise, damage is not affected. If flags include clearStatus, the debuff status byte is cleared; in addition, some bits of the same byte that indicates deadness (but not the bit for dead) are cleared. | |||
14 | halfHp | probability | unused |
If RND < probability, damage is set to target's current hp/2. Otherwise, damage is not affected. | |||
15 | removeStatus | statusByteOffset | bitsToClear |
Damage is not affected. The status byte at the specified offset from the target's portrait byte is cleared of the bits in bitsToClear. This is used by one of Lavos' techs to remove your buffs. No check is made to ensure that statusByteOffset corresponds to a byte carrying status, or is even within the structure's size, so theoretically this can be used to do fun but pointless things like rounding experience down to a multiple of 32. | |||
16 | mulByAttackerHpMod10 | unused | divisor |
Multiply damage by (attacker's hp % 10), then divide by the divisor. | |||
17 | killAttackerOrTarget | unused | which |
If which = 0, kill the attacker; damage is not affected. Any other value causes the damage to become the target's current hp. | |||
18 | killTargetIfBitAndRandom | probability | unused |
The target's flags at offset 19 are checked for bit $80. If that bit is set and RND < probability, the target is killed. Otherwise, damage becomes 0, and the bit index corresponding to the target is cleared from $7EAE95 and $7EAE99. If $7EAE95 becomes 0 as a result, find the highest significance set bit in $7EAE99, clear that bit from $7EAE99, and set that bit in $7EAE95. | |||
19 | doubleOr9999 | unused | which |
If which = 1, damage is set to 9999 regardless of its previous value. Otherwise, damage is doubled. | |||
20 | setBitsAtOffset | byteOffset | bitsToSet |
Same deal as the tag 15 removeStatus, but bits are set instead of cleared. One of my notes says the bits are set on the attacker, not the target, but that seems like a possible typo. I'll have to look over it again. |
I don't totally understand the AI scripts. How often is a condition evaluated? How often is an instruction executed? It seems like there are several actions in sequence, which makes me think it is waiting for its turn between instructions, or maybe I'm misunderstanding something. Also, what do these "switch states" instructions do?
That markup came out a little wacky... but it's a lot to fix... so let me know if you have trouble understanding.
14
Chrono Trigger Modification / Re: New Tech Editor
« on: April 02, 2015, 11:25:24 pm »
I think I just kek'd myself. We've been doing a lot of the same work. I'm gonna give this a whirl and see if I can fill in any blanks, but just from reading the revision history, I think that's about all I'll be able to do. My project started out as an attempt at a mechanics guide, not an editor, so I know stuff like how defense is affected by poison status, but have no clue how the game encodes hit areas, sprite assemblies, or AI conditions; I observe that directly and have no need to decode and re-encode it for the appendix of an FAQ.
15
Chrono Trigger Modification / Re: Simple way to map enemies to the techs they use?
« on: April 02, 2015, 10:59:08 pm »
It's more than 22k lines long. Are you sure you don't just want my symbol table? I copy-pasted it out of my OpenOffice-based disassembler, so it has tabs for columns & will make a lot more sense if you paste it right back into a spreadsheet of some sort. Also no guarantees on what my pseudo-code is supposed to look like. Half of it is "you suck, square" every time they divide by 1, add 0, and branch over 0 instructions.
These performance groups; are you referring to the 3-member lists of PC identifiers beginning at $C249F? Or are you referring to the more interesting 11 byte structures that describe a whole combo for PCs? I've got a dump of tons of those for NPCs, but they're all for just 1 participant, i.e. the 2nd and 3rd slots for tech effect and modifier are null, in addition to the meaningless participant list.
I will look over the attachments at length, since I will be without net for a few nights. Thanks!
Edit: How did you know half of this stuff without disassembling?
These performance groups; are you referring to the 3-member lists of PC identifiers beginning at $C249F? Or are you referring to the more interesting 11 byte structures that describe a whole combo for PCs? I've got a dump of tons of those for NPCs, but they're all for just 1 participant, i.e. the 2nd and 3rd slots for tech effect and modifier are null, in addition to the meaningless participant list.
I will look over the attachments at length, since I will be without net for a few nights. Thanks!
Edit: How did you know half of this stuff without disassembling?
Pages: [1] 2