First of all I apologize if this questions/problems for the eyes of the experts is simple and stupid
But I am dumb, really.
The main problem: I would just like to create a skill that if a character is close to a female character he takes a bonus.
I have already received some tips by Snakey1 (thank you so much for trying to help me first) at this link, I think?
and I have already applied the second tip
``` Done: pop { r4 - r7 } pop { r0 } bx r0 ```
the first advised to check a vanilla function to solve my problem (in my case is SET_FUNC ForEachUnitInRange, 0x8024EAD
, and I tried apply it, I opened the base game with No$gba and find the point (0x8024EAD) in the main windows:
but due to my ignorance, I donât know how to proceed, what to do, I searched and reread the Tequila guide for dummies, but I am a super dummy and now my mind is even more confused
I tried to solve my problem, bypassing the obstacle, I thought if there were other abilities that controlled the flags of a characterâs n°2 traits (where is the flag IsFemale
) and I found the loyalty skill, and I think this is the part that interests me in my case
> Loop: > ldrb r2,[r1] > cmp r2,#0x0 > beq End > add r1,#0x1 > > mov r3,#0x48 > ldr r5,CharData > sub r2,#0x1 > mul r3,r2 > add r5,r3 > mov r3,#0x4 > ldr r5,[r5,r3] > ldrb r3,[r5,r3] > cmp r3,#0x1 > beq Final > cmp r3,#0x2 > beq Final > cmp r3,#0x3 > beq Final > cmp r3,#0x4 > beq Final > cmp r3,#0x3B > beq Final > cmp r3,#0x3C > beq Final > b Loop
but from what I know this ability controls another flag, number 20, that if the unit is a lord
hence what I thought, from my stupid mind, to change the values ââaccording to a very stupid logic:
> Loop: > ldrb r2,[r1] > cmp r2,#0x0 > beq Done > add r1,#0x1 > > mov r3,#0x48 > ldr r5,CharData > sub r2,#0x1 > mul r3,r2 > add r5,r3 > mov r3,#0x4 > ldr r5,[r5,r3] > ldrb r3,[r5,r3] > cmp r3,#0x2 > beq Final > cmp r3,#0x4 > beq Final > cmp r3,#0x5 > beq Final > cmp r3,#0x6 > beq Final > cmp r3,#0x7B > beq Final > cmp r3,#0x7C > beq Final > b Loop
strangely the assembler did not report any errors ⌠so I started to see what had changedâŚ
here are some screenshots of my frankenstein:
I put my skill on Franz (itâs the one without image)
I have moved Franz as far away from other allies as possible
I put next to Franz Ephraim, who is a lord, nothing seems to have changed
I move Eirika ⌠and Franzâs stats change
I thought I succeeded by some miracle, but of course it isnât, because from what I tried later, now see if the flag is a lord and Is female are both activeâŚ
One more thing, my code was supposed to increase both the attack and the character accuracy, but it seems to only improve the attack and I donât know what I did wrong with this part
Final: mov r0, r4 add r0,#0x5A @Move to the attacker's damage. ldrh r3,[r0] @Load the attacker's damage into r3. add r3,#2 @add 2 damage. strh r3,[r0] @Store dmg. add r0,#0x60 @Move to the attacker's hit. ldrh r3,[r0] @Load the attacker's hit into r3. add r3,#10 @add 10 hit. strh r3,[r0] @Store.
Now, I understand that I looks like a big idiot, and my problem is probably easily solvedâŚ
but I canât go anywhere by myself, at the same time I donât want to give up.
thatâs why Iâm here bothering you with my stupid questions, I hope someone armed with patience will help me and guide me on how to solve my problem
I hope I have not bothered anyone with this post and sorry for my english