Results 1 to 7 of 7

Thread: Adding cows

  1. #1
    Scavenger
    Join Date
    Mar 2018
    Posts
    35
    Rep Power
    0

    Adding cows

    I am trying to add a cow to my mod I have downloaded one from turbosquid that is animated it looks like the one that starvation used but once I try to spawn the cow I get an error saying object has no reference.


    <entity_class name="animalCow" extends="animalTemplateTimid">
    <property name="HasRagdoll" value="true" />
    <property name="Mesh" value="#Animals?Cow" />
    <property name="ModelType" value="Standard" />
    <property name="Prefab" value="NPC" />
    <property name="Parent" value="Animals" />
    <property name="AvatarController" value="GameObjectAnimalAnimation" />
    <property name="Weight" value="70" />
    <property name="RotateToGround" value="true" />
    <property name="IsEntityAnimal" value="true" />
    <property name="PhysicsBody" value="Stag" />
    <property name="Faction" value="animals" />
    <property name="CanClimbLadders" value="false" />
    <property name="MaxHealth" value="50" />
    <property name="MaxViewAngle" value="180" />
    <property name="WanderSpeed" value="0.7" />
    <property name="PanicSpeed" value="2.0" />
    <property name="SurfaceCategory" value="organic" />
    <property name="ParticleOnDeath" value="blood_death" />
    <property name="SoundHurt" value="Animals/stagpain" />
    <property name="SoundDeath" value="Animals/stagdeath" />
    <property name="TimeStayAfterDeath" value="300" />
    <property name="IsEnemyEntity" value="false" />
    <property name="ExperienceGain" value="327" />
    <property name="HasRagdoll" value="true" />
    <drop event="Harvest" name="rawMeat" tool_category="Butcher" count="6" />
    <drop event="Harvest" name="animalHide" tool_category="Butcher" count="9" />
    <drop event="Harvest" name="animalFat" tool_category="Butcher" count="4" />
    <drop event="Harvest" name="femur" tool_category="Butcher" count="2" />
    </entity_class>

    Actual error is NullReferenceException: Object not set to an instance of an object
    Last edited by tivial01; 3 Weeks Ago at 04:06 AM.

  2. #2
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,778
    Rep Power
    1
    There's a lot more information needed.

    Are you using sdx?
    Is the model in a .unity3d file in the Mods/SDX/Resources folder?
    Is the model in the right format for 7days?
    Have you followed the SDX tutorials for adding a new entity?

    The AvatarController probably wont work with a downloaded model.

    What is the log file error message because the in game one is useless for actually finding the error.

    Also, this is not the best forum section for asking these sort of questions. Better to place it in the sdx section
    Last edited by StompyNZ; 3 Weeks Ago at 06:00 AM.

  3. #3
    Scavenger
    Join Date
    Mar 2018
    Posts
    35
    Rep Power
    0
    i am using the sdx moded csharp but not actually using sdx to build the mods i am adding them manually

    yes the model is a .unity3d

    i am not sure what the right format for 7dtd is

    if I remove the avatar will it break the model?

    this is the error in the output

    yes I followed the SDX tut on adding the goblin

    (Filename: Line: -1)

    NullReferenceException: Object reference not set to an instance of an object
    at GameObjectAnimalAnimation.IsAnimationAttackPlaying () [0x00000] in <filename unknown>:0
    at EntityAlive.get_RightArmAnimationAttack () [0x00000] in <filename unknown>:0
    at NetPackagePlayerStats..ctor (.EntityAlive _entity) [0x00000] in <filename unknown>:0
    at NetEntityDistributionEntry.updatePlayerList (System.Collections.Generic.List`1 _playerList) [0x00000] in <filename unknown>:0
    at NetEntityDistribution.OnUpdateEntities () [0x00000] in <filename unknown>:0
    at GameManager.JQ () [0x00000] in <filename unknown>:0
    at GameManager.Update () [0x00000] in <filename unknown>:0
    Last edited by tivial01; 3 Weeks Ago at 06:39 AM.

  4. #4
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,778
    Rep Power
    1
    I'm no expert on it, but all the stuff I'm using includes the AnimationSDX mod which allows you to animate imported models.

    It has this:
    <property name="AvatarController" value="AnimationSDX, Mods" />

    The ', Mods' is important as it tells the game to load the class from the mods.dll

    https://7d2dsdx.github.io/Tutorials/ has a great set of tutorials to help you, especially the 'How to set up the animated custom entity' under the howtos

  5. #5
    Scavenger
    Join Date
    Mar 2018
    Posts
    35
    Rep Power
    0
    Thx Ill check it out

  6. #6
    Guppycurian Forum Whore Guppycur's Avatar
    Join Date
    Apr 2014
    Location
    Houston-ish, Texas
    Posts
    17,398
    Rep Power
    1
    Yeh you def want that animationSDX mod.

  7. #7
    Scavenger
    Join Date
    Mar 2018
    Posts
    35
    Rep Power
    0
    I got the animationSDX but it's still not working
    Update: Checking if any animations are playing

    (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

    is NOT Valid
    Last edited by tivial01; 3 Weeks Ago at 06:33 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •