Results 1 to 4 of 4

Thread: editing scripting.lua

  1. #1

    Default editing scripting.lua

    I am trying to change the effects of becoming shogun, to switch from regular guard to takeda guard as the unit that appears. I tried to just type over the name of the unit, but there seems to be no way to save the file. All the changes to editing.lua disappear as soon as I close the PFM. Is there a way to permanently modify that? Will it work in the middle of the campaign, with save-game, rather than starting a new campaign?
    We are peaceful people, but our armored train is always idling on back-up tracks.

  2. #2
    Tribunus
    Join Date
    Jan 2011
    Location
    Ascension, St. Helena
    Posts
    7,336

    Default Re: editing scripting.lua

    Generally speaking changes to conditions like that will only affect new games but I'm no expert on this.

    Rather than changing the base file, why not make your change into a separate .pack?

  3. #3

    Default Re: editing scripting.lua

    So is there a specific editor for .lua files?
    We are peaceful people, but our armored train is always idling on back-up tracks.

  4. #4

    Default Re: editing scripting.lua

    The basic instructions are here (some details need to be changed for TWS2 but these are the instructions I have used to create a simple TWS2 mod):

    http://www.twcenter.net/forums/showthread.php?t=340047

    Get PFM; use it to unpack the lua file; use any plain text editor to edit the lua file. Then you can either create a new pack file with this one file inside, or (simpler, but not as maintainable) copy the lua file into the right place in your own data directory.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •