Jump to content
Double Fine Action Forums
Sign in to follow this  
RedLeader

HiddenJournal.txt

Recommended Posts

Brandon: Thank you! Hack 'n' Slash was the one game I was most excited about, the one game I voted for :)

As for HiddenJournal.txt...

I got it! Very heartfelt message. I'm not a great programmer, I do design / scripting, but I want to give some tips for anyone who hasn't found this yet (at this point), who was maybe as confused as I was:

What is the game flow to find and decrypt HiddenJournal.txt?

- Finish the game first, view credits, the game restarts

- You can now re-use the decryption pedestal, by finding a "key"

- "Keys" are books in the library (as other posters have pointed out)

- You only need one "key" book (the correct one, one that you thoughtfully choose based on its title / topic, not its content)

- You can find HiddenJournal.txt on your own (a secret object)

You can find, but can't decrypt HiddenJournal.txt before the credits roll. This is where I got stuck: the genie's book is decrypted a completely different way, no "key". So the concept of key / book pairs only applies after the credits roll. I left the decryption room to the left, not between the pillars, to avoid the credits, look for secrets (like HiddenJournal.txt), so there was no indication to me how decryption worked / what a "key" was on my first playthrough!

From what I could see, I thought the "signed note", acted as a key, all you needed to decrypt the genie's book. If that were true, maybe you only had one shot to decrypt one thing (since they refuse to "sign" another note for you). That would mean you need to enter the decryption room with one book in your inventory: HiddenJournal.txt, and not the genie's book. There IS a secret path through the wall that circumvents the guards in the Throne Room, just no way that I could see to get through the jail / fireballs without a cable. Imagine if you could, by dive rolling? Decrypt HiddenJournal.txt before you ever get the genie's book. Anyway, this isn't the solution... but it could have been a cool way to decrypt one thing rather than another lol, like how Super Mario World had a pro way to beat the game quickly / enter Bowser's back door if you knew what you were doing!

Share this post


Link to post
Share on other sites

Thanks for the hints, MrKenny... I still can't figure this out.

Without giving it away, guys, does the world tree have anything to do with the hidden journal?

Share this post


Link to post
Share on other sites

No, the world tree actually has nothing to do with anything right now. The world tree is EXACTLY what it seems. An unfinished idea.

Share this post


Link to post
Share on other sites
Thanks for the hints, MrKenny... I still can't figure this out.

Without giving it away, guys, does the world tree have anything to do with the hidden journal?

my hint, if you want another one is this, HINT................................ it's something you can do after you beat it, that you couldn't do before, but you still have to be very careful

Share this post


Link to post
Share on other sites
Thanks for the hints, MrKenny... I still can't figure this out.

Without giving it away, guys, does the world tree have anything to do with the hidden journal?

my hint, if you want another one is this, HINT................................ it's something you can do after you beat it, that you couldn't do before, but you still have to be very careful

You can still do it without beating it. You just have to go a different way before the end.

Share this post


Link to post
Share on other sites
Thanks for the hints, MrKenny... I still can't figure this out.

Without giving it away, guys, does the world tree have anything to do with the hidden journal?

my hint, if you want another one is this, HINT................................ it's something you can do after you beat it, that you couldn't do before, but you still have to be very careful

You can still do it without beating it. You just have to go a different way before the end.

weird, i swear i tried that and the world fell apart, even after i had decoded the moon font and saw the one led to the right room.

Share this post


Link to post
Share on other sites

I still haven't solved it yet...

Problem is that i identified some potential files that might be the decrypting key, however, whenever I try to use one, the game crashes and I have to start all over again...

Any shortcuts (like a global save function that still works after the game crashes?)

thanks,

Jaap

Share this post


Link to post
Share on other sites
I still haven't solved it yet...

Problem is that i identified some potential files that might be the decrypting key, however, whenever I try to use one, the game crashes and I have to start all over again...

Any shortcuts (like a global save function that still works after the game crashes?)

thanks,

Jaap

The only way for such a radical approach would be to alter the game files.

I ended up having the wizard act as decryptor and item dispenser.

However, you are on the right track and while it may sound counter-intuitive, it is generally a good idea to start at the beginning if you get stuck.

Share this post


Link to post
Share on other sites

I've been working on a global save, but it's hard going. You might try looking at all the hidden hints. But know this: there are no in game clues as to which key you need. If you get too frustrated following the clues just PM me and I can help.

Share this post


Link to post
Share on other sites

Yeah would be a bit of a pain. Need to walk through many of the objects hanging off rWorld, plus GameState, plus all the other class prototypes that might have been hacked with the cable. I've been working on the WorldTree implementation and that got a bit more difficult once I decided to try entering some of the userdata objects since the basic lua game tables didn't really have all the much interesting to manipulate.

Share this post


Link to post
Share on other sites

I'm not so sure it's quite that complex. Obviously they have a mostly working save system. It seems to work on everything except for global variables. This could be used to our advantage. If we can hijack the pickled data they've already created and save it and all globals to a file... But thats what I'm working on. Unfortunately I've run into the same problem as you when trying to decompile the saveload. I might just manually go through it and see what I can find out.

