realitymeltdown

  • Content Count

    60
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Posts posted by realitymeltdown


  1. They spawn like hound attacks - just wait around and they should show up. It's got a warning, as well as the tunneling sound, and then depending on the difficulty and duration, they'll show up.

    Interesting idea on number of spawns. I've got a version of the number that spawn worked up(Jaws -> default -> Frenzy -> Sharknado) - just need to wait out the clock and make sure the warnings work on the lowest setting, and seem reasonable on the high numbers.

    I didn't know about the yellow thing... might not be common knowledge enough for players to expect? That said, if you're injured enough, it will try to attack birds (which I find amusing). Chester also is a prime target.. wasn't sure if I should specifically target it and demote it's priority so the shark doesn't just chomp at it.


  2. I think the variables you want are local variables in the brain file. There's no global context that you can change them in to easily switch between on and off. Also, the action definitions are also loaded once when the brain is created, so to change them in the middle of a creature's lifecycle isn't really something you can do either.

    In theory you could go to the brain logic on the instance, access the brain, pull out the priority nodes, grab the specific actions you want to alter, and then change their inner variables to change the sight distance. I think that might be fragile, and may not work as new actions are created. 

    Someone else may know a way to do it, but from what I know, it's not a matter of changing one variable. Sorry


  3. http://store.steampowered.com/subscriber_agreement/

    Check the " 6. USER GENERATED CONTENT" section A. Valve reserves the right to make changes; however it does not grant anyone else the right to copy, modify or redistribute your work. In effect, your work is under copyright, with exceptions made for "Valve and its affiliates".

    Copyright for code is unclear but basically code is a literary document. If you take Shakespeare and replace the "Thous" with "Yous," Shakespeare could claim you infringe on their copyright. If you wrote "Grease" you probably would not. So by that standard, most of these "fixes" are in violation of the author's copyrights.

    To get into code copyright, Wikipedia has an article:

    https://en.wikipedia.org/wiki/Software_copyright

    Klei has been abundantly clear that we are not to use their artwork, sounds, etc, but I am not sure how Klei applies their rights to the entire data/scripts folder. Many mods are using using big copy & paste of those, so I'm guessing Klei is just gracious about that so far but that is really up to them.


  4. I've been working on a project with a tunneling creature. I am, however, pretty helpless when it comes to sound and Foley effects.

    Anyone in the community have experience to get me through it - or is interested in being a part of the project?

    I have dug up some open-license noises, but am having a tough time getting them to cycle in a way that sounds good.

    Anyway - if there is anybody with some experience, I could use the help


  5. I was also thinking about iteration/debugging

    Debug Print

    Maybe this already exists, but it would be nice to be able to select a object and invoke a test output on it. I've been hooking into "update" and spamming the console, but being able to highlight and event and send it messages would be handy. Could be a returned id value on a commandline spawn printed to the console, and then invoking a DebugString method on said object if it exists.

    Quick Startup

    Also, a quick startup would be nice. I have to start up the game, click host, sometimes create a new game, wait, then load on every crash. It would be nice to have a 1-click startup that jumped to either the character selection or world.

    Asset Pipeline?

    Another thought - is the only documentation on the content pipeline here?

    I had some trouble finding it - and I was never sure if this was the latest.


  6. 	State{
            name = "leave",
            tags = { "busy" },
            onenter = function(inst)
    			inst.components.health:SetInvincible(true)
                inst.Physics:Stop()
                RemovePhysicsColliders(inst)            
                inst.AnimState:PlayAnimation("leave")
                inst:SetBrain(nil)
            end,
    		
    		events=
            {
    			EventHandler("animover", function(inst) inst:Remove() end),
            },   
        },

    For anyone reading this, I checked the Krampus brain - which had nearly identical code to my original, except it removed the brain (spooky!). That appeared to get it to properly abandon ship


  7. So I've got a stategraph, with a state called "leave". The only problem is, it doesn't ever hit the "animover" event. It keeps looping the event and the animation over and over.

     

    	State{
            name = "leave",
            tags = { "busy" },
            onenter = function(inst, target)
    			inst.SoundEmitter:KillSound("danger_music")
                inst.AnimState:PlayAnimation("leave")
            end,
    		
            events =
            {
                EventHandler("animqueueover", function(inst) inst.Remove() end),
            },
        },

    It might be in the brain, but I do not see why this would re-invoke and keep trumping the original event... other prefabs didn't seem to need to check if they were re-entrant safe

    function prefab_brain:OnStart()
        local root = PriorityNode(
    		{
    			WhileNode(function() return WantsToEat(self.inst) end, "eating", DoAction(self.inst, MY_EAT)),
    			ActionNode(function() return self.inst.sg:GoToState("leave") end)
    		},
    		.25
    	)
        
        self.bt = BT(self.inst, root)
    end

     

    Anyone know what I am missing here?


  8. I am looking to make mods for a creature and an inventoriable object. I have some old code from DS that I am trying to update.

    I used to be able to use this:

    --Testing only
    function SimInit(player)
    	local x, y, z = player.Transform:GetWorldPosition()
    	GLOBAL.SpawnPrefab("item").Transform:SetPosition(x, y, z)
    end
    
    AddSimPostInit(SimInit)

    I tried checking into where SimPostInit is called, but the only reference i found calling it passed in nil (which matches my error).

    I also tried AddPrefabPostInit, with "ThePlayer" - but that did not produce any effect. Beyond doing it directly, I also tried the code from "Starter Inventory," but that also did nothing.

    For testing purposes, are there simple ways to spawn things?


  9. I need a bit of help because my don't starve isn't converting my animation. Also if I download the sampleprefab and delete the myprefab_build.zip, don't starve will not convert it back from the scml and pngs

     

    I did not see any sort of reversal script in the tools provided. They take spriter files and convert them into the xml Klie uses internally, and then runs it through their scripts to generate the final zip. All this got us the ability to make animations quickly - without re-inventing the whole process.

     

    If you're having trouble converting, make sure you don't use bones (unsupported in the above conversion). Try checking the stuff I listed in the above post as well. It might give you a lead on what the problem is.


  10. Invisibility is what happens when it doesn't know how to draw something. It's likely something is missing.

     

    Here's some ideas to check:

    Does your script match your build?

     Does your "ANIM" zip filename match your .scml filename?

     Does your "build" match your .scml filename?

     Does your "bank" match the entity name?

     Does your PlayAnimation" name match your animation name?

    Are all your files getting copied successfully?

     Check that you have all your images and scml files in "mod/<modname>/exported/<object name>/"

     Check that after running the game, a .zip is created.

     Check that that zip has animation.xml, build.xml and all your images.

     Check that your "mod/<modname>/anim/<buildname>.zip" contains an anim.bin, build.bin, and a atlas-1.tex file.


  11. So my original png file is 512x512 (in case it's a power 2 thing).The actual content area is roughly 180x140. The build xml file produced says 512x512. When I open the resulting texture file, and save it to a png using the tex converter - I get a file 512x 256, with my image roughly 67x48. Since there's two images, I they're spaced really far apart  - makes me think the power 2 was a bad idea  and I'll go back to autocroping layers.


  12. Here's some handy, free options to make images and get them into Spriter:

    Install GIMP http://www.gimp.org/

    Install a plugin to export each layer as a PNG: http://registry.gimp.org/node/28268

    Unzip it to "C:\Users\<username>\.gimp-<version>\plug-ins\export_layers.py"

     

    Open GIMP, and hit new.

    Make an image whatever size you want to work with (512x512 is plenty of space)

    Put each part on a unique layer. Since they're each on a layer, you can line everything up and be sure everything fits together

    Trim each layer using "Layer->Autocrop Layer"

    Go to "File->Export Layers...."

    Type "png" into the "File Format" box

    Chose "C:\Program Files (x86)\Steam\steamapps\common\dont_starve\mods\<your_mod>\anim_source\<prefab_name>"

    Hit "Export Layers"

    Use the defaults, hit "Export"

    Open Spriter.

    Use "New Project"

    Select your "anim_source/<prefab_name>"

    Animate in spriter!

     

    If you want to put your files in various places, I recommend making some .bat scripts to copy them from one space to the next so you can just click your way between each checkpoint

    xcopy /s "C:\<path>\<your_mod>" "C:\Program Files (x86)\Steam\steamapps\common\dont_starve\mods\<your_mod>\anim_source\<prefab>"

    You can also use command-line utilities; including halting if there's an error so you can read the problem. This script uses my (now unneeded) animation binary converter, takes the output (if there's no error) and zips the result (using the free 7z) and puts it into DontStarve's mod directory:

    cd C:\DontStarve\BinaryConverterDontStarveBinaryConverter.exe outputIF %ERRORLEVEL% NEQ 0 PAUSE7z a -tzip "C:\Program Files (x86)\Steam\steamapps\common\dont_starve\mods\binaryconverter_sample\anim\sampleanim.zip" "C:\DontStarve\BinaryConverter\output\*"IF %ERRORLEVEL% NEQ 0 PAUSE

    Anyway; hopefully all that comes in handy for anyone who wants to iterate quickly on all this, even though i can't test animations in the game itself. Yet :D

    • Like 1

  13. I've tried running the sampleprefab for the preview and it didn't seem to work.

    The individual image files got errors like:

    ERROR: Could not run 'C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\compilers\..\buildtools\windows\Python27\python.exe C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\compilers\compiler_scripts/image_build.py "C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\..\..\dont_starve\mods\sampleprefab/images\inventoryimages\myprefab.png"'!

    Might be due to the mix and match forward and back slashes.

     

    The animation didn't appear to get compiled either - when I removed the myprefab_build.zip it breaks on startup (missing asset) and removing all the files inside didn't work either.

    I tried manually compiling it, but got ERROR: Invalid number of arguments!

     

    As for the rest, this thread's got way too much math already - not stuff that'll help anyone use these tools! We could discuss elsewhere if you're still intent on digging into it... as far as I can help anyway.


  14. So I'm obviously not with klie, but I've looked at the binary files more than any sane person ought to, so i think I can answer some of those lingering questions...

     

    The build files are written as a series of 2 triangles, and each and every file I checked makes a square out of 6 vertices. They're tightly clustered around the build image where possible - I assume so they can pack more symbols into a single texture file. So if you wanted to draw over the original image using an existing build you can get cut off due to the boxes the build file uses even when the total texture file has miles of space. 

     

    Take for instance, seeds. The build file actually draws the seeds using 3 boxes - one from the bottom to top in the middle, and two smaller ones on each side (about 2/3rds the way up). The way it's laid out in the texture, though, has more space. The other detail in the build file is the center of an object. This might make sense if you watch the spriter intro video (see http://youtu.be/Y5PBw4aCVNQ) since he demonstrates putting a center of rotation in and then spinning.

     

    Animations use entire symbols - so those 3 boxes for a seed become a single square when the animation rotates it or moves it around (just how spriter treats your single image file). That image is then rotated, scaled and skewed around the center of the build and then translated in each frame.

     

    To my knowledge, nothing is  "planes" - that applies to 3D animation. This appears to be just rectangles copying from a file into memory, then skewing, scaling and translating that rectangle into the video buffer (all 2D operations, but probably using your computer's 3D capable video card). They get depth by sequencing operations - not because they're using a full 3D geometry.  

    As I recall, polyplanes do stuff like mapping a checkerboard unto a cylinder. That keeps it from looking stretched and off but it doesn't make sense for any work on a flat surface. I could be massively wrong - been a long time since I studied computer animation.


  15. By the way Simplex - I was wrong about the z depth controling what gets drawn first. I'm guessing that effects interaction (as does the other values around there). They might be relative to the character or what you can click on (maybe other animation effects?). Depth is based on the order of elements within a frame. Seems to be drawn in reverse order (e.g elements on the top are drawn last, bottom is drawn first).

     

    Should have played with it a bit more before guessing how it worked /:


  16. If you're puzzling out the file formats, there a few helpful links:

     

    The pipeline producing the files (and showcasing the format):

    http://forums.kleientertainment.com/index.php?/topic/18664-qusestion-animation-files-and-custom-characters/?hl=pipeline#entry176834

     

    A sample XML:

    http://forums.kleientertainment.com/index.php?/topic/21111-creating-an-anim-for-items-on-the-ground/#entry210493

     

    Granted, I spent time figuring out the raw binary before I saw those posts - not the easiest to find, even when I knew what i was looking for. But ti sure helped me name stuff in the text files.