Welcome Guest ( Log In | Register )

[ Big| Medium| Small] -



Post new topic Reply to topic  [ 132 posts ]  Go to page 1, 2, 3, 4, 5  Next
    lambchop
  Wed May 23, 2007 3:31 am
Member

Super Simple Journal - V2

I agree this needs to be simplified a bit. - Brewmeister (in response to feedback & excessive support requests)
Changes:
* You only need to edit the list of tasks. The scripts will figure out the rest.
* Added a callback so you can use this from the menu, or from the map with the "Q" key
You will return to the map or menu from whence you came. :)
* Added @offset near tasks, to make it easier to specify a starting switch other than 1.
* Include separate Menu & Map mods so you don't have to edit any default scripts
* Added an option to use a custom windowskin for your journal

Introduction
If you want a very simple journal, this is the script for you. This script creates a new journal screen for you that contains a list of quests that your character needs to complete. The player can scroll through the list, and that's it. You define your journal entries in the script, and then use switches to turn the entries on and off in your game. Easy!

Create Window_Journal

In this section, we will create the journal and its window.

1. Open your game and script editor. ( Tools -> Script Editor, Script Editor Icon, or F11 )

2. Right-Click on Main, and select Insert

2. In the name box, type Window_Journal

3. In the code page (right side), copy & paste the following script:
Remember to turn off line numbers before using the "Select All" button!

Expand to see the code.



Create Scene_Journal

In this section, we will create the scene that will contain our journal window. The scene determines where the journal window will appear to users and what happens when keys are pressed.

1. Open your script editor.

2. Add a new script called Scene_Journal below Window_Journal (above Main) in your script list.

3. In Scene_Journal, add the following code:

Expand to see the code.



Create Scene_Menu_Mods (optional)

In this section, we will add Journal to the main menu. It will appear after Status.

1. Open your script editor.

2. Add a new script called Scene_Menu_Mods below Scene_Journal (above Main) in your script list.

3. In Scene_Menu_Mods, add the following code:

Expand to see the code.



Create Scene_Map_Mods (optional)

In this section, we will add a script to enable using the "Q" key to open the journal

1. Open your script editor.

2. Add a new script called Scene_Map_Mods below Scene_Menu_Mods (above Main) in your script list.

3. In Scene_Map_Mods, add the following code:

Expand to see the code.


Create Journal Entries

Now that you have your Journal set up, you need to add journal entries to it.

1. Go to your Window_Journal script.

2. Find this section:
@data[1] = "Task 1"
@data[2] = "Task 2"
@data[3] = "Task 3"


3. Replace the tasks with your own. For example:
@data[1] = "Find treasure for Jake"
@data[2] = "Get milk for Ma"
@data[3] = "Destroy the world"



Name your Journal Switches

Now that your journal entries are added to your journal, you turn them on and off with switches.
Let's name our switches so we can find them easily while making our game.

[color="Red"]Note: The number assigned to each data entry needs to match the number assigned to each switch. For example, @data[2] = "Get milk for Ma" is turned on/off with switch 0002: Help Ma.[/color]

1. Add a new event to one of your maps.

2. Open the Event Commands window.

3. Click Control Switches, select the arrow next to Single and add the following by selecting each switch number, and typing in a name below:
0001: Help Jake
0002: Help Ma
0003: Destroy World


4. You can delete this event if you're not using it. Or leave it for an event you'll use. We just used it to add names to the switches.


Turn Entries On and Off

To turn entries on and off, simply turn the journal switches on or off in the Event Command window for an event on the map.


How do I add more journal entries?

To add new journal entries, you need to update your list of switches and your list of journal entires in Window_Journal.

1. Open the Window_Journal script and add another entry to the data[] array. for example, data[4] = "Save the world"

4. Exit the script editor, and open an event on your map. Add a new switch for the journal entry. (for example, 0004: Save World)


I don't want to start with switch 1

If you don't want to start your journal entry with switch 1, simply adjust the @offset variable in Window_Journal as follows:

Note: The following code assumes that you are starting at switch 100 instead of 1.

@offset = 99

I want to use a different windowskin for my journal

You can use a custom windowskin just for your journal window. For example, a parchment or book page, or just a different style of windowskin. You will need to make & place your custom windowskin in the GraphicsWindowskins folder in you project.

1) Right below the @offset variable, uncomment (delete the # sign) the following line:

self.windowskin = RPG::Cache.windowskin("RMXP4life_Wood.png")

2) Change the "RMXP4life_Wood.png" to the name of your custom windowskin.

Enjoy!
And let me know if anything can be explained better, or doesn't work like it should.


Last edited by lambchop on Fri May 25, 2007 6:32 am, edited 1 time in total.

Top Top
Profile      
 

    Reaper*
  Wed May 23, 2007 8:00 am
User avatar
Member

One question when you play this script on the game in the quest part will only show save the world or we can put more description?


Top Top
Profile      
 

    Lukasz_PL_POLAND
  Wed May 23, 2007 8:01 am
Member

Can you make a demo? Please... script is very good!


Top Top
Profile      
 

    Nachos
  Wed May 23, 2007 12:22 pm
User avatar


yeahh...demo demo!!

we want a demo :D

..
too much copying and pasting..XD

but yeah! very good script lambchop!


Top Top
Profile      
 

    Isopaha
  Wed May 23, 2007 1:23 pm
Member

When i saw this script, i just fall love for it..

Those who asked DEMO, i just made it, cause i got free time. This link can be added to first post if lambshop just want.

Super Simple Journal Script DEMO


Top Top
Profile      
 

    lambchop
  Thu May 24, 2007 4:04 am
Member

@Isopaha
Thank you so much, Isopaha. I added a link to the demo at the top of the page. :)

@Reaper-
Yep, you can make the entries much longer if you want. When you define your switches, you will probably want to use shorter descriptions because you don't have a lot of room in the Switch dialog box, but in the actual Journal script (Window_Journal), you can make them long enough to fit across the entire screen.


Last edited by lambchop on Thu May 24, 2007 4:10 am, edited 1 time in total.

Top Top
Profile      
 

    Reaper*
  Thu May 24, 2007 7:30 am
User avatar
Member

Ok thank you it looks great i'm going to try it


Top Top
Profile      
 

    tails2
  Fri May 25, 2007 1:02 am
Member

Nice script, and also very user friendly. Great job.


Top Top
Profile      
 

    easydelta
  Tue Sep 25, 2007 4:21 am
Member

Where is Windows_Menu? there's only MenuStatus and it isn't there.


Last edited by easydelta on Tue Sep 25, 2007 5:05 am, edited 1 time in total.

Top Top
Profile      
 

    Tassadar
  Tue Sep 25, 2007 5:37 am
User avatar
Member


Location: Netherlands
In Scene_Menu, replace

Expand to see the code.


with

Expand to see the code.


When that's done, go to the end of line 165, press enter and add

Expand to see the code.


Great script lambchop, simplicity at it's best. I hope you don't mind me helping easydelta out :D

_________________
Image

http://tassadaradun.deviantart.com/


Last edited by Tassadar on Tue Sep 25, 2007 5:59 am, edited 1 time in total.

Top Top
Profile      
 

    easydelta
  Tue Sep 25, 2007 7:12 pm
Member

Blah, it works except it overlaps on my menu, do I need a Custom Menu? I don't think I have it in me @__@

And a error on line 168 NameError or something?


Last edited by easydelta on Tue Sep 25, 2007 7:31 pm, edited 1 time in total.

Top Top
Profile      
 

    Tassadar
  Tue Sep 25, 2007 7:47 pm
User avatar
Member


Location: Netherlands
I can't really come up with something that counters that error, I'm still learning how to script after all. About the overlapping, you can change that by editing the Y positions of your windows. You can find them in Scene_Menu. After that you might need to change the height of some windows, just so they don't get cut off at the edge of your screen. You can find that in Window_something, where something is the name of the window you're trying to change. Hope this helps you ;)

_________________
Image

http://tassadaradun.deviantart.com/


Top Top
Profile      
 

    easydelta
  Tue Sep 25, 2007 8:26 pm
Member

EDIT: LMAO I forgot to add Scene_Journal -.-

It works perfectly! My first four quests are up, but there's no way to show they are completed? They just go away once switch is off?


Last edited by easydelta on Wed Sep 26, 2007 12:55 am, edited 1 time in total.

Top Top
Profile      
 

    Nortos
  Thu Sep 27, 2007 9:43 am
User avatar
Member

Just turn the switch off once you have finished and it will go.
Hmm you could probably have a finished quest journal too using system. If you were really interested.

_________________
http://img223.imageshack.us/img223/5586/signaturecopydz7.png[/img]


Top Top
Profile      
 

    Tempus
  Fri Sep 28, 2007 11:26 am
User avatar
Member


Location: Mom's Basement
Nevermind..

_________________
There ain't no rest for the wicked.


Top Top
Profile      
 

    Love
  Sat Jan 12, 2008 4:06 pm
Eagle Vision's biggest fan girl eva. =D
User avatar
Member


Location: Egypt
Does this script work with the SDK?

Thanks.:)

_________________
Image


Last edited by Anonymous on Mon Jan 14, 2008 7:22 am, edited 1 time in total.

Top Top
Profile      
 

    XP Learner
  Sat Jan 12, 2008 7:44 pm
User avatar
Member

Well i tried it and it does give some errors.

_________________
Merchant Imagari Line Project Link.
http://www.hbgames/forums/http://dev.r ... 64#p109864


Top Top
Profile      
 

    dark-archangel
  Tue Jan 15, 2008 2:08 pm
User avatar
Member


Location: Romania :D
Love : I gave you this script but you said thanks,but don't use
and yes it workes with SDK :)

_________________
http://img99.imageshack.us/img99/1/signatureuh8.gif[/img]


Top Top
Profile      
 

    Love
  Tue Jan 15, 2008 7:28 pm
Eagle Vision's biggest fan girl eva. =D
User avatar
Member


Location: Egypt
@dark-archangel:That time I used a version which doesn't allow me to use it but now it will,thanks.

EDIT:Where is the Window_Menu?

_________________
Image


Last edited by Love on Tue Jan 15, 2008 7:58 pm, edited 1 time in total.

Top Top
Profile      
 

    dark-archangel
  Wed Jan 16, 2008 1:24 pm
User avatar
Member


Location: Romania :D
I think there's a little mystake,search in scene_menu:)

_________________
http://img99.imageshack.us/img99/1/signatureuh8.gif[/img]


Top Top
Profile      
 

    Brewmeister
  Thu Jan 17, 2008 6:45 am
Paste above Main
User avatar


lv 99 Balance Wizard

Location: 42.655713 N 82.619282 W
Love, look at Tassadar's post up there ^  (Starts with "In Scene_Menu, replace...)

Skip Lambchop's "Window_Menu" & "Update Scene_Menu" steps, and do Tassadar's instead.

Then continue with the "Create Journal Entries" step.

Did you download Isopaha's demo?

Be Well

_________________
"Of course that's just my opinion. I could be wrong!"


Image


Top Top
Profile      
 

    Love
  Fri Jan 18, 2008 2:11 pm
Eagle Vision's biggest fan girl eva. =D
User avatar
Member


Location: Egypt
Thanks Brew,but does it really work with SKD? Because I tried it and it didn't appear.

Please help.

Thanks in advance.

_________________
Image


Top Top
Profile      
 

    Dark Koji
  Fri Jan 18, 2008 6:47 pm
User avatar
Member

@Love:
Yes, I tried the script just earlier and it works fine with the SDK. I am using ver. 2.3, by the way.

Did you do the part Tassadar posted? If you did so, you should see a new command option added into your menu interface. The Journal display will be made accessible from there.

If not, you can try opening the journal directly by running a call script event with:

Expand to see the code.


The demo posted here too has an example to that.


Top Top
Profile      
 

    Love
  Sat Jan 19, 2008 9:51 am
Eagle Vision's biggest fan girl eva. =D
User avatar
Member


Location: Egypt
Thanks but I think I'll just go with a game without a journal.

_________________
Image


Top Top
Profile      
 

    Brewmeister
  Sat Jan 19, 2008 7:30 pm
Paste above Main
User avatar


