Jump to content

Recommended Posts

Try making your art double-res. I can't use the compiler, but I thought it half-sized the image... or at least is capable of such through an option? I don't... really know how it works.

 

Though I do remember that all the game's assets were created at double-res, and half-sized when they were imported.

Try making your art double-res. I can't use the compiler, but I thought it half-sized the image... or at least is capable of such through an option? I don't... really know how it works.

 

Though I do remember that all the game's assets were created at double-res, and half-sized when they were imported.

Well, making the size bigger makes the quality still a bit worse. (I tried it and it didn't look well.) My character still isn't done yet either.  She still needs a few things added to her. 

 

Edited by Stealthic

@Cheerio

Is there a way for an arbitrary piece of code to differentiate among the three possible game states: main menu, worldgen and regular game?

To detect worldgen, I've been checking for the existence of the "SEED" global variable. Checking for WorldSim might be better, but still essentially the same approach. To differentiate between the other two, I've been checking for the existence of the world entity (which, in particular, doesn't work for the early stages of the regular game).

Is there a better and standardized way of doing that?

Edited by simplex
  • Developer

@Cheerio

Is there a way for an arbitrary piece of code to differentiate among the three possible game states: main menu, worldgen and regular game?

To detect worldgen, I've been checking for the existence of the "SEED" global variable. Checking for WorldSim might be better, but still essentially the same approach. To differentiate between the other two, I've been checking for the existence of the world entity (which, in particular, doesn't work for the early stages of the regular game).

Is there a better and standardized way of doing that?

 

This is determined in DoResetAction() in gamelogic.lua. There aren't actually three modes, only two: The main game and worldgen. Detecting SEED seems like a perfectly reasonable way of determining if we are in worldgen (though perhaps a bit non-semantic). As far as main menu or regular game:

 

If you follow the calls in DoResetAction, you can see that either a screen will be created (probably MainScreen, CharacterSelectScreen, or WorldGenScreen) or else a slot will be loaded and DoInitGame will be called, creating the world and Wilson.

 

My point is: Because we don't actually have 'modes' your best bet is actually to test for the existence of (or use init hooks for) the MainScreen or World etc. if you need to act on those things. The reason we provided AddGamePostInit and AddSimPostInit was to provide hooks at different points in this startup process where these things will have been created by.

 

Alternatively, similar to DoResetAction, you can inspect Settings.reset_action yourself, as well as the subsequent logic, to see which path the game will eventually go down if you need to know in advance.

This is determined in DoResetAction() in gamelogic.lua. There aren't actually three modes, only two: The main game and worldgen. Detecting SEED seems like a perfectly reasonable way of determining if we are in worldgen (though perhaps a bit non-semantic). As far as main menu or regular game:

 

If you follow the calls in DoResetAction, you can see that either a screen will be created (probably MainScreen, CharacterSelectScreen, or WorldGenScreen) or else a slot will be loaded and DoInitGame will be called, creating the world and Wilson.

 

My point is: Because we don't actually have 'modes' your best bet is actually to test for the existence of (or use init hooks for) the MainScreen or World etc. if you need to act on those things. The reason we provided AddGamePostInit and AddSimPostInit was to provide hooks at different points in this startup process where these things will have been created by.

 

Alternatively, similar to DoResetAction, you can inspect Settings.reset_action yourself, as well as the subsequent logic, to see which path the game will eventually go down if you need to know in advance.

Your alive! I got worried ;_; Never do this to me again!

This is determined in DoResetAction() in gamelogic.lua. There aren't actually three modes, only two: The main game and worldgen. Detecting SEED seems like a perfectly reasonable way of determining if we are in worldgen (though perhaps a bit non-semantic). As far as main menu or regular game:

 

If you follow the calls in DoResetAction, you can see that either a screen will be created (probably MainScreen, CharacterSelectScreen, or WorldGenScreen) or else a slot will be loaded and DoInitGame will be called, creating the world and Wilson.

 

My point is: Because we don't actually have 'modes' your best bet is actually to test for the existence of (or use init hooks for) the MainScreen or World etc. if you need to act on those things. The reason we provided AddGamePostInit and AddSimPostInit was to provide hooks at different points in this startup process where these things will have been created by.

 

Alternatively, similar to DoResetAction, you can inspect Settings.reset_action yourself, as well as the subsequent logic, to see which path the game will eventually go down if you need to know in advance.

I second @Neosaurus: I was thinking @Cheerio was dabbling in necromancy to conjure up that mod preview thread. :razz:

Thank you for the tips, they certainly helped. My only remaining grip with it is that this can't be used in modmain.lua (or modworldgenmain.lua) itself, since by then gamelogic.lua hasn't (started to) run yet (so that Settings hasn't been filled and SaveGameIndex doesn't necessarily exist), so a mod can't predict the execution flow by the time it runs.

But anyway, differentiating between worldgen and else is what truly matters. The rest can be handled through setting up the proper hooks through the mod API.

HHHAAAAAAAALPPPPP!!!!!!

Please can anyone compile a list of freeware i can use to make or mod characters?

I have mat's tools figured out. I'm able to open .TEX files and save as a .png. I brought it into photoshop and thought if i colored over the existing objects i could reconvert it back to a .TEX file replacing the origional and it would just render my changes, but instead it just made a floating head.

The one tutorial mentoined "Spriter",but, unless i purchase the pro edition it seems i can't do anything with it.

I'm artisticly enclined but computer's are a rather new media for me, and I'm self taught, so if any one could help it would be awsome.

  • Developer

HHHAAAAAAAALPPPPP!!!!!!

Please can anyone compile a list of freeware i can use to make or mod characters?

I have mat's tools figured out. I'm able to open .TEX files and save as a .png. I brought it into photoshop and thought if i colored over the existing objects i could reconvert it back to a .TEX file replacing the origional and it would just render my changes, but instead it just made a floating head.

The one tutorial mentoined "Spriter",but, unless i purchase the pro edition it seems i can't do anything with it.

I'm artisticly enclined but computer's are a rather new media for me, and I'm self taught, so if any one could help it would be awsome.

If you're just starting out, one of the funnest and most rewarding things to try is to make a new character.  I would highly recommend following this guide and if you get stuck, ask for more halp on the forums :).

 

http://forums.kleientertainment.com/index.php?/topic/27341-tutorial-the-artists-guide-to-characteritem-modding/

  • Like 1

The one tutorial mentoined "Spriter",but, unless i purchase the pro edition it seems i can't do anything with it.

Actually, the free version of Spriter is fully functional. The Pro version is very nice, though. Very much recommended for any serious animator.

Includes IK locking, and a switch for rotation inheritance, which... those two features may seem small, but they become incredibly handy when you're animating seriously.

Hey everyone! For those who don't know me, I've been working on Don't Starve at Klei doing game design, world gen, adventure mode, and lots of other odds and ends, but:

For the next while I'm going to be dedicating myself to everything mods! Basically I'm going to be your advocate to the team at Klei, trying to make the process of modding as clear and clean as possible!

The main thing is, I don't know yet exactly how I'll be the most useful: My goal is to provide you with the tools and knowledge you need to mod unhindered! So expect to see me hanging around here, answering questions where I can and probably asking a bunch too, so we can figure out how I can be the most useful to everyone. :grin:

Yee-haw!

hi could you help me with the drop function of the tophat where it will show on the ground? it's a rebuild for a witch hat and all is good but ground animation ty

hi could you help me with the drop function of the tophat where it will show on the ground? it's a rebuild for a witch hat and all is good but ground animation ty

Hats are tricky.

You most likely have the wrong SetBank, if it's becoming invisible when you drop it.

Here's the code to a custom hat I created, based on the straw hat:

 

local assets={    Asset("ANIM", "anim/cutehat.zip"),    Asset("ATLAS", "images/inventoryimages/cutehat.xml")}local function onequip(inst, owner)        owner.AnimState:OverrideSymbol("swap_hat", "cutehat", "swap_hat")        owner.AnimState:Show("HAT")        owner.AnimState:Show("HAT_HAIR")        owner.AnimState:Hide("HAIR_NOHAT")        owner.AnimState:Hide("HAIR")endlocal function onunequip(inst, owner)        owner.AnimState:Hide("HAT")        owner.AnimState:Hide("HAT_HAIR")        owner.AnimState:Show("HAIR_NOHAT")        owner.AnimState:Show("HAIR")endlocal function fn(Sim)    local inst = CreateEntity()    local trans = inst.entity:AddTransform()    local anim = inst.entity:AddAnimState()    MakeInventoryPhysics(inst)        inst:AddTag("hat")        anim:SetBank("strawhat")    anim:SetBuild("cutehat")    anim:PlayAnimation("anim")                inst:AddComponent("inspectable")        inst:AddTag("irreplaceable")        inst:AddComponent("inventoryitem")    inst.components.inventoryitem.atlasname = "images/inventoryimages/cutehat.xml"        inst:AddComponent("dapperness")    inst.components.dapperness.dapperness = (TUNING.DAPPERNESS_MED * 2)        inst:AddComponent("equippable")    inst.components.equippable.equipslot = EQUIPSLOTS.HEAD        inst.components.equippable:SetOnEquip( onequip )    inst.components.equippable:SetOnUnequip( onunequip )        return instendreturn Prefab( "common/inventory/cutehat", fn, assets)

 

The straw hat's anim file is "hat_straw.zip" - but the SetBank is "strawhat."

It's confusing, and tripped me up a bit.

Hats are tricky.

You most likely have the wrong SetBank, if it's becoming invisible when you drop it.

Here's the code to a custom hat I created, based on the straw hat:

local assets={    Asset("ANIM", "anim/cutehat.zip"),    Asset("ATLAS", "images/inventoryimages/cutehat.xml")}local function onequip(inst, owner)        owner.AnimState:OverrideSymbol("swap_hat", "cutehat", "swap_hat")        owner.AnimState:Show("HAT")        owner.AnimState:Show("HAT_HAIR")        owner.AnimState:Hide("HAIR_NOHAT")        owner.AnimState:Hide("HAIR")endlocal function onunequip(inst, owner)        owner.AnimState:Hide("HAT")        owner.AnimState:Hide("HAT_HAIR")        owner.AnimState:Show("HAIR_NOHAT")        owner.AnimState:Show("HAIR")endlocal function fn(Sim)    local inst = CreateEntity()    local trans = inst.entity:AddTransform()    local anim = inst.entity:AddAnimState()    MakeInventoryPhysics(inst)        inst:AddTag("hat")        anim:SetBank("strawhat")    anim:SetBuild("cutehat")    anim:PlayAnimation("anim")                inst:AddComponent("inspectable")        inst:AddTag("irreplaceable")        inst:AddComponent("inventoryitem")    inst.components.inventoryitem.atlasname = "images/inventoryimages/cutehat.xml"        inst:AddComponent("dapperness")    inst.components.dapperness.dapperness = (TUNING.DAPPERNESS_MED * 2)        inst:AddComponent("equippable")    inst.components.equippable.equipslot = EQUIPSLOTS.HEAD        inst.components.equippable:SetOnEquip( onequip )    inst.components.equippable:SetOnUnequip( onunequip )        return instendreturn Prefab( "common/inventory/cutehat", fn, assets)

The straw hat's anim file is "hat_straw.zip" - but the SetBank is "strawhat."

It's confusing, and tripped me up a bit.

thanks but the hat bank is hat_top had the no show trouble with silkworm mod cooked worm not showing cause i didn't know the animation name they used and fixed it using spriter but spriter is a can of worms for me atm

i think they have a animation on dropped function

thanks but the hat bank is hat_top had the no show trouble with silkworm mod cooked worm not showing cause i didn't know the animation name they used and fixed it using spriter but spriter is a can of worms for me atm

i think they have a animation on dropped function

And that's precisely your problem.

Try using the bank "tophat" instead. I haven't checked it, but that's most likely it.

 

Like I said, for the straw hat, the anim.zip is named "hat_straw" but the name used in SetBank is "strawhat" instead.

And that's precisely your problem.

Try using the bank "tophat" instead. I haven't checked it, but that's most likely it.

 

Like I said, for the straw hat, the anim.zip is named "hat_straw" but the name used in SetBank is "strawhat" instead.

YOU ARE AWESOME! Thanks much!

Back again

thnx for those who responded to my post. Found some tutorials on youtube for spriter and TheDanaAdams it showed the funtions you were talking about and those do look like they would cut the workload of any project down to 60% or less depending on what you were doing.Cheerio thanx man checking out your link next.

 

 

Actually, the free version of Spriter is fully functional. The Pro version is very nice, though. Very much recommended for any serious animator.
Includes IK locking, and a switch for rotation inheritance, which... those two features may seem small, but they become incredibly handy when you're animating seriously.

 

@Cheerio

The Mod Tools just updated and I got the spriter_exporter source. It doesn't seem it'd take much effort to make it OS agnostic, and I may lend a hand on it, of course. But there's no licensing information in the source (except for bundled 3rd party libraries, of course, such as tinyxml), so... how should I take it as?

And given that it has hard dependencies on a few Python scripts that aren't present, why was the project included (I'm not being snarky, this is an honest question)?

  • Developer

@Cheerio

The Mod Tools just updated and I got the spriter_exporter source. It doesn't seem it'd take much effort to make it OS agnostic, and I may lend a hand on it, of course. But there's no licensing information in the source (except for bundled 3rd party libraries, of course, such as tinyxml), so... how should I take it as?

And given that it has hard dependencies on a few Python scripts that aren't present, why was the project included (I'm not being snarky, this is an honest question)?

Because I haven't had the time to properly setup a script which uploads all scripts and source code whenever we push a new version of the mod tools so in the mean time, I just made copies of some of the things for you to check out.  Ideally from my side, I will update the scripts in a single location and then deploy them to all skus, that's just not setup yet but I still wanted to give you something to check out :).

Because I haven't had the time to properly setup a script which uploads all scripts and source code whenever we push a new version of the mod tools so in the mean time, I just made copies of some of the things for you to check out.  Ideally from my side, I will update the scripts in a single location and then deploy them to all skus, that's just not setup yet but I still wanted to give you something to check out :-).

Oh, ok then. Thank you, I appreciate it. ;]

But still, what's the licensing condition? Could I, for example, port it to Linux/Mac and share it with others?

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
×
  • Create New...