Jump to content

RobertJohnson

The Indie Stone
  • Posts

    3056
  • Joined

  • Last visited

Community Answers

  1. RobertJohnson's post in What are the code names for skills? was marked as the answer   
    Some are passiv or "Parent" skill (so here to group other skills), but here's the list!
  2. RobertJohnson's post in What are the code names for skills? was marked as the answer   
    Some are passiv or "Parent" skill (so here to group other skills), but here's the list!
  3. RobertJohnson's post in Understanding Farming was marked as the answer   
    timeToGrow: ingame hours for one phase? Yup, it can be delayed by lack of water, disease, etc.
    minVeg : Minimum vegetables from the plant for 50 health on harvest
    maxVeg : Maximum vegetables from the plant for 50 health on harvest
    minVegAutorized/maxVegAutorized : You can have more vegetables depending on the health of the plant at the end phase, this will caps it, for example the brocolli will give you 2 to 4, if the health plant is 100, it'll give you like x3, so let's take 4x3 = 12, we'll caps it to 8 (to not be too OP)
    seedPerVeg : seeds you'll have per vegetables
  4. RobertJohnson's post in Items was marked as the answer   
    Rolls mean we'll roll X times to spawn the items in the list.
     
    "All" is the container type, Fridge mean you spawning this item only for the fridge in that room, "All" mean will always spawn those item, no matter the container type, and "other" mean for every other container type, liek if you forgot to add a fridge distributor, or if you have for example lot of container type (example : you have the room tooltore_storage, no matter the container type like shelves or crate, you'll always spawn this items)
  5. RobertJohnson's post in Log in as admin was marked as the answer   
    Login as user = admin ; password = password you entered
  6. RobertJohnson's post in Strange Admin UI was marked as the answer   
    Press 'n' to disable/enable this, it's what we use sometimes (you can also try F2 and F11, very usefull tools.. )
  7. RobertJohnson's post in Is there a way to quickly reload my mod? was marked as the answer   
    You can use the debug mod (add a -debug in the .bat), and then just press F11 in game to bring the lua debugger, there you can reload your file within the game
  8. RobertJohnson's post in Can't add items as Admin was marked as the answer   
    Capital letters
     
    /additem Base.Axe
     
    Check the items.txt/newitems.txt
  9. RobertJohnson's post in Logging in as admin (build 25 beta) was marked as the answer   
    Just found the bug, if the .db file doesn't exist I create an admin/admin account by default, instead of adding a prompt to get the password...
     
    So just log as admin/admin and do a /changepwd admin yournewpwd, it'll be fixed for the next build
  10. RobertJohnson's post in How do I join fences? was marked as the answer   
    You should also have fence pillar to connect them when you make corner.. If I forgot that, just tell me, sorry
     
    Try to rotate the building ("r" key by default)
  11. RobertJohnson's post in ISBaseTimedAction:update() was marked as the answer   
    Don't go for a loop with the gamespeed, just multiply the number with the gamespeed (or / depending...)
  12. RobertJohnson's post in Start spawns in newest Steam build (West Point) was marked as the answer   
    We don't changed the coordinates, we just added a +25/+25 x/y to Muldraugh and +15/+25 for WP
  13. RobertJohnson's post in Help! is this because of code change or is the mod loader broken? was marked as the answer   
    Hello,
     
    So, couple of things.
     
    The modData is a table, not an object (tho a table is an object.. Erm wait ), mean we only save modData["stuff"] and not modData.stuff.
     
    Then, you used "HasBanjoCheatersLoadoutItems" at first, but your test to spawn item is : if(playerData.HasBanjoStarterItemsCheat == "false") then
    So it should be : if(playerData["HasBanjoCheatersLoadoutItems"] == "false") then
    Because it's not the same variable you used (HasBanjoCheatersLoadoutItems/HasBanjoStarterItemsCheat), and it's a table (the ["stuff"] thingy).
     
    Also, there is an event specially for new game only : OnNewGame, use it instead of your trick
     
    Because i'm a fun guy, here's the code fixed (but you really should use OnNewGame ) :
     

    Spoiler BanjoCheatersLoadout = {}

    BanjoCheatersLoadout.GiveCheatersLoadoutItems = function()
        local player = getSpecificPlayer(0);
        local playerData = player:getModData();
        playerData["HasBanjoCheatersLoadoutItems"] = playerData["HasBanjoCheatersLoadoutItems"] or "false";

        if(playerData["HasBanjoCheatersLoadoutItems"] == "false") then
            player:getInventory():AddItem("Base.Axe");
            player:getInventory():AddItem("Base.Hammer");
            player:getInventory():AddItem("Base.Saw");
            player:getInventory():AddItem("Base.Screwdriver");
            player:getInventory():AddItem("Base.Torch");
            player:getInventory():AddItem("Base.Battery");
            player:getInventory():AddItem("Base.TinOpener");
            player:getInventory():AddItem("Base.Lighter");
            player:getInventory():AddItem("camping.CampingTentKit");
            player:getInventory():AddItem("Base.BathTowel");
            player:getInventory():AddItem("Base.WaterBottleFull");
            player:getInventory():AddItem("Base.WaterBottleFull");
            player:getInventory():AddItem("Base.TinnedSoup");
            player:getInventory():AddItem("Base.TinnedSoup");
            player:getInventory():AddItem("Base.TinnedSoup");
            player:getInventory():AddItem("Base.Nails");
            player:getInventory():AddItem("Base.Nails");
            player:getInventory():AddItem("Base.Nails");
            player:getInventory():AddItem("Base.Nails");
            player:getInventory():AddItem("Base.Sheet");
            player:getInventory():AddItem("Base.Sheet");
            player:getInventory():AddItem("Base.Sheet");
            player:getInventory():AddItem("Base.ShotgunSawnoff");
            player:getInventory():AddItem("Base.ShotgunShells");
            player:getInventory():AddItem("Base.ShotgunShells");
            player:getInventory():AddItem("Base.ShotgunShells");
            player:getInventory():AddItem("Base.BigHikingBag");
            player:getInventory():AddItem("Base.Duffelbag");
            playerData["HasBanjoCheatersLoadoutItems"] = "true";
        end

    end

    Events.OnGameStart.Add(BanjoCheatersLoadout.GiveCheatersLoadoutItems);

     
    Don't hesitate to add "print" function everywhere to check if your mod is loaded, to debug the variables you use, etc.
    Also, press F11 (default key) to bring the lua debugger add break point, it's really helpfull to see what's wrong
     
    Cheers !
  14. RobertJohnson's post in Where is the character traits file? was marked as the answer   
    The existing traits/professions are in lua/NPCs/MainCreationMethod.lua
  15. RobertJohnson's post in API of classes and methods accessible via lua scripts ? was marked as the answer   
    Hey, there is the list of all java clas exposed to lua :
     



     
    For the funcion, check the java doc
  16. RobertJohnson's post in global function getText() was marked as the answer   
    Hellow,
     
    It's a java function (global one) to call the translator.
     
    You can see in the translation files in lua/Translate/ or on this forum.
     
    As for textures, erm, I'm sorry but I don't really see what you mean
  17. RobertJohnson's post in Adding a new "rip bandages" recipe was marked as the answer   
    Hey,
     
    Add a :
     
    destroy DishCloth
  18. RobertJohnson's post in How are clothing colours defined? (help with my profession outfit mod) was marked as the answer   
    Heya,
     
    I just added the setters and getters for the Color in inventoryItem :
    setColor(Color) getColor()  
    So, you can do stuff like that :
    local topColor = ColorInfo.new(0.1725,0.2745,0.5411,1);local vest = getPlayer():getInventory():AddItem("Base.Vest");vest:setColor(topColor:toColor());For the color, it's from 0 to 1, just like 0 to 255, so if I want to do 120 in R, I just need to do 120/255 = 0.47, and if you want to know the color we used, just multiply the numbers by 255
     
    Hope it's clear !
  19. RobertJohnson's post in Where can I find the recipes for carpentry? was marked as the answer   
    Hello
     
    I already added this feature, for the debugging/testing purpose, just go in media/lua/BuildingObjects/ISUI/ and open ISBuildMenu.lua, search for ISBuildMenu.cheat = false; and replace the "false" by "true" and enjoy !
  20. RobertJohnson's post in Where Do I Find LUA Code For How To Cause Rotton Food? was marked as the answer   
    It's not Lua related, check the item.txt in media/script/
     
    You have a dayTotallyFresh and dayTotallyRotten IIRC.
     
    After the fresh date, the food become less nutritive, but no risk of disease.
    And rotten, it's less nutritive AND a risk of become sick
  21. RobertJohnson's post in Adding a Moodle / Indentifying a Water Source was marked as the answer   
    Hey, check the ISWorldObjectContextMenu.canStoreWater function in media/lua/ISUI/ISWorldObjectContextMenu.lua, it'll do the trick. (just pass it your object and the function will give you the result)
  22. RobertJohnson's post in LUA Validators was marked as the answer   
    The Indie Stone recommend : IntelliJIdea !
     
    I really don't like the package/hierarchy representation, but it helps a lot to avoid those little mistake (forget to put an end, etc.), also it detect nil reference, etc...
     
    But you'll see, after a while you won't make that kind of error anymore
  23. RobertJohnson's post in How do you Check your Version for Project Zomboid? was marked as the answer   
    Hey,
     
    In the next version (2.9.9.11), you'll have the verison number on the main screen, will be helpfull
×
×
  • Create New...