lv 99 Balance Wizard

Location: 42.655713 N 82.619282 W
You give up too easy....  :)

I just tried it with the SDK2.3, and it works. 

However, since we modified Scene_Menu to add the journal, and the SDK also modifies
Scene_Menu, if the SDK is right above Window_Journal & Scene_Journal, the SDK menu wins.
So, we should just be able to move Scene_Menu below the SDK, so the bottom of your script editor should look like....

Scene_Debug
SDK
Scene_Menu
Window_Journal
Scene_Journal
Main

Give it a shot

_________________
"Of course that's just my opinion. I could be wrong!"


Image


Top Top
Profile      
 

    XP Learner
  Sat Jan 19, 2008 9:13 pm
User avatar
Member

This really works though there should be a option to check how many quests are completed as well as certain quests that trigger throughtout the story.

_________________
Merchant Imagari Line Project Link.
http://www.hbgames/forums/http://dev.r ... 64#p109864


Top Top
Profile      
 

    Brewmeister
  Sat Jan 19, 2008 9:27 pm
Paste above Main
User avatar


lv 99 Balance Wizard

Location: 42.655713 N 82.619282 W
Yes, but that would reduce the Super Simpleness of it all... :)

Someone else mentioned that a second "Completed Quests" page would be cool.
And...  I'm planning on replacing the current Quest system I'm using with this one, so I'll take a stab at adding a "Right/Left Arrow" to switch "Current" & "Completed" views.

Some developers might also like to have a list of "Undiscovered" quests as well. That way if the player finished the game they can see if they missed anything.

Not sure what you mean by the second ER (Enhancement Request).
Each quest is triggered by setting a switch. You also use the same switch to test, in game, if that quest is active.

Be Well

[ EDIT ] I'm an idiot!  I didn't even notice in the "draw_item" method
[code]
      check = Bitmap.new("Graphics\\Pictures\\checkmark.png")
      self.contents.fill_rect(rect, Color.new(0,0,0,0))       
      if $game_switches[index + 200] == true
        self.contents.blt(0, @n, check, check.rect)
      else
        self.contents.draw_text(10, @n, 640, 32, "â €”

_________________
"Of course that's just my opinion. I could be wrong!"


Image


Last edited by Brewmeister on Sat Jan 19, 2008 9:55 pm, edited 1 time in total.

Top Top
Profile      
 

    Love
  Sun Jan 20, 2008 8:42 pm
Eagle Vision's biggest fan girl eva. =D
User avatar
Member


Location: Egypt
Thanks,Brew! Thanks! Thanks! Thanks! But just one problem,it overlaps my menu also I've done everything right,I added everything,can you please please please please please please tell me how to solve this problem?

_________________
Image


Top Top
Profile      
 

    Brewmeister
  Sun Jan 20, 2008 9:47 pm
Paste above Main
User avatar


lv 99 Balance Wizard

Location: 42.655713 N 82.619282 W
in Scene_Menu, "main" method, edit the 'y' values to match this...
Expand to see the code.


Then, edit Window_Steps to look like:
Expand to see the code.

_________________
"Of course that's just my opinion. I could be wrong!"


Image


Last edited by Brewmeister on Sun Jan 20, 2008 9:50 pm, edited 1 time in total.

Top Top
Profile      
 

    Love
  Mon Jan 21, 2008 4:17 pm
Eagle Vision's biggest fan girl eva. =D
User avatar
Member


Location: Egypt
It worked!!! Weeeeeee!!!!!! YAPPY!!!! I AM HAPPY!!! *party*

Thanks so much Brew! Thanks! Thanks!

_________________
Image


Last edited by Love on Mon Jan 21, 2008 8:25 pm, edited 1 time in total.

Top Top
Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 132 posts ]  Go to page 1, 2, 3, 4, 5  Next


Who is online

Users browsing this forum: No users and 34 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

We are an independent, not-for-profit game making community.
Homepage
Board Index
About Us
Downloadable Games
Free Browser Games
Games in Development
RPG Maker Support
Game Maker Support
Construct 2 Support
HBGames the eZine
Advanced RPG Maker
Site Announcements
Powered by phpBB © phpBB Group