-
Notifications
You must be signed in to change notification settings - Fork 3
Retexturing Models
Outdated guide, see https://github.com/Deijin27/RanseiLink/wiki/Map-Editing-Guide
This guide shows you how to retexture a battle map model using RanseiLink-Console-5.0-Beta
This is just one way to use the console app. In command prompt.
Go to the folder containing the exe. Type cmd
into the top bar and hit enter, this will open a command prompt in this directory.
Then to run a command type in the console RanseiLink.Console <the command>
. e.g.
You could use the console command:
nds extract file "rom.nds" "graphics/ikusa_map/MAP00_00.pac"
Here I use nitro explorer 2b
pac unpack "MAP00_00.pac"
See the files
- nsbmd = model and materials
- nsbtx = texture and palette
- nsbta = texture uv animation. not present in all
- nsbtp = texture pattern animation. not present in all
- nsbma = material animation. not present in all
Extract by providing the folder containing the nsbmd, nsbtx etc.
nsbmd extract "c:\path\to\folder\containing\files"
See the extracted model (obj), material library (mtl), and textures (pngs):
You can open the obj in blender File > Import > Wavefront (.obj)
:
And view the textures on the texture paint tab:
The model is quite big, so it will likely look clipped. You can increase the clipping distance with View
and turn on the sidebar, then on the View
tab of the sidebar, increase the clip end.
Edit the textures as you wish, keep in mind you have palette count limits. In maps they use 256 color palettes for non-transparent images, and they use A3I5 for transparent images (32 colors, with 3-bit alpha channel stored per-pixel as opposed to in the palette).
The command simplify palette <imagePath> <maxColors>
may help you simplify the image.
I'm working on getting the models importing. For now it's just textures that we can put back into the game. To do this:
nsbtx generate "c:\folder\containing\pngs"
The options --opacityFormat
and --transparencyFormat
have defaults correct for the maps, the ones mentioned earlier.
Set up folder as it was before, but with your new btx0
pac pack "c:\path\to\folder"
The command uses file order, and auto detects the file extensions to decide how to create the pac, so they need to be correct.
Reinsert with tool of your choice, or use command:
nds insert file "rom.nds" "graphics/ikusa_map/MAP00_00.pac" "c:\new\pac\file.pac"