MV3D - 3D rendering for RMMV with Babylon.js

● ARCHIVED · READ-ONLY
Started by Cutievirus 1560 posts Page 39 of 78 View original ↗
  1. WesdrasLink said:
    In regard on the last update.
    My game looks like this:
    View attachment 133780
    Before this update, the characters was messy., now it's the map that looks this way, an d the sprites is ok.

    This is excellent news. I made a very small change in the part of the code where I get the texture's size. I switched from using getBaseSize to getSize. According to the documentation, they sometimes return different values, and that's the cause of the bug. So I just need to revert the change for the tiles and keep the change for the characters.
    Though, the characters do look a bit vertically stretched.

    @Waterguy
    The mv3d-regions block is actually for the next major update. Rpg maker ignores when I switch branches unless I close the project, so changes I make to the map accidentally get pushed out with bugfixes.


    @Poppie360
    To overwrite the function you would need
    JavaScript:
    mv3d.Character.prototype.updateCharacter=function(){
    
    }
  2. Dread_Nyanak said:
    This is excellent news. I made a very small change in the part of the code where I get the texture's size. I switched from using getBaseSize to getSize. According to the documentation, they sometimes return different values, and that's the cause of the bug. So I just need to revert the change for the tiles and keep the change for the characters.
    Though, the characters do look a bit vertically stretched.

    @Waterguy
    The mv3d-regions block is actually for the next major update. Rpg maker ignores when I switch branches unless I close the project, so changes I make to the map accidentally get pushed out with bugfixes.


    @Poppie360
    To overwrite the function you would need
    JavaScript:
    mv3d.Character.prototype.updateCharacter=function(){
    
    }

    Oh that actually looks much easier than how i was going to go about it on my own, i was going to go and edit it and rebuild the map file...thanks for the help!

    for future reference, would you access all functions by?:
    mv3d.FILENAME.prototype.FUNCTIONNAME
  3. @Poppie360
    No, in this case Character is the name of the class. The prototype is only used for classes. There are some functions directly on the mv3d object, and some which are on a class's prototype.
  4. Dread_Nyanak said:
    @Poppie360
    No, in this case Character is the name of the class. The prototype is only used for classes. There are some functions directly on the mv3d object, and some which are on a class's prototype.

    I seem to have run into an error:
    77da84486a9f0cbd3fc84262a8c78be9.png
    40593f06533c31773266d396e200370e.png
  5. Do you have the latest version of mv3d? mv3d.Character shouldn't be undefined.
  6. Dread_Nyanak said:
    Do you have the latest version of mv3d? mv3d.Character shouldn't be undefined.
    where do i get that?
  7. Dread_Nyanak said:
    Github.
    GitHub - Electravirus/MV3D: 3D RPG Maker MV Plugin
    iiiiiiiiiit works now thanks

    edit:
    6aad08f78b52c2b1e07330a10a81ad41.png
    Seems i have run into some issues, i have no idea why this happened

    The function
    Code:
    mv3d.Character.prototype.updateCharacter=function(){
            this._tilesetId = $gameMap.tilesetId();
            this._tileId = this._character.tileId();
            this._characterName = this._character.characterName();
            this._characterIndex = this._character.characterIndex();
            this._isBigCharacter = ImageManager.isBigCharacter(this._characterName);
            if(this._character.mv_sprite == null){
                //uhhh, well this shouldnt happen
            } else if(this._character.mv_sprite._pathName != null && this._character.mv_sprite._path != null){
                if(this._tileId>0){
                    this.setTileMaterial(this._tileId);
                }else if(this._characterName){
                    if(this.isVehicle){
                        if(this.isBoat){
                            if($gameSwitches.value(6) == true) {
                                this.setMaterial($gameVariables.value(7) + $gameVariables.value(8) + '.png');
                            } else {
                                this.setMaterial(`img/characters/${this._characterName}.png`);
                            }
                        } else if(this.isShip){
                           if($gameSwitches.value(7) == true) {
                               this.setMaterial($gameVariables.value(9) + $gameVariables.value(10) + '.png');
                            } else {
                                this.setMaterial(`img/characters/${this._characterName}.png`);
                            }
                        } else if(this.isAirship){
                            if($gameSwitches.value(8) == true) {
                                this.setMaterial($gameVariables.value(11) + $gameVariables.value(12) + '.png');
                            } else {
                                this.setMaterial(`img/characters/${this._characterName}.png`);
                            }
                        }
                    } else {
                        if((this._character.mv_sprite._path + this._character.mv_sprite._pathName + '.png') != 'VV.png'){
                            this.setMaterial(this._character.mv_sprite._path + this._character.mv_sprite._pathName + '.png');
                        } else {
                            this.setMaterial(`img/characters/${this._characterName}.png`);
                        }
                    }
                }else{
                    this.setEnabled(false);
                }
            } else {
                if(this._tileId>0){
                    this.setTileMaterial(this._tileId);
                }else if(this._characterName){
                    this.setMaterial(`img/characters/${this._characterName}.png`);
                }else{
                    this.setEnabled(false);
                }
            }
            //console.log(this);
        }

    for some reason adding the actor to the party (the follower) cuased an event where all of the events that didnt have custom graphics to have their this._character to become undefined. maybe even more, i havent checked yet
  8. @Poppie360
    I don't see anything wrong with the code you've written. The black textures usually mean there's something wrong with the material.
    One thing to note is that updateCharacter is only called when isImageChanged returns true, so if you want you could also overwrite isImageChanged to check for changes in _path and _pathName.

    @WesdrasLink
    I updated github reverting the change to tiles. Can you or someone else who experienced the bug test to see if it's fixed?
  9. @Dread_Nyanak
    I can't help with the codes, but this is what happened to me:
    1.png
    Most tiles is ok, it seems that some tile b,c,d,e have some problems, and animated auto tiles have problems now.
  10. as i can notice, if you put a file with the simbol % for characters, it would not load the file o.o!, the problem is, galv character frames or qsprite use the % simbol inside their files to make them work, so, if you put a image with the simbol % on it without the plugin , the game cant load it, if you put a file with that simbol but theres a plugin using that simbol to work, it would only load a black square , i test it inside a fresh demo file ^^ ejemplo.png
  11. @WesdrasLink
    Okay, so after some research it seems to be caused by an older version of WebGL. I can simulate the problem on my machine by using mv3d.engine.forcePOTTextures=true
    It should be fixed now, but your textures will be blurrier than people with a newer version of WebGL. I can't fix that.

    @k333
    I just need to start encoding the urls to fix this.

    Update 0.4.8:
    Fixed POT (power of two) texture problem
    encode urls to allow % in filenames.
  12. Just wanted to share a demo of how I've always wanted to design a game in RPG Maker MV, and now I can! Fake-bitmap Artwork created in Affinity Designer (vector) and all audio sequenced/created entirely in Renoise until mastering.

  13. Hello again, well ... I don't know if this is a mistake.
    However, I didn't like it very much ... the sprite character
    is well stretched '-' And ... when I put a tile,
    it gets weird, or it totally changes.
    (It was supposed to be a grass wall, but it turned into bricks '-')
    Glitch.png
  14. @LukaYang did you change any settings?
    you could have set the x or y scales different sizes for characters in the parameters, and in the tilesets they may be put wring.
    To be honest, I can't tell if there is something wrong with the plugin for you or with how you set things with just this image
  15. @Waterguy No, I didn't touch anything. When I put it to the test for the first time, it was like this '-'
  16. @LukaYang
    When did you download the plugin? This is the exact issue that I fixed in my latest post.
    Try downloading the latest version from github and see if that fixes it.
  17. Ok, I'll try to download the file again! @Dread_Nyanak!
  18. Well, I tested it ... some things are back to normal. But one question ... is it normal for the characters to become a little too pixelated? And some tiles like mountains and trees are a little wrong. (Sorry for making you have more work)
  19. Hello everybody, I need help with bridges. I'm wondering if it's possible to make it so that the player can walk underneath a bridge. I have images below to shed light on what I mean. I have a cave system, and there's a narrow path leading beneath a land bridge to a treasure chest. The bridge is functional and the player can walk across, but if I try to walk underneath it on the ground below it's as thought he player hits a wall and can't pass from either side. I've tried a few different methods of changing the passability of the tiles, using events to make the bridge with the platform funtion, and nothing has worked. The bridge I have now is made up of B tiles, and the bridge settings are part of the tileset notetags. The ground level is at a height elevation of 0, and the bridge is a height level of 2.

    Bridge2.pngBridge3.pngBridge1.png