Ruby/RGSSx questions that don't deserve their own thread

never used that so I won't know how to write or read but setting it to item's description would involve:

setting it

resaving the item database so that the changes persist (in case you need it)

$data_items[id].description = TEXT

should change it
That's cool, but doing two lined description is my problem, since that code I just wrote just makes it to 1 line.
Just curious, why would you need to save it first into an external file (using the scripts) before setting it?

If you don't need it to be easily editable from outside, you could just use File open and Marshal.dump/Marshal.load (see how the save and load methods of datamanager works)
I want to learn more things about external files. What if I want my game players to add a description they want rather than me doing it? Fun things 🙂
I see, then yeah, you cannot use the Marshal methods for that as that would serialize the contents before saving.
have you tried to put \n\r at your string for a new line?
I will try that. Second question would be, how can I, detect which line I should get for the text I will include in a variable?
Anyone knows how to prevent command window from closing/disappearing when you choose items/skills etc!?I'd like to have both windows displayed until your done with your turn;the command window should be gone only when characters/enemies animations are played.

Thx in advance 🙂
 
First did you mean actor command window? Then..
Does the it closing when you choosing skill/item? I recall it not, even I test a new project and do battle test, when I choose skill/item, the actor command window is not closed. Do you use a custom script that involving battle?
Oh right I've used Moghunter script for so long that I totally forgot that the window doesn't close by default...

So yes I was talking about actor command window and now I know that this script is the cause why window is closing.

Yet I still don't know how to fix that 🙁
Hmm..  Mog Battle HUD heavily utilizing a custom bitmap layout for every battle aspect window.
 The actor command window also using a custom bitmap, and how Mog do the coding for this matter is not really usual, Imake me a bit confused at first. But actually I manage to found the culprit and tweak it a bit so it would go like what you want, but will Mog permit it?

if yes then
First create a new script slot exactly below the Battle HUD script

Then copy this thing below and paste it there the Battle HUD script.

This was a wrong thing. The correct is my comment below this comment!
I'm pretty sure it does what you want, that will preserve the actor command window until changing the next actor.
Oh I'm afraid you should make a new thread for this matter for further action.
wow this turn up to be more complicated than I thought by the size of that script you wrote.

Unfortunately,this is what I get:

Spoiler
Untitled_zps67236977.png
So any idea what's the cause or should I go and make a thread and thanks alot for trying,I really appreciate it 🙂
Oh my bad, I paste the wrong script, silly me

Here's the correct section :

#==============================================================================# ** Window Actor Command#==============================================================================class Window_ActorCommand < Window_Command def update mog_monogatari_actor_commnand_update self.visible = self.open? if @layout.visible != nil refresh_layout if @layout.visible != self.visible end end end #End of Window_ActorCommand

Put it in new sot exactly below the Battle HUD. I'm sure now working nice.

EDIT : Oh no I paste it wrong again, re check the script, actually it's shorta thingy.
Finally I've been trying to achieve this for so long ;_; ;_; ;_; ;_; ;_; ;_;

Thanks a lot,I'll definitely put you in the credit list 😀
You're welcome, I just want to help 🙂 .
Glad that you can achieve what you want. I don't really need to be credited, but thanks anyway and good luck for the project 😉 .


 
Hey J0pac, if you need help with custom scripts in the future, could you please post a NEW thread in RGSSx Script Support, including a link to the script? Such things usually require a bit of back and forth, as you've seen above, and are not really suitable for THIS thread. Plus, if they have their own thread, it makes it much easier for other people to find if they want to accomplish something similar 🙂 Thanks!
I hope this is the right place for this.. but is there a way to change the line spacing in text?

The text I'm using right now is a custom font, and it spaces out the lines a lot. Which makes it look extremely weird.

Here's the link to the font I'm using, and how it looks like in game.

Font used: http://www.dafont.com/abysmal-gaze.font

Spoiler
tumblr_nd4sf7awVD1s49p9co1_1280.png
try this

class Window_Base  #--------------------------------------------------------------------------  # * Normal Character Processing  #--------------------------------------------------------------------------  def process_normal_character(c, pos)    text_width = text_size(c).width + 5    draw_text(pos[:x], pos[:y], text_width * 2, pos[:height], c)    pos[:x] += text_width  endendyou'll want to change the + 5 in "text_width = text_size©.width + 5"

I used 5 to text to make sure it worked, you'll probably want to use 1 or 2. It will only work for strings that use draw_text_ex. This will make choice windows not scale like normal (since it still calculates its width by the normal width of the text).
-- Ahh I think you've misunderstood. I wasn't talking about the character spacing, but the line spacing, like the space between a first sentence and second sentence. 
ah the vertical spacing?

try the and change the "10" value to what you'd like

class Window_Base < Window #-------------------------------------------------------------------------- # * New Line Character Processing #-------------------------------------------------------------------------- def process_new_line(text, pos) pos[:x] = pos[:new_x] pos[:y] += [pos[:height] - 10, line_height].max pos[:height] = calc_line_height(text) endendeditted: I added a check to make sure it spaces at least the standard line_height setting so you don't run into issues down the road.. like if icons are draw in the message boxes or help window

Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/