MODULE: Journal-Maker 1.1

Started by Akumayo, Thu 29/06/2006 12:23:32

Previous topic - Next topic

Akumayo

The Journal-Maker allows the user to create logs/journals/questbooks/and the like using a GUI label and two buttons for scrolling.

The download includes both the module file and a walkthrough showing how to set up a journal, and some various functions one can use to edit the journal.Ã,  Once you've read over the walkthrough, the comments in the module itself elaborate on the use of each function.

This is just version 1.0, so if you find any bugs, don't hesitate to offer them up for fixing.
This may be an updated version, but bugs and suggestions are still welcome.

User Experience Recommended:
-Basic knowledge or understanding of Strings

For Advanced Use
-Advanced knowledge of String functions (some functions return a String, that can be edited, and then replaced)

Journal-Maker 1.1

-Regards, Akumayo
"Power is not a means - it is an end."

Ghost

yes, it's indeed a nice feat. i had not too much trouble rigging up a small "quest log"- and i really think this is a useful feature for games with a more elaborate scoring system, or a hint of rpg. good work!


Akumayo

Thank you very much, I intend to use it in the RPG I've been thinking about making lately.  I'm glad you found it nice.
"Power is not a means - it is an end."

Akumayo

Version 1.1 now finished.  It incorporates several more functions that are useful only for fine tuning and customizing the module.

-Enjoy, Akumayo
"Power is not a means - it is an end."

pslim

Just a note that when I unzipped the updated version, the period in the version number part of the name of the .scm file caused AGS to think 1 was the extension, so it wouldn't recognize the file type until I renamed it. Testing it out now. :)
 

Akumayo

 :-[ Sorry, I will fix that as soon as I update the module, or get some extra time.
"Power is not a means - it is an end."

JRock

Hello.  I am having trouble with the module.  I created a journal gui and created a label and two buttons.  I know how to add entries, but how do I update the journal to display the NEWEST entry next time the player goes to the journal?

Code: ags

JournalLabel.SetText(JournalModule.GetJournalCurrentText());

doesn't work.  It says that SetText is invalid????  I read the entire help file but I still can't figure out how to have The newest entry displayed.

Any help would be GREATLY appreciated!  THAN YOU so much!

riseryn

Hi
I have solved this problem by changing:

JournalLabel.SetText(JournalModule.GetJournalCurrentText());

by
JournalLabel.Text=JournalModule.GetJournalCurrentText();

hope this help

JRock


Quote from: riseryn on Sat 17/11/2007 09:58:04
Hi
I have solved this problem by changing:

JournalLabel.SetText(JournalModule.GetJournalCurrentText());

by
JournalLabel.Text=JournalModule.GetJournalCurrentText();

hope this help
Ok, but where do you put this code?  Do you put it right after the code for the new journal entry or in REPEATEDLY_EXECUTE?  Cuz I tried both and it still doesn't change to the new entry????

.M.M.

#9
How can I import it to AGS??? There is nothing about it in manual and it´s not .scm or .dll

[EDIT] It´s okay now. Because name of file ends on 1.1 my computer thinks it is file .1- so I just change it on 11.scm 
:)
Your module is great! It´s exactly what I needed!

riseryn

Quote from: JRock on Sat 17/11/2007 17:52:08
Ok, but where do you put this code?  Do you put it right after the code for the new journal entry or in REPEATEDLY_EXECUTE?  Cuz I tried both and it still doesn't change to the new entry????

Yes you put it after the code for the journal entry.
:)

AntmanJB

#11
This is a cool module, I'm currently using it in my game.

However, I have encountered a few issues and I think other people would have them too.

How can I add an "Open Journal" button to the GUI, and a "Close" button in the journal? I can't seem to find any script commands for this.

Also, when new entries are added, I don't want the journal to pop up automatically, I just want it to update itself and let the player open it when they want to.

I might add a sound effect to indicate new entries, for a good example play the game "Submachine 5: The Root". Edit: I've been able to add sounds for the turn pages buttons and also in the global script for AddEntry. Now for the opening and closing of it!

Edit again: Ah! I've done it! Despite scripting not being my strong suit, after searching through the help file I found some commands. gui[number].visible brings up the journal and closes it. I put one on the icon bar and another in the journal itself. Works perfectly.
"Marge, it takes two to lie. One to lie, and one to listen."

.M.M.

#12
I am doing RPG, so It isn´t sure which entry will be, first, second or last. How can I write the script to entry can be 3rd even if there is no entry in 2nd place.
[EDIT] It is error
---------------------------
Adventure Game Studio
---------------------------
An error has occurred. Please contact the game author for support, as this
is likely to be a scripting error and not a bug in AGS.
(ACI version 3.00.1000)

in "GlobalScript.asc", line 128

Error: Null string supplied to CheckForTranslations

---------------------------
OK   
---------------------------

Dualnames

I think the module isn't made for AGS 3.0.. that's a known module bug when the module is made with a previous version. That's just compatibility issues.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

OneDollar

Quote from: Mirek on Fri 08/02/2008 16:10:21
Error: Null string supplied to CheckForTranslations
Actually I don't think this error is anything to do with modules being made on previous versions.

What's happening here is that you're trying to display a string somewhere without assigning any text to it. From the nature of the problem I guess you're writing to entry 3 without writing anything to entry 2, so when the compiler checks to see if there are any available translations for entry 2, it can't find a value to check and crashes. This was all helpfully explained to me a while back in this thread.

Instead of just ignoring entry 2, you'll need to assign it a value of "". (Something like JournalModule.AddEntry(""); ? I've not used this module, so I can't tell you exactly what to type). If that doesn't work, try adding just a space (JournalModule.AddEntry(" "); ?)

Alternatively post the code and ask someone who's used the module :) From what I understand if you want to enter text into entry 3, you first have to enter blank text or a space or something into entry 1 and 2, then when you want to change entry 1 and 2 you'll have to edit them.

.M.M.

QuoteFrom what I understand if you want to enter text into entry 3, you first have to enter blank text or a space or something into entry 1 and 2, then when you want to change entry 1 and 2 you'll have to edit them.
Yes, great idea!  :)
If somebody will have same problem,just put into game_start
Code: ags

JournalModule.AddEntry("EMPTY PAGE 0[(there is nothing)");
JournalModule.SetEntryDisplayed(0);
JournalModule.AddEntry("EMPTY PAGE 1[(there is nothing)");
JournalModule.SetEntryDisplayed(1);

It could be really long....  ;D

.M.M.

OK, Akumayo told me to update this so... Here is Journal-Maker 1.11 ! Now, function JournalMaker.EditEntry won´t replace your text, but it will add it to the end of an old one. Also, when you sometimes need to replace all the text at some entry, Just use that:
Code: ags
 JournalMaker.EditEntry(0, "This will replace text of 0th entry!",false) 


Download here.

Kiah

Its give me an error  on   

#DEFINE Max_Entries 100

it says...

journalmodule_v1.1.asc(49): Unknown preprocessor directive 'DEFINE'

Please help im sure its something obvious and im just an idiot thanks  :)



.M.M.

Try to replace DEFINE with define.

Kiah


SMF spam blocked by CleanTalk