Lian16

Villager
Member
Joined
Dec 5, 2016
Messages
8
Reaction score
5
First Language
Spanish
Primarily Uses
Hi! Today i've made a change to your plugin, because i wanted to use regions to set specific encounters in some areas of a dungeon, but i also wanted to have ceiling on those regions. I will attach the edited file. Here is what i changed, in case you want to consider this for a further update:


View attachment FPLE - Main.js

Oh i forgot to tell how to stablish the ceiling.


On the plugin configuration, with this change, you can stablish the regions on the "Ceiling Region" parameter by inputin the region number separated by a blank space. Example:


Writing 1 2 14 25 on the Ceiling Region parameter, will make the plugin create a ceiling on the regions 1, 2, 14 and 25.

Thanks for sharing this, I'll have to give this a try when I get home. That was one of my issues as well.


Are you able to  see events in game at all? I was never able to get the updated plugin to work myself. Guess I'll get back to tinkering.



I thought exactly the same. I also tought you can't see the graphics of the event. Piksalh i don't understand what you want to ask.


Anyway, i'm not a javascript master, so i couldn't say if some stuff are posible. All i did is something very simple, i changed a variable and a condition, i have no idea how the drawing and the 3D system works. Sorry


I'm going to start looking for a way to adapt the graphics of an event to this view, so you could, for example, have a torch in a wall. The actual system doesn't allow layers. If you add something in a position, it will delete the floor, so if you add a torch as a "wall", there will be no floor on the place, so every idea would be welcome
 

erikmidnatt

Mercenary Wizard possessed by an Evil Spirit
Veteran
Joined
Oct 8, 2015
Messages
367
Reaction score
95
First Language
English
Primarily Uses
RMMV
I thought exactly the same. I also tought you can't see the graphics of the event. 






1

The creator made a new file called MBS_FPLE that i could never get to run. They cleaned up the code an added visbile events. This was a few months ago. I asked in this thread if others actually got it to work but never got any response. I have been using the FPLE - Main file that u edited. The FPLE - Main file worked for me(but is older so no visible events).


I can only assume that Piksalh got the MBS_FPLE file to work.
 
Last edited by a moderator:

piksalh

Veteran
Veteran
Joined
Jun 14, 2014
Messages
106
Reaction score
9
First Language
Lithuanian
Primarily Uses
RMMV
The creator made a new file called MBS_FPLE that i could never get to run. They cleaned up the code an added visbile events. This was a few months ago. I asked in this thread if others actually got it to work but never got any response. I have been using the FPLE - Main file that u edited. The FPLE - Main file worked for me(but is older so no visible events).


I can only assume that Piksalh got the MBS_FPLE file to work.



Well yes, it's working. Recorded a short test to show. There You will see two problems:


1. Event graphics are only 32x32. if I change to something bigger, it will only show first 32x32 px of image. It looks weird because we can use high resolution graphics for walls, foor, ceiling.


2. Event graphics are always faced at player. I havent find a solution how to make normal working doors, it will always change direction (you can see on test recording at 0:48).


3. Extra problem: it seems that walls in front looses some kind of fog or shadow (as you approach) earlier as floor, ceiling and side walls (see at 0:19). Most of the times walls in front are too bright for that reason. I dont know how to change it. Same goes for events with graphics. Any advice?


How it works:


You have to make new project, add plugin (raw) and download babylon.js.  Actually everything is well written in plugin Help. Anyway I wrote my own instructions how to make it work from scratch. See in my next post.
 
Last edited by a moderator:

erikmidnatt

Mercenary Wizard possessed by an Evil Spirit
Veteran
Joined
Oct 8, 2015
Messages
367
Reaction score
95
First Language
English
Primarily Uses
RMMV
Actually I dont really remember :D  I used plugin, not demo (old .js version inside demo). I guess I just renamed MBS_FPLE.js to FPLE - Main.js and thats it.





3

Glad to see it works for me, I tried that a while ago and it didnt work. Thanks for sharing the video, its promising to see stuff in action.


Just tried it again and no dice. Are you using mv 1.3.1? Would you perhaps have a demo project you could share?
 

piksalh

