Modding Help Make pets like certain food

Discussion in 'Starbound Modding' started by kaetzer, Aug 23, 2016.

  1. kaetzer

    kaetzer Scruffy Nerf-Herder

    hello everyone

    i was wondering if you could help me. namely i'm trying to make a pet food mod, and it works well so far except my cat hates it :nurusad:
    is there a way to make pets like certain kinds of food? i looked at the pet behavior .lua-script and noticed the variable "foodliking", but i'm pretty clueless when it comes to scripting...

    greetings
    kaetzer
     
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    The way it works is anytime a pet see's an object - it runs a random number generator - then based on the result decides if it likes ir not.
    Then adds the value to their table.

    So to force something to like it - only way would be to directly input a value - which is not worth it unless you learn lua.
    With that said - a nice place to learn basics of lua - http://www.phailed.me/2011/02/learn-lua-the-hard-way-1/
     
  3. kaetzer

    kaetzer Scruffy Nerf-Herder

    damn... but thank you very much for the info

    "learn lua the hard way" well, that sure sounds reassuring xD
     
  4. The | Suit

    The | Suit Agent S. Forum Moderator

    The name is because after each exercise he asks you to experiment on different things on your own.
    This teaches you what errors happen when you make different kind of mistakes.

    As well teaches you what you can do and what you can't do.
     

Share This Page