• Content count

  • Joined

  • Last visited

Community Reputation

143 Excellent

1 Follower

About Zarklord

  • Rank

Recent Profile Visitors

493 profile views
  1. Disease Mechanics.

    THIS. but yeah, digging and replanting something should hardly be the solution, especially if you have a large field of stuff, it could take awhile to find it all, some sort of item, that you could "spray" on all the diseasable plants to prevent disease for x amount of days, rather than having to examine/harvest them all to find which ones are in the warning phase, would seem better.
  2. Disease Mechanics.

    It not existing. In all seriousness, I'm really not sure, game mechanics need to be a balance of realism and fun, and I don't feel like this mechanic is any good without serious overhauls.
  3. All settings are based off of default world settings. Try disease: it takes 30-70 days for any diseasable entity to "start diseasing" Start diseasing: There is a 10 percent chance of actually becoming diseased, if it fails this check, it goes back to try disease. If its asleep(not loaded by the game currently), it doesn't become diseased, but redoes the try disease with a 1-5 day(instead of the 30-70 day) delay(this also causes the disease chance check to be re rolled). If it passed all previous checks, its in the warning phase, which is 4-6 days long, after those 4-6 days, it becomes diseased. Warning phase: Once a single entity gets into the warning phase, it does a series of checks, for other diseasable entities. The first check is finding other diseasable entities inside the DISEASE_SPREAD_RADIUS(which is 4(4 in a straight line is one whole game tiles width or height), for comparison the ice flingomatics range is 15). If it finds at least one other diseasable entity inside that range, it does a second range check of DISEASE_SPREAD_RADIUS * 2(8). If there are more diseasable entities inside this second check than the first check, it does a third range check of DISEASE_SPREAD_RADIUS*3(12). Lastly for every entity inside the aforementioned check(whichever check had the most diseasable entities), it resets to the try disease phase(the 30-70 days) for each diseasable entity that was in the check. Once an entity is diseased: Every 1.5-2.5 days, it spreads, finding the closest entity inside the DISEASE_SPREAD_RADIUS. If the 1.5-2.5 day timer ends, and its asleep(not loaded by the game currently) it restarts the spread timer(1.5-2.5 days). Transplanting: Every time you transplant(dig up from somewhere then replant somewhere) a diseasable entity, it restarts the spread timers(1.5-2.5 days) of every entity inside the DISEASE_SPREAD_RADIUS. Other settings(on the world gen menu): The try disease(what was 30-70 days) is the only thing that changes: Random: 10-90 days. Long: 60-100 days. Short: 20-40 days. Final notes: Entities generated by the world, are not diseasable, even via spreading. Disease sucks, its a stupid mechanic with nothing interesting, heck even its prevention is boring.
  4. by doing any form of movement to enter the row_start or sail_start states in the SGwilsonboating.lua stategraph, and then canceling entering the row or sail states by doing an action(eating is the easiest), your momentum will never really stop(see the gif below) and you'll float along the water. And lastly, doing anything causing you to enter any state besides "row", "sail", "row_stop", "sail_stop", "dismount", or "doshortaction", from the state "row"(again, eating is easiest), will cause any items that listen to the "startrowing"+"stoprowing"(for instance, torches listen to that.) to not always get the "stoprowing" event, and therefore you can have equipped items, that are inactive, with your only way to fix the behavior is unequipping and reequipping the affected item.(I think for the "startsailing"+"stopsailing" events the same would be true, but nothing uses those...)
  5. to add onto that, if you use dedicated servers, you can launch as many shards(thats what each individual area is called by the game) so that you could have more worlds to do stuff with. but the engine side is hard-capped by two shards.
  6. Broken Autocompiler

    Something not many people know(from who I have talked to), is that technically the time between keyframes doesn't actually matter, the compiler reads each keyframe, as one actual frame ingame. I say technically, because the auto-compiler is still stupid, and messes up for bizarre reasons.
  7. it offers more flexibility, and works better with other mods...
  8. local params = {} params.equip_pack = { widget = { slotpos = {}, animbank = "ui_piggyback_2x6", animbuild = "ui_piggyback_2x6", pos = Vector3(-5, -50, 0), }, issidewidget = true, type = "pack", } for y = 0, 5 do table.insert(params.equip_pack.widget.slotpos, Vector3(-162, -75 * y + 170, 0)) table.insert(params.equip_pack.widget.slotpos, Vector3(-162 + 75, -75 * y + 170, 0)) end local containers = require("containers") local oldwidgetsetup = containers.widgetsetup function containers.widgetsetup(container, prefab, data, ...) local t = data or params[prefab or container.inst.prefab] if t ~= nil then for k, v in pairs(t) do container[k] = v end container:SetNumSlots(container.widget.slotpos ~= nil and #container.widget.slotpos or 0) return end return oldwidgetsetup(container, prefab, data, ...) end
  9. in order to change something like that, you need to create a custom container widget to edit that, otherwise its set to be read only(so you cant edit the variable) if you really want to do it without container widgets you can (cheatily) do this: if not TheWorld.ismastersim then function inst.OnEntityReplicated(inst) --this gets called after every inst.replica, got initialized, and we need the variable changed for clients. inst.replica.containers.acceptsstacks = false end end inst:AddComponent("container") inst.components.container:WidgetSetup("WHATEVERYOUHADHERE") removesetter(inst.components.container, "acceptsstacks") --remove the read only property(please only do this if you really cant do it through widget setup) inst.components.containers.acceptsstacks = false makereadonly(inst.components.container, "acceptsstacks") --reapply read only inst.replica.containers.acceptsstacks = false
  10. I got participator :'(

    they are on the hall of fame, so it did happen.
  11. thanks so much, we really need a central place for data like this, as this will quickly get lost in shuffle, sad we dont have a coding wiki
  12. Forge Health Tracker

    I introduce my newest mod! The Forge Health Tracker! It uses revolutionary technology to send your damage done to other mobs to the other clients, forming a health tracker, when all clients run this mod! This requires all clients to run this mod for it to work, but when you do its delicious! credits to the following mods for there wonderful GUI stuff: Simple Health Bars DST by DYC Epic Boss Healthbars by Tykvesh
  13. while that might be true in most(or all?) cases, at this point you have unnecessary code, creating less maintable(and therefore) buggy code sine your now duplicating LOADS of code in playercontroller.lua, meaning you still have a big issue with how its written.
  14. your mostly correct, but the thing is, if movement prediction is on, extra delay is added, as the RPC is sent when preview_cb is called rather than immediately, this creates extra delay when no real purpose for extra delay exists for it. again, mostly right except extra delay is added for all send RPC's when its on vs off. IE off = 2*ping on = delay + (2*ping)
  15. components/playercontroller.lua @ ln 602-611 is a perfect example of what I'm talking about if movement prediction is off(self.locomotor == nil) it sends the RPC instantly else, the RPC is sent when preview_cb is called, rather than immediately. if self.locomotor == nil then self.remote_controls[CONTROL_CONTROLLER_ACTION] = 0 SendRPCToServer(RPC.ControllerActionButtonDeploy, obj, act.pos.x, act.pos.z, act.rotation ~= 0 and act.rotation or nil) elseif self:CanLocomote() then act.preview_cb = function() self.remote_controls[CONTROL_CONTROLLER_ACTION] = 0 local isreleased = not TheInput:IsControlPressed(CONTROL_CONTROLLER_ACTION) SendRPCToServer(RPC.ControllerActionButtonDeploy, obj, act.pos.x, act.pos.z, act.rotation ~= 0 and act.rotation or nil, isreleased) end end