kudaratan Posted December 17, 2014 Posted December 17, 2014 Hey, it's me again! I'm working with the Prince Pia Carrot PC version demo and I can't quite figure out how to get the text to work properly. First of all, it only takes up half of the entire box. The font size is also quite big, as you can see. Might be hard to fit more complex sentences in. That's a lower priority, though. Second of all, I don't know how to get it to wordwrap. I've tried both the Nagato and insani methods, but "class KAGWindow extends Window", HistoryLayer.tjs, and MessageLayer.tjs don't exist. Here's the data.xp3 if anyone would like to take a look--the rest of the info is divided into archives like 'game01.xp3'. https://www.mediafire.com/?3yo1umgy0yuolno <==Default names are edited, but otherwise clean. Thanks again in advance! Quote
Kelebek1 Posted December 17, 2014 Posted December 17, 2014 At the top of the file, around line 14, just add 2 lines: scFONTSIZE = 18; scDRAWMAX = 90; The font size speaks for itself, set it to whatever you like best. DRAWMAX is the maximum number of characters per line. 100 was too big in general, 90 works nicely for me, but it does depend on the actual line you're writing. So if you hit some weirdness with it, you can take the number down a bit. Optionally, do a ctrl+f for "wnd.add(MessLayer" and change pxMESTEXT into some other number. This alters the x position of the text, so you can move it more to the left and cut down on that big empty left column if you want to. I set it to 35. If you do change this, change the y value just after it as well. To add line wrapping on space, go to line 1784 (with an unedited file), and change the line if((MessArray[inx] == "/") || (draw_cnt == scDRAWMAX)) into if((MessArray[inx] == "/") || ((draw_cnt >= scDRAWMAX) && MessArray[inx] == " ")) and also change the line just below it if(MessArray[inx] == "/"){ ++inx; } into if(MessArray[inx] == "/" || MessArray[inx] == " "){ ++inx; } That'll cause the line to go over scDRAWMAX until it finds a space, and then it'll newline. With all the changes I made, this is how it looks in-game (it's all one really big line): For the sake of ease, here's my MessObject: https://www.mediafire.com/?zghu791vmzrczmi kudaratan 1 Quote
kudaratan Posted December 17, 2014 Author Posted December 17, 2014 Thank you very much! It works beautifully until I get to the line right after the one in myscreenshot above, though. I'm not certain why. This happens and I have to quit the game. I don't get why. The line isn't even different. [talk name=心の声] As soon as I entered I was greeted by a tall waiter, who guided me to a seat by the window. [hitret] [talk name=心の声] The name tag on his chest said, "Manager: Kinoshita Kuon". [hitret] [talk name=心の声] Still young and a manager. Impressive. [hitret] But it crashes on the "still young" line... Quote
Kelebek1 Posted December 17, 2014 Posted December 17, 2014 Runs just fine for me... Did you change the script and then load a save or something? Because I've found that causes errors. If it still crashes from starting a new game then I'm really not sure, because those 3 lines are alright for me. Upload your changed scenario file or something? Maybe even your compiled data as well. kudaratan 1 Quote
kudaratan Posted December 17, 2014 Author Posted December 17, 2014 Didn't load a save, I started a new game. Here's my compiled data. https://www.mediafire.com/?2kzf4c9zacc8h0b And here's my changed scenario file. http://www.mediafire.com/download/i642cl6cp8h5py7/625BZ_01.SOC Quote
Kelebek1 Posted December 17, 2014 Posted December 17, 2014 Ah ok, with that changed scenario I now get the crash. Will have to go through line by line and see what's causing it to happen I guess. EDIT: Ok I narrowed down the error to the "But the classy cafe is gone now, and my dream along with it." line. Anything which doesn't contain the Japanese newline /with 2 lines of text causes that crash. Very very odd. I think I need help from someone who knows kirikiri, because I really don't know why that happens. EDIT2: Fixed it. Use these instead: https://www.mediafire.com/?14w632vw7s8mfa6 The scFONTSIZE and scDRAWMAX were defined in Constant.tjs. Which is weird, I searched for them but got no hits, I don't know why. But I changed them in the constants instead, and now it doesn't error. So yeah, try those 2 files instead and should all be fine now. kudaratan 1 Quote
kudaratan Posted December 21, 2014 Author Posted December 21, 2014 Thank you so much! Everything works absolutely perfectly now! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.