Author Topic: [XP] Diary  (Read 10395 times)

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3248
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
[XP] Diary
« on: December 18, 2010, 10:14:01 PM »
Diary
Authors: ForeverZer0
Version: 1.11
Type: Misc Add-on
Key Term: Misc Add-on

Introduction

This is a basic script that will allow you to keep a "diary" or notepad in your game. It is very simple to use, and uses a simple interface for displaying the notes.

Features

  • Group your notes into "chapters".
  • Automatically formats text to fit on each line in a legible format.
  • Simple script call to add text.
  • Option to define each note in the script editor, then simply use a script call to add it.
  • Option to use the map as the background.

Screenshots

None.

Demo

None.

Script

Here's the script.
(click to show/hide)

Instructions

Place script below default scripts, and above "Main".
Instructions are in the script.

Compatibility

No known issues.

Credits and Thanks

  • ForeverZer0, for the script.
  • Blizzard, for the "slice_text" method I always steal.
  • Lauros, for requesting it.
  • KK20, for modified "slice_text" method and bug fix

Author's Notes

Please report any bugs/issues/suggestions. I will be happy to fix them.
Enjoy!
« Last Edit: January 07, 2014, 10:34:37 PM by KK20 »
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Lauros

  • Guest
Re: [XP] Diary
« Reply #1 on: December 19, 2010, 11:56:47 PM »
The script is !Awesome!, i dont find any bugs, is exactly what i need, is perfect!!!!!

Offline Agckuu Coceg

  • Transcended Spirit
  • ***
  • Posts: 154
  • LV: 0
  • Gender: Male
  • Hail to the Gin, baby!!!
    • View Profile
    • RMK-Space
Re: [XP] Diary
« Reply #2 on: December 20, 2010, 10:05:46 AM »
I don't know why, but when I'm using your script with absolutely new project, I'm got that error:

Quote
Script 'Window_Help' line 26: TypeError occured.
Cannot convert nil into string
In Window_Help that line is:
Quote
self.contents.draw_text(4, 0, self.width - 40, 32, text, align)

And I'm interesting, why I get that error and maybe only I?
I'm not retarded, but I'm busy. Sorry for patience.


Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3248
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [XP] Diary
« Reply #3 on: December 20, 2010, 07:08:28 PM »
It what happens when the text being sent to draw is undefined. The text argument is nil. It has to be a string. You are likely attempting to add an entry that does not have a chapter name defined in the config.

i.e. Trying to read an entry in chapter 5, when chapter 5 does not have a title defined. It could be a bug, I honestly forgot to test it without any entries already present. I just used a script call to add entries, with a call at the end to call the scene when testing it. I'll check it out tonight and see if it needs fixed, or just a configuation error.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Agckuu Coceg

  • Transcended Spirit
  • ***
  • Posts: 154
  • LV: 0
  • Gender: Male
  • Hail to the Gin, baby!!!
    • View Profile
    • RMK-Space
Re: [XP] Diary
« Reply #4 on: December 21, 2010, 06:23:28 AM »
I also tried to find out yesterday, and realized the problem. This error can occur not only when you put the wrong chapter and text, but if you don't put a script call of chapter before run the Journal script. I'm see something like that on the Quest Log of game_guy, and only then realized.
I'm not retarded, but I'm busy. Sorry for patience.


Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3248
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [XP] Diary
« Reply #5 on: December 21, 2010, 06:54:28 AM »
* Updates to v.1.1 *

Fixed bug.
Game won't crash if Diary is opened and no entries have been added yet.
Thank you Agckuu Coceg for pointing that out.  ;)
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Vexus

  • Ethereal Devastator
  • ****
  • Posts: 365
  • LV: 9
    • View Profile
Re: [XP] Diary
« Reply #6 on: July 31, 2012, 01:03:17 AM »
Huge necropost I know but...

Is there anyway I can "update" the text of a chapter by script call without the script making it a new page?

Better explanation:

You add chapter 1 and for now it shows you need to go x place, once you reach the place something happens and you take note on the diary but if you script call to add the updated text it will assume it's a new page instead of having the text updated.

So is there anyway to have let's say chapter one showing piece per piece via script call or at the very least a command that deletes the entry from the diary so adding the updated version would take it's place?

Thanks
Current Project/s:

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3248
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [XP] Diary
« Reply #7 on: July 31, 2012, 01:44:11 AM »
All data is stored in $game_party.diary. You can change it as you need by adding or removing values.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Vexus

  • Ethereal Devastator
  • ****
  • Posts: 365
  • LV: 9
    • View Profile
Re: [XP] Diary
« Reply #8 on: July 31, 2012, 11:34:26 PM »
Would you mind giving me an example on how would I remove chapter 1 text included so I could add another chapter 1 with updated text please?

Thanks
Current Project/s:

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2929
  • LV: 367
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Diary
« Reply #9 on: August 01, 2012, 12:09:05 AM »
Deletes all the text in the following chapter:
Code: [Select]
$game_party.diary[chapter] = []



