Jump to content

Make zombie movement speed all random


MrSamuelAdam

Recommended Posts

Is it possible to create a modlet which makes all zombies rng (random) to either do walk, jog, run, sprint or nightmare?

 

You wouldn't know how each zombie will react.

I think this would be a very fun way to play. During the day or night all zombies would have a equal chance (20%) at one of them at any time.

Link to comment
Share on other sites

The Zombie Transmogrifier does that. It's an SDX mod. It also allows random sized zombies and a head shots mode, random walk types. Pretty cool mod. one of my favs. https://7daystodie.com/forums/showthread.php?74386-MOD-Zombie-Transmogrifier&highlight=zombie+transmogrifier

 

 

Oh nice! Can I download this as a modlet into the mods folder?!

Link to comment
Share on other sites

Oh nice! Can I download this as a modlet into the mods folder?!

 

SDX mods use a little different method of modding than normal modlets. As guppy said, they require DLL changes. There is a tool that automatically will apply this to your game here. In a16 SDX mods were a little more difficult to manage. in a17 they are half dll changes and half modlet. It's really kind of cool. Anyhow, I mixed down the mod for you with todays build (b240) but everytime the game updates you will need to mix down again, so it's best if you learn to do it yourself. Mixing these mods into the game is very simple, making your own is much harder. Anyhow, here is the Zombie Transmogrifier. Just copy to your 7 days folder, and overwrite all. If you want to change the settings you can find the code in modlet form. Hope that helps get you started. :-)

Link to comment
Share on other sites

I haven't looked into this particular buff, but it does seem promising that you may be able to apply a buff on spawn in for the zombies that may be able to randomize their walk types through the new animator hooks.

 

<buff name="buffInjuryCrippled1" name_key="buffInjuryCrippled1Name" description_key="buffInjuryCrippled1Desc" tooltip_key="buffInjuryCrippled1Tooltip" icon="ui_game_symbol_stunned">
	<damage_type value="stun" />
	<stack_type value="ignore" />
	<duration value="0" />
	<effect_group>
		<requirement name="EntityTagCompare" tags="zombie" />
			<triggered_effect trigger="onSelfBuffStart" action="AnimatorSetInt" property="WalkType" value="5" />
	</effect_group>
</buff>

 

That triggered_effect changes the Animator's State Machine to use WalkType 5. So the buffs can directly manipulate the walk type. We'd just need a way to randomize the buffs and that value.

Link to comment
Share on other sites

I haven't looked into this particular buff, but it does seem promising that you may be able to apply a buff on spawn in for the zombies that may be able to randomize their walk types through the new animator hooks.

 

<buff name="buffInjuryCrippled1" name_key="buffInjuryCrippled1Name" description_key="buffInjuryCrippled1Desc" tooltip_key="buffInjuryCrippled1Tooltip" icon="ui_game_symbol_stunned">
	<damage_type value="stun" />
	<stack_type value="ignore" />
	<duration value="0" />
	<effect_group>
		<requirement name="EntityTagCompare" tags="zombie" />
			<triggered_effect trigger="onSelfBuffStart" action="AnimatorSetInt" property="WalkType" value="5" />
	</effect_group>
</buff>

 

That triggered_effect changes the Animator's State Machine to use WalkType 5. So the buffs can directly manipulate the walk type. We'd just need a way to randomize the buffs and that value.

 

That's very interesting. Maybe triggering a buff on spawn and calling RandomRoll?

Link to comment
Share on other sites

SDX mods use a little different method of modding than normal modlets. As guppy said, they require DLL changes. There is a tool that automatically will apply this to your game here. In a16 SDX mods were a little more difficult to manage. in a17 they are half dll changes and half modlet. It's really kind of cool. Anyhow, I mixed down the mod for you with todays build (b240) but everytime the game updates you will need to mix down again, so it's best if you learn to do it yourself. Mixing these mods into the game is very simple, making your own is much harder. Anyhow, here is the Zombie Transmogrifier. Just copy to your 7 days folder, and overwrite all. If you want to change the settings you can find the code in modlet form. Hope that helps get you started. :-)

 

Thank you, thank you.

I wanted to learn how to create modlets in particular. Is there a solid tutorial on YouTube on how to do this to help out the novices who would like to take a stab at it?

Link to comment
Share on other sites

