Hack 'n' Slash

Hack 'n' Slash

Not enough ratings
Example Mod - "Signpost"
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
2.440 KB
1 Nov, 2014 @ 9:05am
4 Nov, 2014 @ 1:45pm
4 Change Notes ( view )

Subscribe to download
Example Mod - "Signpost"

Description
All entities in the game are shipped in compiled format and difficult to change. This mod replaces the "Signpost" entity with an almost identical copy with human-readable, uncompiled lua code.
(You've probably seen Signposts in code rooms - you view them before you dive into a method's code!)

- Signposts are now hackable with the USB sword / boomerang!
- Signposts have two hackable fields: "LABEL" and "FREEDOM" (aka name and protected)

This is intended as a learning aid rather than a 'fun' mod. It's intended to:
- Demonstrate how an entity class is defined and initialised
- Demonstrate how to define 'hackable' fields for an entity (like 'isClosed' or 'onFire')
- Show that the code you see in-game is easily translatable to fully human-readable source code

A couple of things to note:
- Doesn't show how Signposts know which method to jump into (I haven't looked into this either; clues likely lie in one of the CodeRoom files)
- I am not associated with Double Fine, I don't know how to hack the planet.
- *** This is not additive coding, and hence could cause compatibility issues with other mods. If you know of a way to modify a class additively, please let me know. *

Happy Modding!
2 Comments
toneo  [author] 7 Jan, 2015 @ 3:26am 
I've noticed the game can be pretty buggy when you enable mods half-way through the game, especially after you've discovered the library - basically a bunch of things have been edited throughout the course of the game causing massive conflicts.

Have you tried starting a fresh save with the mod enabled and progressing from there? (If that still doesn't work, please tell me!)
Silvian_Bruno 4 Jan, 2015 @ 2:30pm 
Great idea, but the game seems to error out whenever I try using the sword/boomerang on a signpost, with the following message:
Data/Content/Global/Actions/BeHackedAction.lua:69: attempt to index field 'material' (a nil value).
I currently don't have any other mods loaded that could cause interference. Are you seeing the same thing on your end?