I’m trying to give a unit a skill through an event, but the problem is, it tells the player that the skill has been learned, when I just want it to be silent, with no notification
I’ve found changing classes changes skills silently. This is a roundabout way of doing it, but maybe you could change their class to a dummy class with the same name/stats/skills as the original, except with the addition of the new skill you want them to have.
The above only works for units without BWL data, which means units that can’t learn skills with events. If the unit does have BWL, only the class skill will change, previously learned skills will not be gained nor lost. If the initial class has no skill, then you could swap it to the copy of the class that does have the skill, but if that’s not the case that won’t work. If you want to silently give a skill, you’ll have to write an ASM function that writes to BWL data.
You can try one other thing though, that I haven’t tested and might work, which is using the autolevel patch I made. It levels the unit up by silently giving them 100 exp until the desired level, so maybe it will also silently grant skills. If it does work, you can use it along with level/class swapping to give the skill.
Unfortunately, from my testing, it doesn’t seem like autoleveling won’t make any skills appear
You could use the event writer patch.
Skills are saved to gBWLDataStorage at 0x203E894. It starts at char id 1 and each entry is 0x10 bytes while skills start at offset +1.
Therefore, you can edit a character’s skills with math:
0x203E894 + (0x10 * (unitID - 1)) + 1 = 1st skill. +2 at the end = 2nd skill. +3 = 3rd. +4 = 4th. Only 4 skills can be learned and saved like this.
As an example, Ephraim is unit id 0xF:
0x10 * 0xE = 0xE0 + 0x203E894 + 1 = 0x203E975 is Ephraim’s 1st learned skill.
Are there any tutorials on how to use the event writer? I’m trying to figure out how to try this!
There are not.
Event writer is a patch that writes a value to any address in ram. You give it an address to write to and a value (eg. Skill id) and have it write a byte.
BWL data only goes up to 0x45. Unit IDs past this cannot learn skills in ram.
Your math doesn’t seem right either.
0x203F538 - 0x203E894 = 0xCA4
Looks like you’re trying to edit unit ID 0xCB, which is way past 0x45.
That kinda sucks that it doesn’t go further, but it does seem to work for those before 45! Thanks!