Jump to content

Recommended Posts

I’ve really hit a wall with my mod.

The easy part- 
He transforms 'wimpy' on low hunger, but I can’t figure out how to get the threshold of transforming to be lower- say when he’s on hunger 50. Everything I’ve tried has crashed it!

 

Now for the hard part-

I want to change so he transforms to “mighty” when he eats nightmare fuel for a short period of time and then back again. I had the transformation base be like the old version of Wolfgang, but now I can’t seem to get his ‘mighty’ form at all. High time to change it to something better! I don’t want it over powered but having similar stats to full mightiness Wolfgang would do me fine!

Perhaps far more complicated still, if there could be a depleting bar that would indicate this? So eating more nightmare fuel would restock it? But I don’t mind forgoing this part. This would be a ‘like to have if I have time’ scenario.

 

bach.lua

Edited by DevilsRoost
changed ideas

I think I have found good code to make nightmare fuel edible- as provided here by kind modders - 


And as for character transformation, something like this (except not as insanely powerful) but I can't pinpoint which bits I need and I'm just pretty lost overall. 

https://steamcommunity.com/sharedfiles/filedetails/?id=1427073707&searchtext=all+might 

 

Edited by DevilsRoost

I tried applying this code just to test having food transform, but it doesn't work with my mod. 

As you can plainly see,  I have no idea what I'm doing haha!  I just can't trigger 'mighty' state any more no matter what I try

 

local function oneat(inst, food)
	if food and food.components.edible and food.prefab == "seeds"  then
		inst.soundsname = "woodie"
		inst.AnimState:SetBuild("genos_bach")
		inst.components.locomotor.walkspeed = (5)
    		inst.components.locomotor.runspeed = (7)
		inst.components.combat.damagemultiplier = (1)
		inst.components.health:SetAbsorptionAmount(.1)
			inst:AddTag("monster")
		inst:RemoveTag("notarget")
	elseif food and food.components.edible and food.prefab == "monstermeat"  then
		inst.AnimState:SetBuild("bach")
		inst.components.locomotor.walkspeed = (4)
    		inst.components.locomotor.runspeed = (6)
		inst.components.combat.damagemultiplier = (0)
		inst.components.health:SetAbsorptionAmount(0)
		inst:RemoveTag("monster")
		inst:AddTag("notarget")
	end
end

 

Edited by DevilsRoost

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
×
  • Create New...