Jump to content

Crashlog Editing Stuff


Petrenko
 Share

Recommended Posts

Heyho,

i decompiled the .lua files and played a bit with them.

I deleted the traits, making tools a finite tool and also added a new drop to the grass.

(It's just a proof on concept so please don't critizise what i'm doing)

local dig_up = function(inst, chopper)  if inst.components.pickable and inst.components.pickable:CanBePicked() then    inst.components.lootdropper:SpawnLootPrefab("cutgrass") and inst.components.lootdropper:SpawnLootPrefab("seeds")  end  inst:Remove()

After this i get the following crashlog at booting of the game

LOADING LUA SUCCESS...e_Make_Steam_Package\workspace\data\scripts\main.lua:152: Prefab file doesn't return a callable chunk data/scripts/prefabs/grass.luaLUA ERROR stack traceback:        =[C] in function 'assert'

I did not recompile, since it did not work for me, also they told on the forum, you don't have to.

Thanks in advance for any usefull hints etc.

Erast P.

Link to comment
Share on other sites

You mean like this?

if inst.components.pickable and inst.components.pickable:CanBePicked() theninst.components.lootdropper:SpawnLootPrefab("cutgrass") inst.components.lootdropper:SpawnLootPrefab("seeds") end  inst:Remove()

This did not work.

Edited by Petrenko
Link to comment
Share on other sites

You mean like this?

if inst.components.pickable and inst.components.pickable:CanBePicked() theninst.components.lootdropper:SpawnLootPrefab("cutgrass") inst.components.lootdropper:SpawnLootPrefab("seeds") end  inst:Remove()
This did not work.
Are those item scripts? If so where are they?
Link to comment
Share on other sites

local prefabs = {"cutgrass", "dug_grass"}

it's about the fifth line from the top (in the actual file) U must define the prefabs first. Don't forget to add a comma after each word. I figured this out by modding the rocks.lua to drop spears and bee-mines and random stuff, as a mod (based on a story that pigmen hide your stuff under rocks when you die)

----

----

So....

local prefabs = {"cutgrass", "dug_grass, [The prefab goes here]"}

then....

inst.components.lootdropper:SpawnLootPrefab("cutgrass")

inst.components.lootdropper:SpawnLootPrefab("[The prefab goes here]")

[][][]

So if were to make the grass give butter muffins.

i would type 'butterflymuffin' where [The prefab goes here] is, as that is it's prefab name.

----

Hoped that helped :D

Edited by Starvation
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...