No announcement yet.

Help me please with a listbox

  • Filter
  • Time
  • Show
Clear All
new posts

  • Help me please with a listbox

    hello everyone i need your help i am creating a mod loader for a game and i get stuck in the listbox.

    Well there is a video game to which you can add mods and to make it work with MODS, I have to open the * .INI file (GameModOptions.ini) all the time that I want to add several MODS. So I set out to create a MODS loader to avoid fatigue. All mod names I want to use in the game are inside a MODS folder and are as subfolders.
    Normally, I manually open the file "GameModOptions.ini" located in their respective path for example: "C: \ Game \ MODS \ GameModOptions.ini" and write the name of the mod inside the file * .INI for example "ActiveMods = Mod_tomates ". Then we save the file GameModOptions.ini and when you run the game, it comes out with the mod activated.

    It occurred to me that the names of the mods hosted in the MODS path would be loaded in a listbox and I could activate them through checklist and this would also be written automatically in the file "GameModOptions.ini", in this way I would not have to write always the name of each mod in the game.

    In the file "mod loader BETA.apz", I have set them as it should be. Likewise, the syntax or structure of the file GameModOptions.ini is like this inside:
    "So would it be with active mods"
    ActiveMods = Mod_TitanSpark
    ActiveMods = Mod_Kasumi_Squadmate
    ActiveMods = Mod_M3Predator_Pistol
    "So would it be with the mods disabled" (in front of them there is a semicolon, to say that they are disabled)

    ; ActiveMods = Mod_TitanSpark
    ; ActiveMods = Mod_Kasumi_Squadmate
    ; ActiveMods = Mod_M3Predator_Pistol

    That is what I want to do automatically when activating them in the listbox with the checklist boxes and save it in the same INI "GameModOptions.ini".

    I attach an ink with my project in * .rar, there is the * .apz file, the MODS folders and the * .INI file for testing.

    BETA Mod Loader.apz

    BETA Mod Loader.rar

    Sorry for the inconvenience and my English I wish you a good day and a big hug from a distance.

  • #2
    Hi Here is how to get folders into listbox
    BETA Mod Loader2.apz

    To write to ini file Get listbox item text on selected then wirite to ini file section



    • #3
      Click image for larger version

Name:	81493f519d7590e32e96d120af1731f8.jpg
Views:	231
Size:	82.8 KB
ID:	305151

      Hello friend, thank you very much for your help. Thank you.
      Here I am missing something and it is my fault because I did not explain well what I needed. But with this image I think you could help me a little more please. before hand I am again grateful for your help and time. I attach the new file * .apz



      • #4
        Hi You have got something wrong - you cannot have more than one value under the same section.
        SO ActiveMods = can only be one foldername

        Click image for larger version

Name:	ini set.png
Views:	195
Size:	7.5 KB
ID:	305154

        VALUE = DATA
        value2 = data
        value3 = data
        You may have to post a real ini file that is used by the Game or
        Make sure you can only CHECK one from the listbox


        • #5
          Hello again friend, I am very grateful for your help and patience, I am taking your advice into account and I am going very, very slowly for being a novice.

          But well I have created a video of my project in Power Point so that you can understand me and also help and complete my project.

          Here I put the link of the video, please watch it and tell me if it is possible to achieve that.

          This is a video of my project in which I need your help to complete it. I hope it can be done at AMS. Thanks for your help.

          Link *.apz


          Link *.rar


          I would really appreciate your help, please.