[Code] A Thread On Lambdas And Other Epsilons


simplex

Recommended Posts

The log claimed the worldgen screen asset was not found, so it looks like this is a very small and easy to fix problem (unless RoG and vanilla are now using different asset loading systems, preventing the mod from being incompatible with both, but let's hope not).

 

Yes, there are quite a few of those. But this is not an issue: before, if we attempted to play an animation incompatible with a bank, the prefab would simply go invisible with no output to the log, now it's just logged. It's a good thing. The reason for them is the incompatibility of a placeholder bank with the intended animations, which is to be expected, since it's a placeholder.

You'll see that in the log snippet I posted the crash itself had nothing to do with animations. It was an issue with the lootdropper component. I just included the line above that (claiming the missing "death" animation in the "marble" bank) because it shows that the prefab that died (hence triggering loot dropping) uses the marble bank, which helps to narrow it down a bit (though not by much, since marble is being heavily used as a placeholder).

 

Ohhh, so the prefab density isn't screwed, it's just that most flowers have gone invisible due to an incompatible bank, I guess. Again, this is not an issue, we can just use the old bank and build (renamed, of course) by bundling it with the mod.

 

Again, ignore these marble warnings, they are not an issue.

 

You can clone the repo from here:

https://github.com/nsimplex/ds_mod_tools

Done that, go into the ds_mod_tools/src and run premake.sh, which will generate the build files inside ds_mod_tools/build. Then go into ds_mod_tools/build/proj and run

$ make
which should compile everything. Then it should be good to go, except that Python 2.7 and ktech are both requirements which are not currently bundled in, since I left packaging details for Klei to decide how they prefer doing it. You very likely already have Python 2.7 on Debian, but if not just run

$ sudo apt-get install python
(or use whatever UI you prefer, like synaptic). This will place the compiled files in ds_mod_tools/build/linux/mod_tools.

You can get ktech here

https://github.com/nsimplex/ktech

but you'll need the CMake branch. It has as dependencies libmagick++-dev and cmake:

$ sudo apt-get install libmagick++-dev cmake
To compile it, enter the ktech directory with a terminal and then type

$ cmake .
$ make
(note the "." after "cmake")

which should place the compiled ktech into the current directory. The mod tools currently assume ktech is in your PATH (again, as an open packaging detail, especially since I never got a confirmation from Klei on whether ktech would actually be used by the mod tools or not). The easiest way to accomplish that is to do a system wide installation:

$ sudo make install
though you could also place it anywhere and change the PATH environment variable accordingly, though that's more cumbersome and takes more work.

I wish this process were more streamlined, but the open packaging details complicate that (and the mod tools should be distributed precompiled via Steam, anyway). If you run into any problems, let me know.

You can use most tools directly from the output folder (ds_mod_tools/build/linux/mod_tools), but the autocompiler assumes the mod_tools folder is in the same directory as the DS installation folder (as is the case in Steam).

 

Okay, so that's all set up. It's been a while since I've messed with this stuff; what do I use to change the bank names, etcetera? I recall a hex editor would work, but I could've sworn one of the mod tools made that easier.

Link to comment
Share on other sites

Okay, so that's all set up. It's been a while since I've messed with this stuff; what do I use to change the bank names, etcetera? I recall a hex editor would work, but I could've sworn one of the mod tools made that easier.

No, the mod tools don't do that. And Matt's tool is for renaming builds, so it'll have to be a hex editor.

I don't think anyone has renamed a bank before, so you may just upload it and I'll take a look at it (and hopefully do it), since I don't have an old version of the evil flower bank.

Link to comment
Share on other sites

No, the mod tools don't do that. And Matt's tool is for renaming builds, so it'll have to be a hex editor.

I don't think anyone has renamed a bank before, so you may just upload it and I'll take a look at it (and hopefully do it), since I don't have an old version of the evil flower bank.

Ah, that's what it was. Right, so a hex editor it is. yay

 

Here's the evil flower zip, from April 2013. I'm not on Windows anymore, so I have to find my old backups.

 

https://www.dropbox.com/s/roltcxmzs7vrbuo/flowers_evil.zip

Link to comment
Share on other sites

"The file you're looking for has been deleted or moved."

And wht did you move indefinitely from Windows?

My dropbox must be angry. Try now?

 

Yeah, I'm on Debian Jessie now, I keep my old windows OS on my other HDD. I pretty much just use it for storage now.

Link to comment
Share on other sites

My dropbox must be angry. Try now?

Yes, not I got the file. I already took a look into it, but it's a bit delicate (the bank is an animation symbol, so it needs to be rehashed, carefully replaced, etc.), so I'll (hopefully) finish it tomorrow.

Yeah, I'm on Debian Jessie now, I keep my old windows OS on my other HDD. I pretty much just use it for storage now.

Always good to know. ;]

