Jump to content

A way to send small improvements of the game to developers


Recommended Posts

Is there any way to send small changes of the game code to someone to check it and include to the game? There should be few easy steps to do that without creating new topic on the forum etc. These small changes may be not bugs but small improvements, optimizations, increasing compatibility (with mods) etc.

For example, moving one line of the code to another place. Before:

local function onunequip(inst, owner)
    local skin_build = inst:GetSkinBuild()
    if skin_build ~= nil then
		owner:PushEvent("unequipskinneditem", inst:GetSkinName())
    end
    
    if inst.fires ~= nil then
		for _,fx in pairs(inst.fires) do
			fx:Remove()
		end
		inst.fires = nil
    end

    inst.components.burnable:Extinguish()
    owner.components.combat.damage = owner.components.combat.defaultdamage 
    owner.AnimState:Hide("ARM_carry") 
    owner.AnimState:Show("ARM_normal")
    inst.SoundEmitter:KillSound("torch")
    inst.SoundEmitter:PlaySound("dontstarve/common/fireOut")
end

After:

local function onunequip(inst, owner)
    local skin_build = inst:GetSkinBuild()
    if skin_build ~= nil then
		owner:PushEvent("unequipskinneditem", inst:GetSkinName())
    end
    
    if inst.fires ~= nil then
		for _,fx in pairs(inst.fires) do
			fx:Remove()
		end
		inst.fires = nil
        inst.SoundEmitter:PlaySound("dontstarve/common/fireOut")
    end

    inst.components.burnable:Extinguish()
    owner.components.combat.damage = owner.components.combat.defaultdamage 
    owner.AnimState:Hide("ARM_carry") 
    owner.AnimState:Show("ARM_normal")
    inst.SoundEmitter:KillSound("torch")
end

This is not a big deal. But also this takes only few seconds to read and accept these changes.

Link to comment
Share on other sites

20 minutes ago, PeterA said:

Looks like a reasonable change, is there a specific reason you'd like that fireOut sound moved?

Thank you for your reply. As I said this is not a big deal. I needed it (as many other small changes) for compatibility with my mods. For example, there is Kindling Fire mod which makes torch can be without fire until player found a fire.

I wanted to say that there may be many other small "one line" suggestions in future. This will help to make my mods simpler and this could make game more compatible with other random mods. So I'd like to have "one minute" communication.

P.S. Or I could have direct access to repository. :)

Link to comment
Share on other sites

@PeterA

 

Sorry to piggyback on this thread, but much as @Maris I'm not sure what is the best place to request small code changes.

 

Could the "OnClickTab" function in widgets/customizationtab.lua be made non-local?

 

EDIT: and the DEFAULT_PRESETS and DEFAULT_TAB_LOCATIONS tables, same file?

Link to comment
Share on other sites

  • Developer
On 3/20/2016 at 6:14 PM, simplex said:

Could the "OnClickTab" function in widgets/customizationtab.lua be made non-local?

 

EDIT: and the DEFAULT_PRESETS and DEFAULT_TAB_LOCATIONS tables, same file?

Yeah I'll take a look as see if we can make these more open in an upcoming release.

Link to comment
Share on other sites

11 minutes ago, PeterA said:

Yeah I'll take a look as see if we can make these more open in an upcoming release.

To clarify my request with an example, my goal was to do this (you can see the post, right? it's still private to most forum users, but I presume Developers have full access). In order to accomplish that, I had to resort to using the debug library to fetch these 3 local values, so my request is one for a more stable way of access.

Link to comment
Share on other sites

  • Developer
7 minutes ago, simplex said:

To clarify my request with an example, my goal was to do this (you can see the post, right? it's still private to most forum users, but I presume Developers have full access)

hah apparently I don't have access to see your private posts.

Link to comment
Share on other sites

1 hour ago, PeterA said:

hah apparently I don't have access to see your private posts.

They're not my private posts, only @JoeW's private experiments.

Anyway, the post was these three screenshots, showcasing adding UI support for new multilevels/slave shards:

 

Spoiler

JQW6NRS.jpg

Vh08pJ2.jpg

njzaYSj.jpg

 

Link to comment
Share on other sites

  • Developer
On 3/28/2016 at 4:34 PM, simplex said:

To clarify my request with an example, my goal was to do this (you can see the post, right? it's still private to most forum users, but I presume Developers have full access). In order to accomplish that, I had to resort to using the debug library to fetch these 3 local values, so my request is one for a more stable way of access.

This screen file has had a significant rework, which will be out in the next week or two. You should just keep hacking it until then. But this is good to know. Here's how it will probably work:

You'll add new locations via an AddLocation("cloudrealm") call before AddLevel(). Then, DEFAULT_TAB_LOCATIONS will be pokeable, if you set it to {"forest", "cave", "cloudrealm"} then the tabs should appear as desired. Default presets will just be taken from the first level in the list for a location.

You shouldn't need OnClickTab then, because all the necessary information would be read from STRINGS and from the Location table, all that method is really for is to switch tabs...

Does that sound reasonable? I'm upgrading this as we speak so let me know of any other concerns!

Link to comment
Share on other sites

2 minutes ago, Ipsquiggle said:

Does that sound reasonable? I'm upgrading this as we speak so let me know of any other concerns!

It sounds very reasonable. As I mentioned, I already implemented the functionality I was looking for, pointing out all of the "unstable surface of contact" I found. Since all of the points I raised seem to have been addressed, it should suit my needs perfectly.

Link to comment
Share on other sites

  • Developer

@simplex An update on this: Because of the way client-hosted servers are launched, it's nontrivial to add a 3rd (or nth) one. As per the changes above, it will still be trivial to e.g. replace the caves with cloudrealm. But for the near future 3 or more levels is just going to require running dedicated servers.

Link to comment
Share on other sites

1 hour ago, Ipsquiggle said:

@simplex An update on this: Because of the way client-hosted servers are launched, it's nontrivial to add a 3rd (or nth) one. As per the changes above, it will still be trivial to e.g. replace the caves with cloudrealm. But for the near future 3 or more levels is just going to require running dedicated servers.

That's unfortunate. I still haven't finished tying up the front and backends for shard launching and setup in U&A, and I was hoping the frontend part wouldn't give me too much trouble. Let me know if the situation changes, though in the meantime requiring dedicated servers seems fine.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...