Jump to content

Recommended Posts

  • 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)?

Also here's the parts that would need to get ported:

 

Autocompiler which is simply a tool the game calls which iterates through all the mod files and compiles them if necessary.  This would be easy to port.  SpriterExporter converts spriter files to don't starve source files.  Then the animation compiler is a python script which should just run on any platform and the last tool is the ds texture converter which is another c++ app.  And then you would have a full toolchain.  I don't think porting should be too hard for any of them.

Also here's the parts that would need to get ported:

 

Autocompiler which is simply a tool the game calls which iterates through all the mod files and compiles them if necessary.  This would be easy to port.  SpriterExporter converts spriter files to don't starve source files.  Then the animation compiler is a python script which should just run on any platform and the last tool is the ds texture converter which is another c++ app.  And then you would have a full toolchain.  I don't think porting should be too hard for any of them.

Some of it is already done (but here it's more up to date). Though it wouldn't really fit into a "Klei toolchain" due to licensing. I could relicense it under the MIT license, I suppose, since that would make it more generally useful...

I did read the buildanimations.py script before (though I'm not sure if it's been modified since), and I don't believe it's Windows specific at all (as you mentioned), unless some library used is.

And about the Autocompiler, I wouldn't call it a priority. At least on a personal level I'd prefer not to have it (or have an option to disable it).

EDIT: Actually, relicensing ktech wouldn't be necessary for binary bundling (provided the sources for ktech are distributed alongside it, per section 3 of the GPLv2). But anyway, this is just in case ktech were to be used, TextureConverter can be ported as well.

Edited by simplex
  • Developer

Some of it is already done (but here it's more up to date). Though it wouldn't really fit into a "Klei toolchain" due to licensing. I could relicense it under the MIT license, I suppose, since that would make it more generally useful...

I did read the buildanimations.py script before (though I'm not sure if it's been modified since), and I don't believe it's Windows specific at all (as you mentioned), unless some library used is.

And about the Autocompiler, I wouldn't call it a priority. At least on a personal level I'd prefer not to have it (or have an option to disable it).

EDIT: Actually, relicensing ktech wouldn't be necessary for binary bundling (provided the sources for ktech are distributed alongside it, per section 3 of the GPLv2). But anyway, this is just in case ktech were to be used, TextureConverter can be ported as well.

My thought was to start a github projected which is a fork of our own internal tools so that people could fork it and submit patches to be integrated all the way up to the main branch as opposed to sharing code on the forum.  It would let me autopush changes from my side and be able to easily manage change proposals from the outside.

  • Like 1
  • Developer

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.

 

My link points to Dana's guide  :-)

My thought was to start a github projected which is a fork of our own internal tools so that people could fork it and submit patches to be integrated all the way up to the main branch as opposed to sharing code on the forum.  It would let me autopush changes from my side and be able to easily manage change proposals from the outside.

Where have you been all this time? :razz:

p.s.: What's your buildchain for Linux/Mac? GNU Make, Automake/Autoconf, CMake... ?

Edited by simplex
  • Developer

Where have you been all this time? :razz:

p.s.: What's your buildchain for Linux/Mac? GNU Make, Automake/Autoconf, CMake... ?

The game has it's own Premake/Make toolchain.  The mod tools right now are just a couple of visual studio solutions.

Give this a try:

Okay, so I placed all the images of my character over sample_dude.  I opened up spriter and rearranged everything that's visible to me.  It looks fine now and her hair fits, but I have a few questions. 

First of all, are there and guides on these forums for using spriter?  I'm so unfamiliar with it.

Also, now that I moved the face, what happens when her expressions change?  Will they be all over the place now?

Another question is again with the mod tools.  It's not showing up to download in my library.  I had a similar problem with the creation kit for Skyrim. -_-  I can't view her in game now, only spriter.

Last question...how do I add her skirt in now?  The sample doesn't have a skirt folder since Wilson doesn't have a skirt.

Thanks.

Edited by Stealthic
  • Developer

Okay, so I placed all the images of my character over sample_dude.  I opened up spriter and rearranged everything that's visible to me.  It looks fine now and her hair fits, but I have a few questions. 

First of all, are there and guides on these forums for using spriter?  I'm so unfamiliar with it.

Also, now that I moved the face, what happens when her expressions change?  Will they be all over the place now?

Another question is again with the mod tools.  It's not showing up to download in my library.  I had a similar problem with the creation kit for Skyrim. -_-  I can't view her in game now, only spriter.

Last question...how do I add her skirt in now?  The sample doesn't have a skirt folder since Wilson doesn't have a skirt.

Thanks.

Moving things in Spriter won't change how she looks in game. All that matters in Spriter is the pivot points. Could you upload what you have for me to take a look? And as for the skirt, I'll hook you up with either a different sample or I'll add a skirt to the Wilson sample I gave you :)

Moving things in Spriter won't change how she looks in game. All that matters in Spriter is the pivot points. Could you upload what you have for me to take a look? And as for the skirt, I'll hook you up with either a different sample or I'll add a skirt to the Wilson sample I gave you :-)

Sure! And adding a skirt to Wilson's sample would be fine :razz:  Everything is probably going to look very jumbled up. This isn't exactly how I want her parts to all look in game, and her art still needs to be finished, but it shows a good idea of what I am heading for.

sample_dude.zip

Edited by Stealthic

Cheerio/Ipsquiggle: is there any way to crop an ImageWidget's texture instead of scaling it? ImageWidget:SetSize scales the texture to fit the new size, unfortunately.

If it's not currently possible, it'd be really great to have.

Edited by squeek
  • Developer

Cheerio/Ipsquiggle: is there any way to crop an ImageWidget's texture instead of scaling it? ImageWidget:SetSize scales the texture to fit the new size, unfortunately.

If it's not currently possible, it'd be really great to have.

I don't think so but what are you trying to achieve?

I don't think so but what are you trying to achieve?

I'd like to be able to fake an increase in the max zoom level of the minimap by drawing the minimap texture itself large, but then only show a portion of it.

Something like:

self.inst.ImageWidget:SetSize(64,64)self.inst.ImageWidget:SetExtents(0,0,32,32)
which would then show the top left quadrant of the texture and hide the rest.

Being able to apply an alpha mask to a texture using another texture would be even better, as it'd allow you to have complete control over the shape as well (circle minimap!).

Edited by squeek
  • Developer

I'd like to be able to fake an increase in the max zoom level of the minimap by drawing the minimap texture itself large, but then only show a portion of it.

Something like:

self.inst.ImageWidget:SetSize(64,64)self.inst.ImageWidget:SetExtents(0,0,32,32)
which would then show the top left quadrant of the texture and hide the rest.

Being able to apply an alpha mask to a texture using another texture would be even better, as it'd allow you to have complete control over the shape as well (circle minimap!).

 

Let me do some digging :).

Let me do some digging :-).

Really appreciate it.

If you've got your shovel out, I've come across another issue: if the MiniMap is visible (meaning the MiniMap userdata's IsVisible function returns true; a MiniMap texture doesn't even need to be on the screen) and MiniMap:RebuildLayer is called (like when a tile is terraformed by a pitchfork), it flickers the HUD (the darkened edges go away, everything seems to get brighter, and then it resets).

I've written up a test mod that calls MiniMap:ToggleVisibility() and then calls MiniMap:RebuildLayer every 3 frames, flickering the HUD like crazy (check the comments in modmain.lua for more information):

TestMiniMapUpdate.zip

Also note that I tried overwriting Terraformer:Terraform to do MiniMap:ToggleVisibility() before and after the terraforming is actually done, but it didn't seem to solve the problem. I've included that code as well.

Edited by squeek
Hi, Cheerio.
You sad that you'll take a look, but there is still no answer from you.
Could you please take a look at this error?

Thanks for the answer, but it does not seem to work.

When I replace the font in game folder (dont_starve\data\fonts) all is fine, the new icons is visible, but when I create the 'font' folder in my mod with modified font the game crashes at start.

Here is the log:

Starting up

Don't Starve: 86935 WIN32_STEAM
Build Date: 2013-10-05_15-58-06
THREAD - started 'GAClient' (5448)
HttpClient::ClientThread::Main()
cGame::InitializeOnMainThread
WindowManager::Initialize
RestoreWindowPosition
   Saved Client Pos (18 x 455)
   Adjusted Window Pos (10 x 425)
EnsureWindowOnScreen
   All good.
GLInfo
~~~~~~
GL_VENDOR: Google Inc.
GL_RENDERER: ANGLE (RDPDD Chained DD)
GL_VERSION: OpenGL ES 2.0 (ANGLE 1.0.0.2249)
GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 1.00 (ANGLE 1.0.0.2249)
THREAD - started 'WindowsInputManager' (14548)
OpenGL extensions (19, 19):
GL_ANGLE_depth_texture
GL_ANGLE_framebuffer_blit
GL_ANGLE_framebuffer_multisample
GL_ANGLE_instanced_arrays
GL_ANGLE_pack_reverse_row_order
GL_ANGLE_texture_compression_dxt3
GL_ANGLE_texture_compression_dxt5
GL_ANGLE_texture_usage
GL_ANGLE_translated_shader_source
GL_EXT_read_format_bgra
GL_EXT_robustness
GL_EXT_texture_compression_dxt1
GL_EXT_texture_format_BGRA8888
GL_EXT_texture_storage
GL_OES_get_program_binary
GL_OES_packed_depth_stencil
GL_OES_rgb8_rgba8
GL_OES_standard_derivatives
GL_OES_texture_npot
GL_MAX_TEXTURE_SIZE = 8192
GL_MAX_TEXTURE_IMAGE_UNITS = 16
GL_MAX_RENDERBUFFER_SIZE = 8192
GL_MAX_VIEWPORT_DIMS = 8192, 8192
GL_MAX_VARYING_VECTORS = 10
GL_MAX_VERTEX_ATTRIBS = 16
GL_MAX_VERTEX_UNIFORM_VECTORS = 254
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 4
GL_MAX_FRAGMENT_UNIFORM_VECTORS = 221
4 compressed texture formats
texture format 0x83f0
texture format 0x83f1
texture format 0x83f2
texture format 0x83f3
cDontStarveGame::DoGameSpecificInitialize()
cGame::StartPlaying
LOADING LUA
DoLuaFile scripts/main.lua
DoLuaFile loading buffer scripts/main.lua
scripts/main.lua(144,1) running main.lua
 
scripts/modindex.lua(274,1) loaded modindex
scripts/modindex.lua(57,1) ModIndex: Beginning normal load sequence.
 
scripts/mods.lua(141,1) Loading mod: DisplayFoodValues2 (DisplayFoodValues22)
scripts/mods.lua(165,1) Mod: DisplayFoodValues2 (DisplayFoodValues22) Loading modworldgenmain.lua
scripts/mods.lua(173,1) Mod: DisplayFoodValues2 (DisplayFoodValues22)  Mod had no modworldgenmain.lua. Skipping.
scripts/mods.lua(165,1) Mod: DisplayFoodValues2 (DisplayFoodValues22) Loading modmain.lua
scripts/mods.lua(255,1) Mod: DisplayFoodValues2 (DisplayFoodValues22) Registering prefabs
scripts/mods.lua(278,1) Mod: DisplayFoodValues2 (DisplayFoodValues22)  Registering default mod prefab
LOADING LUA SUCCESS
scripts/playerdeaths.lua(79,1) PlayerDeaths loaded morgue 112
scripts/playerprofile.lua(268,1) loaded profile
scripts/playerprofile.lua(313,1) bloom_enabled false
scripts/saveindex.lua(75,1) loaded saveindex
scripts/gamelogic.lua(1046,1) OnFilesLoaded()
scripts/gamelogic.lua(1035,1) OnUpdatePurchaseStateComplete
scripts/gamelogic.lua(81,1) Unload BE
scripts/gamelogic.lua(84,1) Unload BE done
scripts/gamelogic.lua(86,1) Load FE
scripts/gamelogic.lua(88,1) Load FE: done
Assert failure 'mRenderParams.m_font != INVALID_RESOURCE_HANDLE' at ..\source\game\render\textnode.cpp(323): Trace follows...
 

 

 

 

  • Developer

