June 22, 2017, 08:24:25 PM

Author Topic: Export - Import Tracked items (like military & professions) [duplicated thread]  (Read 1354 times)

Chatmetaleux

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
I think it could be useful to be able to export an import the Tracked items the same way we can do for militia and profession jobs  ::)

Sorry... duplicated thread...http://forums.gnomoria.com/index.php?topic=6280.0
« Last Edit: March 03, 2016, 10:17:03 AM by Chatmetaleux »

Tacyn

  • Full Member
  • ***
  • Posts: 223
    • View Profile
You can add tracked items very easily using mods  by editing stockmenusettings.xml.

Chatmetaleux

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
 :D thanks !

Theory

  • Newbie
  • *
  • Posts: 3
    • View Profile
Can you provide a pick out of code to say track Pine Planks.

How do you state you want to track Pine Planks specifically not just Planks?

Tacyn

  • Full Member
  • ***
  • Posts: 223
    • View Profile
Can you provide a pick out of code to say track Pine Planks.

How do you state you want to track Pine Planks specifically not just Planks?

Doesn't look like that is possible via mods.
Specific materials can only be checked ingame.

Chatmetaleux

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Hmmm, that's weird we can't set materials because there is only the <ItemID>...
Looking to do an export/import function with a Faark's mod, it could be possible to add a trackeditem directly with the materialID wanted :

Code: [Select]
namespace Game
{
    public sealed class TrackedItemGroup
    {
        public TrackedItemGroup();
        public TrackedItemGroup(BinaryReader reader);

        public ItemGroup AllowedItems { get; set; }
        public GameProperty<int> ItemCount { get; set; }
        public GameProperty<string> Name { get; set; }

        public void AddAllowedItem(string itemID);
        public void AddAllowedMaterial(string itemID, string materialID);
        public void AddItem(Item item);
        public bool IsItemAllowed(string itemID);
        public bool IsMaterialAllowed(string itemID, string materialID);
        public void RecountItems();
        public void RemoveAllowedItem(string itemID);
        public void RemoveAllowedMaterial(string itemID, string materialID);
        public void RemoveItem(Item item);
        public void Serialize(BinaryWriter writer);
    }
}