Jump to content

[Character Mod] [WIP] Wog'Maw, the Mouth of the Abyss


Recommended Posts

fziF7JJ.png

9i8LBLM.jpg

TwEv8eA.jpg

OxvuOMW.jpg

p0nDmy7.gif

Character 1.0.8 release! Steam workshop page: https://steamcommunity.com/sharedfiles/filedetails/?id=497091310

 

Character mod Wog'Maw for Don't Starve Together. Character art and design modified from Kog'Maw of League of Legends.

Health: 75
Hunger: 1000
Sanity: 125

Perk 1: Ranged Attack 
Perk 2: Likes all food and isn't picky 
Perk 3: Always hungry

With or without a weapon in hand, Wog'Maw can perform a ranged attack. Weapons will upgrade the damage they deal.

Wog'Maw can eat all types of food with no penalty. It gains a small sanity boost from raw meat, can eat monster food, and even doesn't care about spoilage.

Wog'Maw has an insatiable hunger, however. Its hunger drain is 4 times the default amount. 

Various other tweaks are included, such as increased sanity drain from monsters, reduced Krampus spawn rate, and a secret bonus if you manage to fill Wog'Maw's stomach!

Please let me know of any crashes, errors, or mod compatability issues.

Big thanks to DarkXero and ZupaleX for help coding!

Time to feast!

 

I appreciate any feedback!

 

----------------------------CHANGELOG:

 

8/10/15 - 1.0.6 - Initial release following hotfixes

 

8/11/15 - 1.0.8 - Updated character portrait

 

8/12/15 - 1.1.0 - Bugfix with rapid fire at flying birds 
-fixed crash for launching projectile "nil" target 
-base hunger rate increased to 4x default 
-attack speed lowered - no more ranged stun-lock 
-diminishing returns on bonus damage from equipped weapons 
-special functionality given to ham bat! 
-removed extra night sanity drain, increased sanity drain from nearby monsters

 
8/12/15 - 1.1.1 - Bugfix with rapid fire at burrowing moleworms
 
8/17/15 - 1.1.2 - Diminishing returns on weapon damage buffed up - full damage with spears now 
-Krampus slightly more difficult to spawn now 
-Hunger rate lowered slightly 

 

Possible future changes:

More skin colors, add to configuration options?

Projectile size scaling with damage

"quickeat" override when eating raw meat 

Fix glitch with rapid fire projectile against tentacle and birchnuts going underground

Improve attack animation - body_swap and head_swap items slightly to moderately out of correct position

Custom sound file

 

 

EDIT 1: 
Scriped an attack animation in Spriter, here's a preview (he shoots spit from his tongue)9UlTxgN.gif

That's two attacks in a row, in case you're wondering. Just have to get the animation to replace the standard attacks. Not 100% sure how, but I can probably manage.

 

I also have a simple workaround for ranged attacks (Thanks DarkXero!). I have his diet all squared away too. Just need to tweak his hunger rate and rate change due to high hunger values.

My preliminary test was informative. Seems like something like 5 times hunger drain wouldn't be unreasonable, since all those birds and rabbits do give a bunch of food. Unforseen side-effect though, I spawned two Krampus within two days gathering my bird/rabbit meat. I don't mind the extra intrusions, but it'd unbalance farming his sack. So I think I'll half the drop rate on the sack.

Hmm I should take some in-game shots to post as well...

 

EDIT 2: A default hunger rate of 3 times Wilson (225 calories per day) seems to be a good amount. He receives full hunger value from raw meat, any spoiled food, and monster meat. Even without having to worry about cooking, it can be pretty tough keeping him fed. Just what I wanted :grin: Additionally, higher hunger levels increase his hunger rate, going up to 4* at 40% stomach, up to 5* at 80%. Since I needed to add in some benefit for having a full stomach, but keep it so he can never be full, if you manage to get 100% stomach, he'll instantly convert 80% of his hunger into a permanent 7 HP boost to max HP. This drops you back down to 20% hunger. I don't forsee it needing a limit since it seems pretty difficult to achieve, you'd have to have a nice meaty stew factory to really abuse it. A reasonable limit would be 200 max HP, which would require filling his stomach 18 times. I figure, more power to you. Those extremely long runs tend to make you pretty OP anyway. I'll test it out.

 

Also since I thought it was fun, at 60% and higher fullness, he gives off a slight glow. It seems *any* amount of light makes him immune to the night monster, but I didn't think that was such a big deal either. His light radius is miniscule, so it's not like you can do anything besides not die being out in the dark.

 

Still have the problems with Naughtiness. The neither the forums nor code for Krampus/rabbits/etc tell me anything about naughtiness, other than it being a value stored on the server, not client-side. It's not something that breaks my mod, per-se, but it does add both an unwanted annoyance and an unbalance.

Also unable to get the above animation to show for attacks, but I am getting the basic attack to be replaced with a blank character, so that's a start. Any help in those two areas would be awesome!

 

EDIT 3: Max health capped at 200 from increasing it through getting a full stomach. Found a slightly janky workaround for the increased Krampus spawning by setting 

TUNING.KRAMPUS_NAUGHTINESS_DECAY_PERIOD = TUNING.KRAMPUS_NAUGHTINESS_DECAY_PERIOD * 0.25

This means the spawning threshold is still the same, but decays 4 times faster, meaning instead of losing 8 naughtiness per day, you lose 32. Unfortunately, this means that this applies to all players on the server, meaning it's nigh-impossible for a non-Wog'Maw to summon the krampus by any means other than killing Glommer. But assuming there's an active Wog'Maw playing on the server, it should be possible to summon him accidentally by killing too many rabbits, and certainly possible if you do it on purpose.

 

Also, I determined he needed increased sanity drain, since his ranged attacks reduce combat sanity drain significantly. I played using +50% night drain and +100% negative aura drain, but that wound up being just a little too much, going +20% night drain and +100% negative aura drain. Also gave eating raw meat give a +2 sanity increase, meaning there is some choice involved with cooking or not. Raw meat gives a little sanity, cooked meat gives a little health, but both give the same hunger.

Edited by StarmanUltra
Link to comment
Share on other sites

I guess I should have clarified a little. The 1000 hunger is a gimmick. Since high hunger values will drain much more quickly than low values, his hunger will always be on the low end, and getting full is impossible. All-in-all, his regular hunger needs will be double or triple of Wilson, and he won't be able to "stockpile" food since it'll disappear quickly.

Link to comment
Share on other sites

I'm having a very hard time replacing his attack animation. So far, he goes blank upon attacking and until moving again, at which time his sprite shows back up. I created a custom animation (seen above) using the character template in Spriter and named the file player_attacks.scml. Beyond that, I'm not sure where to go. Obviously it's trying to replace the animation, but nothing is showing up in-game. I'm guessing a factor is the animation name itself "template - BUILD_PLAYER_ATTACKS" (for the entity - animation) doesn't work. I have most of the rest of the mod worked out, so this is really the thing holding me back from a 1.0 release. 

Link to comment
Share on other sites

Still showing up blank. I think the forum user Zupalex is going to upload their .scml files, but if you have the time, maybe you can just look at how I have things set up. My animation stuff is pretty messy right now because I've tried several different things (such as having a separate folder in exported for the attack animation, as well as renaming it to "rangedattack". I've also been unable to intercept the attack command by listening for it via
 

 

inst:ListenForEvent("doattack", RangedAttack)

 
Thank you in advance for any help you can and have provided, this animation stuff is *not* straight-forward in Don't Starve.  :grin:

 

EDIT: Sooo it took me nearly a full week to get animations to actually *show up in game*. Geez, the documentation is far from sufficient... Turns out, the entity in spriter and the assignments within the .lua scripts need to give the animation to "wilson" even though they're specifically for my character "wogmaw"... I guess since the mod character replaces Wilson's stuff, you give it to Wilson first. But holy crap I was wracking my brain for days trying to get this working. Now I need to tweak the animations for atk_pre vs atk, etc. But yeah, animations are in! I'm psyched! Getting pretty close to a 1.0 release.

Edited by StarmanUltra
Link to comment
Share on other sites

I'm running into an issue where my projectile prefab is causing a crash due to inventoryitem_replica calling the following function:

 

function InventoryItem:GetImage()    return self.classified ~= nil and        self.classified.image:value() ~= 0 and        self.classified.image:value() or        (self.inst.prefab..".tex")end

The crash happens because it can't load in the .tex file (which I set up). I can use the console to spawn it in my inventory, even equip it in my hand, but when I try to create a projectile out of it, there's problems.

The error is: "attempt to concatenate field 'prefab' (a nil value)"

 

wogmaw.lua has a function called rangedattack that attempts to call the projectile:

 

local function rangedattack(inst,data)local weapon = CreateEntity()        weapon.entity:AddTransform()        MakeInventoryPhysics(weapon)        weapon:AddComponent("weapon")        weapon.components.weapon:SetDamage(25)        weapon.components.weapon:SetRange(inst.components.combat.attackrange, inst.components.combat.attackrange+4)        weapon.components.weapon:SetProjectile("spit")        weapon:AddComponent("inventoryitem")        weapon.persists = false        weapon.components.inventoryitem:SetOnDroppedFn(function() WeaponDropped(weapon) end)        weapon:AddComponent("equippable")        inst.weapon = weapon        inst.components.inventory:Equip(inst.weapon)        inst.components.inventory:Unequip(EQUIPSLOTS.HANDS)end

 

Edited by StarmanUltra
Link to comment
Share on other sites

Took a break from working on the ranged attack code for now, wanted to finalize his attack animation by adding in the tongue. Problem is, it doesn't want to show up in game, nor does the new headbase I had to use to get the layering to show up correctly. Look at the comparison gifs:
OPdMM0I.gif

A5lroNh.gif

 

Am I just not allowed to have a headbase-5.png or add in a beard-0.png? Or is there something else I have to declare in the game code?

Edited by StarmanUltra
Link to comment
Share on other sites

How can I make the eating animation play for this function? It also doesn't complete the unequip action (it leaves the icon in the equip slot)

 

local function equipchange(inst,data)  local equiphand = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HANDS)  local food = nil  if equiphand == nil then    return  end  if equiphand.prefab == "hambat" then    inst:PushEvent("unequip",inst)    equiphand:Remove()    inst:DoTaskInTime(0,function()                 food = SpawnPrefab("meat")                 inst.components.eater:Eat(food)                 end)    --inst.AnimState:PlayAnimation("eat_pre")    --inst.AnimState:PushAnimation("eat", false)  endend

 

Link to comment
Share on other sites

@StarmanUltra:

local function equipchange(inst, data)	local equiphand = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HANDS)	if equiphand and equiphand.prefab == "hambat" then		equiphand:Remove()		local food = SpawnPrefab("meat")		BufferedAction(inst, food, ACTIONS.EAT):Do()	endend

?

Link to comment
Share on other sites

@StarmanUltra:

local function equipchange(inst, data)	local equiphand = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HANDS)	if equiphand and equiphand.prefab == "hambat" then		equiphand:Remove()		local food = SpawnPrefab("meat")		BufferedAction(inst, food, ACTIONS.EAT):Do()	endend

?

That doesn't work any better, unfortunately (looks a lot prettier though :grin: ). And it does need the inst:PushEvent("unequip",inst) to update the inventory bar (otherwise it looks like the ham bat is still equipped. Even cutting out most of the function and just pushing an eat action doesn't play the animation for eating, it just changes hunger and does the sound effect. It seems like adding a talker component makes that a priority, even at the end of the function. What I really want in the end is an eating animation to show.

 

This is pretty close to what I want, not quite perfect yet since the eating animation can be cut off by movement.

 

local function equipchange(inst, data)    local equiphand = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HANDS)    if equiphand and equiphand.prefab == "hambat" then--inst.components.locomotor:Stop()        local food = SpawnPrefab("meat")inst:DoTaskInTime(0,function() inst:PushEvent("unequip",inst)equiphand:Remove()end) inst:DoTaskInTime(0.75,function() inst.AnimState:PlayAnimation("eat_pre",false)inst.AnimState:PushAnimation("eat", false)BufferedAction(inst, food, ACTIONS.EAT):Do()end) inst:DoTaskInTime(3,function() inst.components.talker:Say("Meat on stick!")end)    endend

 

Edited by StarmanUltra
Link to comment
Share on other sites

@StarmanUltra,

local function equipchange(inst, data)    local equiphand = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HANDS)    if equiphand and equiphand.prefab == "hambat" then		inst.components.inventory:DropItem(equiphand)        equiphand:Remove()        local food = SpawnPrefab("meat")		local buffaction = BufferedAction(inst, food, ACTIONS.EAT)		inst:PushBufferedAction(buffaction)    endend

Like this then.

Link to comment
Share on other sites

Weird, I tried lots of different variations, and I could only ever get one or two of the actions to go. Either

 

- it wouldn't properly unequip the ham bat,

- the eat animation wouldn't occur

- eat animation would play, but no hunger value gained

 

But it turns out using DoTaskInTime allows the functions to not pile up, I guess? I found the perfect balance in this:

 

local function equipchange(inst, data)    local equiphand = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HANDS)    if equiphand and equiphand.prefab == "hambat" theninst:DoTaskInTime(0,function()         inst:PushEvent("unequip",inst)        equiphand:Remove()        end) inst:DoTaskInTime(0.75,function()         local food = SpawnPrefab("meat")        local buffaction = BufferedAction(inst, food, ACTIONS.EAT)        inst:PushBufferedAction(buffaction)        end) inst:DoTaskInTime(3,function()         inst.components.talker:Say("Meat on stick!")        end)    endend

This allows the unequip animation and prefab removal to happen fluidly, but then the eat action forces the character to stop and eat. I'm really happy with the result :D Thanks!

You thought you were going to equip the ham bat? Think again! 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...