The ability to edit the main campaign's scripting file without having to restart the game to test changes (like ETW/NTW/S2)
So obviously the main feature is that this allows the user to edit the scripting.lua without using PFM and restarting the game. All you have to do now is exit to the main menu and restart a campaign to test scripting changes.
Installation:
Drop the "R2 Script Extender" folder and "Rome 2 Script Extender.pack" file into your data directory. Dont worry about editing the mod pack, it's in movie format.
Usage:
To edit the scripting.lua for the main campaign while the game is in progress, just go to data\R2 Script Extender\vanilla_scripting.lua. This file is an exact copy of the latest packed scripting file. Make your changes, save the file and restart a campaign to test. You can also drop code straight into the file "script.lua" which will be executed; at present it has a function "hello" which has examples of the logging functions. You can call the function hello() from vanilla_scripting.lua to see it in action
Logging functions:
Spoiler Alert, click show to read:
createNewLog(logName)
Code:
Description:
Creates a new log in the logging directory. Will overwrite any existing logs with the same name
Arguments:
String logName
Name of the log file to create
Returns:
n/a
updateLog(logName, updateArg)
Code:
Description:
Writes to the log file
Arguments:
String logName
The name of the log file to write to
String updateArg
Text to append to the log
Returns:
n/a
I'll format this post better when the forums are back to normal. More features to come.
Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell
Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell
I'm wondering, is this script extender also usable in ETW or not?
No, but the concept is exactly the same so if you are going to be doing scripting, which I assume you are if you're using this, then you should be much more than capable of transferring this to ETW.
No, but the concept is exactly the same so if you are going to be doing scripting, which I assume you are if you're using this, then you should be much more than capable of transferring this to ETW.
I understand,
If I understand this concept correctly, you are creating objects from the script files (script.lua and logging.lua) in extenderCore.lua. You're loading them before you load the base lua script from the game itself, and this will enable us to put scripting in script.lua and it'll be loaded even when the game is running? I do know how to script, I just don't understand the ways things are loaded yet etc