Prefab List

Discussion in 'Hurtworld Development' started by Noviets, Feb 13, 2016.

  1. Thought this might be helpful.

    Code:
    List<string> prefabs = new List<string>();
    void Saveprefabs() => Interface.GetMod().DataFileSystem.WriteObject("Prefabs", prefabs);
    void Loaded()
    {
            int count = 0;
            foreach (var obj in Resources.FindObjectsOfTypeAll<ConstructionPrefab>())
            {
             
                count++;
                prefabs.Add(obj.name);
            }
            Puts("Prefabs: "+count);
            Saveprefabs();
    }
    
    Result:
    Code:
    [
      "RemovalConstructionItem(Clone)",
      "FoundationConstructionItem(Clone)",
      "WorkbenchDynamicConstructionItem(Clone)",
      "WorkbenchDynamicConstructionItem",
      "WoodDoorDynamicConstructionItem(Clone)",
      "WoodDoorDynamicConstructionItem",
      "WallConstructionItem(Clone)",
      "WallConstructionItem",
      "TrussConstructionItem(Clone)",
      "TrussConstructionItem",
      "TPipeConstructionItem(Clone)",
      "TPipeConstructionItem",
      "TorchConstructionItem(Clone)",
      "TorchConstructionItem",
      "TestSourceDynamicConstructionItem(Clone)",
      "TestSourceDynamicConstructionItem",
      "SucculentDynamicConstructionItem(Clone)",
      "SucculentDynamicConstructionItem",
      "StraightPipeConstructionItem(Clone)",
      "StraightPipeConstructionItem",
      "StorageCrateDynamicConstructionItem(Clone)",
      "StorageCrateDynamicConstructionItem",
      "StorageChestDynamicConstructionItem(Clone)",
      "StorageChestDynamicConstructionItem",
      "StoneWallConstructionItem(Clone)",
      "StoneWallConstructionItem",
      "StoneDoorDynamicConstructionItem(Clone)",
      "StoneDoorDynamicConstructionItem",
      "SteepRampTrussConstructionItem(Clone)",
      "SteepRampTrussConstructionItem",
      "ShortWallConstructionItem(Clone)",
      "ShortWallConstructionItem",
      "RoofConstructionItem(Clone)",
      "RoofConstructionItem",
      "RoachDynamicConstructionItem(Clone)",
      "RoachDynamicConstructionItem",
      "RemovalConstructionItem(Clone)",
      "RemovalConstructionItem",
      "RampTrussConstructionItem(Clone)",
      "RampTrussConstructionItem",
      "RampFoundationConstructionItem(Clone)",
      "RampFoundationConstructionItem",
      "PoisonTrapConstructionItem(Clone)",
      "PoisonTrapConstructionItem",
      "PitcherPlantDynamicConstructionItem(Clone)",
      "PitcherPlantDynamicConstructionItem",
      "OwrongDynamicConstructionItem(Clone)",
      "OwrongDynamicConstructionItem",
      "OwnershipStakeDynamicConstructionItem(Clone)",
      "OwnershipStakeDynamicConstructionItem",
      "OilDrillDynamicConstructionItem(Clone)",
      "OilDrillDynamicConstructionItem",
      "MetalWallConstructionItem(Clone)",
      "MetalWallConstructionItem",
      "MetalDoorDynamicConstructionItem(Clone)",
      "MetalDoorDynamicConstructionItem",
      "MedusaVineDynamicConstructionItem(Clone)",
      "MedusaVineDynamicConstructionItem",
      "LandCrabMineConstructionItem(Clone)",
      "LandCrabMineConstructionItem",
      "GroundDrillDynamicConstructionItem(Clone)",
      "GroundDrillDynamicConstructionItem",
      "GreenGroundDrillDynamicConstructionItem(Clone)",
      "GreenGroundDrillDynamicConstructionItem",
      "GoatDynamicConstructionItem(Clone)",
      "GoatDynamicConstructionItem",
      "GarageDoorWoodDynamicConstructionItem(Clone)",
      "GarageDoorWoodDynamicConstructionItem",
      "GarageDoorwayWoodenConstructionItem(Clone)",
      "GarageDoorwayWoodenConstructionItem",
      "GarageDoorwayStoneConstructionItem(Clone)",
      "GarageDoorwayStoneConstructionItem",
      "GarageDoorwayMetalConstructionItem(Clone)",
      "GarageDoorwayMetalConstructionItem",
      "GarageDoorStoneDynamicConstructionItem(Clone)",
      "GarageDoorStoneDynamicConstructionItem",
      "GarageDoorMetalDynamicConstructionItem(Clone)",
      "GarageDoorMetalDynamicConstructionItem",
      "FridgeConstructionItem(Clone)",
      "FridgeConstructionItem",
      "FoundationConstructionItem(Clone)",
      "FoundationConstructionItem",
      "FloorConstructionItem(Clone)",
      "FloorConstructionItem",
      "FirepitDynamicConstructionItem(Clone)",
      "FirepitDynamicConstructionItem",
      "DoorwayWoodenConstructionItem(Clone)",
      "DoorwayWoodenConstructionItem",
      "DoorwayStoneConstructionItem(Clone)",
      "DoorwayStoneConstructionItem",
      "DoorwayMetalConstructionItem(Clone)",
      "DoorwayMetalConstructionItem",
      "CampfireDynamicConstructionItem(Clone)",
      "CampfireDynamicConstructionItem",
      "C4ConstructionItem(Clone)",
      "C4ConstructionItem",
      "BlueGroundDrillDynamicConstructionItem(Clone)",
      "BlueGroundDrillDynamicConstructionItem",
      "BlastfurnaceDynamicConstructionItem(Clone)",
      "BlastfurnaceDynamicConstructionItem",
      "BentPipeConstructionItem(Clone)",
      "BentPipeConstructionItem",
      "StoneDoorDynamicConstructionItem",
      "WoodDoorDynamicConstructionItem",
      "MetalDoorDynamicConstructionItem",
      "ShortWallConstructionItem",
      "SteepRampTrussConstructionItem",
      "StoneWallConstructionItem",
      "MetalWallConstructionItem",
      "RemovalConstructionItem",
      "GarageDoorMetalDynamicConstructionItem",
      "DoorwayWoodenConstructionItem",
      "GarageDoorStoneDynamicConstructionItem",
      "RampTrussConstructionItem",
      "GarageDoorwayWoodenConstructionItem",
      "RoofConstructionItem",
      "TorchConstructionItem",
      "GarageDoorwayStoneConstructionItem",
      "DoorwayMetalConstructionItem",
      "FloorConstructionItem",
      "DoorwayStoneConstructionItem",
      "WallConstructionItem",
      "FoundationConstructionItem",
      "TrussConstructionItem",
      "GarageDoorwayMetalConstructionItem",
      "GarageDoorWoodDynamicConstructionItem",
      "RampFoundationConstructionItem",
      "OwnershipStakeDynamicConstructionItem",
      "StorageCrateDynamicConstructionItem",
      "PoisonTrapConstructionItem",
      "WorkbenchDynamicConstructionItem",
      "BentPipeConstructionItem",
      "StraightPipeConstructionItem",
      "TPipeConstructionItem",
      "PitcherPlantDynamicConstructionItem",
      "TestSourceDynamicConstructionItem",
      "CampfireDynamicConstructionItem",
      "FirepitDynamicConstructionItem",
      "OilDrillDynamicConstructionItem",
      "GoatDynamicConstructionItem",
      "LandCrabMineConstructionItem",
      "MedusaVineDynamicConstructionItem",
      "StorageChestDynamicConstructionItem",
      "FridgeConstructionItem",
      "C4ConstructionItem",
      "OwrongDynamicConstructionItem",
      "BlastfurnaceDynamicConstructionItem",
      "SucculentDynamicConstructionItem",
      "GroundDrillDynamicConstructionItem",
      "BlueGroundDrillDynamicConstructionItem",
      "GreenGroundDrillDynamicConstructionItem",
      "RoachDynamicConstructionItem"
    ]
     
    Last edited by a moderator: Feb 13, 2016
  2. Spawnable Objects:
    Code:
    [
      "AIBorRadServer",
      "AIBorServer",
      "AIRafagaServer",
      "AIShepherdServer",
      "AIShigiArcticServer",
      "AIShigiForestServer",
      "AIShigiServer",
      "AIShigiWolfServer",
      "AITokarAlbinoServer",
      "AITokarBlueServer",
      "AITokarParrotServer",
      "AITokarServer",
      "AIYetiForestServer",
      "AIYetiServer",
      "ArrowProjectile",
      "BentPipeConstructionItem",
      "BlastFurnaceDynamicConstructed",
      "BlastFurnaceDynamicConstructionItem",
      "BulletProjectile",
      "C4ConstructionItem",
      "C4DynamicObject",
      "CampfireDynamicConstructed",
      "CampfireDynamicConstructionItem",
      "CoalRockResourceNodeServer",
      "Deadtree1ResourceNodeServer",
      "Deadtree2ResourceNodeServer",
      "Deadtree3ResourceNodeServer",
      "DoorwayMetalConstructionItem",
      "DoorwayStoneConstructionItem",
      "DoorwayWoodenConstructionItem",
      "DynamiteExplosiveWorldItem",
      "ExplosiveProjectile",
      "FirepitDynamicConstructed",
      "FirepitDynamicConstructionItem",
      "FlintrockResourceNodeServer",
      "FloorConstructionItem",
      "FoundationConstructionItem",
      "FridgeConstructionItem",
      "FridgeDynamicConstructed",
      "GarageDoorMetalDynamicConstructed",
      "GarageDoorMetalDynamicConstructionItem",
      "GarageDoorStoneDynamicConstructed",
      "GarageDoorStoneDynamicConstructionItem",
      "GarageDoorwayMetalConstructionItem",
      "GarageDoorwayStoneConstructionItem",
      "GarageDoorwayWoodenConstructionItem",
      "GarageDoorWoodDynamicConstructed",
      "GarageDoorWoodDynamicConstructionItem",
      "Goat",
      "GoatDynamicConstructionItem",
      "GroundDrillDynamicConstructed",
      "GroundDrillDynamicConstructionItem",
      "IronRockResourceNodeServer",
      "LandCrabDynamicObject",
      "LandCrabmineConstructionItem",
      "LargeMiningRockServer",
      "LogResourceNodeServer",
      "LootCache",
      "MedusaVineDynamic",
      "MedusaVineDynamicConstructionItem",
      "Metal2ResourceNodeServer",
      "Metal3ResourceNodeServer",
      "Metal4ResourceNodeServer",
      "MetaldoorDynamicConstructed",
      "MetaldoorDynamicConstructionItem",
      "MetalWallConstructionItem",
      "OilDrillDynamicConstructed",
      "OilDrillDynamicConstructionItem",
      "OwnershipStakeDynamicConstructed",
      "OwnershipStakeDynamicConstructionItem",
      "OwrongDynamicConstructionItem",
      "OwrongResourceNode",
      "PelletProjectile",
      "PitcherPlantDynamicConstructionItem",
      "PitcherPlantResourceNode",
      "PlayerServer",
      "PlayerServerLoadTest",
      "PoisonTrapConstructionItem",
      "PoisonTrapDynamicObject",
      "RainStormServer",
      "RampFoundationConstructionItem",
      "RampTrussConstructionItem",
      "RemovalConstructionItem",
      "Roach",
      "RoachDynamicConstructionItem",
      "RoofConstructionItem",
      "SandstoneResourceNodeServer",
      "SandstormServer",
      "ShortWallConstructionItem",
      "SimpleProjectile",
      "SpearProjectile",
      "SteepRampTrussConstructionItem",
      "StonedoorDynamicConstructed",
      "StonedoorDynamicConstructionItem",
      "StoneWallConstructionItem",
      "StorageChestDynamicConstructed",
      "StorageChestDynamicConstructionItem",
      "StorageCrateDynamicConstructed",
      "StorageCrateDynamicConstructionItem",
      "StraightPipeConstructionItem",
      "StructureManager",
      "SucculentDynamicConstructionItem",
      "SucculentResourceNode",
      "TestSourceDynamicConstructionItem",
      "TokarPoison",
      "TokarSpit",
      "TorchConstructed",
      "TorchConstructionItem",
      "TPipeConstructionItem",
      "TrapPoison",
      "TrussConstructionItem",
      "WallConstructionItem",
      "WooddoorDynamicConstructed",
      "WooddoorDynamicConstructionItem",
      "WorkbenchDynamicConstructed",
      "WorkbenchDynamicConstructedproxy",
      "WorkbenchDynamicConstructionItem",
      "WorldItem",
      "WorldItemCache",
      "WorldItemFlint",
      "WorldItemMeteor",
      "WorldItemOre",
      "WorldItemSpear",
      "WorldItemSpeargreen",
      "WorldItemSpearice",
      "WorldItemSpearmolten",
      "WorldItemWood"
    ]
     
  3. Hello Noviets,

    Thank you for this and your time. Appreciate man!

    Cheers
     
  4. Can you post new prefabs please :)
     
  5. Just use the Code above??

    Code:
    [
      "WallConstructionItem(Clone)",
      "WallConstructionItem(Clone)",
      "TrapConstructionItem(Clone)",
      "TrapConstructionItem(Clone)",
      "TPipeConstructionItem(Clone)",
      "TPipeConstructionItem(Clone)",
      "TestSourceDynamicConstructionItem(Clone)",
      "TestSourceDynamicConstructionItem(Clone)",
      "SurfaceConstructionItem(Clone)",
      "SurfaceConstructionItem(Clone)",
      "StraightPipeConstructionItem(Clone)",
      "StraightPipeConstructionItem(Clone)",
      "SignConstructionItem(Clone)",
      "SignConstructionItem(Clone)",
      "RemovalConstructionItemProxy(Clone)",
      "RemovalConstructionItemProxy(Clone)",
      "RemovalConstructionItem(Clone)",
      "RemovalConstructionItem(Clone)",
      "PlantConstructionItem(Clone)",
      "PlantConstructionItem(Clone)",
      "OwnershipStakeConstructionItem(Clone)",
      "OwnershipStakeConstructionItem(Clone)",
      "GroundConstructionItem(Clone)",
      "GroundConstructionItem(Clone)",
      "GenericConstructionItem(Clone)",
      "GenericConstructionItem(Clone)",
      "DrillConstructionItem(Clone)",
      "DrillConstructionItem(Clone)",
      "BentPipeConstructionItem(Clone)",
      "BentPipeConstructionItem(Clone)",
      "SurfaceConstructionItem",
      "DrillConstructionItemProxy",
      "DrillConstructionItem",
      "SignConstructionItemProxy",
      "PlantConstructionItem",
      "RemovalConstructionItem",
      "RemovalConstructionItemProxy",
      "PlantConstructionItemProxy",
      "GroundConstructionItemProxy",
      "WallConstructionItem",
      "TrapConstructionItem",
      "SignConstructionItem",
      "TrapConstructionItemProxy",
      "TestSourceDynamicConstructionItem",
      "GenericConstructionItemProxy",
      "OwnershipStakeConstructionItemProxy",
      "BentPipeConstructionItem",
      "GenericConstructionItem",
      "StraightPipeConstructionItem",
      "OwnershipStakeConstructionItem",
      "TPipeConstructionItem",
      "WallConstructionItemProxy",
      "SurfaceConstructionItemProxy",
      "GroundConstructionItem"
    ]
    
     
  6. where do you use the code above at?