Chrono Compendium

Kajar Laboratories - Fan Works and Submissions => Chrono Trigger Modification => Topic started by: IHBP on July 17, 2019, 10:50:32 am

Title: Another idea
Post by: IHBP on July 17, 2019, 10:50:32 am
The Berserker Ring changes a characters color which looks especially cool on Robo, I've converted the Relic accessory into a Robo exclusive item but it would be even better if I could give it the berserker's color change effect (without losing control of my character obviously. )

Actually in Status effects 2 where berserk is located there there are two empty slots, giving one of those the "red" option would allow anyone to add it to any accessory they want.

Probably a longshot but would it be possible to have the accessory load the pallet at location load instead of battle load up?
Title: Re: Another idea
Post by: Zakyrus on July 17, 2019, 01:44:15 pm
That would be sweet! Perhaps even a custom pallet shift for battle aura effects as well, ...?

~Z
Title: Re: Another idea
Post by: Mauron on July 17, 2019, 02:11:45 pm
Finding the status effect glow code has been on my todo list for some time. I'll take a look later.
Title: Re: Another idea
Post by: Mauron on July 17, 2019, 11:26:35 pm
0x0CF7A0 and 0x0CF7A4 - Change to 81 (unused 01) or 90 (unused 10) to add an unused status with Berserk's coloration.

0xCCF780 - Status effect color changes, 4 bytes each.
Byte 1 - Byte offset from status effect table.
Byte 2 - Bits to check.
Byte 3 - Routine to use for applying status effect. 03 - Berserk coloring.
Byte 4 - Unknown.

I'll have more later.
Title: Re: Another idea
Post by: IHBP on July 18, 2019, 09:51:37 am
Yup I got it too work.
Title: Re: Another idea
Post by: Mauron on July 18, 2019, 03:52:51 pm
The data is simple enough that I'll probably be able to make an editor for it in a day or two, and it'll be easy to add extras with it.
Title: Re: Another idea
Post by: IHBP on July 18, 2019, 05:22:11 pm
That's great, any idea what features it'll have?
Title: Re: Another idea
Post by: Mauron on July 18, 2019, 05:28:54 pm
It depends on the rest of what I figure out, but at the very least, adding, removing, and reordering status effect display. I'll probably include an option to change the Berserk palette and see how it displays.
Title: Re: Another idea
Post by: IHBP on July 18, 2019, 07:03:27 pm
Is there any possibility of it loading the pallet on screen load or is that just wishful thinking?
Title: Re: Another idea
Post by: Mauron on July 18, 2019, 07:19:49 pm
That's a major recode. I'd flavor text it as a supercharge mode that can't be used all the time.
Title: Re: Another idea
Post by: IHBP on July 18, 2019, 07:24:50 pm
It'll be fun to play with either way.  Will it always borrow from Berserks pallet pr is it possible to have say blue in one slot and red in another?
Title: Re: Another idea
Post by: Mauron on July 18, 2019, 08:17:00 pm
Currently it has to be the same palette. It might be possible to change that, but I can't guarantee anything.
Title: Re: Another idea
Post by: IHBP on July 18, 2019, 08:39:52 pm
Cool,  just throwing ideas out there, can you feel I'm excited?
Title: Re: Another idea
Post by: Mauron on July 18, 2019, 08:57:33 pm
Definitely.
Title: Re: Another idea
Post by: IHBP on July 18, 2019, 10:55:23 pm
Last one (no promises) since the Safe Helm can change a character's idle stance is it possible to make an accessory change a character's attack animation? For example changing Robo from a punch animation to using Debbuer's missile attack?
Title: Re: Another idea
Post by: Mauron on July 19, 2019, 02:26:35 am
I'd lean towards no on that one. Attacks pull from more complex data that's visible in Hi-Tech, while idle stance is a single animation on loop. It might be possible to work in that attack as Robo's ranged attack though.

We need a thinking Nu emoji.
Title: Re: Another idea
Post by: IHBP on July 19, 2019, 08:21:46 am
Ya I like that idea, where do I start.
Title: Re: Another idea
Post by: Mauron on July 19, 2019, 01:46:41 pm
Start with Warrior Workshop, and uncheck Melee Attacks Only for Robo. See what his default ranged attack looks like.

It'll probably need changes, but it's a start.
Title: Re: Another idea
Post by: IHBP on July 19, 2019, 02:40:28 pm
Same as his regular attack, the rest a place in high tech where I can edit it, I'll give that a try
Title: Re: Another idea
Post by: Mauron on July 19, 2019, 03:51:20 pm
The animation is under Robo -> Ranged Attack. When he uses his ranged attack, he punches without moving.

