ksaab

  • Content count

    72
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Everything posted by ksaab

  1. 3) Check out the forum, there is a pinned thread about them; 4) I offer variants to you. How you will implement dependng on your preferences. The last variant doesn't requie a client stategraph; 5) How do you use dodge without weapon? GetPointSpecialActions? Or key binding? How do you realize cooldown on the client side? You can remove my AddComponentAction if you don't need them.
  2. 3) Yes... busy tag doesn't sync... hmmm. Net variable? Anyway it's required if you want to add a cooldown for dodge. 4) Yep. But with this implementation you don't use client ctategraph at all. 5) You've lost sg — inst.sg:RemoveStateTag("busy")
  3. 2) Did you add data as second argument for onenter function? 3) AddComponentAction functions. 4) I suppose a fix for this problem requires a dirty hook. I don't have a good solution for it. Try to add inst.Physics:Teleport(inst.Transform:GetWorldPosition()) to pre state. 5) It should.
  4. 1) Yep. Busy tag should help. 2) Dodge direction should be handled in the "pre" state with data.pos if data and data.pos then inst:ForceFacePoint(data.pos.x, 0, data.pos.z) end 3) Add conditions to action collectors. Something like this: if not inst:HasTag("busy") then
  5. AddAction("DODGE", "Dodge", function(act) act.doer:PushEvent("letsdododge", {pos = act.pos or Vector3(act.target.Transform:GetWorldPosition())}) return true end) ACTIONS.DODGE.distance = math.huge ACTIONS.DODGE.instant = true AddStategraphEvent("wilson", EventHandler("letsdododge", function(inst, data) inst.sg:GoToState("dodge_pre", data) end) ) I think you want something like this — use dodge while player is moving. It's a bit dirty-tricky and looks weird on clients. But the second could be fixed I suppose. Client-stategraph doesn't need any code at all. Other things from the previous post. Dodge direction should be handled in the "pre" state with data.pos. One more thing — pos = act.pos will work incorrect after RoT release. Klei has changed this filed. Check out bufferedaction.lua after update. Two more thing — 0.25 widnow is too short. Clients with high unstable ping will have problems (I did a parry spell with 0.5 seconds window in The Forge Battle Pack and recieved a lot of complaints)
  6. AddStategraphState("wilson", State { name = "dodge_pre", tags = {"doing", "busy", "evade", "no_stun"}, onenter = function(inst) inst.components.locomotor:Stop() inst.AnimState:PlayAnimation("parry_pre", false) end, events = { EventHandler("animover", function(inst) inst.sg:GoToState("dodge") end), } }) AddStategraphState("wilson", State { name = "dodge", tags = {"doing", "evade", "no_stun", "nopredict", "nomorph",}, onenter = function(inst) inst.AnimState:PlayAnimation("parry_loop", true) inst.components.health:SetInvincible(true) inst.components.locomotor:EnableGroundSpeedMultiplier(true) inst.last_dodge_time = GLOBAL.GetTime() inst.Physics:SetMotorVel(-20,0,0) --this should be moved to the action code ----------------------------------------- if GLOBAL.TheNet:GetServerGameMode() == "lavaarena" then COMMON_FNS.DoFrontAOE(inst, 5, 0, 3.25, "strong", nil) inst:DoTaskInTime(0.5, function() COMMON_FNS.DoFrontAOE(inst, 5, 0, 3.25, "strong", nil) end) if inst.laserdodge ~= nil then inst.laserdodge:Cancel() inst.laserdodge = nil end end ----------------------------------------- inst.SoundEmitter:PlaySound("dontstarve_DLC003/characters/wheeler/slide") inst:PerformBufferedAction() --not the best idea --because of latency character will dash for shorter distance then you're expecting --will be much better to calculate target postion and use onupdate until character reaches it; --after fire your custom event and catch it in EventHandler("yourevent", function() place code from ontimeout end) inst.sg:SetTimeout(0.25) end, events = { EventHandler("animqueueover", function(inst) --this happens only after inst.AnimState:PlayAnimation("parry_pst", false) will be complete if inst.AnimState:AnimDone() then inst.sg:GoToState("idle") end end), }, ontimeout = function(inst) inst.Physics:SetMotorVel(0, 0, 0) inst.components.health:SetInvincible(false) inst.components.locomotor:EnableGroundSpeedMultiplier(false) inst.AnimState:PlayAnimation("parry_pst", false) end, onexit = function(inst) --need to double this code — case when we will leave the state before timeout inst.Physics:SetMotorVel(0, 0, 0) inst.components.health:SetInvincible(false) inst.components.locomotor:EnableGroundSpeedMultiplier(false) end, }) AddStategraphActionHandler("wilson", ActionHandler(ACTIONS.DODGE, "dodge_pre")) AddStategraphState("wilson_client", State { name = "dodge_pre", tags = {"doing", "busy", "evade", "no_stun"}, onenter = function(inst) inst.components.locomotor:Stop() inst.AnimState:PlayAnimation("parry_pre", false) inst.AnimState:PushAnimation("parry_loop", true) inst:PerformPreviewBufferedAction() inst.sg:SetTimeout(2) end, onupdate = function(inst) if inst:HasTag("doing") then if inst.entity:FlattenMovementPrediction() then inst.sg:GoToState("idle", "noanim") end elseif inst.bufferedaction == nil then inst.sg:GoToState("idle") end end, ontimeout = function(inst) inst:ClearBufferedAction() inst.sg:GoToState("idle") end, } ) AddStategraphActionHandler("wilson_client", ActionHandler(ACTIONS.DODGE, "dodge_pre")) --actions collectors, dodge will work with any equipped weapon. Not good but it's just an example --I'm not sure overriding onlocomote event handler is a good idea --check out the wortox prefab if you want use dodge like wortox's soul hop AddComponentAction("EQUIPPED", "weapon", function(inst, doer, target, actions, right) if right then table.insert(actions, ACTIONS.DODGE) end end) AddComponentAction("POINT", "weapon", function(inst, doer, pos, actions, right) if right then table.insert(actions, ACTIONS.DODGE) end end) don't forget to rename animation
  7. Your character moves after dodging because of inst.Physics:SetMotorVelOverride(20,0,0). Client draws fake position for character, but real doesn't change (actually it doesn't work at all). Any client state should contain animation and tag things only. AddStategraphState("wilson_client", State { name = "dodge", tags = {"busy", "evade", "no_stun"}, onenter = function(inst) inst.components.locomotor:Stop() inst.AnimState:PlayAnimation("slide_pre", false) --only pre animation, the slide animation command must come from server inst:PerformPreviewBufferedAction() --this thing says to server "hey man, I'm doing something" inst.sg:SetTimeout(2) end, --[[I use this chunk, but I don't have idea what it really does. Sometime state doesn't work without "onupdate". It requires "doing" tag for server and client states onupdate = function(inst) if inst:HasTag("doing") then if inst.entity:FlattenMovementPrediction() then inst.sg:GoToState("idle", "noanim") end elseif inst.bufferedaction == nil then inst.sg:GoToState("idle") end end, ]]-- --timeout happens only if player have a lag ontimeout = function(inst) inst:ClearBufferedAction() inst.sg:GoToState("idle") end, ) I think the second state is not requied for the client stategraph.
  8. There is "wilson_client" stategraph. The game uses it if lag compenstion is enabled on client (when you're playing as host without caves you are actually not a client and don't use this stategraph). It is almost the same but doesn't contain any game logic. The solution for the problem — you need to add lightweight versions of your states to "wilson_client".
  9. Custom Farming

    Version 1.2.0

    1,242 downloads

    Grow vegetables and fruits without a farm! How to do it? Create a hoe; Till the ground; Fertilize the soil; Plant a seed! It is possible to grow vanilla plants too! Cook new vegetables in a crockpot. New recipes: Bread (4 wheat); Fruit muffin (fruit, egg, wheat, honey) Tomato soup (2 tomato, veggies, no meat); Onion soup (2 onion, veggies, no meat); Meat soup (2 garlic, 1 additional veggie, 1 meat); Fish soup (2 potato, 2 fish); Pumpkin soup (pumpkin, 1 honey, wheat, no meat) Fruit pie (2 wheat, fruits, no meat) Vegetable pie (2 wheat, veggies, no meat) Meat pie (2 wheat, meat) Fish pie (2 wheat, fish) Sweet turnip (2 turnip, 2 honey, no meat) How to get new seeds? It's pretty simple — new vegetables can be grown from usual seeds. Also you can get specific seeds using a birdcage. Don't like the new farming system? Disable the hoe recipe and grow new vegs on usual farms. Steam links: Together, Single
  10. Green!

    Version 1.2.0

    555 downloads

    First: this mod doesn't have any gameplay content — it is the basis for other mods! Second: This mod is in development. Errors and issues are expected! Green! is a framework which improves magic in the game, adding a lot of roleplay features: Spells with skillshot-mechanic and cooldowns; Status effects (buffs and debuffs); Affixes (diablo-style modificators for items and creatures); More cool stuff like drinks, enchants, caster-creatures, etc. What can be done with this? The Forge-style weapon; Character with active spells (go away, boring passive perks!); Bleeding, deseases, poison and more dangerous (or useful) things; Spider-mages with meteors. Mods based on the Green!: Green World; The Forge Battle Pack. Steam vesrsion: here
  11. Version 1.0.3

    1,028 downloads

    First: TFBP features require the «Green!». Spells will not work without it! Second: This mod is in development — issues are expected! Do you miss you favorite weapon or suit from The Forge event*? Then this is what you need! Almost all weapons (no Lucy); All hats and helms; 5 types of armor/clothes. All spells and item bonuses are implemented *Fossil effect replaced by freezing. Items, which shares sprites with skins, were recolored. All recipes require Prestihatitator (first magic tier). Steam version: Here
  12. Custom Farming

    It's not a bug, I'm just too lazy to rename variables. Check ca_veggies.lua line 289
  13. Custom Farming

    No, basic farms and crops have different chances. When you change a weight for a crop, It does not impacts farms.
  14. Custom Farming

    Yeah, but I need to examine it first (never used it before) It has high chance to replace carrot or corn with a new vegetable for a usual farm. It doesn't affect other seed-products (well, I've broken vanilla chances in the last update, not critically, but late noticed) New farming is a weighted system now, so you can change a chance for any crop you want (not as an option, from the code only) Thanks for your feedback.
  15. Version 1.0.0

    73 downloads

    This mod can be used as a template for custom ground tiles for Don't Starve Together. I use it in the Green World. The main logic implemented in two files: tileadder.lua — provides two functions: AddTiles() and AddMinimap(); tiledescription.lua — contains parameteres for new tiles. Function AddTiles() should be called from the modworldgen.lua, function AddMinimap() should be called from the the modmain.lua. Ground ID is not required, the tile adder calculates it automatically; this provides high compability with any other custom tile mods. Turf prefab is also generated by the tile adder, but you need to set build/icon/anim/any other prefab data with AddPrefabPostInit() function in the modmain file. Five steps to add new tile: Pick the name for you tile; Place ground texture (resolution 512x512, name «noise_yourtilename») and minimap texture (resolution 256x256, name «mini_noise_yourtilename») in the «images/textures» folder; Add string «yourtilename = { }» to the tiledescription.lua file; Add AddPrefabPostInit() function to set inventory images for your tile; Test it! More information you can find in the tiledescription.lua file. As an example, two custom ground tiles (Jungle and Tech) are added.
  16. Green World

    It's not possible now, but I try to move all important staff to a standalone mod and make it compatible with single DS. There are not "impassable" tiles in the game. The game draws a blocker line between the ground and... non-ground during the world creation. But there is a small hack — you can remove the tile, rebake the map and place the tile back. Rebaking takes about 0.5-1 second for a medium-size world on i5 4.0GHz.
  17. Green World

    Version 1.3.6

    1,157 downloads

    First: GW features require the «Green!». Spells, effects, potions will not work without it! Second: This mod is in development — issues are expected! What"s interesting: New zone - Green Swamp; New creatures: lizardmens, green tentacles and green snakes; New objects on the map: marshberry bushes and Ancient Watcher; New magic weapons; Shorttime effects for characters and equipment; Elite creatures with random affixes; Magic potions; New boss and some new loot. Magic weapons Lightning Spear — deals electrical damage in a conus area; Amethyst axe — shatters the ground in front of caster, dealing damage; Tentacle staff — summons a poison cloud that damages everything inside it; Bonestaff — try to breathe life into inanimate objects... or challenge the new boss by animating the Pig Figure; Lava dart — deal damage from range, damage depends on range; Axe — Lucien — yes, it can be used as a throwing weapon; Doomhammer — pull the ghost hounds. Spell scrolls Crushing Wave — extinguish fires and freeze your enemies; Chain lightning — what could be easier than a chain lightning? Frost nova — catch your opponent in a cage of ice spikes; Meteorite — inflict damage on group of enemies; Tranquility — heal your wounds after a hard battle. Stylish caster set Wizard Coat — decreases cooldowns for spells and items; Wizard's Hat — increases damage and power of spell effects, also allows you to read scrolls even when taking damage. For some characters the base spell power is changed: Wigfrid — base spell power reduced by 35%; Wendy — base spell power increased by 20%; Maxwell — the base spell power increased by 20%; Winona — cooldowns decreased by 20%. Enchants Red glyph — weapon — vampirism, armor — movement speed; Yellow glyph — weapon — chance to unleash the chain lightning, armor — releasess lightnings to attackesr Blue glyph — weapon — shattered armor (target gets more damage from all sources), armor — toughness (you take less damage); Green glyph — weapon — applies a weakness effect on attacks, armor — poison immune; Potions Rejuvenation Potion — Restores health and sanity; Haste Potion — Increases movement speed; Firefly Potion — Shows the way in the darkness; Worker Potion — Work better, work harder; Resourcefulness Potion — Simplifies the crafting of items; Genius Potion — Crafting without prototypes; Evocation Potion — Boosts your spell power; Inspiration Potion — Boosts your physical damage; Armor Potion — If you constantly forget the armor; Antidot — Removes the poison effect and make invulnerable to it for a short time. Materials Green scales — can be obtained from lizardmen and green tentacles; A great soul can be obtained by solving the riddle of the Ancient Watcher or by defeating the new boss; Essences — can be obtained from elite creatures. New in the world Lizardmen cave — a home for lizardmens — day-time creatures, which can attack from a long range; Snake hole, a home for nocturnal creatures — green snakes; Green tentacles — they are almost like normal tentacles, but more dangerous, because they can attack you from a distance; Ancient Watcher is a statue, which ready to reward player, who will be able to solve its runic riddle; Marshberry — berry bushes, which grow only in the rain. Steam link: click
  18. Green World

    The world will be bigger. I think other mods do the same.
  19. Green World

    I thought about it and even tried to deal with Klei shaders, but I've failed. It's possible to add an option for colour change, but creatures will look a bit weird. Maybe I should ask for help with shaders. Yep. I reworked the spell and effect systems, and now can make affixes more "immersive". Thanks for the translation.
  20. Green World

    It's not difficult to write code for The Forge creatures. The Main problem is how to make new creatures lorefriendly and useful.
  21. Green World

    I think this was the last content update for GW. I don't know which direction to develop the mod — I don't have any feedback and ideas.
  22. Green World

    I wanted to do a small witch table for alchemy and enchanting stuff... but I'm too lazy to draw and animate it it will take a lot of time, I prefer to add new features instead.
  23. Green World

    Hey. Thanks, it's nice to see that someone likes it. Update will be soon, may be even this week (magic potions, reworked glyphs and some spells, pigmans-shamans with chain lightnings) Yeah, send it to me.
  24. Green World

    All new items can be crafted at the magic tab. New creatures dwell in the new biome.