ROM Hack Animal Crossing: New Leaf ROM Hacking

Manito

Well-Known Member
Member
Joined
Dec 15, 2014
Messages
327
Trophies
0
Age
25
XP
424
Country
United States
I replaced Victoria the horse with Isabelle so she's a regular villager!
CS7lmTOVAAET8TW.jpg:large
CS7lmTGVAAA2av2.jpg:large

I also added in City Folk's OST. https://twitter.com/cilerbaa/status/661630330919497728/video/1 (Ignore the tweet. I did end up getting the looping to work)
Can you make a tutorial on how to make Isabelle a villager?
 

Fredabill

Member
Newcomer
Joined
Oct 27, 2015
Messages
22
Trophies
0
Age
24
XP
102
Country
United States
I put Tomodachi Life's theme bcstm (from its romfs) into the animal crossing files, and yes i renamed and replaced.
And put Moe, a cat villager, over Isabelle, I did all the hex editing crap, bla bla, started up HANS with romfs mode and animal crossing loaded up, but after loading when the intro music was supposed to play, it froze...
Anyone know what I had did wrong?
 

Shrinefox

Persona Modder
Member
Joined
Sep 5, 2013
Messages
124
Trophies
1
Website
shrinefox.com
XP
511
Country
United States
The thing is, I don't know if you can save changes in that build even if you import an obj or smd. The changes show up in the viewer but there's no save button... And it doesn't save automatically.
 

probablygay

Well-Known Member
Member
Joined
Jan 20, 2014
Messages
127
Trophies
0
XP
224
Country
United States
Ohana3ds rebirth exports and imports obj/smd files, so you can probably use old ohana3ds alongside it to change the textures since the new one lacks that functionality. It will probably get messy and complicated though, and I'm sure that method has its limitations until ohana3ds rebirth updates.

So, I'd use Ohana3DS rebirth as a means to import my mesh data, and then go back and use old ohana3ds to do textures and I'll be good to go?

EDIT: Also, do each of the villagers have their own head and body models, or are the models separated by animal species and differentiated via textures?
 
Last edited by probablygay,

troa11

Older Than You
Member
Joined
Apr 11, 2006
Messages
260
Trophies
0
XP
967
Country
United States
Just wanted to say I figured out how to safely expand names, and I assume the principle will apply to the other script files...too tired now to type it up, but I'll give a description tomorrow. By the by, it's insanely tedious, but hopefully someone can use the knowledge I came up with to write a program that'll do the same thing much easier.
 
  • Like
Reactions: Cilerba and Manito

MRJPGames

Pretty great guy
Member
Joined
Aug 17, 2013
Messages
1,199
Trophies
1
Location
The Netherlands
Website
fizazy.com
XP
1,674
Country
Netherlands
I put Tomodachi Life's theme bcstm (from its romfs) into the animal crossing files, and yes i renamed and replaced.
And put Moe, a cat villager, over Isabelle, I did all the hex editing crap, bla bla, started up HANS with romfs mode and animal crossing loaded up, but after loading when the intro music was supposed to play, it froze...
Anyone know what I had did wrong?
If you're still unable to do this, you're probably running an older version of HANS, only the latest release supports Animal Crossing; NL with Custom ROMFS.
 

troa11

Older Than You
Member
Joined
Apr 11, 2006
Messages
260
Trophies
0
XP
967
Country
United States
Alright ladies and gentlemen; a short guide to point you in the right direction, for as much time as I have today. If this is still super-confusing I'll try to get some pictures and be more specific. As I said before, I'm going to assume these principles would apply to any script file, but the one I used was STR_NNpc_name.umsbt found in the Script/Str folder of RomFS.

The structure of the file starts off with a large chunk of data that includes the villager code references. I'm not sure what this does, I tried to swap two of them and it broke their names entirely. Anyway, beyond that is a large zero set, and then at offset 288E starts another chunk of data that includes the villager names. If you're editing the US English names, this is where you want to be. The large group preceding the actual names is in fact references to where each name starts. However, they don't have any actual reference to the file in hex that I can tell, so they're basically internal pointers that you have to edit relative to each other. The pointers are two bytes, separated by 3 "00" bytes each. The first name "Cyrano" has the address 0C 07. If you look at the pattern of numbers, you can find that the address works as "Small Address" "Large Address" In other words the first byte increments from 00 to FF, at which point the second byte increments by 1.

Now, the decimal difference between one address and the next tells you how many bytes that name is allotted. Looking at the first two addresses, 1A minus 0C gives you 14 in decimal, and since the first name is Cyrano, that makes sense, as each name is allotted twice as many bytes as letters in the name, plus 2.

Okay, fair enough. But there's a monkey in the mix. Notice that some names have extra blanks after them? Well, each extra set of two bytes following the names also has an address in the table at the start here. So you can't just count off names and count down the addresses. You have to count the extra blanks as well to find the address of the name you want to expand. I used a spreadsheet with some repeated formulas to work this all out.

THEN, once you know the offset of the name you want to expand you're ready to go. Add in as many bytes as you need to finish the name (Remember you need 2 bytes for each extra letter). Now, you need to increase the offset for each FOLLOWING entry by the number of bytes you added. How far you have to go in doing this depends on what you want to do exactly, you have some options...
1 - shorten another name later in the list to balance out (remember to delete the same number of bytes later on, not just "00" the characters).
2 - come to one of the gaps with blank entries and delete enough bytes to balance out (as far as I can tell, the blank entries are not used, so it doesn't matter where they reference exactly and it's okay if a previous name overlaps them some)
3 - just increase the pointers until the end of the list.

I should point out that this same technique works in Happy Home Designer, except that (2) is not an option since it has no empty entries.

Hope this helps someone else! Feel free to ask for clarification
 

Ar7ific1al

Well-Known Member
Member
Joined
Jul 12, 2009
Messages
134
Trophies
1
XP
324
Country
United States
Alright ladies and gentlemen; a short guide to point you in the right direction, for as much time as I have today. If this is still super-confusing I'll try to get some pictures and be more specific. As I said before, I'm going to assume these principles would apply to any script file, but the one I used was STR_NNpc_name.umsbt found in the Script/Str folder of RomFS.

The structure of the file starts off with a large chunk of data that includes the villager code references. I'm not sure what this does, I tried to swap two of them and it broke their names entirely. Anyway, beyond that is a large zero set, and then at offset 288E starts another chunk of data that includes the villager names. If you're editing the US English names, this is where you want to be. The large group preceding the actual names is in fact references to where each name starts. However, they don't have any actual reference to the file in hex that I can tell, so they're basically internal pointers that you have to edit relative to each other. The pointers are two bytes, separated by 3 "00" bytes each. The first name "Cyrano" has the address 0C 07. If you look at the pattern of numbers, you can find that the address works as "Small Address" "Large Address" In other words the first byte increments from 00 to FF, at which point the second byte increments by 1.

Now, the decimal difference between one address and the next tells you how many bytes that name is allotted. Looking at the first two addresses, 1A minus 0C gives you 14 in decimal, and since the first name is Cyrano, that makes sense, as each name is allotted twice as many bytes as letters in the name, plus 2.

Okay, fair enough. But there's a monkey in the mix. Notice that some names have extra blanks after them? Well, each extra set of two bytes following the names also has an address in the table at the start here. So you can't just count off names and count down the addresses. You have to count the extra blanks as well to find the address of the name you want to expand. I used a spreadsheet with some repeated formulas to work this all out.

THEN, once you know the offset of the name you want to expand you're ready to go. Add in as many bytes as you need to finish the name (Remember you need 2 bytes for each extra letter). Now, you need to increase the offset for each FOLLOWING entry by the number of bytes you added. How far you have to go in doing this depends on what you want to do exactly, you have some options...
1 - shorten another name later in the list to balance out (remember to delete the same number of bytes later on, not just "00" the characters).
2 - come to one of the gaps with blank entries and delete enough bytes to balance out (as far as I can tell, the blank entries are not used, so it doesn't matter where they reference exactly and it's okay if a previous name overlaps them some)
3 - just increase the pointers until the end of the list.

I should point out that this same technique works in Happy Home Designer, except that (2) is not an option since it has no empty entries.

Hope this helps someone else! Feel free to ask for clarification

With this level of information, it should be relatively simple for someone to develop a program to edit the file and do all of that automatically. I would do it myself, but I'm not particularly interested in doing it. My C# skills aren't as strong as they should be for a task like this.

Really great info though. Good bonus about HHD as well.
 

troa11

Older Than You
Member
Joined
Apr 11, 2006
Messages
260
Trophies
0
XP
967
Country
United States
So this is not exactly New Leaf hacking, but after I turned Maple into a custom villager for my wife, I thought it would be nice to put the new villager in Happy Home Designer as well. Essentially process was the same (except for a minor issue of how Ohana opened the model files, had to open them in the model tab instead of the texture tab). But, Happy Home has little icons for each villager that are put in the client list after you encounter them. I would like to be able to modify this as well. I found the file that holds the image using EFE, they're all in RomFS/Layout/IconNPC. EFE shows the image and can extract it from the .arc file, but I can't find any way to replace the image. Poking around the .arc file in hex shows that it's a bflim file type, which apparently is also used in MK8? Any thoughts?
 
Last edited by troa11,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: