Jump to content
Korean Random
DEbranded

XVM и Inno Setup // XVM and Inno Setup

Recommended Posts

Надеюсь, что я здесь ...

 

Я пытаюсь создать пакет мод без конфигурации XVM с помощью Inno Setup. С некоторыми модами я должен заменить код в некоторых файлах XC (например, "mirroredVehicleIcons": true --> "mirroredVehicleIcons": false).

Поскольку каждый игрок может использовать разные файлы конфигурации XVM, поэтому мне нужно знать ...

  • который является активным (если установлено больше, чем установлено по умолчанию)
  • где строка (например, «mirroredVehicleIcons») является
  • как его заменить

 

У кого-нибудь есть опыт в этом?

Я не хочу строить свою конфигурацию XVM ... Я просто хочу правильно «настроить» существующую, если игрок хочет.

 

с уважением

DEbranded

------------------------------

 

Hoping that I'm right here...

 

I'm trying to create a mod pack without a XVM config by using Inno Setup. With some mods I have to replace code in some XC files (e.g. "mirroredVehicleIcons": true --> "mirroredVehicleIcons": false).

As each player can use different XVM config files so I need to know...

  • which one is the active one (if there are more than default installed)
  • where the string (e.g. "mirroredVehicleIcons") is
  • how to replace it

 

Does anyone have experience in doing this?

I don't want to build my XVM config... I just want to correctly "adjust" an existing one, if the player wants to.

 

kind regards

DEbranded

 

Share this post


Link to post

Short link
Share on other sites

I wonder if I'm the only one who doesn't quite understand what you're trying to do.

Is it that you want to create a modpack using an installer, that will install XVM, but without a config, that will let players, who already have XVM installed, customize their existing config?

 

Share this post


Link to post

Short link
Share on other sites

@konrad509

 

Да. Я пытаюсь создать modpack для моих контурных значков, значков оборудования и навыков, моей группы пользовательских флагов и некоторых других. Но не конфигурацию XVM ... как Aslain, Jimb0 или другие.

Большинство этих модов можно установить либо в VANILLA, либо в XVM.

Но контурные значки нуждаются в настройках в существующих конфигурациях XVM.

 

------------------------------

 

Yes. I'm trying to create a modpack for my contour icons, equipment & skill icons, my bunch of custom flags and some more. But not an XVM config... like Aslain, Jimb0 or others.

Most of these mods can be installed either in VANILLA or XVM.

But the contour icons need customizations in existing XVM configs.

Share this post


Link to post

Short link
Share on other sites

@DEbranded 

 

Example:

procedure ConfigEdit(Name, OldValue, NewValue: String);
var
  Config: TStringList;
  ConfigSetStr: TArrayOfString;
  ConfigAnsiStr: AnsiString;
  ConfigDir, FileName, Temp: String;
begin
  Temp:=String(ConfigAnsiStr);
  ConfigDir:=ExpandConstant('{app}\');
  FileName:=ConfigDir + Name;
  if FileExists(FileName) then
  begin
    Config:=TStringList.Create;
    try
      Config.LoadFromFile(ConfigDir + Name);
      Temp:=Config.Text;
      StringChange(Temp, OldValue, NewValue);
      Config.Text:=Temp;
      Config.SaveToFile(ConfigDir + Name);
      if LoadStringsFromFile(ConfigDir + Name, ConfigSetStr) then
        SaveStringsToUTF8File(ConfigDir + Name, ConfigSetStr, False);
    finally
      Config.Free;
    end;
  end;
end;

Further in the right place:

ConfigEdit('res_mods\configs\xvm\default\battle.xc', '"mirroredVehicleIcons": true,', '"mirroredVehicleIcons": false,');
  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

@night_dragon_on 

но что делать, если каталог xvm не "default" или в battle.xc только ссылка стоит ("mirroredVehicleIcons": ${"HawgPen/Battle/Battle_nothawgsicontours/OnOff.xc": "mirroredVehicleIcons"},)

 

sorry for yandex translate

Share this post


Link to post

Short link
Share on other sites
13 часов назад, Budyx69 сказал:

но что делать, если каталог xvm не "default" или в battle.xc только ссылка стоит

 

This can be provided by presets, depending on which component is selected:

begin
  if IsComponentSelected('HawgPen-Config') then
    ConfigEdit('res_mods\configs\xvm\HawgPen\Battle\Battle_nothawgsicontours\OnOff.xc', '"mirroredVehicleIcons": true,', '"mirroredVehicleIcons": false,');
end;
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites
1 час назад, night_dragon_on сказал:

 

Dies kann je nach ausgewählter Komponente durch Presets erfolgen:


   

 

Да, это правда ... но почти невозможно узнать все настраиваемые конфигурации и написать ConfigEdit для каждого из них.

 

------------------------------

 

Yes, that's true... but it's nearly impossible to know all custom configs out there and to write a ConfigEdit for each of them.

Share this post


Link to post

Short link
Share on other sites

Это там любой вроде "флаг" к идентифицировать который xvm конфигурация, если кратное installed, это активный один? Это чтение xvm.xc сейф и надежный метод? Или являются там другие?

 

-------------------------------

 

Is there any kind of "flag" to identify which XVM configuration, if multiple installed, is the active one?

Is reading xvm.xc a safe and reliable method? Or are there others?

Share this post


Link to post

Short link
Share on other sites

@DEbranded don't use translator, it's unreadable. Write in english only)

 

44 минуты назад, DEbranded сказал:

Is reading xvm.xc a safe and reliable method? Or are there others?

This is the only correct method.

Edited by yepev

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...