1 Screenshot

About This File

Feats for you to achieve!

This mod adds Feats (you may know them as Achievements!) to Don't Starve. The list of feats can be viewed in the feats screen, by clicking the "Feats" button next to the "Morgue" button when loading a save game.

Feats can also be viewed in-game, via the Accomplishment Shrine.

The mod is currently a work in progress. There are currently a handful of achievements, but I plan on adding a handful of new achievements on a weekly basis.

Challenges completed before installing Feats will not register, and will have to be redone to trigger an achievement.

Feel free to suggest new feats!

Thanks to @Blueberrys for the persistent data module that helped make this mod possible!


What's New in Version 1.4   See changelog

Released

  • It's been ages, forgive me for the vague changelog.
  • - Sort of added an API for other mods to hook to. A tutorial will be included in the next update.
  • - Fixed some bugs.
  • - More feats were added, probably.
  • - Code cleanup.
  • - Fixed the Vegetariasm feat.
  • - Began working towards a cleaner API for rewards upon achieving feats.



User Feedback



Recommended Comments

I would greatly appreciate to perform feats to their honour, if they could show me the truth and all related insanities in return.

 

Because, you know, the truth and stuff... don't question the value or relation anchors of the truth.

Share this comment


Link to comment
Share on other sites

Yeah this is great now after day 100 I can finaly keep going because I have a reason because after day 100 I usually just hop into a new world because I feel like there is nothing left to do

Share this comment


Link to comment
Share on other sites

Yeah this is great now after day 100 I can finaly keep going because I have a reason because after day 100 I usually just hop into a new world because I feel like there is nothing left to do

You could go through maxwell's door to the next worlds...

Share this comment


Link to comment
Share on other sites

Updated the mod. Changes are in the change log. The next update should decrease the file size (and hopefully decrease lag), as I plan on doing some refactoring. Currently the mod isn't terribly optimized, so that's the biggest priority on my to-do list.

 

Along with the refactoring will come feats designed for some other mods (which will only show up if the aforementioned mod is installed.)

Share this comment


Link to comment
Share on other sites

Updated the mod. Changes are in the change log. The next update should decrease the file size (and hopefully decrease lag), as I plan on doing some refactoring. Currently the mod isn't terribly optimized, so that's the biggest priority on my to-do list.

 

Along with the refactoring will come feats designed for some other mods (which will only show up if the aforementioned mod is installed.)

 

Will the feats achieved be saved even when the mod is deactivated? And more importantly, can mods bring their own feats (not terribly important, but still cool)?

Share this comment


Link to comment
Share on other sites

Will the feats achieved be saved even when the mod is deactivated? And more importantly, can mods bring their own feats (not terribly important, but still cool)?

 

Yeah, feat data will persist even if the mod is disabled. Relevant feats will simply not show up in the menu if the required mod is disabled.

 

As for mods adding their own feats, I intend for them to be able to.

  • Like 1

Share this comment


Link to comment
Share on other sites

Alright, so a bunch of the refactoring is done (which includes the inter-mod stuff). I'm not uploading the changes yet, because I haven't gotten around to working on the feats themselves.

 

For a mod to add its own feats, it needs to create a modfeats.lua file in its directory. It should like something like this:

 

ModFeats = {   {"SampleExternalKeyname", "Sample External Feat Name", "Sample Description", false, false, 0, "Sample Hint", "Display Food Values"},return ModFeats

 

The parameters are lengthy, but they allow for a good deal of diversity in feats. Here they are in order:

keyname, name, description, locked, hidden, score, hint, mod

 

Keyname is the technical name of the feat. This is only used internally.

Name is the name that will be displayed for the feat.

Description is self-explanatory.

Locked and hidden determine whether or not a feat is locked or hidden, respectively. :p

Score is the amount of points the feat is worth. 100 is currently the highest score of any one feat.

Hint is the text displayed if a feat is hidden.

Mod is the mod related to the feat. Please use modinfo.name or modinfo.id here.

 

Feats are unlocked via a components attached to the world. If you want to unlock a feat, use this:

GLOBAL.GetWorld().components.feattrigger:Trigger(keyname)

 

If you only want to unhide a feat, use this:

GLOBAL.GetWorld().components.feattrigger:Trigger(keyname, true)

 

I'll make a topic or something for that stuff once the update is actually out.

  • Like 1

Share this comment


Link to comment
Share on other sites

I got this error just after enabling Feats:
http://s27.postimg.org/yy3f2qjq9/feats_bug.jpg

Interestingly enough, it *doesn't* appear after turning "Feats" on first time - only after disabling it and re-enabling again. Since that, it error-out on every attempt to enable it. Whats worth to note, is that I haven't started a single game between "toggling" first enable-disable-enable - something got created for persistent storage, that expect values, but found none (perhaps)?

Cheers,
/Estel

Share this comment


Link to comment
Share on other sites

//Update:
I've tried confirming this with fresh (updated to last) DS:RoG install, and indeed, the mod doesn't crash on enabling. Hoever, it *does* crash at the start of a game, so it's not a big difference. Latest update changed something crucial, maybe?

Share this comment


Link to comment
Share on other sites

w00t starting to get interesting now ;)

