Auto-translated
Regular expressions are certainly cool, but you can easily find everything using a simple Ctrl+F.
New here? I'm Roha — want a quick tour?
Regular expressions are cool, but you can easily find everything using a simple Ctrl+F.
I don't really want to delve into it, but what do the lines of code that explicitly specify the creature level look like?
If (let's say) the answer to my question is "true," then I can suggest the following: if there is a fixed line indicating the level, then you can create a Ruby program (in my opinion, it's convenient for this; if someone hasn't heard of it, it's similar to Python) that will look at the line, (roughly speaking) determine the level, and replace it with a line that specifies the same level but a random creature.
The most straightforward implementation (since it will take time ~(n^2+n)) seems to me to be the following: let's assume that we have a line in the file - "level 1 - assassin." We read the entire file into an array (if the language allows, it's better to use a string) text. By iterating through the file, we make a line-by-line comparison with the array arr. In the array arr, we have seven reference lines ["level 1 - (regular expression)".."level 7 - (regular expression)"]. And if (a[0]==text[a certain interval containing the line from the file]) then (text[a certain interval containing the line from the file]="level 1 - (random creature)") and so on.
I don't really want to dig into it, but what do the lines of code that explicitly specify the level of creatures look like?
If (let's say) the answer to my question is "true," then I can suggest the following: if there is a fixed line indicating the level, then you can create a Ruby program (in my opinion, it's convenient for this; if someone hasn't heard of it, it's similar to Python) that will look at the line, (roughly speaking) determine the level, and replace it with a line that specifies the same level but a random creature.
The most straightforward implementation (since it will take time ~(n^2+n)) seems to me to be the following: let's assume that we have a line in the file - "level 1 - assassin." We read the entire file into an array (if the language allows, it's better to use a string) text. By iterating through the file, we make a line-by-line comparison with the array arr. In the array arr, we have seven reference lines ["level 1 - (regular expression)".."level 7 - (regular expression)"]. And if (a[0]==text[a certain interval containing the line from the file]) then (text[a certain interval containing the line from the file]="level 1 - (random creature)") and so on.
The creature level is defined as follows:
6
It can take values from 1 to 8 ;)
Hello. What do you think about the idea of adding creatures similar to those from the 4th game: Gargantua, Medusa, Thunderbird, Beholder, Sea Monster? The Sea Monster could be placed in a building similar to a sunken temple. Also, in the 5th part, there is no way to move creatures across water as in the 4th part – or is there?
NCF MS
Version 0.1
A program created to make creatures from NCF appear on maps that do not contain random monsters! This is especially useful for GSC (Grand Strategy Campaign).
Usage.
Download the NCF MS.zip file and extract it to any location.
Open the map file (*.h5m) with an archiver, find map.xdb (usually located in /Maps/SingleMissions/***/ or /Maps/Multiplayer/***/), and copy it to NCF MS\maps. You can use intermediate folders.
Run lua.exe, a window will appear. Enter the map name (map.xdb. Use relative paths if you are using intermediate folders). Click Okay. If the process completes without errors, the program will close; otherwise, an error message will appear. Pack map.xdb back into the map.
Possible errors and how to fix them.
Permission denied - the file is read-only; change the file attribute and run the program again.
No such file or directory - the file was not found / the path is incorrect. Check and correct the path.
Warnings.
All "armies" are converted into a single monster until...
I'm waiting for suggestions and requests, if any.
RedHeavenHero, thank you very much =).
P.S.
You could mention that you are the author or something).
P.S.S.
A couple of things I noticed:
1) It's good that there is a folder where you need to put map.xdb, but (by default) it will be the only file there, so (in my opinion) the folder is not needed, since the file (i.e., map.xdb) will still be deleted;
2) if you still think about leaving the folder, then in the program (where the path to the file is) you should clearly indicate (by default) that the file is located there (i.e., in the folder). At first, I thought that it doesn't matter whether it's in the folder or in the root - it all worked in the folder, but not in the root. [of course, I wrote it awkwardly, but I think the meaning is clear];
3) I think it would be good if the program made a backup of the old file just in case.
1) 2) I will still leave the folder.
3) I will do it.
Regarding point 4: I will try to do it, but it is very difficult due to the lack of a properly functioning library; so far, I have only managed to achieve reading zip files.
What kind of library is that?!
zlib.dll for Lua 5.1
So, is this a library for Lua scripts in the game? And is it possible to connect another, more functional library by replacing the file?