Hi Everyone,
Sorry to bother you but I have been digging and testing for hours but can't figure out how to do it properly (poor RUBY knowledge probably).
What I am trying to accomplish is having a different outline color for the equip window so that I can use an Item rarity (and colouring) script. My current outline color for the rest of the game is orange and doesn't fit with my selected rarity colors.
Thank you very much in advance for helping me out here and broadening my knwoledge.
Change Outline Font color for Equip window
● ARCHIVED · READ-ONLY
-
-
I've moved this thread to RGSSx Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
Do you want ALL text in that window to have the same outline colour, but just different to all other windows? Or do you only want it different for SOME items?
bitmap.font.out_color is what you would need to change, via script, after the bitmap is created but before the text is written. Where exactly you put that command will depend on the answer to the question above. -
Hi Shaz,
Thanks for the quick answer. I think I want it for all the text in that window because it pulls also stats values and to be fair they do not look great outlined in orange ;) The rest of the window is being governed by picture overlays so I can change those easily to the color I want.
So to sum up: Yes I want all the Equip Window text to have the outline color changed.
Thanks for your help in advance. -
Try this:
class Window_EquipStatus < Window_Base def create_contents super contents.font.out_color.set(X) endendclass Window_EquipCommand < Window_HorzCommand def create_contents super contents.font.out_color.set(X) endendclass Window_EquipSlot < Window_Selectable def create_contents super contents.font.out_color.set(X) endendclass Window_EquipItem < Window_ItemList def create_contents super contents.font.out_color.set(X) endendbut instead of X in all of those commands, use one of the following:text_color(X)
where X is the index of one of the colour squares in the System/Window image (go to Resource Manager > System > Window > Preview and look at the 32 coloured squares in the lower right corner). The first one is index 0 and the last one is index 31.
So the full line will be:
contents.font.out_color.set(text_color(15))
or whatever id you want to use.
Color.new(red, green, blue[, alpha])
where red, green and blue are the correct settings for the colour you want if you don't want something in that group of 32. You can leave alpha out to have it default to 255.
So the full line will be:
contents.font.out_color.set(Color.new(255, 100, 255))
which I imagine would be some kind of purplish shade. -
That looks gorgeous Shaz.
I will try it tonight (am out home) and let you know but looks great. And gives me another sets of Ruby commands to learn.
Will edit this post later this afternoon. -
You MIGHT find it looks a bit strange if the help window still has the default colours though, because I think that's displayed at the same time. You might need a script that also does a mod to Scene_Equip to change the colour of the help window when the scene loads, and change it back to the default again when the scene closes.
Also, you didn't indicate if you're using any custom scripts for the equip scene. If you are, the above may not work, or may only work partially. -
Hi Shaz,
I am well aware I did not specify if I was using custom scripts. This because I want to try figure out as much as possible myself and turn to you guys (and woman) only when I am completly stuck. In this case I was lacking the proper Ruby knowledge and the structure you gave should give me enough hints to figure the rest out myself.
In case I get totally stuck (again) I am using Yanflys Core Engine, his Equip Engine, and pretty much every MoghHunter script (uptodate as of now), as well as an Item Rarity script (which I have mastered yipee).
Hopefully I will be able to figure things out on my own and not rely solely on your help. But again big thanks for the snippet that inspired me alot (no Ruby knowledge and my programming base study years are far away^^). Keep you updated.
Edit: Shaz you are a Goddess. Thanks for the snippet it is perfect. Now it will help much in the future for further programming. This thread can be closed.