Sure! And adding a skirt to Wilson's sample would be fine :razz:  Everything is probably going to look very jumbled up. This isn't exactly how I want her parts to all look in game, and her art still needs to be finished, but it shows a good idea of what I am heading for.

A couple of things from testing out your changes.

1. I wouldn't use Spriter to move things around until I write a tutorial on how to use it because you can't really move things around and have them work with the existing animations.  That's my fault, I should of explained that better.

2. Because of how Spriter stores it's information, the lower rez sample isn't going to work.  I wrote a script to resize your images to fit with the original sample.

3. Testing it out in game, you'll have to either expand her head or shrink her faces because the two don't currently match :-).  Here's a working version for you to check out.

4. I still need to hook you up with a skirt :-).

 

sample_dude.zip

post-283016-0-84363500-1382840053_thumb.

A couple of things from testing out your changes.

1. I wouldn't use Spriter to move things around until I write a tutorial on how to use it because you can't really move things around and have them work with the existing animations.  That's my fault, I should of explained that better.

4. I still need to hook you up with a skirt :-).

Any estimate on when you'll have time for such a thing?

 

Also, we'll need the other symbols - pigtails, for example. (Basically, the parts that are all present in the template "wod" atlas.

Which brings me to my question... if I want to make a character with a high ponytail... is it possible to offset the pigtail animation?

Furthermore, could it be offset to such a degree that the pigtail symbol could be used as a character's tail?

 

Is it, or will it be possible to add entirely new symbols? For example, if I wanted to make a knight, with a flowing cape, and large pauldrons?

A couple of things from testing out your changes.

1. I wouldn't use Spriter to move things around until I write a tutorial on how to use it because you can't really move things around and have them work with the existing animations.  That's my fault, I should of explained that better.

2. Because of how Spriter stores it's information, the lower rez sample isn't going to work.  I wrote a script to resize your images to fit with the original sample.

3. Testing it out in game, you'll have to either expand her head or shrink her faces because the two don't currently match :-).  Here's a working version for you to check out.

4. I still need to hook you up with a skirt :-).

 

attachicon.gifsample_dude.zip

attachicon.gifwinter.jpg

Oh my!  Haha yeah, she looks a bit messed up. 

Okay, I shouldn't have jumped the gun anyways :p I'm definitely going to make her head bigger, haha.  Her arms look pretty thick as well.  And once again, thank you for helping me out with this. 

One question, after this is all done, will this create an atlas for me just like all of the other characters have?

A couple of things from testing out your changes.

1. I wouldn't use Spriter to move things around until I write a tutorial on how to use it because you can't really move things around and have them work with the existing animations.  That's my fault, I should of explained that better.

2. Because of how Spriter stores it's information, the lower rez sample isn't going to work.  I wrote a script to resize your images to fit with the original sample.

3. Testing it out in game, you'll have to either expand her head or shrink her faces because the two don't currently match :-).  Here's a working version for you to check out.

4. I still need to hook you up with a skirt :-).

 

attachicon.gifsample_dude.zip

attachicon.gifwinter.jpg

Here is what she looked like with the atlas template:

 

nprul3.jpg

2. Because of how Spriter stores it's information, the lower rez sample isn't going to work.  I wrote a script to resize your images to fit with the original sample.

Can I haz that script please? For a noob like me it's not really easy to wirte something like that...

It looks to me as if the hair is cut off at the borrom, especially so in the side view. Am I seeing that wrong?

 

EDIT: Damnit, sorry for the unintentional double post  :'(

Hahaha, it is cut off, that's what we are trying to fix. :)

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