I've been doing some fiddling, but there's some things I need to figure out first.
Title: Re: Another idea
Post by: Zakyrus on July 19, 2019, 06:46:56 pm
The animation is under Robo -> Ranged Attack. When he uses his ranged attack, he punches without moving.

I've been doing some fiddling, but there's some things I need to figure out first.

Cool. I didn't know about this.
Also, I'm hoping the tutorial series will bring a greater flow of ROM hackers into the Chrono Trigger editing scene, I'm mentioning *anything* I know about the VARIANTs in the EVENT EDITOR as well as unknowns, and variants in the other plugins. Hopefully, with increased user traffic, people will play around with/and be more encouraged to decipher what those mean (so we can update the editors).

~Z
Title: Re: Another idea
Post by: IHBP on July 19, 2019, 09:26:10 pm
I noticed that the long range attack triggers if you're more than one hex away, that's way to often for the missile animation, maybe just as the range attack's critical animation would suit better.
Title: Re: Another idea
Post by: Mauron on July 19, 2019, 11:55:04 pm
Critical in general is doable, and it might be possible to change everyone's ranged distance, but there's not a specific ranged critical.
Title: Re: Another idea
Post by: IHBP on July 25, 2019, 03:50:29 pm
How hard would it be to have enemies E7 E8 and E9 (Lavos clones) do nothing but exclusively use Lightning Fire and Ice 2 respectively every turn?

The reason I ask is I want to make a Magus interlude where he fights the three gurus.
Title: Re: Another idea
Post by: Mauron on July 25, 2019, 05:23:59 pm
Starting at 0x0CC538, you'll need three copies of the following.

00 00 00 00 FE 02 9A 05 00 00 00 FE FF 00 00 00 00 FE 00 00 06 00 FE FF

Change the bold to Fire/Ice/Lightning 2 values.

You'll need to change pointers at 0x0C8CD8 and 0x0C8CDA to match the second and third copies. All three should fit, but if it goes beyond 0x0CC59A you'll have a problem.
Title: Re: Another idea
Post by: IHBP on July 25, 2019, 09:50:22 pm
Thanks I'll give it a try tomorrow
Title: Re: Another idea
Post by: IHBP on July 27, 2019, 11:44:51 pm
So I spent today fixing my own bugs but now have a small understanding how ai is stored. But I am curious what exactly causes enemies that accompany bosses to die when the boss does? I tried adding them to regular battles and they still kept fighting when they were the last ones, except  the left Lavos bit which ended the battle before any enemies were beaten. This is really the only obstacle left to having guest party members.

Also any idea what's up with the Barrier affect? Specifically from armor or accessories. From observations it sometimes works completely sometimes it half works and quite often does nothing, by contrast Shield works 100% of the time.
Title: Re: Another idea
Post by: Mauron on July 28, 2019, 12:22:44 am
For bosses, the main form has a final attack of tech 7F. Sometimes other parts will have a condition to check for the main form. For guests, I'd do this:

05 01 00 00 FF 02 7F 03 00 00 00 FF.

If only the guest is alive, defeat all enemies. And give it the same load enemy/battle flags used on Gato.

Barrier: Can you give more specific examples? It should be 100% dependent on the control and effect header flags for the attack.
Title: Re: Another idea
Post by: IHBP on July 28, 2019, 09:05:55 am
So I played around with this this morning and I was able to make an enemy use the attack I wanted, I made it use the unused attack EC: then I changed the graphics of that attack to the ones I wanted.

So far so good. Unfortunately I couldn't make it attack other enemies despite my new tech meeting the conditions ( Enemy vs Enemy:True, and targeting One Ally 0x00)

The last bit you posted didn't seem to do anything, do I use exclusively that or in addition to what's there? Also do I give that to the other enemies that are with the guest or the guest itself? For now I'm just using enemy E7.

As for Barrier if I had to guess and I'm a terrible guesser I think it has problems with status effect that have the glow effect, even if they come from another piece of equipment.
Title: Re: Another idea
Post by: Mauron on July 28, 2019, 12:39:31 pm
The data I gave previously should be part of it's AI, probably first in both the action and reaction section.

For using a tech command against an enemy, you'll need to change targeting in AI as well.

