Jump to content

Overriding Core LUA Files Question


Recommended Posts

In a mod, is it possible to have your mod's version of a core lua script be used instead of the default game lua?

 

Like for example: for /scripts/speech_wilson.lua

 

I want to modify various speech text to say something different. I tried to have my own speech_wilson.lua in my mod directory, but I don't see any change in the game.

 

Is there some special declaration I need to make so the game knows to use the mod's version of the lua and not the core lua? Or is it something that is not supported?

 

 

 

 

Link to comment
Share on other sites

No special shistlewistle is needed, you literally just recreate the folder structure in your mod and paste the file there. Edit away on the copy!

 

e.g. to modify data/scripts/speech_bla.lua

you need to make a mymod/scripts/speech_bla.lua

and it'll load instead.

 

EDIT: though a quick tip, you can usually edit things in a "cleaner" way.

In your modmain.lua you can type:

GLOBAL.STRINGS.CHARACTERS.WILSON.DESCRIBE.AXE = "This is an axe."

Link to comment
Share on other sites

Thanks for the reply Mobbstar!

 

So I have the lua set as /scripts/speech_wilson.lua in my mod directory, but no matter what I edit in it, I never see the changes. Even after disabling and enabling the mod, even after shutting down the game and restarting. Nothing is taking. Only when I edit the core speech_wilson.lua do I see any text changes. Totally stumped as to why this is the case.

Link to comment
Share on other sites

Archived

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

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...