mifki / df-twbt

Text Will Be Text
187 stars 30 forks source link

Can't exec 'multilevel' commands on world load #72

Closed MrROBUST closed 6 years ago

MrROBUST commented 6 years ago

Make onLoad.init. Write there

multilevel 15
multilevel shadowcolor 0.0 0.0 0.0 0.5
multilevel fogcolor 0.8 1.0 1.0
multilevel fogdensity 0.1 0.5 1.0

Nothing happens. But commands do work when written by hand.

Win7 x64, df_44_05_win

lethosor commented 6 years ago

Are you sure you spelled the filename right? What if you add devel/print-args test - does it print test to the console?

MrROBUST commented 6 years ago

@lethosor Ok, seems like my bad. For some reason, onLoad.init-example is starting even if onLoad.init exists. But commands in onLoad.init is not working. So I moved command set to *-example file, delete onLoad.init, and it's do the job. Weird dfHack is weird. Thank you.

lethosor commented 6 years ago

onLoad.init-example is set up to run by dfhack.init-example with the sc-script command. onLoad.init always runs if it exists. I suspect you gave onLoad.init the wrong extension, like onLoad.init.txt, or spelled it wrong, especially if the print-args command didn't work.

MrROBUST commented 6 years ago

@lethosor

suspect you gave onLoad.init the wrong extension, like onLoad.init.txt

No, it was exactly onLoad.init. In fact they are both running. But for some reason commands in onLoad.init wasn't working. Adding devel/print-args Test! in both files gives me 2 Test lines.

lethosor commented 6 years ago

Okay, so it is loading onLoad.init, then. I don't know why multilevel commands wouldn't work there.