#[CBT] - Is there any easy way to copy an allies persona skills for an enemy?

130 messages · Page 1 of 1 (latest)

ruby jay
#

I have a general idea for what I CAN Do however it relies very heavily on a lot of checks and I feel that this would end up being ineffective using that method, so I wondered if there was any hidden function that copies a persona skills or skill ids (and subsequently returns them of course).

regal elbow
#

again, enemies don't read persona data at all

#

so no

ruby jay
#

Could I read the memory slots where data for allied personas is to get the relevant data from there? and then run assigns and checks

#

This would remove most of the checks from the original as now its just a straight read

#

yeah if I find where the current allies persona stats/skills are in memory I can pass it into here and grab the ids from there no?

#

this might also rely on being able to check multiple bits at once with an input like BIT_CHECK( 1, 2, 3) then return values like var0, var1, var2

#

for efficency

ruby jay
#

if I cant determine the skills in a more modular fasion I can just check what the current persona is for each party memeber and just use my brain to think what they wouod have

regal elbow
#

I'm incredibly confused as to what the point of this is

#

but it sounds like you're making this way more complicated than it needs to be

lone oyster
#

Enemies don't really have skills in the first place. The skills you see in skill section of enemy's data are there for show only with shadow calcalus (well, also the passives apply).
The actual skills enemies use are in their AI files (or in elsai tbl if the enemy is very simple).

If you want to check what skills personas of player/allies have at the moment in enemy AI script.. well, that's not completely impossible but very difficult.

By that point it would probably be easier to create your own flowscript function with Flowscript Framework, though earlier there somewhere was a discussion on how to read any arbitrary data in game's memory with in flowscript with BIT_CHKL or something (I haven't done that and it's not a good way of doing things anyway).

#

In any case that either method requires exe reverse engineering and possibly a code mod.

ruby jay
#

I wanted it as a detail but it kinda doesnt matter

#

I can just use my brain and look for the unique skills allies get on awakenings and just change which persona is used visually instead

#

then not be an idiot with the skills

#

So basically not make captain kidd use brave blade

#

sticking to gods hand

#

thats pretty simple and I semi-understand what to do but if I ever just dont feel like it I will either skip this entirely or just use the base personas

#

it's not a big deal I just wanted to get the hard work if it was possible done now

ruby jay
#

Ok so my idea before I wanted to try and start searching memory was this, it has flaws but should cover most possible circumstances

#

just realised I put in the exact skill ids but it works for a demonstration

#

of course it also needs some more fine tuning though I could just return the value directly but hey I need to understand what I can do

lone oyster
#

wait actually yes lmao

#

this should work 100%

#

it checks for the skills of player's currently equipped persona but besides that it should work

ruby jay
#

Well I cant really go and copy the protags current personas if enemies dont inherit so this is the next best thing

regal elbow
#

oh, I just did confidant rank checks for that lol

ruby jay
#

You mean I could do that from the start!

#

well thats some code yoinked already shoTroll

#

DO you minf documenting those so I can use them later for the other party members

#

oh and in this case what is the double bar for?

#

is it a comma replacement?

gray pebble
ruby jay
#

Yes

gray pebble
#

It's a logical OR, meaning at least one of the conditions it's connecting must be true.

ruby jay
#

oh

#

You see my keyboard lacks the key for that and I cant switch its type

#

the input for that just breaks sometimes

gray pebble
#

No bar/pipe or backslash for you, then!? RIP....

ruby jay
#

sometimes the input works other times it doesnt

#

its bound to the same key as hashtag

regal elbow
#

because it's split for the girls between platonic vs romance

regal elbow
ruby jay
#

I mean the functions

#

I looked through the ai script guide and checking the confidant level never came up

#

I assume that days_startend looks for the date they get the second awaken in memory or something but that date is different for each member

gray pebble
#

No, it's checking whether you're between certain dates (the above code is checking between 1/1 and 2/3, I believe), so you'd want to make sure those line up with the dates you actually want for a given character.

ruby jay
#

ok then

#

I will make note of that when I put it down

gray pebble
#