Enemy AI (https://www.chronocompendium.com/Term/Enemy_AI.html). Actions are outdated, but the rest is up to date.

02 EC 05 00 00 00 - The bolded is the targeting value. Use one of the enemy values, other than 03.
Title: Re: Another idea
Post by: IHBP on July 29, 2019, 01:08:42 pm
So for now I've put the three gurus battle on hold until next release, I just want to get a working guest character for now.

So from the notes I see that enemies have two blocks of data actions and reactions each action is terminated with FE and the block terminated with FF.

So I set up enemy E7 as follows,  05 01 00 FE 02 (EC) (07) 00 00 00 FE FF 02 7F 03 00 FE 00 00 00 60 00 FE FF

EC Is the attack I created which it uses but only when it's the last one alive, and 07 should be the targeting (one enemy) but still shoots my party.
Title: Re: Another idea
Post by: Mauron on July 29, 2019, 02:36:58 pm
Code: [Select]
07 - Farthest PC
Try 03. AI Targeting is different from PC tech targeting or enemy tech targeting.
Title: Re: Another idea
Post by: IHBP on July 29, 2019, 05:33:13 pm
Ok so I have the battle ending when it's the last one alive working perfectly and it uses the attack I wanted it to but the targeting at 03 makes it only attack itself 00 and 04-09 make it attack one party member, 02 03 and anything above 09 will make it take no actions.

Also what can I change to make it move around?

For actions I have the run away code and the shoot laser code.
05 01 00 00 FE 02 7F 03 00 00 00 FE 00 00 00 00 FE 02 EC 00 00 00 00 FE FF

For reactions I have just the run away code again.
05 01 00 00 FE 02 7F 03 00 00 FE FF
Title: Re: Another idea
Post by: Mauron on July 29, 2019, 06:00:20 pm
17, 18, or 19 should work. Did you see the link on the last page to the AI documentation?
Title: Re: Another idea
Post by: IHBP on July 29, 2019, 11:16:16 pm
That's it, we have the first fully working guest companion  :o

I actually did read the link, what I could understand of it was actually very helpful in organizing the data, I however did not read far enough down to see the targeting bytes and I feel kinda dumb about that  :oops:
Title: Re: Another idea
Post by: IHBP on July 30, 2019, 04:06:52 pm
So I've been putting my guest on various maps and it hasn't caused much problem except that it counters when its attacked, is there anything I could put in the reactions section to make it ignore being hit?

It gets annoying when you use all enemy spells, other than that it's super fun.
Title: Re: Another idea
Post by: Mauron on July 30, 2019, 04:48:20 pm
What's the full AI like?
Title: Re: Another idea
Post by: IHBP on July 30, 2019, 05:01:36 pm
Ya I was thinking it might be leftover from the enemies original code, could I just fill it in with FF?
Title: Re: Another idea
Post by: IHBP on July 30, 2019, 06:15:07 pm
Ok so I played with it and that doesn't seem to be it the whole reaction part of the code looks like this

05 01 00 00 FE 02 7F 03 00 00 FE FF 00 00  00 00 00 FE 00 00 00 00 00 FE 00 00 00 00 FE FF
Title: Re: Another idea
Post by: Mauron on July 30, 2019, 06:25:50 pm
You need one more value before the first FE FF in that section. I'm not entirely sure how it's handling things after that, because it's going to hit errors at that point.

If inserting an extra value doesn't fix things, give me the full AI, not just the reaction section.
Title: Re: Another idea
Post by: IHBP on July 30, 2019, 06:33:44 pm
Not sure what value to add, I did 7F 03 00 (06) FE FF and nothing changed the full actions are in post 32, I'll keep playing with it to see if anything changes.
Title: Re: Another idea
Post by: IHBP on July 30, 2019, 06:38:57 pm
Forget what I just said, I put a few more 00 00 00 00 FEs before the FF and that did it
Title: Re: Another idea
Post by: Mauron on July 30, 2019, 08:21:54 pm
Here's the basic AI structure.

Condition FE
Action FE
FF
Condition FE
Action FE
FF

The first block is action, and the second is reaction. Conditions are always 4 or 8 bytes long, actions vary in length and can have as many per block as you want, unless you start with the randomizer, in which case there must be 4 to choose from.


05 01 00 00 FE 02 7F 03 00 00 FE FF 00 00 00 00 00 FE 00 00 00 00 00 FE 00 00 00 00 FE FF

In this section here, the bolded is being read as the displayed message for the Guest's final attack. It then hits an unexpected FF, which based on the Red Beast's behavior, should cause it to end the section.

In the red, there's a 5 byte action, so it'll get lopsided there, but it should have ended prior to that.

I'd double check all lengths in your commands to make sure they're right.
Title: Re: Another idea
Post by: IHBP on July 30, 2019, 10:53:52 pm
Ok that clarifies things a bit, I can probably refine it a little now.
Title: Re: Another idea
Post by: IHBP on August 08, 2019, 01:54:40 pm
I figured out what the problem I was having with barrier was, I was testing it on Nu Spekkio and he has a reduce to 1 HP move, I forgot those cancelled barrier and protect.