Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
- Original title: MV Creating a Journal
- Original author: dovearrow
- Original date: January 13, 2023
- Source thread: https://forums.rpgmakerweb.com/threads/creating-a-journal.154073/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Learning Javascript
Summary
I'm very new to Javascript and object-oriented programming, so forgive me if I sound really dumb. I'm trying to create a journal to which players can add their own journal entries. The journal will contain the following information: Journal Entry Date (Example: 01/01/2023) States Affecting the Character at the Time (Example: Poisoned)
Archived First Post
I'm very new to Javascript and object-oriented programming, so forgive me if I sound really dumb.
I'm trying to create a journal to which players can add their own journal entries. The journal will contain the following information:
I then created the following script.
Now this is working... sorta. If the game is running, it adds the entry and I can even get the NPCs to repeat the date back. However, when I close the game, the data resets and the new entry disappears.
The other thing I'm realizing as I work on this is that I need the data to save dynamically to the game and not to the primary JSON file. I thought maybe the DoubleX Dynamic Data plugin might help. However, I put in the following command and it isn't adding the new journal entry date the way I thought it would.
So yeah. I feel like I'm moving in the right direction. However, I'm so new to all of this, that I feel like I'm swimming through pudding trying to figure it out.
I'm trying to create a journal to which players can add their own journal entries. The journal will contain the following information:
- Journal Entry Date (Example: 01/01/2023)
- States Affecting the Character at the Time (Example: Poisoned)
- Tasks Accomplished
[
null,
{"id":1,"entryDate":"01/01/2023"},
{"id":2,"entryDate":"01/09/2023"},
{"id":3,"entryDate":"01/10/2023"}
]
null,
{"id":1,"entryDate":"01/01/2023"},
{"id":2,"entryDate":"01/09/2023"},
{"id":3,"entryDate":"01/10/2023"}
]
I then created the following script.
var jsonJournalEntry = $dataJournalEntry
jsonJournalEntry.push({"id": 4, "entryDate": "01/13/2023"});
jsonJournalEntry.push({"id": 4, "entryDate": "01/13/2023"});
Now this is working... sorta. If the game is running, it adds the entry and I can even get the NPCs to repeat the date back. However, when I close the game, the data resets and the new entry disappears.
The other thing I'm realizing as I work on this is that I need the data to save dynamically to the game and not to the primary JSON file. I thought maybe the DoubleX Dynamic Data plugin might help. However, I put in the following command and it isn't adding the new journal entry date the way I thought it would.
$gameSystem.setDynamicData("$dataJournalEntry", $dataJournalEntry[4])
So yeah. I feel like I'm moving in the right direction. However, I'm so new to all of this, that I feel like I'm swimming through pudding trying to figure it out.
Downloads / Referenced Files
Log in to download
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadCreator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
0
replies
1
view
Topic Summary
Loading summary...