Jump to content

Unable to get custom cookpot recipe to work


Recommended Posts

Link to tutorial http://forums.kleientertainment.com/topic/32910-tutorial-adding-recipes-to-the-crockpot/

 

My problem is strictly with the art asset.  The testfood works perfectly (thanks squeek).  But now I am trying to add my own.  It will show up in the cookpot fine but it is invisible on the ground.  What I did was simply modify the testfood scml (changing every ref to "testfood" to "myfood").  

 

The scml file is identical other than the label.  But when I add it to my mod the ground image is not there.  

 

If I use the testfood.zip that comes with the tutorial (no modifications) it works fine, I can replace the anim-0.tex and I have my custom food.  If I autocompile the testfood.scml it also fails in the same way.

 

Is there something wrong with the autocompiler when it comes to cookpot foods?  Do I need to have another idle animation?

 

myFood.scml

<?xml version="1.0" encoding="UTF-8"?>
<spriter_data scml_version="1.0" generator="BrashMonkey Spriter" generator_version="b5">
    <folder id="0" name="myFood">
        <file id="0" name="myFood/base.png" width="128" height="128" pivot_x="0" pivot_y="1"/>
    </folder>
    <entity id="0" name="myFood">
        <animation id="0" name="idle" length="1000">
            <mainline>
                <key id="0">
                    <object_ref id="0" name="base" folder="0" file="0" abs_x="0" abs_y="0" abs_pivot_x="0" abs_pivot_y="1" abs_angle="0" abs_scale_x="1" abs_scale_y="1" abs_a="1" timeline="0" key="0" z_index="0"/>
                </key>
            </mainline>
            <timeline id="0" name="base">
                <key id="0" spin="0">
                    <object folder="0" file="0" angle="0"/>
                </key>
            </timeline>
        </animation>
    </entity>
</spriter_data>

 

Spriter Pic

zwb0Oh4.png

Link to comment
Share on other sites

Did you change the name of the item to myFood in the prefab file?

 

    inst.AnimState:SetBank("myfood")
    inst.AnimState:SetBuild("myfood")
    inst.AnimState:PlayAnimation("idle")

 

Like so?  I think I had a similar issue, and I'd missed editing the prefab.

Link to comment
Share on other sites

Thank you ColeenMcCleod yes I did.  I solved it through some strange workaround. Although I have no clue as to how this works...

 

I had to include 2 Assets (myfood and testfood from the tutorial):

local assets=
{
    Asset("ANIM", "anim/myfood.zip"),                   -- Cookpot Image
    Asset("ANIM", "anim/testfood.zip"),                 -- Ground Image
}

 

Then set the AnimState to testfood like so:

inst.AnimState:SetBank("testfood")
inst.AnimState:SetBuild("testfood")
inst.AnimState:PlayAnimation("idle")
 
It uses the testfood.zip as the ground Anim and myfood as the cookpot Anim

 

Link to comment
Share on other sites

I'm glad you got it to work, but I was wondering if you might have some advice on a problem I am having.

 

http://forums.kleientertainment.com/topic/40592-off-center-graphics/#entry533966

 

in a nutshell, the anim graphics look correct on the ground, and they show up in the crock pot,

but they are off-center (only in the crock pot). - Ive tried rebuilding the anim files several times,

but it continues happening. The odd thing is I didn't have this problem the first time, but I was

trying to update the images with slightly better artwork, and now I cant get it to work correctly.

 

Thanks for any advice.

 

Link to comment
Share on other sites

I'm having the same problem myself with Camp Cuisine.  It seems to effect crops growing on farm plots as well, and started after the last update (as far as I can tell).  Not sure what's causing it, and I haven't been able to fix it either.

 

Well that sucks.

If I find something out I will let you know.

Link to comment
Share on other sites

I'm having the same problem myself with Camp Cuisine.  It seems to effect crops growing on farm plots as well, and started after the last update (as far as I can tell).  Not sure what's causing it, and I haven't been able to fix it either.

I was logging on today to pass on the solution, but I saw you already read it.

 

Good luck in your mod

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