For Ryuji in particular, you might also just be able to do a if ( BIT_CHK( ( 0x10000000 + 231 ) ) ), since that's the bitflag that gets set during his third awakening persona evolution (EVENT_DATA/SCRIPT/E700/E707_200.BF).

All of the party members should have something like that -- e.g., Haru's should check 227 instead of 231.

ruby jay
#

ok

regal elbow
#

and have completed their confidant

gray pebble
#

Sure, it wouldn't work if you don't want to be dependent on that condition.

regal elbow
ruby jay
#

so in the end I didnt even have to read memory SkadiDaijoubu

regal elbow
#

but you can run stuff like that from AI scripts no issue

ruby jay
ruby jay
#

you gotta be kidding me there is no recorded data

#

guess I will just track from the first to the end Clueless

regal elbow
#

data for what?

ruby jay
#

for the date of the event

#

but oh well accuracy doesnt matter

regal elbow
#

well there's no set date on them

ruby jay
#

oh and one other small question is can I do this?

regal elbow
#

but why does the date matter

gray pebble
#

It's not a fixed date. At least not for the awakening itself.

ruby jay
#

well yeah it doesnt really matter SkadiDaijoubu

#

actually wait I dont think functions work the way I thinl they do here

#

I cant pass in and return values like :

AAA = function(BBB)

right?

regal elbow
#

yeah you can

#

plenty of AI scripts do that

ruby jay
#

Oh wdf

#

ok then I can make this not terribly inefficient then

#

although

#

actually it should be fine

#

I set it once and then it doesnt matter

gray pebble
#

I mean, it depends on the function/method. If you're making your own, it can do whatever you want, but you can't just pass any argument or get any return value from anything.

ruby jay
#

would it be better to do the persona id assignment once over for everyone or just let it do it on a per turn basis?

#

actually I will do it all at once then set it as a global

#

in the battle script

#

actually I can do it in the ai script

regal elbow
#

well you need something to plug into the CBT function

ruby jay
#

ok I have this SkadiDaijoubu

gray pebble
#

Looks reasonable to me 🤔

#

I like the OR'd condition, lol. You probably wouldn't ever have the latter being true without the former being true, but it shouldn't be an issue, anyway.

ruby jay
#

I mean someone will probally try something funny

#

and change bitflags

#

uh the animatica wiki doesnt have anything about morgana rank 10 or third awakening 😔

#

I saw rank 9 but

#

looks like I am skipping that for now!

gray pebble
#

E701_200 is his third awakening.

ruby jay
#

wdf

#

omg all the others have (Third awakening) I CANT

gray pebble
#

E435_001 miiiight be his Rank 10? I'm not at my computer to double-check.

ruby jay
#

I just want to see what bits it changes

ruby jay
#

oh god I am gonna get invested into this and make an overly complicated targeting system ICANT

regal elbow
#

why are you going off the bitflags

regal elbow
gray pebble
#

As a failsafe, it sounded like 🤷

#

In case of other mods' shenanigans, I guess.

regal elbow
#

how would other mods be screwing with checking confidant level and the calendar date

gray pebble
#

Lol, I don't know. I agree it's not necessary.

ruby jay
ruby jay
#

Oh and yeah I will need a battle script here to give me the party members idea as according to the documentation of the ai scripts I cant just count the number of player characters with an ailment I need to check if one of them have it withan id AdinMad_PartingGift

#

or is this trying to imply that it looks at the player party?

regal elbow
#

it looks at player party

#

if called from an enemy AI script

ruby jay
#

wtf

#

ok then I am good

regal elbow
#

if it's called from enemy script, almost anything with EN in it is checking the player side

#

not the enemy

ruby jay
#

Ok then

#

I could have something later which looks for 2 or more then does an aoe

#

Or be lazy and make it aoe when there is one ICANT

#

its bool right?

regal elbow
#

yeah

ruby jay
#

okie steve_thumbsup

#

I might make a general help thread for this

slender rapids
#

AI_CHK_ENBAD( 0x1 ) would return true if at least one party member is burned. It doesn't check for the other ailments; you'd have to add up all their numbers (from the enum that lists them in the doc) and put that number as the parameter to check for any ailment at all.

ruby jay
#

Yeah I am wanting to make notes of each ailment to make smarter targeting