aliens

Author Topic: [DONE][Suggestion] Global craft/soldier loadout templates for new game and new battle  (Read 1740 times)

Offline B1ackwolf

  • Colonel
  • ****
  • Posts: 178
  • im back...i guess
    • View Profile
I have a small humbly request regarding inventory loadouts in the game. Currently, loadout profiles are saved in savefiles, but I'm wondering if there's a possibility to move them into a .rul file format.

This feature could greatly simplify the process of managing loadouts for soldiers in different campaigns. Instead of manually copying and pasting loadouts into new savefiles, we could easily access and apply them directly from a .rul file. Additionally, it could allow for the creation and distribution of suggested loadout templates for players to use.

Personally, I would find this feature particularly useful for testing purposes. When I need to test weapons, items, or specific loadouts in the quick mission mode, having pre-defined loadouts readily available would streamline the setup process and save time, especially when running multiple test scenarios on the same map.

I believe implementing this feature would not only benefit me but also other players and modders who seek greater convenience and efficiency in managing loadouts.

Thank you for considering this suggestion, and I look forward to hearing your thoughts on it.

Offline Alex_D

  • Colonel
  • ****
  • Posts: 498
    • View Profile
Re: [Suggestion] Saving Inventory Loadouts in .rul Files
« Reply #1 on: May 07, 2024, 10:57:52 pm »
In my case, I do it manually. I open the save and copy/paste into another file (formatted in yaml).

I found myself using it for Crafts rather than Units, because, as far as I know, Craft load-out templates only have 10 slots, and Units have 50.

Offline B1ackwolf

  • Colonel
  • ****
  • Posts: 178
  • im back...i guess
    • View Profile
Re: [Suggestion] Saving Inventory Loadouts in .rul Files
« Reply #2 on: May 08, 2024, 05:47:12 pm »
yeah, im aware you can manually copy and paste it into your save files, i already do it, but i wished to know for possible alternatives, tho.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Re: [Suggestion] Saving Inventory Loadouts in .rul Files
« Reply #3 on: August 12, 2024, 03:17:33 pm »
and when should the data be copied from *.rul into *sav ?

1. on new game?
2. on every load?
3. on hotkey?
4. something else?

Offline B1ackwolf

  • Colonel
  • ****
  • Posts: 178
  • im back...i guess
    • View Profile
Re: [Suggestion] Saving Inventory Loadouts in .rul Files
« Reply #4 on: August 12, 2024, 06:41:27 pm »
and when should the data be copied from *.rul into *sav ?

1. on new game?
2. on every load?
3. on hotkey?
4. something else?

TL;DR:
1. would be more convenient.
3. in case first option doesnt apply into the "new/quick battle" screen.


Long Answer:
If I'm completely honest, my preferred option would be the one that doesn't create an insurmountable hassle to implement. However, I'll leave that decision in your hands, as it's clear you're more knowledgeable about this topic than I am.

1. I think this option might be the most convenient for new players who try mods and find themselves overwhelmed by multiple new weapon additions. It could help mitigate the 'shock' of the sheer number of new options. For veteran players, or in my specific case, most of the time spent in the loadout screen is during the initial setup when creating templates. After that, I just replace weapons as new tiers are unlocked. The critical point, in my opinion, is at the very beginning.

2. I might be completely wrong, but wouldn't this create extra load time, especially in some mega-mods with hundreds of additions? It feels like a less convenient version of option 1, to be honest.

3. This could be an excellent tradeoff, with the added perk that players who create their own exotic loadouts based on their preferred playstyles won't have their lists cluttered with more 'standard and conservative' suggestions. Also, this is the only scenario I can imagine affecting the quick battle generator, right?"

Online Delian

  • Colonel
  • ****
  • Posts: 494
    • View Profile
Re: [Suggestion] Saving Inventory Loadouts in .rul Files
« Reply #5 on: August 12, 2024, 06:50:57 pm »
I'm neutral on this feature, but I think the correct solution for this would be an Export / Import buttons somewhere...

In the craft equipment window, when the user presses F5, the Save Craft Loadout window is brought up. Add an Export button to this window.
In the craft equipment window, when the user presses F9, the Load Craft Loadout window is brought up. Add an Import button to this window.
In the soldier inventory window, when the user presses F5, the Save Equipment Template window is brought up. Add an Export Button to this window.
In the soldier inventory window, when the user presses F9, the Load Equipment Template window is brought up. Add an Import Button to this window.

Pressing in these import/export buttons would show the user a dialogue message box saying something like, Templates will be saved to blabla file. Do you wish to overwrite the file? or Do you wish to overwrite the current craft templates/current equipment templates?

The files would be separate for crafts and for equipment.

Hmm. Could be problems if a template file was made in one mod, and loaded in the other mod.
« Last Edit: August 12, 2024, 06:56:47 pm by Delian »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9084
    • View Profile
Done.

Definitions are loaded from the starting base ruleset, new attribute is called `globalTemplates`.

Example:

Code: [Select]
startingBase:
  globalTemplates:
    globalEquipmentLayout1:
      - {itemType: STR_PISTOL, slot: STR_RIGHT_HAND, ammoItem: STR_PISTOL_CLIP, ammoItemSlots: [STR_PISTOL_CLIP]}
      - {itemType: STR_HC_AP_AMMO, slot: STR_BELT}
    globalEquipmentLayoutName1: pistol guy
    globalEquipmentLayout3:
      - {itemType: STR_HEAVY_CANNON, slot: STR_LEFT_HAND, ammoItem: STR_HC_AP_AMMO, ammoItemSlots: [STR_HC_AP_AMMO]}
      - {itemType: STR_HC_HE_AMMO, slot: STR_BACK_PACK, slotY: 2}
    globalEquipmentLayoutName3: heavy guy
    globalCraftLoadout2:
      STR_HC_AP_AMMO: 2
      STR_HC_HE_AMMO: 2
      STR_HEAVY_CANNON: 1
      STR_PISTOL: 2
      STR_PISTOL_CLIP: 4
    globalCraftLoadoutName2: craft template 3

TL;DR:
1. would be more convenient.
3. in case first option doesnt apply into the "new/quick battle" screen.

implemented 1.