Current time: 14.04.2024, 21:58 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
Era II Mod Manager
» Менеджер модов для платформы Эра
Author Message
Berserker Offline
Administrators

Posts: 16471
Post: #391

Code:
PROGRAM InstallMod;
{
DESCRIPTION:  Replaces strings in the specified file
AUTHOR:       Alexander Shostak (aka Berserker aka EtherniDee aka BerSoft)
}

USES SysUtils, Utils, Lists, Files, DlgMes, CmdApp;

CONST
  MODS_DIR                  = 'Mods';
  DEFAULT_MODLIST_FILEPATH  = MODS_DIR + '\list.txt';


PROCEDURE Install (CONST NewModName: STRING);
VAR
{O} ModList:      Lists.TStringList;
{O} FileList:     Lists.TStringList;
    ModListText:  STRING;
    ModName:      STRING;
    ModInd:       INTEGER;
    i:            INTEGER;
  
BEGIN
  FileList  :=  Lists.NewSimpleStrList;
  ModList   :=  Lists.NewSimpleStrList;
  // * * * * * //
  ModList.CaseInsensitive :=  TRUE;
  Files.ReadFileContents(DEFAULT_MODLIST_FILEPATH, ModListText);
  FileList.LoadFromText(ModListText, #13#10);
  FileList.Add(NewModName);
  
  FOR i := FileList.Count - 1 DOWNTO 0 DO BEGIN
    ModName :=
      SysUtils.ExcludeTrailingBackslash(
      SysUtils.ExtractFileName(
      SysUtils.Trim(FileList[i])
      ));

    IF (ModName <> '') AND NOT ModList.Find(ModName, ModInd) THEN BEGIN
      ModList.Insert(ModName, 0);
    END; // .IF
  END; // .FOR
  
  Files.WriteFileContents(ModList.ToText(#13#10), DEFAULT_MODLIST_FILEPATH);
  // * * * * * //
  SysUtils.FreeAndNil(FileList);
  SysUtils.FreeAndNil(ModList);
END; // .PROCEDURE Install

FUNCTION Run: BOOLEAN;
VAR
  Error:  STRING;

BEGIN
  RESULT  :=  TRUE;
  
  IF CmdApp.ArgsList.Count = 0 THEN BEGIN
    DlgMes.Msg('Program.exe [ModPath]');
  END // .IF
  ELSE BEGIN
    RESULT  :=  CmdApp.ArgsList.Count = 1;
    
    IF NOT RESULT THEN BEGIN
      Error :=  'Invalid number of parameters. Run program without parameters for help.';
    END // .IF
    ELSE BEGIN
      Install(CmdApp.ArgsList[0]);
    END; // .ELSE
  END; // .ELSE
  
  IF NOT RESULT THEN BEGIN
    DlgMes.MsgError(Error);
  END; // .IF
END; // .FUNCTION Run

BEGIN
  Run;
END.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
07.09.2014 20:45
Find all posts by this user Quote this message in a reply
SyDr Offline

Posts: 1052
Post: #392

По той же ссылке небольшое, но важное обновление:
Mod Manager will no longer use "installmod.exe" when installing mod.
If you rename "modsmann.exe" to "installmod.exe" and replace original "installmod.exe" - MM will work like this utility but with awareness of Priority system*.
MM will launch with same elevation level as parent application

*There is following differences between MM and original "installmod":
1) MM will use self containing directory as base (<Game Dir>\Tools\..\Mods), not a working dir (place a empty file "im_use_work_dir" to restore old behavior).
2) MM does not require administrator privileges on machines with enabled UAC.
07.09.2014 21:46
Find all posts by this user Quote this message in a reply
SyDr Offline

Posts: 1052
Post: #393

Кто-нибудь тестил использование ММ в качестве installmod?
14.09.2014 14:41
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16471
Post: #394

---------------------------
AutoIt Error
---------------------------
Line 10982 (File "D:\Soft\Games\Heroes3\Era\Tools\installmod.exe"):


Error: Subscript used on non-accessible variable.
---------------------------
ОК
---------------------------

WoG
Yona
Secondary Skills Scrolling
Fast Battle Animation
#NewYona
WoG Rus
#Vallex Portraits
#New Music Pack
#WoG Revised
#Morn battlefields
#Big Spellbook
Phoenix
#Battle Heroes
#H2 Succession Wars
#Another heroes
#Tew IV
#WoG Chinese
#ERA scripts Rus
#HmS_Improved_Interface


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
14.09.2014 23:42
Find all posts by this user Quote this message in a reply
SyDr Offline

Posts: 1052
Post: #395

Исправлено. Ссылка та же. Всех остальных это не касается, на версии, которой вы пользуетесь - такого нет.
15.09.2014 00:08
Find all posts by this user Quote this message in a reply
SyDr Offline

Posts: 1052
Post: #396

Небольшое обновление: исправлена ошибка при которой двойной клик по любой активной категории приводил к отключению первого мода в списке (бета не обновлена).
16.09.2014 11:54
Find all posts by this user Quote this message in a reply
SyDr Offline

Posts: 1052
Post: #397

Update:
1) Window size and state (maximized or not) will be remembered always. Window position will not be remembered. Option removed from settings.
2) Removed browser detection for "Go to webpage". MM will use ShellExecute (try Win+R -> type address). Allowed protocols are "http" and "https"
3) Removed hidden "Explorer" settings.
4) Icons changed to Oxygen Icons.
5) Improved detection "is mod list actual" when MM regains focus. Now list should be reloaded only if changes occurs (use F5 if you made changes to file mod_info.ini).
6) Other fixes.
16.09.2014 17:53
Find all posts by this user Quote this message in a reply
Bes Offline

