Do I need python to run python plug-ins in Notepad++?With the game? I think it uses 2.3 but you don't need Python on your system to mod it.
I don't know what I'm doing wrong...No. The plugin has a build-in python console.
I'm pretty sure I don't, won't it usually say so right at the top of the program window?Do you have the 32-bit version of Notepad++ or the 64-bit version? The plugin only works for the 32-bit version. (A plugin for the 64-bit version has never been released)
I've still got nothing, is there any particular settings I need to have?You can check the version by pressing the F1 key when you have Notepad++ opened.
You might need to redownload and reinstall Notepad++ to make it work. (I had to do this too when I tried to install the plugin)
Notepad++ or the python script? Either way, neither had errors when I installed them. Is this what it should look like? Menu > Plugins > Python Script > Scripts > Samples / startupNot that I know of. Do you get an error message when you try to install it?
So I opened a new file, I went Menu->plugins->Python Script->New script saved the code as Increment.py in the notepad++ Python Scripts directory... I went back to the 1700AD scenario file I clicked Run>Run...>...>Increment.py>Run nothing appeared to happen, should anything have happened?That is how it should look like indeed. It seems you did install it correctly.
To use the mapeditor script, simply create a new script. (Menu->plugins->Python Script->New script) Copy-paste the code you found in this post. And then run it.
from Npp import *
import re
start = int(notepad.prompt(notepad, 'Number of the new civ', ""))
end = 75
editor.beginUndoAction()
for i in reversed(range(start, end)):
editor.rereplace(r"(Owner=|Reveal=|Player|,|Team=|TeamID=|AttitudePlayer=)" + "(" + str(i) + ")([^1234567890])", r"($1)" + str(i+1) + "($3)")
editor.endUndoAction()
notepad.messageBox("Finished", "", 0)
To execute the script, do Plugins->Python Script->Scripts->Increment.py.
Make sure you are on the 1700 AD scenario file. (Which you did last time)
Here is the latest version of my script. I made some minor changes in the code and added a message box that indicates that the script is finished.
Code:from Npp import * import re start = int(notepad.prompt(notepad, 'Number of the new civ', "")) end = 75 editor.beginUndoAction() for i in reversed(range(start, end)): editor.rereplace(r"(Owner=|Reveal=|Player|,|Team=|TeamID=|AttitudePlayer=)" + "(" + str(i) + ")([^1234567890])", r"($1)" + str(i+1) + "($3)") editor.endUndoAction() notepad.messageBox("Finished", "", 0)
BeginTeam
TeamID=XX, (Name)
EndTeam
BeginPlayer
Team=XX
LeaderType=LEADER_XXX
CivType=CIVILIZATION_XXX
PlayableCiv=1
StartingGold=XXX
Handicap=HANDICAP_REGENT
EndPlayer