Heavenfall

  • Content Count

    1216
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Posts posted by Heavenfall


  1. As a straight white american male, i dont understand why people confuse human equality with politics. There is nothing wrong with encouraging themes that promote non discriminatory behavior. This isnt politics. 

     

    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.


  2. 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.


  3. 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...

    • Like 2

  4. 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.


  5. 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 = DROPSINGLE

    and 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)

  6. 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 = DROPSINGLE

    and last, define the function being executed in your component:

    function SingleDroppable:Execute(item, doer)    print(item)    print(doer)end

    That 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).


  7. Edit: Nvm, that solution won't work.

     

    So, just to be clear, you have a stackable item in your inventory. You can drop it on the ground in a stack, and you can drop it in singles on the ground, but only when you activate your special action do you want something to happen, yes? Then I would suggest that you do not drop the item at all, simply remove the item from your inventory and follow up with what you want to happen.


  8. I used it as a baseline for getting the magnifying glass to show up on the ground. Thanks, by the way.

     

    Lots of files that aren't going to be in a real release in there.

     

    Edit: the chance of getting an enchanted item is 20%, only after that is it rolled for what type of effect. Armor pieces are always discovered (forgot to flip a switch).


  9. Indeed a flaming axe of frost would be useless for the reason you said - flaming includes thawing frozen enemies, and frost would include extinguishing burning enemies.

     

    I'm linking the strength of the enchantment to the weapon instead. So a flaming axe might have 2% chance to set someone on fire, while a tentacle spike would have 6%. This way we can have variable effects but the player can rest assured that "more is always better".

    • Like 1

  10. I'm going to settle for 1 prefix from the start, because I don't want a 1 in 100 chance to get something extremely op from the start. Maybe a suffix would be something that could come from the forge that may or may not show up at a later time.

     

    I'm also going to use a non-random naming system, so a freezing axe has the same effect as a freezing shovel. I want to do as many unique effects as possible, so it's important that they can be identified by their name immediately.

    • Like 1

  11. @TheDanaAddams I wasn't able to work the component for every item (custom and vanilla). The prefabs list isn't populated until after mods are loaded, and then it is too late to add to the prefab functions.

     

    Instead of loading last, I will load first. Then if anyone wants to add the effects to an item in their own mod you can do

     

    if GLOBAL.STRINGS.NAMES.MAGNIFYINGGLASS then

        AddPrefabPostInit("myweapon1", function(inst) inst:AddComponent("rpgweapon") end)

        AddPrefabPostInit("myweapon2", function(inst) inst:AddComponent("rpgweapon") end)

        AddPrefabPostInit("myarmor1", function(inst) inst:AddComponent("rpgarmor") end)

        AddPrefabPostInit("myhat1", function(inst) inst:AddComponent("rpgarmor") end)

    end

     

    and it will add the component if this mod is already loaded

     

    I was able to alter the hover-text like you suggested, so now if you have an unidentified item it says

    Axe (?)

    and then it is changed to something like

    Freezing Axe
    when identified. As before, examining the item will give more details.

  12. @TheDanaAddams

     

    Yes, the goal would be that it integrates with other mods as well. Obviously there's going to be limits and I'm sure bugs will come up as a result, but I think if I write it right it should work.

     

    Sure, we can do an ignore switch if you want to. I don't think making it a tag serves a purpose, you can just do inst.ignorerpgeffects = true in the prefab function.

     

    Right now I have the explanation in the examine text, because the functions that govern what text appears when you hover over stuff is a LOT more complicated to hook in to.

     

    The actual effect names are never displayed, I just display what the effect does at the moment. But if I can work it I will use your suggested names, thank you for those.

    • Like 1