#[CBT] - Is there any easy way to copy an allies persona skills for an enemy?
130 messages · Page 1 of 1 (latest)
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
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
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
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.
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
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
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
Well I cant really go and copy the protags current personas if enemies dont inherit so this is the next best thing

You mean I could do that from the start!
well thats some code yoinked already 
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?
You mean ||?
Yes
It's a logical OR, meaning at least one of the conditions it's connecting must be true.
oh

You see my keyboard lacks the key for that and I cant switch its type
the input for that just breaks sometimes
No bar/pipe or backslash for you, then!? RIP....
yeah, this was for Haru so it's checking for one of her confidant IDs to equal 10
because it's split for the girls between platonic vs romance
both the persona IDs and the confidant IDs are on Amicitia
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
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.
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.
yeah this was done to make them switch to their 3rd semester persona if you're in 3rd semester
and have completed their confidant
Sure, it wouldn't work if you don't want to be dependent on that condition.
yeah it's not normally something you see in AI scripts
so in the end I didnt even have to read memory 
but you can run stuff like that from AI scripts no issue
its fine I can make it an or

you gotta be kidding me there is no recorded data
guess I will just track from the first to the end 
data for what?
well there's no set date on them
oh and one other small question is can I do this?
but why does the date matter
It's not a fixed date. At least not for the awakening itself.
well yeah it doesnt really matter 
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?
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
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.
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
well you need something to plug into the CBT function
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.

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!
E701_200 is his third awakening.
E435_001 miiiight be his Rank 10? I'm not at my computer to double-check.
I just want to see what bits it changes
oh god I am gonna get invested into this and make an overly complicated targeting system 
why are you going off the bitflags
like this would work the same without having to dig to find whatever bitflags these are lol
how would other mods be screwing with checking confidant level and the calendar date
Lol, I don't know. I agree it's not necessary.
I just ditched the rest and used the dates
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 
or is this trying to imply that it looks at the player party?
if it's called from enemy script, almost anything with EN in it is checking the player side
not the enemy
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 
its bool right?
yeah
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.
Yeah I am wanting to make notes of each ailment to make smarter targeting

