Cheers TC, went to your post then and said yes!
Cheers TC, went to your post then and said yes!
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.
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
Change victory conditions? By script? I don't remember seeing something about it
In the starpos. I want to change the countries that Austria must take to win
Ordoprinceps
Semper Ferox
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
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.
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.
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.
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.
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.
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.
That's what Mitch did actually. Deserved credit for his work: it opens a text file, as Notepad can do.
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?
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..
the army_destruction penalty? Yeah already tried that one. No use, didnt do anything.
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.
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?