How do i change the text outline color?
I was able to disable it but it made some texts unreadable
JavaScript questions that don't deserve their own thread
● ARCHIVED · READ-ONLY
-
-
I'm officially stuck. I'm having trouble with a turn counter after applying a state to character.
Using Yanfly's Buff & State Core and I want to add new states to the user after a state is going on for 3, 6 and 9 turns.
This is what I tried:
<Custom Apply Effect>
user._bleedCounter = 1;
</Custom Apply Effect>
<Custom Regenerate Effect>
var n = user._bleedCounter;
if (n = 3) {
user.addState(9);
}
user._bleedCounter += 1;
</Custom Regenerate Effect>
The effect is applied before turn 3. What am I missing here? -
@kovakYou can do that with Yanfly Message Core.
@LeetstuffYou need to put a == or === in the if statement. Look at this, it explains how to compare variables. www.w3schools.com/js/js_comparisons.asp -
@waynee95 i need a global change else i'll have to use text codes on everything...
-
@waynee95 i need a global change else i'll have to use text codes on everything...
If you want a global change, in the Bitmap class, it assigns the text color outline and width with variables. You could either directly edit the code (not recommended), or make a small plugin that changes it for every bitmap. -
wish i knew how to do it :c
it's not mandatory anyway :v -
@kovak The simplest plugin for that would be something like this in a .js file:
// store the original function in a variable called '_old_Bitmap_initialize'
_old_Bitmap_initialize = Bitmap.prototype.initialize;
// redefine the function
Bitmap.prototype.initialize = function(width, height) {
// call the original function to make sure everything else is initialized correctly
_old_Bitmap_initialize.call(this, width, height);
// set the outline color to something else
// 'rgba(0, 0, 0, 0.5)' is the default; you will probably want to change that to something else.
this.outlineColor = 'rgba(0, 0, 0, 0.5)';
}
Of course, one could extend this and e.g. make the outline color a plugin parameter or make the plugin compatible with Yanfly's Message Core... -
@LadyBaskerville Sadly by the time i've noticed that it would be easier if i pay somebody to do it for each scene instead.
-
@Leetstuff if you need help with a plugin, please start a new thread or post in the thread for the plugin. This thread is not for plugin support.
@kovak
_Bitmap_initialize = Bitmap.prototype.initialize;
Bitmap.prototype.initialize = function(width, height) {
_Bitmap_initialize.call(this, width, height);
this.outlineColor = 'rgba(0, 0, 0, 0.5)';
}
changing the rgba values to what outline color you want.
Save as a .js file in your plugins folder - name doesn't matter - and add/enable it in your plugin manager. -
First of all sorry I didn't know where to post this and have requested something similar but I was wondering if it could be a community thing and may help others like me in future if trying to convert something similar
Would any one be able to help me, try and convert an old vx ace script to mv,
It's a fairly small script and is very handy and would make a great addition to mv.
I'm not sure on a lot and only know the very basics on converting ruby to js
Like;
@ Equals this.
And nil? Equals == null
Ect
But I am clueless on how to convert the do and while anyway here is the script;
http://pastebin.com/KXbFkx9s
Any help would be much appreciated -
Please post a new thread in the appropriate forum for that - it is definitely not a "question that doesn't deserve its own thread"
That is going to be a difficult script to convert. Have you looked at what plugins are already out there? I'm sure someone just asked the other day and was pointed to a plugin that provides multiple map layers. -
Soooo...
A few months ago, I posted in here because I was using Yanflys DoT effect but didn't want it to kill enemies.
I am still using the code, but in a new project and I basically converted it into a HoT, where it simply it just adds the damage instead of subtracting it. This works, but for some reasons sometimes the healing is 0. I don't know why. I am using the same code for both HoTs and DoTs, each state/different effect only has changes to the damage/healing and the stack size. And the healing seems to stop working when the target has both the HoT and the DoT active at the same time, but the healing even ends after wards when the DoT is no longer active and it also seems to stop randomly at times (which I only read about, I myself only saw it stopped working with the DoT active).
Soooo... has anyone an idea why this happens or should I ask Yanfly directly? I did change his original code, so I am not sure he can help me. -
@Shaz Sorry I posted here but even any help on the do and while function as a start :/
And I looked at all layer plugins and tested all of them including galvs, oranges, LTN layers ect.
But I did try them before I asked
By Map layers I mean overlay one map with another not shadows/fog or par.
Sorry for not been clearer the first time -
You didn't ask about a do ... while question - unless it was something about the script, and in that case you really need to start a new thread, because one little question will be answered, then you'll have another, and another, and soon we'll have 3 pages of the "questions that don't deserve their own thread" just for your request, which is more than a lot of script questions that DO have their own thread :) Seriously - start a new thread in Plugin Requests and ask someone to convert it for you.
Also, if you did try other plugins, you should probably state why you want this one converted instead of using one of them - what is it that they do that you don't want, or what do you want that they don't do? It might be easier to make small modifications to an existing plugin than to reconvert one from scratch (says she who is in the middle of converting an 8-script system from Ace to MV as a commission and pulling her hair out over it). I also know that the way MV does its tiling is even more complicated since 1.3.0's release, and a conversion from an Ace script to an MV plugin that does map drawing is NOT going to be easy. -
@Shaz Okay fair one I totally understand my bad, also take it your the bald one in that story :)
But thanks on that little bit of inspiration at the end there, spent my last 3 days sat drinking coffee staring at that script while looking through the rpg core and rpg objects :D -
Umm... I'm struggling to understand an issue here
this.actorSprite.bitmap = ImageManager.loadActor(this._battlerName);
var bitmap = this.actorSprite.bitmap;
console.log(bitmap.width);
this.actorSprite.setFrame(0, 0, 64, 64);
The code above works well. But I'm trying to replace "setFrame" command arguments with the code below to polish my script, by allowing the script read any kind of sprite-set that follows the same 9x6 pattern.
this.actorSprite.setFrame(0, 0, bitmap.width/9, bitmap.height/6);
// OR
this.actorSprite.setFrame(0, 0, this.actorSprite.bitmap.width/9, this.actorSprite.bitmap.height/6);
But for a reason I don't know, when I run the game, bitmap.width always returns 0. Same happens for height.
For me it doesn't make any sense since I'm calling "bitmap.width" after loading the bitmap; and everything works as intended when I use 64 as parameter.
I really appreciate any help here.
Thanks in advance! :S -
because the bitmap hasn't actually been loaded when you run the commands that retrieve the width and height
-
Alright I'm uncertain if this has been answered before here but I'm going to ask as I'm taking a small break from coding this part before getting back into it. Hoping someone knows the answer.
-----------------------------------------------------------------
In the base menu there are three windows. Command Window / Status Window / Gold Window.
I added a command in the base command window to lead to a new scene.
In this new scene I have a new command window / status window / gold window
The new command window has its own list and the new status window has its own party, not the gameParty but lets call them Party2 for now.
When I select the Equip/Status/Skill options the status menu DOES NOT highlight the first actor in Party2 like the main menu does for the gameParty. I was wondering if anyone knew what part of the default code controls this so I can see how it works so I can fix it in / copy it for my plugin. Thank you. -
@Shaz
Oh... thank you!
I called "setFrame" later on "update" function using bitmap.height as parameter and it worked! -
@Sekunri I suggest you start a new thread and post your script so we can see what you've done. Otherwise we're just guessing.