Is it safe to (try and) use the current API or will the proper one not be backwards-compatible?

Share this comment


Link to comment
Share on other sites

w00t starting to get interesting now ;)

Is it safe to (try and) use the current API or will the proper one not be backwards-compatible?

 

It's safe! I aim to keep internal updates as friendly as possible.

  • Like 1

Share this comment


Link to comment
Share on other sites

Well, the picture in my previous comment contain log (I'm using extended crash logs mod), including pinpointing exact lines that caused problems, doesn't it? I've searched through whole DS directory, and I haven't found any other logs. Output from terminal contain the same error messages as in attached picture.

If there is any other way to obtain logs, I'll be happy to provide :)

Share this comment


Link to comment
Share on other sites

Well, the picture in my previous comment contain log (I'm using extended crash logs mod), including pinpointing exact lines that caused problems, doesn't it? I've searched through whole DS directory, and I haven't found any other logs. Output from terminal contain the same error messages as in attached picture.

If there is any other way to obtain logs, I'll be happy to provide :-)

 

See the link Mobbstar posted.

 

Also, if you please go into the mod configuration option and enable debugging (even if it does seem to crash immediately) that would be helpful. That debugging function should print A LOT of information for me. It may not help much, but I can see if something weird is happening.

 

I looked into the error you received, and I don't see anything that would cause a crash. What's happening is that the mod is trying to propagate the list of feats, and it creates dummy feats in order to make the list function properly. It always erases dummy feats on load so that it can propagate appropriately, to account for new feats and feats added by other mods. When it tries to delete those feats (tables, really) from the savedata, it can't, and so it explodes.

 

 

giphy.gif

  • Like 1

Share this comment


Link to comment
Share on other sites

One quick question; Are you running Feats with other mods, and if so, do any of them have a file called persistentdata.lua in their scripts directory?

Share this comment


Link to comment
Share on other sites

Sorry for not replying so far - I'm on a trip, and somehow lost remote access to my home machine (damn you, dynamic dns or my ISP!). i will reply as soon as I'll be able to login again, or upon returning, which is no sooner than 1.09.2015.

/Estel

Share this comment


Link to comment
Share on other sites

Question: Is there a way for other mods to tell whether a feat is unlocked? That'd help skip unnecessary calculations :p

Share this comment


Link to comment
Share on other sites

Question: Is there a way for other mods to tell whether a feat is unlocked? That'd help skip unnecessary calculations :razz:

 

It's been a while since I've looked at the relevant code for that, but yes. If I can figure it out before you do, I'll let you know. :p

Share this comment


Link to comment
Share on other sites

It's been a while since I've looked at the relevant code for that, but yes. If I can figure it out before you do, I'll let you know. :razz:

 

If you're thinking of "GetFeatLocked" at line 141, that's in the mod environment, isn't it?

Share this comment


Link to comment
Share on other sites

If you're thinking of "GetFeatLocked" at line 141, that's in the mod environment, isn't it?

 

Nah, I'm speaking of the persistentdata.lua bits.

 

The savedata itself is actually accessible from other mods, but I have to figure out how to read it nicely.

Share this comment


Link to comment
Share on other sites

mind == blown

 

I mean, the simplest way would be to drop a copy of persistentdata.lua into your mod, and call on its functions to read the savedata. That should work. I think.

 

1371257249_tumblr_lo9et1q9711qzbyhpo1_50

Share this comment


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now