Page 5 of 6 FirstFirst 123456 LastLast
Results 81 to 100 of 101

Thread: The NTW Script-o-Rama (Updated 27/03/2011)

  1. #81
    Dee Jay's Avatar I'm gone....
    Join Date
    May 2010
    Location
    Australia
    Posts
    892

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    Cheers TC, went to your post then and said yes!

  2. #82
    Lord Davn's Avatar Senator
    Join Date
    Jul 2011
    Location
    Milwaukee, WI
    Posts
    1,070

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    For anyone interested in learning more about scripting Lua files here are some tutorial links

    Recommended by T.C. -http://maurits.tv/data/garrysmod/wik...index2bde.html

    wiki Lua tutorials -http://lua-users.org/wiki/TutorialDirectory
    Last edited by Lord Davn; January 11, 2013 at 09:25 AM.

  3. #83

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    TC,
    Can you guide me through changing victory conditions? The one tutorial I found was not detailed enough so I couldn't make it work.
    Ordoprinceps
    Semper Ferox

  4. #84
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    Change victory conditions? By script? I don't remember seeing something about it

  5. #85

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    In the starpos. I want to change the countries that Austria must take to win
    Ordoprinceps
    Semper Ferox

  6. #86
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    oj. That's not very difficult. I can tell you when back home (this evening, or tomorrow). But it's not script related, and you asked in the script-o-rama

  7. #87
    B-DizL's Avatar TGW Lead Modeller
    Patrician

    Join Date
    May 2009
    Location
    America
    Posts
    5,900

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    When editing the scripting.lua file is it best to save it as a txt first then edit it then save it as .lua or does that not matter?

    Ive been editing it just by opening it as a lua and changing things then saving but ive had some issues with scripts not working right and i wonder if its because of how i edit the file.

  8. #88
    Lord Davn's Avatar Senator
    Join Date
    Jul 2011
    Location
    Milwaukee, WI
    Posts
    1,070

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    Quote Originally Posted by B-DizL View Post
    When editing the scripting.lua file is it best to save it as a txt first then edit it then save it as .lua or does that not matter?
    Ive been editing it just by opening it as a lua and changing things then saving but ive had some issues with scripts not working right and i wonder if its because of how i edit the file.
    I always save it as a lua file to maintain file integrity and avoid any problems.

  9. #89
    The Hedge Knight's Avatar Fierce When Cornered
    Artifex

    Join Date
    Oct 2009
    Location
    England
    Posts
    5,875

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    A lua an a text file differ only in extension. There is no difference at all between them otherwise so you may as well just edit them as .lua. When editing you should use an editor with syntax highlighting to help you spot mistakes. There are probably dedicated lua editors out there but otherwise something like Notepad++ is great, its simple but has lots of functionality if you need it.

  10. #90
    Lord Davn's Avatar Senator
    Join Date
    Jul 2011
    Location
    Milwaukee, WI
    Posts
    1,070

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    Thank you for your timely post. I also found this scripting & preference file editor to be extremely helpful: http://www.twcenter.net/forums/showt...SHO2-(Updated)
    Last edited by Lord Davn; February 23, 2015 at 09:14 PM.

  11. #91
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    That's not a relevant tool.

    Lua scripting handles in-game stuff like campaign events, that tools handles preference text files and the file that lets you set what mods to launch. Nothing to do with Lua.

  12. #92
    Lord Davn's Avatar Senator
    Join Date
    Jul 2011
    Location
    Milwaukee, WI
    Posts
    1,070

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    Quote Originally Posted by .Mitch. View Post
    That's not a relevant tool.
    husserlTW's tool actually works quite well editing scripting.lua files
    Updated post: http://www.twcenter.net/forums/showt...erences-Editor
    Last edited by Lord Davn; January 24, 2015 at 08:34 PM.

  13. #93
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    lol all his tool does is open text files, which is what the preferences and userscript are. Anything that can read a text file, including notepad, can edit scripting files because the script is just text. If you change scripting.lua to scripting.txt you can open it right away in Notepad instead of going through this hoop. You're using a tool that implements some kind of notepad instead of... well, notepad.

    I'd suggest you use Notepad++ or SciTE, both are actually designed to handle code and Lua respectively. That's if you want the syntax highlighting and autocomplete features.

  14. #94
    Lord Davn's Avatar Senator
    Join Date
    Jul 2011
    Location
    Milwaukee, WI
    Posts
    1,070

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    Quote Originally Posted by .Mitch. View Post
    lol all his tool does is open text files.
    Well that's what husserlTW designed it for and it does a hell of a nice job with them. Give the man some credit for his work
    Last edited by Lord Davn; January 20, 2015 at 10:20 PM.

  15. #95
    Steph's Avatar Maréchal de France
    Patrician Artifex

    Join Date
    Apr 2010
    Location
    Pont de l'Arn, France
    Posts
    9,174

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    That's what Mitch did actually. Deserved credit for his work: it opens a text file, as Notepad can do.

  16. #96

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    Please, for the love of NTW and all napoleonic fans out there... I'm sick, and I mean SICK, of having to chase that single hidden unit when everyone else is either shattered or fled out of the battlefield. This is the number one thing that annoys me the most, out of the stupid AI, which I more or less tolerate forcing myself not to be too aggressive. Is anyone able to provide a script, or at least an advice, to finally close the battle when less than X amount of troops are still in the field?

    I was looking at the "OnBattleConflictPhaseCommenced" function but I saw that it just fires the command once and I wouldnt know how to end the damn battle in any case. I think spawning the message for ending the battle or continuing the pursuit would solve my problems when other conditions are met, but I'm stuck here atm.

    Any suggestions?

  17. #97

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    Not sure if it will work (need to test it out) but there is a casualty morale penalty in kv_morale table, that checks army losses... if you increase that penalty high enough, all units will break if army takes high casualties. Not sure if there is any other way in NTW how to do that..

  18. #98

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    the army_destruction penalty? Yeah already tried that one. No use, didnt do anything.

  19. #99
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    Routing at the end of the battle is handled by the rout manager script.

    Can't remember where it is... but that's whats meant to stop the situation where you chase down one remaining unit at the end of a battle.

  20. #100

    Default Re: The NTW Script-o-Rama (Updated 27/03/2011)

    hey guys, im a bit new in this.. whats the story behind .luac files? i know i can open lua in text editor, but what i need for luac?

Page 5 of 6 FirstFirst 123456 LastLast

Posting Permissions

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