FearThe1337

  • Content count

    6
  • Joined

  • Last visited

Community Reputation

2 Neutral

About FearThe1337

  • Rank
    Junior Member

Badges

Oxygen Not Included
  • Alpha Contributor

Recent Profile Visitors

148 profile views
  1. Tinting objects?

    I've finally figured out how to modify existing things in the game such as rocks and their loot after reading some source code of this game, but now I'd like to modify it so that the existing rock boulder contains only one kind of loot and has a tint. In this case it's gems, so instead of it being able to drop any gem, I'd like to make it drop only one gem and it should remember which gem it has no matter what you do (exit the world, get into it again and etc). Is that possible to do? I know that I could just randomly pick the tint and loot (if tint is possible) in AddPrefabPostInit, but it's just for when the object is created at runtime in world I'd assume, and so it's not persistent, does anyone know anything that I could use for this? Unless I am mislead and it modifies the actual prefab itself which means that every single object will be exactly the same no matter what. EDIT: Example - gold rock is now slightly tinted orange and will drop a single orange gem along with it's normal loot, but a gold rock (the "rock2" prefab) right next to it could be tinted red and drop a red gem, I can do the loot part, at least I think I understand how modifying of the object works already, but not tinting, or changing individual objects randomly only once, and for other times persisting what was generated.
  2. TL;DR what's the best resource for learning virtually ANYTHING I'd want to do without just asking "how to do X"? In terms of Don't Starve modding of course. First of all, I should probably tell that I know quite a few programming languages and I love programming, so that part is done, at least for this case. I never used lua before, although I've read some samples already, and as I understand most of the code, since it's syntax is really simple, and code in general is self explanatory, I couldn't really do anything else than what wasn't provided in examples though... My issue here is, where do I pull out other examples from? I know that DS engine is written in C++, and that most things that are ingame are actually scripted using lua, so, you could say that most of the game is written in the "modding api"? If so, how can I look at the code of don't starve? I'd prefer if there was documentation of most common things, but oh well, code will do too. I don't know if it matters, but I want to learn how to write a mod that is compatible in any version, other than DST, basically base game and two expansions, RoG and Shipwrecked. So now I want to add these things: Base game modification: Mining a common plain boulder, on every hit, will give player one sanity (affecting stats during interaction); On last hit, when boulder is destroyed, by player, player loses 5hp (affecting stats during destroy event, I guess); There's a chance that rock drops any gem, but gem replaces one of flint or rock piece, also there's a chance for additional gem to drop that doesn't do that (typical dropping from destroyed structure or well resource); RoG modification: Same things as base, just applied to glacier, doesn't really matter, just to confirm that it works in RoG; Shipwrecked modification: Limpet rocks have a chance to give Fish Morsel instead of limpets, just cause. (Overriding how existing thing works entirely) That's just for learning, by the way, how do I know if it would even work? Especially the part where player mines boulder and their stats are changed, maybe there's a thing that is triggered on action (since magma piles in shipwrecked drop items even before being fully mined) in the object itself? Or would I have to make the tool affect the player only if it interacts with x thing?