I don't think RandomRoll is what we're looking for...that would roll a new number each time rather than having 5 different ranges for a single roll to land in. But how about ModifyCVar with randomint?

 

ModifyCVar: target, cvar, operation[set,add,subtract,multiply,divide,randomfloat,randomint],value

value="low,high" for randomfloat/randomint.

 

So if I understand that right, would putting something like this in the entityclass base zombie template work?

 

<triggered_effect trigger="onSelfFirstSpawn" action="ModifyCVar" cvar="ZombieSpeed" operation="randomint" value="4,8"/>
<triggered_effect trigger="onSelfFirstSpawn" action="AnimatorSetInt" property="WalkType" value="@ZombieSpeed"/>

 

I don't know what the range of walktypes is, but 4,8 was just an example.

 

Edit: Actually I don't think WalkType is what we want. That just has to do with the animation used for walking...eg WalkType 6 is the twitchy walktype that farmers/utilityworkers/steves use. However...being able to randomize those is still awesome to me. I'm going to experiment with this tomorrow using a range of 1,7 (8 is spider zombie, 9 seems to be the unused behemoth zombie) and see how it works.

Link to comment
Share on other sites

It looks like what we want is:

 

<property name="MoveSpeedAggro" value="0.2, 1.25"/>

 

I haven't experimented with using CVars on properties or how that will affect things if the range is replaced with a single number. But I'll also experiment with this tomorrow. The question is if this will work:

 

<property name="MoveSpeedAggro" value="@ZombieSpeed"/>

 

Or...I also wonder if this will work??

 

<property name="MoveSpeedAggro" value="@ZombieSpeedMin,@ZombieSpeedMax"/>

Link to comment
Share on other sites

Bad news all around...

 

- I don't think randomfloat/randomint work currently. Wasn't having any luck then found this in buffs.xml:

"value="randomfloat(1,10)" / value="randomint(1,10)"

- randomfloat,randomint are currently broken. Need special handling for values."

 

- Can't use CVars on <property>'s anyway. Gives me invalid character @ or invalid input string error. I don't know of any other way to possibly modify properties in-game otherwise.

 

- Can't seem to use CVars on AnimatorSetInt either. Same deal.

 

- AnimatorSetInt doesn't seem to update the animation change until the zombie is knocked down. Even if I set it to OnSelfFirstSpawn or OnOtherDamagedSelf, the change to walk animation doesn't apply until the knockdown animation is played or they are ragdolled and they stand back up. Ugh.

 

I've said before I wish we had a way to change properties in-game rather than just _effects, but maybe that isn't possible. Would open up all kinds of cool things we could do with XML mods. As of right now, I think Guppy's solution is the only way this is possible without SDX.

Link to comment
Share on other sites

Bad news all around...

 

- I don't think randomfloat/randomint work currently. Wasn't having any luck then found this in buffs.xml:

"value="randomfloat(1,10)" / value="randomint(1,10)"

- randomfloat,randomint are currently broken. Need special handling for values."

 

- Can't use CVars on <property>'s anyway. Gives me invalid character @ or invalid input string error. I don't know of any other way to possibly modify properties in-game otherwise.

 

- Can't seem to use CVars on AnimatorSetInt either. Same deal.

 

- AnimatorSetInt doesn't seem to update the animation change until the zombie is knocked down. Even if I set it to OnSelfFirstSpawn or OnOtherDamagedSelf, the change to walk animation doesn't apply until the knockdown animation is played or they are ragdolled and they stand back up. Ugh.

 

I've said before I wish we had a way to change properties in-game rather than just _effects, but maybe that isn't possible. Would open up all kinds of cool things we could do with XML mods. As of right now, I think Guppy's solution is the only way this is possible without SDX.

 

Sorry pastry I kind of forgot about this thread. Yeah sphereii was talking about the random walktypes that are in the transmogrifier. How to do them without dlls. And yeah I came to the same result you did after my testing. I never tried randomint cause i saw the note that it didn't work before hand. I guess we need to wait for that to be implemented to truly get the random results like that. I should've came back and posted my results i guess but i figure since i didn't get any progress there wasn't much point till i do.

 

Samuel Adams: You can run a search and should find something. I pretty much only watch Xyths tutorials but they are a little advanced for what you want to learn. Not sure if he has beginner tutorials. Anyhow, if you need any help or anything don't hesitate to message. :-)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...