Hoping someone can help.... i am looking to add a way to call on different name display bases for different maps - Example... the image behind the name would be different for an Item store... then say the image for a weapon store... or creepy dungeon... Is there anyway to modify or add to the JS to do this?
MOGS Mapname JS
JS Plugin RequestsWell, I think this plugin already has this feature.
So if you name the maps differently, the names showed will be different. Is that it that you want?
Or do you want a name to be displayed when you open a scene? For example, shop one?
It means " Shows a Hud with the name of the map"
So if you name the maps differently, the names showed will be different. Is that it that you want?
Or do you want a name to be displayed when you open a scene? For example, shop one?
I actually already did this a long a time ago for myself.
I believe I took the code from
fallenangelolivia.itch.io
So you can find how to use it from there.
Wait just realized you said image, if you want image changed it's pretty easy as well.
I edited the particles for a different one based off variables, you could do the same thing for all the others, didn't do it myself yet as it isn't a priority.
Code:
Game_Map.prototype.overrideMapName = function(text) {
this.overrideDisplayName(text);
};
Game_Map.prototype.overrideDisplayName = function(text) {
this._overrideDisplayName = text;
};
Game_Map.prototype.clearOverrideMapName = function() {
this.clearOverrideDisplayName();
};
Game_Map.prototype.clearOverrideDisplayName = function() {
this._overrideDisplayName = undefined;
};
Game_Map.prototype.displayName = function() {
if (this._overrideDisplayName) {
return this._overrideDisplayName;
} else {
return $dataMap.displayName;
}
};
I believe I took the code from
Map Display Name Core plugin for RPG Maker MV by Olivia
For RPG Maker MV, control your Map Display Names.
fallenangelolivia.itch.io
Wait just realized you said image, if you want image changed it's pretty easy as well.
Code:
Map_Name_Hud.prototype.createParticles = function() {
this._particlesField = new Sprite();
this.addChild(this._particlesField);
this._particles = [];
const particleRNG = Math.randomInt(3),
look = $gameVariables.value(105);
switch(look) {
case 'item':
$gameSystem._mapNameData.nParticles = Math.randomInt(50) + 26;
break;
default:
$gameSystem._mapNameData.nParticles = 15;
break;
}
for (let i = 0; i < this.data().nParticles ; i++) {
switch(look) {
case 'item':
this._particles[i] = new Sprite(ImageManager.loadIcon("IconSet_" + $gameVariables.value(106)));
break;
default:
this._particles[i] = new Sprite(ImageManager.loadIcon("MapName_Particles" + $gameVariables.value(29) + particleRNG));
break;
}
this._particles[i].anchor.x = 0.5;
this._particles[i].anchor.y = 0.5;
this._particles[i].sx = 0;
this._particles[i].sy = 0;
this._particles[i].so = 0;
this._particles[i].sr = 0;
this._particlesField.addChild(this._particles[i]);
if (this.data().cw != 0) {this.refreshParticles(this._particles[i],true)};
};
};
I think i am confused... I use the particles though in the plugin. Mogs calls on the Mapname.png in line 283 of the plugin. I want it to call on what ever I specify for that image for when the player enters the map..... not just one image for all maps... say for example... MapnameItemShop.png or MapnameInn.png
the goal is that basically every map has a different png file that would be displayed when the maps change.
Ok it's really easy.
Code:
Map_Name_Hud.prototype.loadBitmap = function() {
this._layoutImg = ImageManager.loadSystem("MapName" + $gameVariables.value(1));
};
And that would be a plugin function or a script call in the event?
You put that in a javascript plugin file or overwrite that function in mogs plugin. Then just use control variables in game to set it before transfer.
Can you please show me what the event will look like? once i see it ill be ok. Im just very visual and trying to wrap my head around this lol
It's just variables then transfer, you may need an image named MapName0 for the first map loaded.
Doing that event will make it load MapName1 from system folder.
Did you put the code into a plugin below mogs or replace mogs base script?
Code:
Map_Name_Hud.prototype.loadBitmap = function() {
this._layoutImg = ImageManager.loadSystem("MapName" + $gameVariables.value(1));
};
i got it! i was just being an idiot and forgot to change the number to the variable i was gonna use for it haha!
lmfaooooooooooo THANK YOU!!
next question is... can i use a plugin command to turn off and on the circle and particles for the map name
?
lmfaooooooooooo THANK YOU!!
next question is... can i use a plugin command to turn off and on the circle and particles for the map name
?
Code:
Map_Name_Hud.prototype.createSprites = function() {
if (!$gameSwitches.value(1)) {
if (this.data().circle && this.data().circleZ === 0) {this.createCircle()};
}
this.createLayout();
if (!$gameSwitches.value(1)) {
if (this.data().circle && this.data().circleZ != 0) {this.createCircle()};
if (this.data().particles) {this.createParticles()};
}
this.createName();
};
Code:
Map_Name_Hud.prototype.createSprites = function() {
if (!$gameSwitches.value(1)) {
if (this.data().circle && this.data().circleZ === 0) {this.createCircle()};
}
this.createLayout();
if (!$gameSwitches.value(1)) {
if (this.data().circle && this.data().circleZ != 0) {this.createCircle()};
}
if (!$gameSwitches.value(2)) {
if (this.data().particles) {this.createParticles()};
}
this.createName();
};
AWESOME POSSUM! Thank you so much ^.^
a better way is to use of this plugin from Procraftynation.
I dont know if you can use a switch as well to turn it off if the player wish so, but I think
the option was there though.
it draw's the images from the picture folder, anywhere from the map. I love it though 🙂 but you can make every map very unique
to show its own image map or not 🙂
I dont know if you can use a switch as well to turn it off if the player wish so, but I think
the option was there though.
it draw's the images from the picture folder, anywhere from the map. I love it though 🙂 but you can make every map very unique
to show its own image map or not 🙂
Oooo ill try this out too... Thank you ^·^
Original thread: https://forums.rpgmakerweb.com/threads/mogs-mapname-js.118870/