-
Content Count
1216 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Klei Bug Tracker
Game Updates
Hot Lava Bug Reporter
Everything posted by Heavenfall
-
-
-
[MOD] Hero in the Dark (original thread)
Heavenfall replied to kraken121's topic in Mod Collaboration: Hero in the Dark
Hey, just saw this topic. If you guys want to include or use a version of my RPG Items mod, you are more than welcome. Seems to fit fairly well, and I did abandon the mod a couple months back. So you can really do whatever you want with it. -
DoPeriodicTask lets you do a function every x seconds. It's not exactly sleep, but if you have a recurring check you want to run that's what you should use.
-
It's called DoPeriodicTask()
-
Human rights and politics are damn closely intertwined. I would consider it a political issue because it defines how society functions, and people don't agree one way or the other. And anyway, guess what country is famous for not ratifying human rights declarations and implementing them? The good ol' US of A. That shining beacon of freedom and hope, and all that stuff. But don't worry - this thread isn't political.
- 72 replies
-
As much as I support the cause, I don't think this board should be a place for politics. I mean, you'd probably get pretty pissed off if someone made a "mod challenge" (obvious bait btw) for gay bashing, or why not some white power cause? You probably think you are in the right, but you obviously know others don't. So the political discussions begin... and probably shouldn't happen on these forums, at least. I admire the gay Link, I thought it looked funny and well done. But I still hope this is the last politically charged "mod challenge" we see on these forums... ever.
- 72 replies
-
Where is a custom ACTION.fn called from?
Heavenfall replied to seronis's topic in [Don't Starve] Mods and tools
The fail reason is passed from ACTION.testfn. For an example check out ACTION.SHAVE, shaver component, beard component and speech_wilson.lua for the custom fail reasons. -
Is it wrong that about 1/20 of those are mine? notsureifgustaface.jpg Edit: No, that's not right. I had a lot of comments in the old mod threads you "vanished" so they're not all in this subforum.
-
Adding it to CHARACTERLIST is how we did it in the way back when, I moved away from it because there are functions in the game that cycle through it. Actually I'm pretty sure IPSquiggle added AddModCharacter() just because of it. Anyway, recommend you don't just add to CHARACTERLIST. And why would you? You've got a perfectly good hook into IsCharacterUnlocked() and you've got the persist data save, so what's the problem...
-
Yeah, looks fine to me. That's how I try to do my core function overwrites as long as they are returning something. Well, except my mod to unlock all characters that happens to overwrite the same function: function HF_unlockallreleasedchars(self) local playerprofileclasshook = GLOBAL.PlayerProfile playerprofileclasshook.IsCharacterUnlocked = function() return true endendAddGamePostInit(HF_unlockallreleasedchars)but the point of that is kind of to unlock everything always.
-
Mabel Pines uses a custom way to determine how the character looks, where the name of the character prefab is not identical to the texture build (like other characters). If you want to edit the clone to work with Mapel Pines you can do so on line 133-134 in summonclone.lua by inserting after those lines the following code if summonclonebuild.prefab == "mabel" then anim:SetBuild("mabel_bal") end
-
-
-
-
-
-
-
-
-
-
[Question] Is It Possible To Add Events ?
Heavenfall replied to RCatta's topic in [Don't Starve] Mods and tools
@TheDanaAddams I moved an "end", make sure you get the edited version above. -
[Question] Is It Possible To Add Events ?
Heavenfall replied to RCatta's topic in [Don't Starve] Mods and tools
Or if you want to stick to the event, you can do local DROPSINGLE = Action(1, true, true)DROPSINGLE.id = "DROPSINGLE"DROPSINGLE.str = "Drop"DROPSINGLE.fn = function(act) if act.doer.components.inventory then act.invobject.didwedropsingle = true return act.doer.components.inventory:DropItem(act.invobject, false, false, act.pos) end endAddAction(DROPSINGLE) GLOBAL.ACTIONS.DROPSINGLE = DROPSINGLEand in the listenforevent inst:ListenForEvent("ondropped", function(inst) if inst.didwedropsingle == true then local fire = SpawnPrefab("dinfire") fire.Transform:SetPosition(inst.Transform:GetWorldPosition()) GetPlayer().components.health.fire_damage_scale = 0 GetPlayer():AddTag("dinsfire") inst:Remove() ------------------------------ GetPlayer().components.inventory:GiveItem( SpawnPrefab("dinrock") end) ------------------------------ inst:DoTaskInTime(15, function(inst) if not GetPlayer():HasTag("wearingredtunic") then GetPlayer().components.health.fire_damage_scale = 1 GetPlayer():RemoveTag("dinsfire") end end, inst) -
[Question] Is It Possible To Add Events ?
Heavenfall replied to RCatta's topic in [Don't Starve] Mods and tools
If it doesn't stack, this is how I would approach it: first, skip the whole listenforevent thing. It's not going to get you where you want. You still need to add the component to the item, of course. Second, alter your action so it executes a function in your item's component: local DROPSINGLE = GLOBAL.Action(1, true, true)DROPSINGLE.id = "DROPSINGLE"DROPSINGLE.str = "Drop"DROPSINGLE.fn = function(act) if act.doer.components.inventory then return act.invobject.components.singledroppable:Execute(act.invobject, act.doer) end endAddAction(DROPSINGLE)GLOBAL.ACTIONS.DROPSINGLE = DROPSINGLEand last, define the function being executed in your component: function SingleDroppable:Execute(item, doer) print(item) print(doer)endThat final function you'll have to tweak yourself, but it should be a small thing (I printed the parameters so you know what is what).