Jump to content

Recommended Posts

Hi all.

 

I want to make simple mod that nerfs worm spawn underground. I've located game file responsible for worm spawning: scripts\periodicthreat.lua, where period and strength of worm attacks is defined. But I don't know how to mod it :frown-new: It isn't component, nor prefab, nor class, nor anything else I've seen in the API Examples.

 

Help me please. I'm not lazy, I just get stuck.

Link to comment
https://forums.kleientertainment.com/forums/topic/30394-less-worm-mod-need-help/
Share on other sites

That stumped me too when I saw it, as I had no idea to overwrite that stuff. 

Now, even though I have a character mod, maybe I can help. In my modmain.lua, the first thing I have is

PrefabFiles = {

"webber", "spider", "spiderqueen",
}
 
This, as you probably know, calls the prefabs which should be loaded/overwritten.
Then, there is:
 
Assets = {
    Asset( "IMAGE", "images/saveslot_portraits/webber.tex" ),
    Asset( "IMAGE", "images/selectscreen_portraits/webber.tex" ),
    Asset( "IMAGE", "bigportraits/webber.tex" ),
    Asset( "ATLAS", "images/saveslot_portraits/webber.xml" ),
    Asset( "ATLAS", "images/selectscreen_portraits/webber.xml" ),
    Asset( "ATLAS", "bigportraits/webber.xml" ),
}
Here, the path for each asset is explained, pointing to where each icon/texture is located.
 
If I was to take a guess, you could either add under Assets:
asset( "SCRIPT", "scripts/periodicthreat.lua" ),--or, since assets are probably like art, xml,and sound files, tryScriptFiles = {	"periodicthreat" , }--I don't know if any of these work, but feel free to try! Also, put thhe previous 2 lines of code BELOW PrefabFiles = {}

Try it out. Otherwise, do some mod-hunting. I believe there are a few tweaks mod in the downloads section that overwrite tuning.lua,they have the word "tweak" in them or something. Download one of those mods and poke around in the code. You never know what you may find :p

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...