Share this post


Link to post
Share on other sites

Well to make a really reliable save system you'd need to track down and fix the bug causing the "table index is NaN" message, I still have the game sometimes get into a state where saves are either temporarily or permanently broken. You can decompile the SaveLoad file under DFCommon, but doesn't look like alot helpful there, has stuff about cloud saves so maybe its from MMOJ. I can get part of the main SaveLoad to decompile with unluac, not enough to replace with the decompiled version, but enough to see a bit of how it works. Like if you could inject some code to set "DEBUG_PERSIST = true" then maybe something useful would happen?

Share this post


Link to post
Share on other sites

Yes, to make it fully perfect there would be a LOT of work. I'm more interested in getting this prototype to "alpha" level. Mainly to convince DF to dedicate resources to complete it.

Share this post


Link to post
Share on other sites

Light programming help for non-programmers:

- You can edit Lua files in Notepad

- Right Click -> Open with Notepad -> when you're done hit Save

Edit the files in AfHack\Win\Munged\Rooms

You can actually erase most of the enemies, making exploring a lot easier (certainly in the event of a crash / restart). For example:

In Rooms\Castle\DungeonEntrance.lua

Scroll down to:

{

 type = "objectgroup",

 name = "Objects",

 visible = true,

 opacity = 1,

 properties = {},

 objects = {{ ... "Timed Monster" ... },{... "Timed Monster" ...},{...}}

}

I typed {...} but basically there are a lot of entries for "TimedMonster" in { }, and other objects, separated by commas. Paying attention to the brackets and commas, you can erase entries for { ... ["sCharacter"] = "Timed Monster" ... } or other enemies in the game!

Specifically, this is how much you want to erase to get rid of one monster, including commas so any remaining sets of { } are separated by one comma (like they are currently).

{

 name = "",

 type = "Spawn",

 shape = "rectangle",

 x = 768,

 y = 512,

 width = 256,

 height = 256,

 visible = true,

 properties = {

   ["iDelayPeriod"] = "4",

   ["sCharacter"] = "TimedMonster",

   ["sDirection"] = "S"

 }

},

Happy exploring!

Share this post


Link to post
Share on other sites

OK, I need a little help.

I found the journal in-game, but when I go and try to decrypt it, with some choices it crashes, with one choice it told me "The decryption ritual is now complete", but nothing happened. Is this good? bad? did it work? I don't know if to keep trying other stuff or if I'm missing something obvious.

Thanks!

Share this post


Link to post
Share on other sites

If you get “The decryption ritual is now complete” you have decrypted it. You can then read the book by pressing the number next to it. And use space bar to go through the pages.

Share this post


Link to post
Share on other sites
If you get “The decryption ritual is now complete” you have decrypted it. You can then read the book by pressing the number next to it. And use space bar to go through the pages.

Nope, still seems garbled. Perhaps it isn't the right key after all.

Share this post


Link to post
Share on other sites
You also need to flip the switch in the glyph room to be able to read English.

Thank you!

I don't know how I totally missed that.

In hind sight it should have bugged me more that I didn't do anything meaningful in the glyph room.

Phew, now I can rest :)

Share this post


Link to post
Share on other sites
I'm not so sure it's quite that complex. Obviously they have a mostly working save system. It seems to work on everything except for global variables. This could be used to our advantage. If we can hijack the pickled data they've already created and save it and all globals to a file... But thats what I'm working on. Unfortunately I've run into the same problem as you when trying to decompile the saveload. I might just manually go through it and see what I can find out.