Veteran
Veteran
Joined
Jun 14, 2014
Messages
106
Reaction score
9
First Language
Lithuanian
Primarily Uses
RMMV
OK I tried to create again from the scratch. Well, renaming does not work. Actually everything is well written in plugin Help. Anyway I wrote my own instructions:

  1. File > New Project
  2. Download script: go to Script(Raw) link, then right mouse click and choose Save as... [your project]\js\plugins)
  3. Download babylon.js: go to http://cdn.babylonjs.com/2-3/babylon.js, then right mouse click and choose Save as... [your project]\js\libs)
  4. Go to your project folder and open index.html. Make new line after <body style="background-color: black">. Insert into new line "<script type="text/javascript" src="js/libs/babylon.js"></script>]" (without quotes). Save.
  5. Copy tileset rom FPLE MV demo game (the only tileset in FPLE MV Demo\img\tilesets).
  6. Paste tileset in your new project ([your project]\img\tilesets).
  7. Select all the images from FPLE MV Demo\img\textures and copy them to [your project]\img\textures (there is no such folder, so make one before or just copy whole folder from demo).
  8. Open new project and press F9. Choose Tilesets option from left. Then choose first tileset and remove images from A1, A2, A3, B1 etc (all images should be clear - select (None) from list).
  9. Choose image A5 and select tileset FPLE from list.
  10. Choose terrain tag from right and add 1 to tiles that will be your wall tiles. Left some tiles with 0 - it will be your floor tiles.
  11. Shake that... I mean paint that map like it's your last time. Well just paint it.
  12. Add event, choose Image, select stepping options for test.
  13. Select your map from the left list and press space button. Add note "<fple>" (without quotes) and press OK.
  14. Press F10 and activate MBS_FPLE plugin (double click empty line and select plugin from a name list).
  15. LEDONE.



You can make your own tileset and textures, just read plugin Help.
 
Last edited by a moderator:

erikmidnatt

Mercenary Wizard possessed by an Evil Spirit
Veteran
Joined
Oct 8, 2015
Messages
367
Reaction score
95
First Language
English
Primarily Uses
RMMV
I just tried again and no dice. So could you confirm somethings.

  1. Are you using 1.3.1 of MV?
  2. Second you didn't mention going into the Map and including the tag :<FPLE>: Did you do this step?
  3. The plugin version you are using is MBS_FPLE?



Thanks, for writing all that up. But I did follow all the steps in the instructions and couldn't get the updated plugin to work a couple of months ago. The old one from the demo works fine. As in, if I follow all the steps, but use the old plugin it works. Follow those steps with the new one and it does not. 


Doesn't seem like Babylon.js ever runs if I use the newer plugin.(looking at the developer tools)


Kinda why I'm interested in a demo that is known to work to see if that even works for me. I can't imagine its an OS thing or anything to that effect. But I've tried everything I can think of.
 
Last edited by a moderator:

piksalh

Veteran
Veteran
Joined
Jun 14, 2014
Messages
106
Reaction score
9
First Language
Lithuanian
Primarily Uses
RMMV
1. Yes. 2. Yes (only lowercase). 3. Yes. Strange that it doesnt work. Btw, have You added and activated plugin in Plugin Manager (F10)?
 

erikmidnatt

Mercenary Wizard possessed by an Evil Spirit
Veteran
Joined
Oct 8, 2015
Messages
367
Reaction score
95
First Language
English
Primarily Uses
RMMV
2. Yes (only lowercase).

This was the issue! Now it works. The help file says FPLE, but really it should be fple...


Huge help, thanks for insights.


@Lian16 do you think you could incorporate your changes into Masked most recent plugin? I tried myself and broke something. I updated both sections and I even tried to correct the line here


cubes[n].push(cube);


so it matched Masked most recent code. But I'm obviously missing something.
 
Last edited by a moderator:

Lian16

Villager
Member
Joined
Dec 5, 2016
Messages
8
Reaction score
5
First Language
Spanish
Primarily Uses
This was the issue! Now it works. The help file says FPLE, but really it should be fple...


Huge help, thanks for insights.


@Lian16 do you think you could incorporate your changes into Masked most recent plugin? I tried myself and broke something. I updated both sections and I even tried to correct the line here



cubes[n].push(cube);


so it matched Masked most recent code. But I'm obviously missing something.

Sure, no problem
 

Lian16

Villager
Member
Joined
Dec 5, 2016
Messages
8
Reaction score
5
First Language
Spanish
Primarily Uses
Can you give me the updated plugin link? I'm not sure which is the latest
 