Posts: 5422
Post: #398

мне кажется или разработчики специально начали вести информационный канал на английском в силу своего приподнятого настроения?! 96-copy
16.09.2014 21:34
Visit this user's website Find all posts by this user Quote this message in a reply
SyDr Offline

Posts: 1052
Post: #399

Ну что поделаешь... У меня тут как-то традиционно сложилось, что на русском я пишу, когда это касается в первую очередь здешний народ, а на английском - когда касается также Valery или kswdiy.
Вообще, вся последняя работа после приоритетов направлена на то, чтобы я вспомнил - что, где и как работает.
Удаление настроек, собственно, позволяет прощё проводить дальнейшие изменения в коде (самое главное - отдельная колонка для модмейкеров, позволило вырезать кучу страшных костылей).

Вообще, я достаточно долго присматривался к различным инструментам... с мыслью аля "щас напишу на крутой штуке и это всё будет круто", пока до меня наконец не дошло, что нифига у меня не выйдет - не хватит терпения переписать столько кода. Не говоря уже о том, что AutoIt таки снова обновляют и избавляют от старых проблем.
И вообще, Bes, что там не так с форматом .zip?
16.09.2014 23:00
Find all posts by this user Quote this message in a reply
Bes Offline

Posts: 5422
Post: #400

(16.09.2014 23:00)SyDr Wrote:  И вообще, Bes, что там не так с форматом .zip?

Вконтакте видит что в архив есть EXE и блокирует файл для храения
а 7Z не может так сканировать...
только по этому 144
16.09.2014 23:42
Visit this user's website Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16471
Post: #401

На мой взгляд лучше rar-а сейчас ничего не придумаешь )

Ай да Бес, ай да молодца )))


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
17.09.2014 00:20
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #402

120+ mods today in my manager. When we started it was like 10 mods.
(This post was last modified: 17.09.2014 19:10 by Valery.)
17.09.2014 17:47
Find all posts by this user Quote this message in a reply
SyDr Offline

Posts: 1052
Post: #403

Valery, why you don't translate mod manager to French yet?

Also, show a screenshot with these mods Sm
17.09.2014 18:38
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #404

Believe me, I would do it if only there was need.

I don't know a single Heroes 3 french player.

(This post was last modified: 17.09.2014 19:09 by Valery.)
17.09.2014 19:01
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16471
Post: #405

Great package it is!


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
17.09.2014 22:06
Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Forum Jump:

Powered by MyBB Copyright © 2002-2024 MyBB Group