(click to show/hide)
NNID: KK20-CP

Offline Vexus

  • Ethereal Devastator
  • ****
  • Posts: 365
  • LV: 9
    • View Profile
Re: [XP] Diary
« Reply #10 on: August 01, 2012, 02:21:07 AM »
Thanks :)
Current Project/s:

Offline theneonheart

  • Trained Member
  • *
  • Posts: 19
  • LV: 0
  • Gender: Male
    • View Profile
    • The Neon Heart.com
Re: [XP] Diary
« Reply #11 on: August 27, 2012, 04:41:50 AM »
Hi, I'm using this script in my game, and it seems to be working, the only thing is whenever I add an entry, it posts the entry twice in the window, one right after the other...

I was wondering if you might know what could cause this?

I am using CCOA's UMS http://www.rmxpunlimited.net/forums/files/file/63-ccoas-ums-18/, thought that might have something to do with it. But otherwise I have no clue.
My Games: ExXception Draft - A Cyberpunk Detective Story with a Twist of the Paranormal

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2929
  • LV: 367
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Diary
« Reply #12 on: August 27, 2012, 06:19:01 PM »
The message system should have, in no way, any effect on the Diary script. Problem solving tip: If you think another script is causing the problem, remove the script and see if the problem persists.

Most likely what you are doing is calling Diary.add_entry twice. I even went as far as to try using the two scripts together--I got no errors.



(click to show/hide)
NNID: KK20-CP

Offline Launian

  • Trained Member
  • *
  • Posts: 23
  • LV: 1
  • Gender: Male
  • Tsuki no Kenshi
    • View Profile
Re: [XP] Diary
« Reply #13 on: September 27, 2012, 09:39:42 PM »
Hello. I'm just wondering: is there any way I can put line jumps on the script? I've been fooling around with it, and I can't figure it out.

What I need is to make some sort of list, something like:

Code: [Select]
Hotkeys:

1 - Equipment Window
2 - Item Window
3 - Status Window
...

Something like that. Any ideas?

If I were to leave tonight, would your hand try to reach me?

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2929
  • LV: 367
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Diary
« Reply #14 on: September 28, 2012, 01:56:53 AM »
Hello. I'm just wondering: is there any way I can put line jumps on the script? I've been fooling around with it, and I can't figure it out.
Clicky



(click to show/hide)
NNID: KK20-CP

Offline Launian

  • Trained Member
  • *
  • Posts: 23
  • LV: 1
  • Gender: Male
  • Tsuki no Kenshi
    • View Profile
Re: [XP] Diary
« Reply #15 on: September 28, 2012, 07:57:32 AM »
Hello. I'm just wondering: is there any way I can put line jumps on the script? I've been fooling around with it, and I can't figure it out.
Clicky

Thank you so much! =D Worked great.

If I were to leave tonight, would your hand try to reach me?

Offline pickedlastjake

  • Trained Member
  • *
  • Posts: 10
  • LV: 0
    • View Profile
Re: [XP] Diary
« Reply #16 on: December 06, 2012, 08:34:23 AM »
Hey there, I'm pretty n00bish to RGSS and Ruby in general. But I'm trying to learn by reading and using different scripts in my game. I put this script into my game, and I love it! It is exactly what I needed. The only problem is, and its quite probably due to the fact that I'm very new to all this, is that when I have more than one chapter added I can't see any of the chapters except the first one. When I press up and down with the window open it makes the sound but doesn't display any of the other pages. If you could let me in on why this might happen that'd be awesome!

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2929
  • LV: 367
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Diary
« Reply #17 on: December 07, 2012, 03:42:41 AM »
It's the L and R buttons (default are Q and W keys). Up and Down only scroll down the current chapter, for long entries.



(click to show/hide)
NNID: KK20-CP

Offline MarkHest

  • Video Game Music Composer
  • Astral Trancist
  • *****
  • Posts: 700
  • LV: 16
  • Gender: Male
  • Smile, Laugh, Live
    • View Profile
    • My Youtube Site
Re: [XP] Diary
« Reply #18 on: January 01, 2014, 04:24:44 AM »
For some reason when I make a the script call for a new chapter it won't happen. It stays at the lowest chapter I created. Is it meant to count down?

To describe my problem: When I make a script call for chapter 1 it works fine. Then when I make a script call for starting chapter 2 it won't happen and starts at chapter 1. However, If I start by using chapter 2 and then make a script call for going to chapter 1, it works :???:

(click to show/hide)
   

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2929
  • LV: 367
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Diary
« Reply #19 on: January 02, 2014, 03:06:38 AM »
Well, since it's a diary, all chapters you add to it are kept in memory. Of course it should start off with Chapter 1 first.
To swap between different chapters,
It's the L and R buttons (default are Q and W keys). Up and Down only scroll down the current chapter, for long entries.
If you want to clear out your diary of everything
Code: [Select]
$game_party.diary.clear



(click to show/hide)
NNID: KK20-CP