Mod Manager

2 years 11 months ago #25 by MeToX
Replied by MeToX on topic Mod Manager

What if the Gamestyle is written as
Ga me S tyl e
Will it read it?

I would make this that program makes temporary input line that has no spaces and has no tabs and also converst all characters to lower case (or upper case)
And after that it could make flawless search for keywords !

As I said earlier, it is expected that the creator of the mod prepares his mpmaplist in a way that the game can read it and I am sure this is not the case if the HTML tags have spaces like shown here. I mean, if you make a map for the people and you include a mpmaplist, you would make it so that the user just can copy it out and paste it anywhere, dont you? The ModManager even copies that whole block between the ALLOWITEMS tags, no matter what the format it is. If the creator used tabs, it will use tabs, if its spaces, it will be spaces. Btw. Spaces/tabs in front and after the HTML tags are completly ignored.
However, the idea to convert everything to lower case and strip of the empty spaces WITHIN the html tags is actually something I concidered for the next update, because right now it is expecting these double spaces in the tags, which is not ideal at all! So yeah, this will be changed and is confirmed for the final version (if not earlier).

And why file name restriction ?
Cant it just search all txt files inside ZIP ?

Because thats the most effective and very straight forward way. Instead of searching all possible text files (every time you activate and deactivate it) it will just lookup what it needs there. I would also have to make it so that it can detect it before it starts the algorithm and I doubt its enough to tell it "yea just look for a GAMESTYLE keyword". Or imagine it finds more than one mpmaplist data, then it wouldnt know which one to include or it would include everything it finds, which might be not ideal, because it could be the same map but with different items.

Quick search on google revealed that c++ has some RAR librarys, i dont know if they are any good...
Some mods come as RAR and if user will un-pack it then its easy to just paste them to game folder other than re-pack them to ZIP to be used for ModManager.

There are plenty of RAR libaries, but I won't include compatibility for other formats like RAR, 7z etc. The code is simply not ment to modulary add other formats. If the user wants to use the ModManger to mount his mods, he needs to unpack it and repack it to .zip, which should not be a problem. I chose ZIP because on win10 (and probably older versions) everyone can open and pack .zip files, without the need of downloading additional software.

And add automatic backup for mpmaplist.txt.
Because If this program is meant to make something automatic then why user must do some steps manually ? 
(Backup should be one time backup,, next time no backup because it might overwrite backup with messed up file)

No. The user does not have to do anything, I just suggested to make a backup of the mpmaplist, because this feature is still experimental (which is also why its kinda hidden), but in theory it should not destroy it. It should not make it unusable. If it inserts a mpmaplist from a mod and then removes it again, it should look more or less the same and work as before.
As long as this is not the case, I have to keep working on this feature until there are no issues anymore. Until then I will keep pushing pre-releases (BETA).

The last update was mainly focused on the multiple mod conflict bug, which is now hopefully gone, so I was not paying too much attention to the mpmaplist feature, but its nice that is being used so intensivly.
 
The following user(s) said Thank You: snowman, culticaxe

Please Log in or Create an account to join the conversation.

2 years 11 months ago #26 by MeToX
Replied by MeToX on topic Mod Manager
I forgot to mention that I have uploaded the code. Feel free to have a look on the github page
The following user(s) said Thank You: snowman

Please Log in or Create an account to join the conversation.

2 years 11 months ago #27 by snowman
Replied by snowman on topic Mod Manager
Tested on my Windows 7 HDD and it works fine

The only problem is, it changes the format of the original file for me. Only the installed map displays fine. When I remove the mod via the manager, the mpmaplist displays normal again

 

"Straight and narrow is the path."
Attachments:

Please Log in or Create an account to join the conversation.

2 years 10 months ago - 2 years 10 months ago #28 by Stern
Replied by Stern on topic Mod Manager
For me it did same thing, messed up file.
Can you open it in some Hex edit program?
To see if there any line brakes:

 

These 2 bytes marked, one is 13 (1Byte) other is 10 (same as ENTER = line brake)

Im guess it handles data in wrong form maybe as a stream of characters.

The one who hesitates is lost !
Attachments:
The following user(s) said Thank You: snowman

Please Log in or Create an account to join the conversation.

2 years 10 months ago #29 by Stern
Replied by Stern on topic Mod Manager


Byte 13 is deleted.
This is why mpmaplist in no longer text with lines.
It just one long line (up to added map), notepad will display as multiple lines because it has one line character limit.

And map name got replaced with  type=
In game it shows map name: type=
 

The one who hesitates is lost !
Attachments:
The following user(s) said Thank You: snowman

Please Log in or Create an account to join the conversation.

2 years 10 months ago #30 by snowman
Replied by snowman on topic Mod Manager
Is it possible to add extra folders to the list? I'm talking about the possibility of having the "Text" folder, which has the folders for each language. This can be used when we install a completely new mission to add the extract the extra text files in each of those folders. Just tested it, thinking it's possible, but this is not. It seems that the game recognizes any new file in each language folder, so we don't have to modify the original game files anymore, thanks to Winters.

I'm thinking if functionality/support for "Tables" and "PlayersProfiles" can be added also

"Straight and narrow is the path."

Please Log in or Create an account to join the conversation.

  • Lukasz birthday is in 3 days (41)
  • spartacus birthday is in 10 days (63)
Powered by Kunena Forum