Hi, there. The save system actually saves _everything_(*), starting from the global table and recursing through everything reachable (and some stuff that's only reachable from userdatas hidden away in various C++ objects). It's intended to be as close to an emulator checkpoint as it's possible to get (with some concessions to usability; eg, it pops up a confirmation dialog before restoring) This is the reason the NaN bug is so irritating; as soon as one shows up anywhere, it'll try to get persisted. Still, it should work as long as it's in a value; I'm not yet sure why it's getting put in as a key.

The SaveLoad.lua file you should be looking at is in Data/Scripts. It's an unfortunate naming coincidence that there's also a SaveLoad.lua in our common library. I've been meaning to post an unobfuscated version of it, with some commentary on the various hacks and tricks it needs to use. But right now I'm sucked back into finalling the Cave, so the bugfix and the writeup will probably have to wait for my holiday break.

(*) with one or two exceptions

Edit: and actually, setting DEBUG_PERSIST=true is a good idea. If you are able to reproduce the NaN bug, the output from DEBUG_PERSIST would be super helpful! Warning: it is large and unwieldy.

Share this post


Link to post
Share on other sites

Yeah, we've been trying to use the saveload in scripts. I've actually tried using the saveload (which we can decompile) in common to try to figure out manually whats in the one in scripts, but it's been hard going and ultimately futile.

Since it saves everything why are these global variable issues popping up? The game acts like the globals either aren't saving or aren't loading properly. I can give examples and test cases if you need them.

Share this post


Link to post
Share on other sites

Yes, examples would be great! Re-reading the thread, it's hard to tell what the problem is.

The only thing I can think of is the timescale, and that should be fixed in the Steam build (Brandon got very clever when he implemented that bit of functionality)

Share this post


Link to post
Share on other sites

Done from a fresh Steam install. Checked twice to verify repeatability:

Play normally until "secret path" to dungeon. Save. Enter and talk to genie. Load. Go back to talk to genie: He says "Have you found the book yet?" still have wizard note!

Play normally until throne room, save before entering library. Enter library and pick up hourglass. Load save. Enter library. No hourglass in inventory or on floor.

Play through normally until library. Save in hourglass room. Enter flame room, enter stacks. Load. Enter flame room again, can't enter stacks!

Thats all the bugs I can hit in one playthrough. If you need more, I can give you them.

All these bugs seem to rely on global variables to store the current game state. Essentially they come about when you save before entering the room they're affected by.

Share this post


Link to post
Share on other sites

I think the problem is that some of those are stored in a place where they AREN'T global variables, so don't get added to the root as part of the _G. I think the solution might just be to remove the local keyword in GameState.

local GameState = require("Class").create()

function GameState:init()

 self.tValues = {}

end

-- local rGameState = GameState.new() -- original line

rGameState = GameState.new() -- replace with

return rGameState

Share this post


Link to post
Share on other sites
...

Aha. Thanks! I actually had the fix locally but now I see that it fixes a larger class of problems than I originally thought. Watch this: I'm going to push a fix to Steam and it's going to be SO FAST.

Edit: BAM.

Edit2: The problem was that the absence of packages in package.loaded wasn't being persisted properly. In this case, when you made your first savegame, package.loaded.GameState = nil. After talking to the genie for the first time, it became non-nil. After loading, it should have (but did not) become nil again. The package system is one of those nooks-and-crannies that requires a bit of special care when checkpointing.

Edit3: Just fixed the NaN bug; that was a pluto problem.

Share this post


Link to post
Share on other sites

Awesome, was trying to produce a nice DEBUG_PERSIST log for you, but was slow going since difficult to reproduce on demand.

So now all we need for a reliable persistent save is a bit of:

function quicksave()

   s_state.quick = SaveLoad.save()

   local rFile = io.open("game.sav", "wb")

   rFile:write(s_state.quick)

   rFile:close()

   print(string.format("Saved state in %d bytes", string.len(s_state.quick)))

end

function quickload()

   local rFile = io.open("game.sav", "rb")

   if rFile then

       s_state.quick = rFile:read("*a")

       rFile:close()

   end

   if s_state.quick ~= nil then

       SaveLoad.load(s_state.quick)

       if MOAIFmodEventMgr then

           MOAIFmodEventMgr.playEvent2D('HackandSlash/UI/NPC_Interact', false)

       end

   end

end

function has_quickload()

   return true

end

Share this post


Link to post
Share on other sites
Awesome, was trying to produce a nice DEBUG_PERSIST log for you, but was slow going since difficult to reproduce on demand.

So now all we need for a reliable persistent save is a bit of ...snip...

That's true; probably the biggest reason not to is to simplify things. I'll get into this more in my description of SaveLoad.lua, but when I say we save _everything_ I really mean it. Functions, coroutines, closures and upvalues, tables, room data, light and heavy userdata, you name it. And now, even NaNs (I'm still not sure how they're getting in there, but they'll persist).

The idea is that any changes you make -- hacking on functions, tweaking metatables, etc -- will persist across the save and reload. Also that a reload will undo whatever changes you might have made.

It does start getting a little weird when you start persisting saves across runs of the game; it means the reloaded game can appear to ignore changes you've made to the .lua files. This is one of the main reasons I keep SaveLoad.lua from getting included in the snapshot.

Share this post


Link to post
Share on other sites

Going to be an interesting design challenge to deal with that in the full game. You'd want to be able to have at least some persistent state if it's going to be much longer, rather than needing to restart from the beginning every session.

However doing a complete state save like this does have the issue of persisting broken things. Maybe you'd need different types of saves or something, where you can pickup from a checkpoint with your general quest progress, but also be able to store your complete custom hacked state - especially if later quests involve actual persistent state change. The idea during the prototype that state reset when you moved between rooms worked well enough for the cable hacking, but other types of hacking may differ.

Also editing an in-memory saved representation of the lua files might work better for gameplay involving the magic pen concept Brandon talked about, although could make things more difficult for you during development and testing.

Sure you guys will work it out. :)

Share this post


Link to post
Share on other sites

Maybe saving a diff works best? Then you should be able to apply this against anything.

Actually. Even better! Make it a diff AND a minigame where you have to ensure it gets rejoined properly. That way if any files change you still get all the benefits but you have to make sure it lines up correctly on your own.

Share this post


Link to post
Share on other sites
Maybe saving a diff works best? Then you should be able to apply this against anything.
Maybe could use the game to teach source control concepts. Like you could start by using the diffs to build unlimited undo, but once you have that then you'll want branching and tagging as well to manage it. But instead of source, you're dealing with game state.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×
×
  • Create New...