TinyStart 2

by et508

Original mod by Yehn. A minimalist starter kit with a tier 0 power armor, a mini low-output reactor, and the accoutrements you need for robot construction. As simple as 'Install and Play', but includes optional loadout customization for those looking to tailor their experience, such as using solar power instead.

Utilities
1 year, 2 months ago
2.0
4.18K

b Mk0 equipment disappears

1 year, 2 months ago

When you craft an Mk1 armor using your existing Mk0, it "eats" up all equipment in the grid and it disappears forever.

1 year, 2 months ago

Thank you for letting me know. I will look into it.

10 months ago

This is still an issue I just found out about today. Any info on a fix for this?

12 days ago
(updated 12 days ago)

I hacked this in to regenerate mine after my modules got eaten by the mk1 upgrade.
This was my solution by modifying the mod's control.lua to insert a new regenerate command
1. unzip the mod in AppData/Roaming/Factorio/mods
2. modify control.lua
3. re-zip folder and delete the unzipped folder
4. Relaunch game and load save.
5. In game run /tinystart-regen

I hope this helps someone.

Add this to control.lua:

commands.add_command(
  "tinystart-regen",
  "Gives/equips TinyStart armor and regenerates its equipment (safe, no duplication).",
  function(cmd)
    local player = game.get_player(cmd.player_index)
    if not player then return end

    local chara = player.character or player.cutscene_character
    if not chara then
      player.print("[TinyStart] No character available (sandbox/cutscene).")
      return
    end

    local armor_inv = player.get_inventory(defines.inventory.character_armor)
    if not armor_inv then
      player.print("[TinyStart] No armor inventory available.")
      return
    end

    -- Get currently equipped armor (if any)
    local armor = armor_inv[1]
    local wearing_tiny = armor.valid_for_read and armor.name == "tiny-armor-mk0"

    -- If not wearing Tiny armor, create/equip it
    if not wearing_tiny then
      -- If another armor is equipped, move it to main inventory (or drop if full)
      if armor.valid_for_read then
        local main = player.get_main_inventory()
        local inserted = main and main.insert(armor)
        if not inserted or inserted == 0 then
          player.surface.spill_item_stack(player.position, armor, true, player.force, false)
        end
        armor.clear()
      end

      armor_inv.insert({ name = "tiny-armor-mk0", count = 1 })
      armor = armor_inv[1]
      player.print("[TinyStart] Equipped tiny-armor-mk0.")
    end

    if not armor.valid_for_read then
      player.print("[TinyStart] Failed to equip TinyStart armor.")
      return
    end

    -- Prevent duplication
    if armor.grid.count() > 0 then
      player.print("[TinyStart] Armor already has equipment; not regenerating.")
      return
    end

    genarmor(player, chara)
    player.print("[TinyStart] TinyStart equipment regenerated.")
  end
)

New response