[WIP] The Fourth Dimension: A Super Mario 3D land level editor

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by exelix11, Apr 24, 2016.

  1. exelix11
    OP

    exelix11 GBAtemp Advanced Fan

    Member
    554
    391
    Feb 25, 2015
    Italy
    C:\users\exelix11\
    I already tried, but building the romfs is just too slow, the best thing would be modding citra to load files of a folder instead of the romfs, kinda like cemu loads games in loadiine format, but it's something i can't do
     
    mustafag32g likes this.
  2. mustafag32g

    mustafag32g GBAtemp Advanced Fan

    Member
    647
    443
    Jul 30, 2014
    Argentina
    well a button added to the program that could rebuild the files to a cia would be amazing if you could do that... it would be faster than using 3dstocia editor :D
     
  3. exelix11
    OP

    exelix11 GBAtemp Advanced Fan

    Member
    554
    391
    Feb 25, 2015
    Italy
    C:\users\exelix11\
    after a bit of research i realized why i couldn't build working 3ds files
    Use this: https://github.com/exelix11/3DS-Builder-citra/releases/tag/citra-build
    make a bat file with:
    Code:
    del game.3ds
    "3DS Builder" -romfs "path to romfs" -exefs "path to exefs" -exheader "path to exheader" -out game.3ds
    "path to citra\citra-qt" game.3ds
    
    romfs and exefs can be both decompressed to a folder or already built.
    every time you open the bat it will build a 3ds of the game and run it in citra, also the build time is considerably faster without encryption.
     
    Last edited by exelix11, Aug 4, 2017
    mustafag32g likes this.
  4. EmulatorLover

    EmulatorLover 3ds master race

    Member
    959
    234
    Apr 26, 2015
    United States
    Anywhere ;)
    is it normal that I'm getting generating octree and its going on for almost 6 hours now?
     
  5. exelix11
    OP

    exelix11 GBAtemp Advanced Fan

    Member
    554
    391
    Feb 25, 2015
    Italy
    C:\users\exelix11\
    The model is too complex or big, you might as well cancel it since it will most likely crash the game.
    Collisions generation speed depends on your hardware, but normally should be pretty fast,try removing everything the player can't collide with, simplify the mesh , export only one side of the faces.
    If you still have this issue split it in multiple models
     
  6. EmulatorLover

    EmulatorLover 3ds master race

    Member
    959
    234
    Apr 26, 2015
    United States
    Anywhere ;)
    ok I'll try that
     
  7. ataricore

    ataricore Advanced Member

    Newcomer
    53
    3
    Sep 21, 2017
    United Kingdom
    I have imported a custom object but the only thing I can't get my head around is adding it to the CreatorClassNameTable. I generate the CCNT patches but then I don't know if I'm doing it right after that. There doesn't seem to be a way to select the object file or anything that I want to use and when I add it to the scene it just appears as the blue box with an arrow (as it said it would if not done correctly. I've followed everything so far well and I'd appreciate any help with this. Thanks
     
  8. exelix11
    OP

    exelix11 GBAtemp Advanced Fan

    Member
    554
    391
    Feb 25, 2015
    Italy
    C:\users\exelix11\
    You must put your obj file in the models folder with the same name you gave to the game object (eg. your game object name is PeachCastle, you must call the 3d model PeachCastle.obj )
     
  9. ataricore

    ataricore Advanced Member

    Newcomer
    53
    3
    Sep 21, 2017
    United Kingdom
    I removed the .obj extension from the obj file and it works now. This program really is amazing, by the way. thanks for making it. One suggestion I have for the future is being able to resize custom objects but it's amazing this program even exists so thanks.
     
  10. Psi-hate

    Psi-hate GBATemp's Official Psi-Hater

    Member
    1,666
    1,060
    Dec 14, 2014
    United States
    Houston
    A friend and I are fiddling around with this program, for the most part I've gathered enough to figure out how to import my custom maps. I have yet to get one working in game, but I'm working on that right now. There really needs to be a proper in-depth tutorial other than the one in the OP. I'm an experienced OoT modder and even so I still had a lot of trial and error trying to get the process of getting the model in-program.

    Edit: I've successfully injected the map into FirstStageMap1.szs and when loading that szs, it runs fine in the program, but shoving that onto my 3ds makes the game crash when loading a level. Is there anything I can do to debug this?
     
    Last edited by Psi-hate, Oct 3, 2017
  11. exelix11
    OP

    exelix11 GBAtemp Advanced Fan

    Member
    554
    391
    Feb 25, 2015
    Italy
    C:\users\exelix11\
    Try to reduce as much as you can the textures size, that seems to be the main reason to crash the game.
    Also if you're not already doing, make the model with the official tools.
    Unluckily i don't know how to debug the game, maybe with luma but i never looked into that.
     
  12. Psi-hate

    Psi-hate GBATemp's Official Psi-Hater

    Member
    1,666
    1,060
    Dec 14, 2014
    United States
    Houston
    Ah, okay. I'll import a simpler map in the meantime and if that works, I'll try to remake my previous model to work better in sm3dl.
     
  13. ataricore

    ataricore Advanced Member

    Newcomer
    53
    3
    Sep 21, 2017
    United Kingdom
    There are already quite a few tutorials? I came from N64 modding too and I had imported my first custom map on the first day
     
  14. Psi-hate

    Psi-hate GBATemp's Official Psi-Hater

    Member
    1,666
    1,060
    Dec 14, 2014
    United States
    Houston
    Huh, anyway my friend melonspeedruns and I have been trying to get 1 small map in game but it crashes, despite us doing exactly what the tutorial says. The map is only 200 polys and the textures are fine, so I feel like I'm missing something important.

    Also to be fair I've been using efe to convert my obj, but I'm downloading Maya and the plugins right now in the meantime. I assumed it'd import and run in game with the efe method, just with the potentiality of being screwy.
     
    Last edited by Psi-hate, Oct 5, 2017
  15. ataricore

    ataricore Advanced Member

    Newcomer
    53
    3
    Sep 21, 2017
    United Kingdom
    I'd suggest using blender or sketchup. I've used both and they worked for me.
     
  16. exelix11
    OP

    exelix11 GBAtemp Advanced Fan

    Member
    554
    391
    Feb 25, 2015
    Italy
    C:\users\exelix11\
    I always had troubles importing with efe, but iirc it wasn't crashing, just not showing or showing with the faces messed up.
    Since the video is a bit outdated, this is the way i import models with the latest version of the editor:
    1) Make the model, i use sketchup but every program should be fine
    2) Put in the same 3d space a model from the game, a stage or mario, so you can scale your model to the game size, then export as obj
    2) open it in maya with the leaked tools, i have a VM just for this. Do the hypershade thing and export it how it's described in the video, when you choose the name of the model use a single word just with letters to avoid problems
    3) in the editor click on Tools -> Model importer, select your bcmdl (selecting the obj will use efe conversion)
    4) now the collisions: if your model is simple click the generate now button, else you must make a simpler version of your model by removing things the player can't touch and things that aren't solid, also you could remove smooth edges and stuff like that, but DON'T change the model position in the 3d space or else the collision won't match the model, export as obj and drag it over collisionsMng.exe, it will generate a KCL and a PA file, open them in the model import window.
    5) set a higher clipping radius and click generate SZS, save the SZS with the same name of the model, it should be already written in the save window
    6) back to the main editor, click on Tools -> CreatorClassNameTable editor
    7) on the panel on the right write the name of your model in the object name field and click add object, then save.
    8) copy the obj of the model in the models folder to view it in the editor while editing levels
    9) make your level.
    10) when copying the custom files to the game you must copy the CreatorClassNameTable.szs you will find in the editor's directory to the SystemData folder and the model szs to the ObjectData folder
    11) Profit

    i wrote this quickly there may be some inaccuracies, but it should work.
    If you still have problems i'll make a new video when i have some free time.
     
    Psi-hate likes this.
  17. Psi-hate

    Psi-hate GBATemp's Official Psi-Hater

    Member
    1,666
    1,060
    Dec 14, 2014
    United States
    Houston
    Thank you so much! I'll get to it as soon as I'm home.
     
  18. Psi-hate

    Psi-hate GBATemp's Official Psi-Hater

    Member
    1,666
    1,060
    Dec 14, 2014
    United States
    Houston
    Here are the steps that I did:

    1) Exported the model made in sketchup into an obj
    2) Used NW4C tools to export the obj into cmdl
    3) Used CreativeStudio to export the cmdl into bcmdl
    4) made collision from bcmdl
    5) imported the collision and bcmdl into "FirstStepASideView.szs"
    6) Added the object to "CreatorClassNameTable.szs"
    7) Made the level
    8) Imported the byml into "FirstStageMap1.szs"
    9) Moved "CreatorClassNameTable.szs" to /SystemData
    10) Moved "3dltest.szs" to /ObjectData

    It worked! Textures for my walls were black, but that's whatever. I found out what my fatal flaw was when trying this previously: I didn't put "3dltest.szs" to /ObjectData, instead I simply put the byml from "3dltest.szs" into "FirstStageMap1.szs". The video tutorial didn't exactly clarify, but maybe that was just me overlooking it. Honestly, the setup was harder than it should have been, but fortunately enough I got it working and I plan on making an in-depth tutorial once I get the hang of it where I make the model from scratch up to showing it off in game.

    20171005_233357.jpg
     
    Last edited by Psi-hate, Oct 6, 2017
    exelix11 likes this.
  19. exelix11
    OP

    exelix11 GBAtemp Advanced Fan

    Member
    554
    391
    Feb 25, 2015
    Italy
    C:\users\exelix11\
    The textures are black probably because you didn't do the fragment lighting thing.
    Anyway, you injected your bcmdl in another model, using the model importer from the editor it will create a new szs so you can add models without breaking other levels.
    Also you might be using an older version of the editor because from a while it can edit szs levels directly so you don't have manually inject the byml every time.

    EDIT: i checked the video, it clearly shows copying the szs to the objects folder.
    If you are saving the level as byml because the video says that you don't have to, if you open a szs level then it will save as szs
     
    Last edited by exelix11, Oct 6, 2017
    Psi-hate likes this.
  20. Psi-hate

    Psi-hate GBATemp's Official Psi-Hater

    Member
    1,666
    1,060
    Dec 14, 2014
    United States
    Houston
    The video did show it, but I don't believe I noticed since there was no text explaining it, but don't worry I blame myself for not seeing it. Anyway I tried the shading in Maya but no matter what the model appeared pitch black despite doing the exact same thing in the video. Anyway, is fragmentation lighting done via Maya?