Results 1 to 8 of 8

Thread: How to Edit .Luac and .Lua files?

  1. #1

    Icon5 How to Edit .Luac and .Lua files?

    I'm trying to figure out how to add the mutiny mechanic. There are some tables for this event, along with 2D art and whatnot. While reading very old posts, I've seen people claiming to be included on the very original release (before any patch). The event supposedly consisted in a ship without an admiral turning into a pirate ship by a random chance.

    On the same note, I'm trying to adapt the VDM 2.0 (VadAntS Desease Mod) for personal use.

    Although I can open the scripting.lua, I cannot find in it anything related to the event triggers themselves. Opening the remaining .LUAC files leads to only a couple of random numbers.

    Just to be clear: the goal is to find how the scripts actually are triggered. I'm using the ++Notepad, no tutorial was helpful and I'm sorry if this is a rookie mistake or something.

  2. #2
    Quintus Hortensius Hortalus's Avatar Lex duodecim tabularum
    Citizen

    Join Date
    Jun 2011
    Location
    Electorate of Hannover
    Posts
    2,350

    Default Re: How to Edit .Luac and .Lua files?

    I would check the official website: http://www.lua.org/
    And here is some work from taw:
    https://github.com/taw/etwng/tree/master/luac
    https://sourceforge.net/projects/unluac/
    I have no idea how to run them.

    Under the patronage of wangrin my workshop

  3. #3

    Default Re: How to Edit .Luac and .Lua files?

    I already came across the TAW guide to no avail.

    Apparently .LUAC are basically encrypted/compiled LUA files, which can be decompiled by the unluac.jar and then read normally in the Notepad++. However, TAW's instructions are less than 2 lines of text with a prompt command that I have no idea what do with.

    There are some more informative videos and tutorial that I've found, Reddit may prove useful as well. Grateful as always for your help, it seems you're the only modder left on this forum!

    By the way, cool trophy on your avatar! Congratulations!

  4. #4
    Geronimo2006's Avatar TAR Local Moderator
    Join Date
    Oct 2007
    Location
    Ireland
    Posts
    7,364

    Default Re: How to Edit .Luac and .Lua files?

    Terryman did some lua scripting for me a few years back to link recruitment of certain units to certain dates. You could try asking him.
    Colonialism 1600AD - 2016 Modding Awards for "Compilations and Overhauls".



    Core i7 2600 @ 3.4ghz - NVIDIA GTX950 2GB

  5. #5

    Default Re: How to Edit .Luac and .Lua files?

    The Luac files need to be exported first to see the code by using the luac converter that taw made. To make it work, i can't really say as i never scripted before. But i am interested how you make it work.

  6. #6

    Default Re: How to Edit .Luac and .Lua files?

    Terryman did some lua scripting for me a few years back to link recruitment of certain units to certain dates. You could try asking him.
    Thanks for the tip!

    The Luac files need to be exported first to see the code by using the luac converter that taw made. To make it work, i can't really say as i never scripted before.
    Far as I understand, the tool wasn't made by TAW, it's just a decompiler for 5.1 LUA. His instructions involve a prompt command (I guess?) that I don't have a clue what to do with.

    A guy on Reddit referred several tools for me. I'm trying those, but so far they all require a third tool and some crypt tech stuff to work.

    But i am interested how you make it work.
    Don't get your hopes up. I'm as quixotic as quixotic gets with this I really like your work btw, nice to see you around these parts!

  7. #7

    Default Re: How to Edit .Luac and .Lua files?

    You have to de-compile the Luac file to a readable format. See that you have Java installed on your pc. Add the Luac converter folder for example on your desktop. Open the folder and add the .luac file you like to de-compile in the folder. After, in the adress bar above, you click on the folder icon and type cmd. This will open a command prompt that uses the address of the folder and type the following code: java -jar unluac.jar file.luac. file.luace is a placeholder for the file name. So if the name of the luac file is for example unit.luac, than you type in the cmd java -jar unluac.jar unit.luac. This will give you a readable format in the cmd. Just copy the code for example and add it in a .txt file for example (i use Notepad++ and than i save it as a lua file).

  8. #8

    Default Re: How to Edit .Luac and .Lua files?

    Brilliant, Izzi, worked like a charm. The forum doesn't notify replies to started threads, wish I had seen this sooner.

    Thank you so much!

Posting Permissions

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