Though I tend to find Debian a bit boring for personal use. Its big concern for stability and long testing cycles for the packages in its official repositores make it great for server and other systems which need to be reliable at all times. But for a home computer... I prefer something with fresher software (though the testing branches of Debian fill that role as well I suppose, I just never tried them).

Link to comment
Share on other sites

@debugman18

I renamed the old "flowers_evil" bank to "datura", fixing the issue we were talking about (though the low prefab density does not have anything to do with it... :/). The changes have been pushed to the git repo.

I'm actually surprised my hunch on how to do this simply worked. What I did was rename the "flowers_evil" animation symbol (used to represent the bank) in the anim.bin file of datura.zip. I changed it to "datura", replacing the occurrences of the "flowers_evil" hash with the hash for the string "datura", computed by mimicking the strhash function found in the buildanimations.py script (in the mod tools).

Regarding the worldgen screen issue, I found that mod assets are simply not being loaded when the worldgen screen shows, that's why our assets are not showing (the game simply can't find them, as they have not been registered). I posted a bug report here.

EDIT: Where it said "mod screen" above, it should've said "worldgen screen". The post has been fixed.

Link to comment
Share on other sites

@debugman18

I renamed the old "flowers_evil" bank to "datura", fixing the issue we were talking about (though the low prefab density does not have anything to do with it... :/). The changes have been pushed to the git repo.

I'm actually surprised my hunch on how to do this simply worked. What I did was rename the "flowers_evil" animation symbol (used to represent the bank) in the anim.bin file of datura.zip. I changed it to "datura", replacing the occurrences of the "flowers_evil" hash with the hash for the string "datura", computed by mimicking the strhash function found in the buildanimations.py script (in the mod tools).

Regarding the worldgen screen issue, I found that mod assets are simply not being loaded when the mod screen shows, that's why our assets are not showing (the game simply can't find them, as they have not been registered). I posted a bug report here.

I don't find Debian boring. :p I find it's a good middle ground between an in-your-face easy linux distro like Ubuntu and a compile-it-all-yourself distro like Gentoo. I've had to compile a few programs (mednafen, some python applications, etcetera), but that's fine. I don't use synaptic either, I'm getting real friendly with gnome-terminal. It should also be noted I'm slowly extending what I can do with the script you wrote me for tracking Starbound assets (no cygwin needed :p). I'm using it in conjuction with some much smaller scripts to do small changelogs, by using meld to do check differences.

 

Anyways, I fixed up Winnie's portrait (not really a big deal, but it was bugging me) and I'm currently looking around in the files. Saveindex.lua is pretty interesting.

 

Oh, I guess you've noticed, but the mantas are practically done for us with the buzzard, so that's a plus. I haven't got into the meat of it yet, but I think there's quite a lot to be gained from having RoG installed.

 

Speaking of which, is there anyone on the team who doesn't have the DLC yet?

Link to comment
Share on other sites

I don't find Debian boring. :razz: I find it's a good middle ground between an in-your-face easy linux distro like Ubuntu and a compile-it-all-yourself distro like Gentoo. I've had to compile a few programs (mednafen, some python applications, etcetera), but that's fine. I don't use synaptic either, I'm getting real friendly with gnome-terminal. It should also be noted I'm slowly extending what I can do with the script you wrote me for tracking Starbound assets (no cygwin needed :razz:). I'm using it in conjuction with some much smaller scripts to do small changelogs, by using meld to do check differences.

May I ask what made you completely switch to Linux?

And yeah, meld is a pretty awesome program.

 

Oh, I guess you've noticed, but the mantas are practically done for us with the buzzard, so that's a plus. I haven't got into the meat of it yet, but I think there's quite a lot to be gained from having RoG installed.

I hadn't thought about that, but you're absolutely right. And luckily using the buzzard as a base does not require players to have the DLC installed.

 

Speaking of which, is there anyone on the team who doesn't have the DLC yet?

I'm not sure, but I think everyone has it.

Link to comment
Share on other sites

May I ask what made you completely switch to Linux?

And yeah, meld is a pretty awesome program.

 

I hadn't thought about that, but you're absolutely right. And luckily using the buzzard as a base does not require players to have the DLC installed.

 

I'm not sure, but I think everyone has it.

Meld serves my purposes well. Sometimes it gives me trouble if I close it incorrectly, but a quick su - fixes that.

 

As for switching to Linux, wall of text incoming:

 

Well, not only does Windows hog resources just by being on, it has issues with drivers that peeve me off. For instance, Windows always complained about my drawing tablet, would forget my settings, just stupid things like that. So far, with zero configuration, on Linux, my tablet works exactly as I want it to. (For one, to not count my hand as input while I'm using the pen, and also with the right click functionality.) Something similar happened with an old webcam I had; Windows refused to acknowledge it. Linux didn't argue a bit. Programs that I use that need an update of sorts can easily be updated without having to be repackaged for Windows, so long as I have the source. A similar thing with bugs. Mednafen, for instance, did not immediately work. However, with some detective work and some terminal love, I was able to get it working just fine. (It turned out to be an issue with alsa.) If I had had the same issue with some pre-compiled program on Windows, the only choice would be to wait for an update. The taskbar on Windows would constantly screw up, for instance it would pop up randomly and I'd have to restart explorer for it to finally disappear again. Another thing that bothers me about Windows is the repair process. It's ridiculous to repair an installation of Windows, especially if you don't have the CD, and sometimes there's no choice but to use a system restore CD, which may not even work. Linux, on the other hand, short of deleting important files, will not die so easily. Which brings me to my final gripe. Who the hell thought the registry was a good idea, especially after seeing it in action for so long?

Link to comment
Share on other sites

As for switching to Linux, wall of text incoming:

I'm glad you're getting along with Linux. Linux does have a very good support for older hardware, and open source drivers tend to work well out of the box due to interested users being able to contribute to their development with the features they want. Hardware manufacturers don't make Linux's life easy when they decide to only release a closed source Windows driver, and for complex hardware like graphics card open source drivers are limited since they rely on reverse engineering, but overall I never had big issues with hardware incompatibility (and the graphics drivers are getting considerably better, both the open source and proprietary ones, since the SteamOS announcement).

Being able to heavily tweak and customise both the OS and applications really is one of Linux's big advantages. Open source software tends to be extensibly configurable (and you can always inspect and tweak the source, of course). And I agree with your gripe with Windows' registry: I can't think of a good enough reason for it to exist at all. Configuration files do everything it does, only more and better.

Have you picked Emacs or Vim as your text editor yet? :razz:

Link to comment
Share on other sites

I'm glad you're getting along with Linux. Linux does have a very good support for older hardware, and open source drivers tend to work well out of the box due to interested users being able to contribute to their development with the features they want. Hardware manufacturers don't make Linux's life easy when they decide to only release a closed source Windows driver, and for complex hardware like graphics card open source drivers are limited since they rely on reverse engineering, but overall I never had big issues with hardware incompatibility (and the graphics drivers are getting considerably better, both the open source and proprietary ones, since the SteamOS announcement).

Being able to heavily tweak and customise both the OS and applications really is one of Linux's big advantages. Open source software tends to be extensibly configurable (and you can always inspect and tweak the source, of course). And I agree with your gripe with Windows' registry: I can't think of a good enough reason for it to exist at all. Configuration files do everything it does, only more and better.

Have you picked Emacs or Vim as your text editor yet? :razz:

I'm currently just using gedit. I'm leaning towards Vim, though. I think Emacs isn't really necessary for my purposes, from what I understand of it.

Link to comment
Share on other sites

I'm currently just using gedit. I'm leaning towards Vim, though. I think Emacs isn't really necessary for my purposes, from what I understand of it.

Well, I use both (though I used gedit for quite some time before that). I generally prefer Emacs, but I do like Vim as well, especially for its plugins (a great thing about Vim is that it has an API for plugin development in pretty much every programming language, so it's easy to write some glue code embedding just about any software as a Vim plugin, and for that reason there are many incredibly useful plugins).

Emacs may seem daunting due to its huge set of features (its manual has 600 pages), but pretty much no one knows it all, or would have a reason to do so. The core set of features for everyday use is quite simple, and I feel it is more natural than the Vim approach (like saving the file by pressing Ctrl-x Ctrl-s instead of Esc, :w and Enter). But both are very good text editors.

Link to comment
Share on other sites

@simplex

Fixed the lootdropper crash. Ball_lightning was causing it, because it had no loot table.

 

Here's a couple of the other issues that the DLC causes:

 

You're already aware of the bizarre prefab density. It wasn't perfect before, but now it's just silly.

 

You're already aware of the buggy worldgen anims, you posted a bug report.

 

There's an issue with colorcubes, the color seems way off if the DLC is active. (If it isn't active, things are normal.)

 

I'm not sure what else there is, but I'm sure anything else will become apparent eventually.

Link to comment
Share on other sites

Fixed the lootdropper crash. Ball_lightning was causing it, because it had no loot table.

Great! I wrote a mod specifically having this issue in mind, but nevertheless I'm glad it's been solved already. It might be useful in the future, though.

 

There's an issue with colorcubes, the color seems way off if the DLC is active. (If it isn't active, things are normal.)

Strange. This might be caused by the addition of weather to caves (since the cloud realm is technically a cave), but I couldn't find a winter cave colourcube, and snowdusk_cc.tex remains the same. Maybe the default cave colourcube and snowdusk_cc are being composed.

Link to comment
Share on other sites

Great! I wrote a mod specifically having this issue in mind, but nevertheless I'm glad it's been solved already. It might be useful in the future, though.

 

Strange. This might be caused by the addition of weather to caves (since the cloud realm is technically a cave), but I couldn't find a winter cave colourcube, and snowdusk_cc.tex remains the same. Maybe the default cave colourcube and snowdusk_cc are being composed.

Interesting. I wonder if there's a way to disable that?

 

So I haven't worked on the prefabs themselves yet, but I plan to get to it tomorrow. However, I did polish the main screen and I also enabled the behavior for the json fetching, so now the mod screen will show the latest version as whatever is in our git repo's modstatus.json file.

Link to comment
Share on other sites

In regards to every member having the DLC... I think we may need to enlist a tester who does not have the DLC - reason being, apparently some mods will work fine on a game that has no DLC, and will crash on someone who has the DLC, whether it's enabled or not.

I fear this could go both ways, so... it may be an idea to check. Just to be safe.

But there's no way to uninstall the DLC for that purpose, so... we'd need someone who doesn't yet have RoG.

 

Carry on, Sergeant Major!

Link to comment
Share on other sites

In regards to every member having the DLC... I think we may need to enlist a tester who does not have the DLC - reason being, apparently some mods will work fine on a game that has no DLC, and will crash on someone who has the DLC, whether it's enabled or not.

I fear this could go both ways, so... it may be an idea to check. Just to be safe.

But there's no way to uninstall the DLC for that purpose, so... we'd need someone who doesn't yet have RoG.

 

Carry on, Sergeant Major!

 

Damn,

so we need to find a DLCless individuum and pin his or her fingers down so they can't purchase it!!!

Or, you know, we could test it in the DLC-less standalone version as well. :razz:

Link to comment
Share on other sites

Question,

I really want to expand my knowledge of this upon more than just art and atlases. Not only to contribute better to our cause but because I'm shifting my education in this direction.

 

Also it only can help with spriter and also anim.files  to get a better result in our work here. I know there are tutorials and stuff. Since you are already into it could you perhaps point out the ones you find best for me? ^ ^

I've downloaded Lua 5.1 from the official page to get a look onto it.

 

Incidentally I'm looking into coding in general too and I'm intensifying to train my art skills. 

Link to comment
Share on other sites

Question,

I really want to expand my knowledge of this upon more than just art and atlases. Not only to contribute better to our cause but because I'm shifting my education in this direction.

 

Also it only can help with spriter and also anim.files  to get a better result in our work here. I know there are tutorials and stuff. Since you are already into it could you perhaps point out the ones you find best for me? ^ ^

I've downloaded Lua 5.1 from the official page to get a look onto it.

 

Incidentally I'm looking into coding in general too and I'm intensifying to train my art skills. 

 

Well, I reference this usually, if I need clarification on something:

http://www.lua.org/pil/contents.html

 

That's just Lua, but once you get a hang of the syntax and logic behind using a language, it becomes a little easier to learn other languages.

 

For Don't Starve specific Lua usage, I recommend http://forums.kleientertainment.com/files/file/202-sample-mods/

 

Using that hand-in-hand with vanilla scripts will help you solidify your ability to understand Lua. Those are in prefabs/ in the Don't Starve data/ directory. You could also tear open U&A and look at our prefabs. Those are in code/prefabs/ in the mod directory.

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.