Skip to content

Posts from NCF – Extended list of Neutral creatures.

4.9 (14 ratings)
User Avatar
13 years ago
Auto-translated
Regular expressions are certainly cool, but you can easily find everything using a simple Ctrl+F.
In reply to Ment
User Avatar
13 years ago
Auto-translated
Ment
Regular expressions are cool, but you can easily find everything using a simple Ctrl+F.
In any case, this is a crude solution to the problem. If, instead of peasants, there are some other units, the map will create a terrible imbalance.
13 years ago
Auto-translated
I don't really want to dig through the code, 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.
In reply to Рексарыч
User Avatar
13 years ago
Auto-translated
Reksarich
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.

The creature level is defined as follows:

6

It can take values from 1 to 8 ;)
In reply to Рексарыч
User Avatar
13 years ago
Auto-translated
Reksarich
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.
By the way, an idea!
I'll try to do the same in Lua. If it works, I'll post it.;)

Added 1 minute ago
psatkha
The creature level is defined as follows:

6

It can take values from 1 to 8 ;)
And I saw some mage in brown robes with level 10.:confused:
In reply to RedHeavenHero
User Avatar
13 years ago
Auto-translated
Hello. What do you think about this idea? In Heroes of Might and Magic IV, there were creatures like Gargantua, Medusa, Thunderbird, Beholder, and Sea Monster. Maybe we could create something similar: The Sea Monster could be placed in a building similar to a sunken temple. In Heroes of Might and Magic V, is there a way for creatures to move across water like in Heroes of Might and Magic IV, or is there no such possibility?
In reply to SRD
13 years ago
Auto-translated
SRD
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?

There is a Medusa in NCF (although it's not very well made, but if you don't zoom in with the camera, it's passable). There are also Thunderbirds (although under a different name, I don't remember what it is, but it's not difficult to rename).
In reply to wildcat
User Avatar
13 years ago
Auto-translated
New Creatures Frameworks Map Supporter

Version 0.1

A program designed to make creatures from NCF appear on maps that do not contain random monsters! This is especially applicable to GSC (Grand Strategy Campaign).
The program converts all fixed monsters into random ones, but with a level dependency.


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 processing is successful, the program will close; otherwise, an error message will appear. Repack 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, for now...
Make backups before processing.

I look forward to suggestions and requests, if any.
Attachments 1
1 file attached • Total size: 1.6 MB
In reply to RedHeavenHero
User Avatar
13 years ago
Auto-translated
RedHeavenHero
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.

Could you provide a manual with pictures?! :rolleyes:
13 years ago
Auto-translated
RedHeavenHero, thank you very much =). P.S. You could mention that you are the author. P.S.S. A couple of things I noticed: 1) It's good that there's a folder where you need to put the map.xdb file, but (by default) it will be the only file there, so (in my opinion) the folder isn't necessary, since the file (i.e., map.xdb) will be deleted anyway; 2) If you still plan to keep the folder, then in the program (where the file path is specified), you should clearly indicate (by default) that the file is located there (i.e., in the folder). At first, I thought it didn't matter whether it was in the folder or in the root directory – it worked in the folder, but not in the root. [I know 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.
In reply to Рексарыч
User Avatar
13 years ago
Auto-translated
Reksarich
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 normally functioning library; so far, I have only managed to achieve reading zip files.
In reply to RedHeavenHero
User Avatar
13 years ago
Auto-translated
RedHeavenHero
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 library are you talking about?
In reply to psatkha
User Avatar
13 years ago
Auto-translated
psatkha
What kind of library is that?!
zlib.dll for Lua 5.1
In reply to RedHeavenHero
User Avatar
13 years ago
Auto-translated
RedHeavenHero
zlib.dll for Lua 5.1
So, is this a library for the game's Lua scripts? And is it possible to connect a different, more functional library by replacing the file?
In reply to Nargott
User Avatar
13 years ago
Auto-translated
Nargott
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?
Not for the game.
I don't think that's possible. Do you need a library of standard Lua functions?

Statistics

Welcome our newest member: recijeb

Users Online 3 users 1588 guests