erikmidnatt

Mercenary Wizard possessed by an Evil Spirit
Veteran
Joined
Oct 8, 2015
Messages
367
Reaction score
95
First Language
English
Primarily Uses
RMMV
Don't use the demo, use one of these links instead


Script (GitHub): https://github.com/MaskedRpg/JS/blob/master/mv/MBS_FPLE.js


Script (Raw): https://raw.githubusercontent.com/MaskedRpg/JS/master/mv/MBS_FPLE.js


You should be able to put this in your existing project. But you will need to add the note tag "<fple>" to any map u want the first person view to work on(without the quotes).


The updated plugin gives us a bit more power, but if we add your fix for the ceilings and regions I'd be super happy for now ^_^


Also, if you wouldn't mind showing what you change to get it to work that would be great. I'm trying to see what I missed.
 
Last edited by a moderator:

Lian16

Villager
Member
Joined
Dec 5, 2016
Messages
8
Reaction score
5
First Language
Spanish
Primarily Uses
Don't use the demo, use one of these links instead


Script (GitHub): https://github.com/MaskedRpg/JS/blob/master/mv/MBS_FPLE.js


Script (Raw): https://raw.githubusercontent.com/MaskedRpg/JS/master/mv/MBS_FPLE.js


You should be able to put this in your existing project. But you will need to add the note tag "<fple>" to any map u want the first person view to work on(without the quotes).


The updated plugin gives us a bit more power, but if we add your fix for the ceilings and regions I'd be super happy for now ^_^


Also, if you wouldn't mind showing what you change to get it to work that would be great. I'm trying to see what I missed.



I've made it, the changes are the same i did before, but instead of 


cubes.push(cube);


I used:


cubes[n].push(cube);


I don't know why it didn't work on your file. Perhaps you made a mistake when replacing the code. I will attach the new file so you can check it out

View attachment MBS_FPLE.js
 
Last edited by a moderator:

erikmidnatt

Mercenary Wizard possessed by an Evil Spirit
Veteran
Joined
Oct 8, 2015
Messages
367
Reaction score
95
First Language
English
Primarily Uses
RMMV
Perhaps you made a mistake when replacing the code.





 

I think I must have had a syntax mistake in there. Your update looks like what I tried except I commented out the later portion and prolly made a mistake down there.


Thanks again, i have both the most recent plugin with events as well as your region fix working now. Time to experiment some more.
 

Lian16

Villager
Member
Joined
Dec 5, 2016
Messages
8
Reaction score
5
First Language
Spanish
Primarily Uses
Ok, now i need some help. With the updated plugin, i always get an error when i make a big map.


Cannot set property 'material' of null
 

erikmidnatt

Mercenary Wizard possessed by an Evil Spirit
Veteran
Joined
Oct 8, 2015
Messages
367
Reaction score
95
First Language
English
Primarily Uses
RMMV
how big are you trying to make the map?


Also, Im derping around with the plugin changing the event sizes and I think i may be able to find a way to use events art that is not the 48x48 chest. So far i have been able to get it to read the sprite sheet differently, so its progress.


However prolly would be best to add it to the plugin properly as an option once I figure out what to change. I may be able to muster that much but may be asking a lot too hahaha. Still excited and gonna keep tinkering.


And i think you would need to pick a single size for all your events and plan accordingly. I could live with that If I can pull it off. (and they would need to be square)


UPDATE: I figured out how to have events that are larger and even animate in a fixed direction fine. Its just one number to change in the plugin to make it work. Problem is unless you adjust the section that determines how to step through the sprite sheet, you can only use this for characters on the top most row.


I'll try tinkering some more later.
 
Last edited by a moderator:

Lian16

Villager
Member
Joined
Dec 5, 2016
Messages
8
Reaction score
5
First Language
Spanish
Primarily Uses
how big are you trying to make the map?


Also, Im derping around with the plugin changing the event sizes and I think i may be able to find a way to use events art that is not the 48x48 chest. So far i have been able to get it to read the sprite sheet differently, so its progress.


However prolly would be best to add it to the plugin properly as an option once I figure out what to change. I may be able to muster that much but may be asking a lot too hahaha. Still excited and gonna keep tinkering.


And i think you would need to pick a single size for all your events and plan accordingly. I could live with that If I can pull it off. (and they would need to be square)


UPDATE: I figured out how to have events that are larger and even animate in a fixed direction fine. Its just one number to change in the plugin to make it work. Problem is unless you adjust the section that determines how to step through the sprite sheet, you can only use this for characters on the top most row.


I'll try tinkering some more later.



Can you show us the sprite sheet of the event? Also i wanted to say that i made doors using a wall texture. Of curse, it doesn't look much realistic, but it's not bad either
 

erikmidnatt

Mercenary Wizard possessed by an Evil Spirit
Veteran
Joined
Oct 8, 2015
Messages
367
Reaction score
95
First Language
English
Primarily Uses
RMMV
K here goes, the XX i put in there is what controls the size used for the sprite


The section immediately below it has a reference to MBS.FPLE.Map.prototype._updateEvents = function(scene)  in there is what controls how it steps through the sheet. I tried a lot of stuff, but math is too hard for me so I never could get anything good out of it.


MBS.FPLE.Map.prototype._applyEvents = function(scene) {
this._events = [];
this._managers = {};

$gameMap.events().forEach(function (event) {
var charName = event.characterName();
if (!charName) return;

var manager;
if (!this._managers[charName]) {
manager = new BABYLON.SpriteManager(
"ev_" + charName,
"img/characters/" + encodeURIComponent(charName) + ".png",
256,
XX, //Controls the size used in the sprite sheet 48 is default
scene
);
this._managers[charName] = manager;
} else {
manager = this._managers[charName];
}

var sprite = new BABYLON.Sprite("event" + event.id, manager);
sprite._event = event;
this._events.push(sprite);
}.bind(this));
};


I can get animations to work for single row assets that are 3 columns with a fixed direction. Really don't want to use the standard 12 across because at the sizes I would want the PNG would be massive and illogical. But for directional animations, it seems to only respect the 12 across template, unless someone figures out how to tweak the sprite sheet logic to support a single character.


EDIT: I have to concede defeat for having complete animated sprite sheets for single characters. I can make it work for 3 frames but that wont really be useful most of the time. I opened a thread in JS support in hopes someone can tinker with the sprite sheet code.


Also noticed even the unedited script seems to have a bug. If you use a character thats not the first in the list, it will move over to the first character on the last frame of animation.
 
Last edited by a moderator:

piksalh

Veteran
Veteran
Joined
Jun 14, 2014
Messages
106
Reaction score
9
First Language
Lithuanian
Primarily Uses
RMMV
K here goes, the XX i put in there is what controls the size used for the sprite



OMG, erikmidnatt, it works! 


One more questions: how to set event sprite to be horizontally aligned not on center but on the corner of the tile. Can you... make it? With such update it would be possible to create decent dungeon crawlers. So, pls help me! ^^


Thanks again for custom event graphics size!
 
Last edited by a moderator:

piksalh

Veteran
Veteran
Joined
Jun 14, 2014
Messages
106
Reaction score
9
First Language
Lithuanian
Primarily Uses
RMMV
Does anyone tried to create bigger than 31x31 size map and fill with tiles? I get an error:

TypeError Cannot set property 'material' of null



Developer console window says:

Cannot merge meshes because resulting mesh will have more than 65536 vertices. Please use allow32BitsIndices = true to use 32 bits indices.



Can anyone explain what's happening and how to fix it?


BTW I can make bigger than 31x31 maps but if I fill more than 30x30 tiles, mentioned error occurs.
 
Last edited by a moderator:

OKIComputer

Villager
Member
Joined
Mar 20, 2016
Messages
17
Reaction score
8
First Language
English
Primarily Uses
That's strange, I just made a 40x40 map and it works fine. I'm just using the stock demo, by the way.
 
Last edited by a moderator:

Latest Threads

Latest Profile Posts

Well, I've decided I'll take a break on making Forgotten Eclipse...and Make a mod for FNF
Trailer for my new game.
last one for a while
MythicRuss wrote on gothicvoid's profile.
hi, i was looking thru ur awesome stuff, and was looking around the internet, how in the heckin heck do i get the hiddendoors to open? im addng them to the doors event but they just appear as solid walls, btw am total noob lol

Forum statistics

Threads
110,308
Messages
1,052,195
Members
143,343
Latest member
DarkValkyrieSin
Top