Author Topic: [Other] TM PC Modding API  (Read 22982 times)

0 Members and 1 Guest are viewing this topic.

TheDestinedCrab

  • Legendary Member
  • *****
  • Posts: 1370
  • Did you see that? Me neither.
  • Awards 3 years on site Donated a giveaway prize. (Must be a prize of cash value.) 2 years on site 1 year on site
    • View Profile
    • Awards
[Other] Re: TM PC Modding API
« Reply #60 on: November 03, 2016, 01:27:52 PM »
Thankyou, I didn't realise that.
Thanks Gold Knight for the amazing sig!

TM Charles

  • Supreme Member
  • *****
  • Posts: 2101
  • Awards Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site 2 years on site 1 year on site Was in the top 10 of the forum stats page as of 4/12/15
    • View Profile
    • ::)
    • Awards
  • Xbox: ETTP & Mr Zincy
Re: TM PC Modding API
« Reply #61 on: December 07, 2016, 11:13:10 AM »
Ok so when supplying multiple textures for one mod correct me if i'm wrong this is how we do it.

Supply the texture atlas of all the textures.


Then in the XML data simply list them in order from left to right.

Code: [Select]
<?xml version="1.0"?>
<ArrayOfItemXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ItemXML>
    <ItemID>Square</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>Circle</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>SquareOnItsSide</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>HalfSquare</ItemID>
  </ItemXML>
</ArrayOfItemXML>

Next say we had multiple rows of textures when were listing them in the XML data we go from top left to right then at the end of the row back to the left and so on?


Looking like this.


Then when we write it into the XML data we do it in the same order as in the picture above.

Code: [Select]
<?xml version="1.0"?>
<ArrayOfItemXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ItemXML>
    <ItemID>Square</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>Circle</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>SquareOnItsSide</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>HalfSquare</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>CharlesTri</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>CharlesDiamond</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>CharlesCircle2</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>CharlesSquare2</ItemID>
  </ItemXML>
</ArrayOfItemXML>




Last something i've done is put Charles in front of any item id, the reason for this is if someone is running 2 mods that just so happen to have an item named Circle I could see bad things happening. So to remove that issue I put my name before anything in my mods. Now some may say what if someones name is Charles and they do this. Well Ill just use TMCharles, Ieyfo or something.



Dryym

  • Supreme Member
  • *****
  • Posts: 4334
  • What's yours is mine. ~TM's Resident Master Thief~
  • Awards Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site 3 years on site Site art contributions/TPs in-game/Contest winners 1 year on site
    • View Profile
    • Awards
  • Xbox: dryym
Re: TM PC Modding API
« Reply #62 on: December 07, 2016, 11:43:45 AM »
Serious question. Why would you put "HalfSquare" Instead of "RightIsoscelesTriangle" Or just "Triangle"? Kinda off topic, But it seemed odd to me.

Also, "SquareOnItsSide" Is better defined as "Rhombus".

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

TM Charles

  • Supreme Member
  • *****
  • Posts: 2101
  • Awards Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site 2 years on site 1 year on site Was in the top 10 of the forum stats page as of 4/12/15
    • View Profile
    • ::)
    • Awards
  • Xbox: ETTP & Mr Zincy
Re: TM PC Modding API
« Reply #63 on: December 07, 2016, 11:54:54 AM »
Serious question. Why would you put "HalfSquare" Instead of "RightIsoscelesTriangle" Or just "Triangle"? Kinda off topic, But it seemed odd to me.

Also, "SquareOnItsSide" Is better defined as "Rhombus".

Cause I was feeling creative. and funny. Also to make people like you ask questions. :p



TheDestinedCrab

  • Legendary Member
  • *****
  • Posts: 1370
  • Did you see that? Me neither.
  • Awards 3 years on site Donated a giveaway prize. (Must be a prize of cash value.) 2 years on site 1 year on site
    • View Profile
    • Awards
Re: TM PC Modding API
« Reply #64 on: December 07, 2016, 04:23:02 PM »
Hi,

I hate to bother you (whoever does this), but would you mind checking over these four xml files for me to let me know if what I'm doing is correct. Thanks in advance!

Spoiler for Hidden Content:
ItemData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemDataXML>
    <ItemID>NegativeLightBlock</ItemID>
    <Name>Negative Light Block</Name>
    <Desc>This will erase light around the block.</Desc>
    <IsValid>true</IsValid>
    <IsEnabled>true</IsEnabled>
    <LockedDD>true</LockedDD>
    <LockedCR>false</LockedCR>
    <LockedSU>false</LockedSU>
    <MinCSPrice>500</MinCSPrice>
    <StackSize>100</StackSize>
    <Durability>1200</Durability>
    <StrikeDamage>1</StrikeDamage>
    <StrikeReach>2</StrikeReach>
    <HealPower>0</HealPower>
    <BurnTime>0</BurnTime>
    <SmeltTime>0</SmeltTime>
    <ParticleLight>-50</ParticleLight>
<CanDropIfLocked>true</CanDropIfLocked>
    <Plural>S</Plural>
  </ModItemDataXML>
</ArrayOfModItemDataXML>
ItemTypeData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemTypeDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemTypeDataXML>
    <ItemID>NegativeLightBlock</ItemID>
    <Use>Block</Use>
    <Type>Block</Type>
    <SubType>None</SubType>
    <Class>Steel</Class>
    <Inv>Building</Inv>
    <Combat>None</Combat>
    <Model>Weapon</Model>
    <Swing>Weapon</Swing>
    <Equip>RightHand</Equip>
  </ModItemTypeDataXML>
</ArrayOfModItemTypeDataXML>

ItemCombatData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemCombatDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemCombatDataXML>
    <CombatID>NegativeLightBlock</CombatID>
    <Health>0</Health>
    <Attack>1</Attack>
    <Strength>0</Strength>
    <Defence>0</Defence>
    <Ranged>0</Ranged>
    <Looting>0</Looting>
  </ModItemCombatDataXML>
</ArrayOfModItemCombatDataXML>

ItemModelData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemModelDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemModelDataXML>
    <ItemModelType>Block</ItemModelType>
    <Scale>2.2</Scale>
    <HandOffset>
      <X>0</X>
      <Y>0.03331069</Y>
      <Z>-0.04895301</Z>
    </HandOffset>
    <HandYPR>
      <X>0</X>
      <Y>-1.35</Y>
      <Z>0</Z>
    </HandYPR>
    <HUDScale>1</HUDScale>
    <HUDOffset>
      <X>0</X>
      <Y>-0.06391386</Y>
      <Z>-0.0002981975</Z>
    </HUDOffset>
  </ModItemModelDataXML>
</ArrayOfModItemModelDataXML>

SkillData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModSkillDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModSkillDataXML>
    <ItemID>SteelSword</ItemID>
    <MineReq>0</MineReq>
    <UseReq>10</UseReq>
    <UseSkill>Building</UseSkill>
    <CraftReq>10</CraftReq>
    <CraftSkill>Building</CraftSkill>
  </ModSkillDataXML>
</ArrayOfModSkillDataXML>

I know I haven't added a texture in yet but the aim of this is for it to be a negative light block. This means that it will get rid of all light around it. I made an ideas topic found here ages ago but I'm planning on making a mod for it now :P

Cheers,
Crab.
Thanks Gold Knight for the amazing sig!

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6650
  • Dig Deep
  • Awards Developer 5 years on site 4 years on site 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: TM PC Modding API
« Reply #65 on: December 07, 2016, 04:51:17 PM »
Ok so when supplying multiple textures for one mod... correct me if i'm wrong this is how we do it.

Supply the texture atlas of all the textures.


Then in the XML data simply list them in order from left to right.

Code: [Select]
<?xml version="1.0"?>
<ArrayOfItemXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ItemXML>
    <ItemID>Square</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>Circle</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>SquareOnItsSide</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>HalfSquare</ItemID>
  </ItemXML>
</ArrayOfItemXML>

Next say we had multiple rows of textures when were listing them in the XML data we go from top left to right then at the end of the row back to the left and so on?


Looking like this.


Then when we write it into the XML data we do it in the same order as in the picture above.

Code: [Select]
<?xml version="1.0"?>
<ArrayOfItemXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ItemXML>
    <ItemID>Square</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>Circle</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>SquareOnItsSide</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>HalfSquare</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>CharlesTri</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>CharlesDiamond</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>CharlesCircle2</ItemID>
  </ItemXML>
  <ItemXML>
    <ItemID>CharlesSquare2</ItemID>
  </ItemXML>
</ArrayOfItemXML>
Correct. The textures can be in a single row, a single column or a grid of rows and columns. Just list the items in the xml file from left to right, top to bottom.

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6650
  • Dig Deep
  • Awards Developer 5 years on site 4 years on site 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: TM PC Modding API
« Reply #66 on: December 07, 2016, 05:01:57 PM »
Hi,

I hate to bother you (whoever does this), but would you mind checking over these four xml files for me to let me know if what I'm doing is correct. Thanks in advance!

Spoiler for Hidden Content:
ItemData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemDataXML>
    <ItemID>NegativeLightBlock</ItemID>
    <Name>Negative Light Block</Name>
    <Desc>This will erase light around the block.</Desc>
    <IsValid>true</IsValid>
    <IsEnabled>true</IsEnabled>
    <LockedDD>true</LockedDD>
    <LockedCR>false</LockedCR>
    <LockedSU>false</LockedSU>
    <MinCSPrice>500</MinCSPrice>
    <StackSize>100</StackSize>
    <Durability>1200</Durability>
    <StrikeDamage>1</StrikeDamage>
    <StrikeReach>2</StrikeReach>
    <HealPower>0</HealPower>
    <BurnTime>0</BurnTime>
    <SmeltTime>0</SmeltTime>
    <ParticleLight>-50</ParticleLight>
<CanDropIfLocked>true</CanDropIfLocked>
    <Plural>S</Plural>
  </ModItemDataXML>
</ArrayOfModItemDataXML>
ItemTypeData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemTypeDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemTypeDataXML>
    <ItemID>NegativeLightBlock</ItemID>
    <Use>Block</Use>
    <Type>Block</Type>
    <SubType>None</SubType>
    <Class>Steel</Class>
    <Inv>Building</Inv>
    <Combat>None</Combat>
    <Model>Weapon</Model>
    <Swing>Weapon</Swing>
    <Equip>RightHand</Equip>
  </ModItemTypeDataXML>
</ArrayOfModItemTypeDataXML>

ItemCombatData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemCombatDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemCombatDataXML>
    <CombatID>NegativeLightBlock</CombatID>
    <Health>0</Health>
    <Attack>1</Attack>
    <Strength>0</Strength>
    <Defence>0</Defence>
    <Ranged>0</Ranged>
    <Looting>0</Looting>
  </ModItemCombatDataXML>
</ArrayOfModItemCombatDataXML>

ItemModelData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemModelDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemModelDataXML>
    <ItemModelType>Block</ItemModelType>
    <Scale>2.2</Scale>
    <HandOffset>
      <X>0</X>
      <Y>0.03331069</Y>
      <Z>-0.04895301</Z>
    </HandOffset>
    <HandYPR>
      <X>0</X>
      <Y>-1.35</Y>
      <Z>0</Z>
    </HandYPR>
    <HUDScale>1</HUDScale>
    <HUDOffset>
      <X>0</X>
      <Y>-0.06391386</Y>
      <Z>-0.0002981975</Z>
    </HUDOffset>
  </ModItemModelDataXML>
</ArrayOfModItemModelDataXML>

SkillData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModSkillDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModSkillDataXML>
    <ItemID>SteelSword</ItemID>
    <MineReq>0</MineReq>
    <UseReq>10</UseReq>
    <UseSkill>Building</UseSkill>
    <CraftReq>10</CraftReq>
    <CraftSkill>Building</CraftSkill>
  </ModSkillDataXML>
</ArrayOfModSkillDataXML>

I know I haven't added a texture in yet but the aim of this is for it to be a negative light block. This means that it will get rid of all light around it. I made an ideas topic found here ages ago but I'm planning on making a mod for it now :P

Cheers,
Crab.

You won't be able to create a negative light block from xml, the games lighting engine doesn't support it.

Notes:
1. You don't need to supply the ItemCombatData.xml and ItemModelData.xml files unless you're actually modding that data, which you typically wouldn't do when modding a block.
2. Blocks generally don't have Durability, StrikeDamage or StrikeReach.
3. In ItemTypeData.xml, Class is typically None for blocks. Model and Swing are typically Block, and Equip is typically LeftHand for blocks.
4. ItemID in SkillData.xml should be NegativeLightBlock.

TM Charles

  • Supreme Member
  • *****
  • Posts: 2101
  • Awards Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site 2 years on site 1 year on site Was in the top 10 of the forum stats page as of 4/12/15
    • View Profile
    • ::)
    • Awards
  • Xbox: ETTP & Mr Zincy
Re: TM PC Modding API
« Reply #67 on: December 07, 2016, 07:45:53 PM »
Another question, if I supply both 16,32 pixel textures when someone goes from a 32 pixel TP or 64 to a 16 will it swap to the 16x16 texture and the same for going from 16 to 32 or 64?
 



Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6650
  • Dig Deep
  • Awards Developer 5 years on site 4 years on site 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: TM PC Modding API
« Reply #68 on: December 07, 2016, 08:07:49 PM »
Another question, if I supply both 16,32 pixel textures when someone goes from a 32 pixel TP or 64 to a 16 will it swap to the 16x16 texture and the same for going from 16 to 32 or 64?
Yes, otherwise it would be kind of pointless right?

.ok

  • Supreme Member
  • *****
  • Posts: 2212
  • Awards Site art contributions/TPs in-game/Contest winners 4 years on site Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site 2 years on site Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site
    • View Profile
    • Awards
Re: TM PC Modding API
« Reply #69 on: December 08, 2016, 12:51:04 AM »
If I wanted to make a mod for decals,would it be under texture pack?or would it fall Under the rules for adding blocks?




TheDestinedCrab

  • Legendary Member
  • *****
  • Posts: 1370
  • Did you see that? Me neither.
  • Awards 3 years on site Donated a giveaway prize. (Must be a prize of cash value.) 2 years on site 1 year on site
    • View Profile
    • Awards
Re: TM PC Modding API
« Reply #70 on: December 08, 2016, 02:21:07 AM »
Hi,

I hate to bother you (whoever does this), but would you mind checking over these four xml files for me to let me know if what I'm doing is correct. Thanks in advance!

Spoiler for Hidden Content:
ItemData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemDataXML>
    <ItemID>NegativeLightBlock</ItemID>
    <Name>Negative Light Block</Name>
    <Desc>This will erase light around the block.</Desc>
    <IsValid>true</IsValid>
    <IsEnabled>true</IsEnabled>
    <LockedDD>true</LockedDD>
    <LockedCR>false</LockedCR>
    <LockedSU>false</LockedSU>
    <MinCSPrice>500</MinCSPrice>
    <StackSize>100</StackSize>
    <Durability>1200</Durability>
    <StrikeDamage>1</StrikeDamage>
    <StrikeReach>2</StrikeReach>
    <HealPower>0</HealPower>
    <BurnTime>0</BurnTime>
    <SmeltTime>0</SmeltTime>
    <ParticleLight>-50</ParticleLight>
<CanDropIfLocked>true</CanDropIfLocked>
    <Plural>S</Plural>
  </ModItemDataXML>
</ArrayOfModItemDataXML>
ItemTypeData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemTypeDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemTypeDataXML>
    <ItemID>NegativeLightBlock</ItemID>
    <Use>Block</Use>
    <Type>Block</Type>
    <SubType>None</SubType>
    <Class>Steel</Class>
    <Inv>Building</Inv>
    <Combat>None</Combat>
    <Model>Weapon</Model>
    <Swing>Weapon</Swing>
    <Equip>RightHand</Equip>
  </ModItemTypeDataXML>
</ArrayOfModItemTypeDataXML>

ItemCombatData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemCombatDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemCombatDataXML>
    <CombatID>NegativeLightBlock</CombatID>
    <Health>0</Health>
    <Attack>1</Attack>
    <Strength>0</Strength>
    <Defence>0</Defence>
    <Ranged>0</Ranged>
    <Looting>0</Looting>
  </ModItemCombatDataXML>
</ArrayOfModItemCombatDataXML>

ItemModelData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemModelDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemModelDataXML>
    <ItemModelType>Block</ItemModelType>
    <Scale>2.2</Scale>
    <HandOffset>
      <X>0</X>
      <Y>0.03331069</Y>
      <Z>-0.04895301</Z>
    </HandOffset>
    <HandYPR>
      <X>0</X>
      <Y>-1.35</Y>
      <Z>0</Z>
    </HandYPR>
    <HUDScale>1</HUDScale>
    <HUDOffset>
      <X>0</X>
      <Y>-0.06391386</Y>
      <Z>-0.0002981975</Z>
    </HUDOffset>
  </ModItemModelDataXML>
</ArrayOfModItemModelDataXML>

SkillData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModSkillDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModSkillDataXML>
    <ItemID>SteelSword</ItemID>
    <MineReq>0</MineReq>
    <UseReq>10</UseReq>
    <UseSkill>Building</UseSkill>
    <CraftReq>10</CraftReq>
    <CraftSkill>Building</CraftSkill>
  </ModSkillDataXML>
</ArrayOfModSkillDataXML>

I know I haven't added a texture in yet but the aim of this is for it to be a negative light block. This means that it will get rid of all light around it. I made an ideas topic found here ages ago but I'm planning on making a mod for it now :P

Cheers,
Crab.

You won't be able to create a negative light block from xml, the games lighting engine doesn't support it.

Notes:
1. You don't need to supply the ItemCombatData.xml and ItemModelData.xml files unless you're actually modding that data, which you typically wouldn't do when modding a block.
2. Blocks generally don't have Durability, StrikeDamage or StrikeReach.
3. In ItemTypeData.xml, Class is typically None for blocks. Model and Swing are typically Block, and Equip is typically LeftHand for blocks.
4. ItemID in SkillData.xml should be NegativeLightBlock.

Does that mean that it is possible to mod it, just not using xml files? If so, could you expand on that please?

Cheers,
Crab.
Thanks Gold Knight for the amazing sig!

The Gold Knight

  • Legendary Member
  • *****
  • Posts: 1092
  • My Forgeplex is better ;)
  • Awards 3 years on site Site art contributions/TPs in-game/Contest winners 5 years on site Top contributors to the forum downloads. 4 years on site Donated a giveaway prize. (Must be a prize of cash value.) 2 years on site Former MotM winners 1 year on site Week 1 members w/25+ posts (4/13/13-4/20/13)
    • View Profile
    • Insert Clickbait Title Here!
    • Awards
  • Other: 何
Re: TM PC Modding API
« Reply #71 on: December 08, 2016, 03:27:28 AM »
Hi,

I hate to bother you (whoever does this), but would you mind checking over these four xml files for me to let me know if what I'm doing is correct. Thanks in advance!

Spoiler for Hidden Content:
ItemData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemDataXML>
    <ItemID>NegativeLightBlock</ItemID>
    <Name>Negative Light Block</Name>
    <Desc>This will erase light around the block.</Desc>
    <IsValid>true</IsValid>
    <IsEnabled>true</IsEnabled>
    <LockedDD>true</LockedDD>
    <LockedCR>false</LockedCR>
    <LockedSU>false</LockedSU>
    <MinCSPrice>500</MinCSPrice>
    <StackSize>100</StackSize>
    <Durability>1200</Durability>
    <StrikeDamage>1</StrikeDamage>
    <StrikeReach>2</StrikeReach>
    <HealPower>0</HealPower>
    <BurnTime>0</BurnTime>
    <SmeltTime>0</SmeltTime>
    <ParticleLight>-50</ParticleLight>
<CanDropIfLocked>true</CanDropIfLocked>
    <Plural>S</Plural>
  </ModItemDataXML>
</ArrayOfModItemDataXML>
ItemTypeData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemTypeDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemTypeDataXML>
    <ItemID>NegativeLightBlock</ItemID>
    <Use>Block</Use>
    <Type>Block</Type>
    <SubType>None</SubType>
    <Class>Steel</Class>
    <Inv>Building</Inv>
    <Combat>None</Combat>
    <Model>Weapon</Model>
    <Swing>Weapon</Swing>
    <Equip>RightHand</Equip>
  </ModItemTypeDataXML>
</ArrayOfModItemTypeDataXML>

ItemCombatData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemCombatDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemCombatDataXML>
    <CombatID>NegativeLightBlock</CombatID>
    <Health>0</Health>
    <Attack>1</Attack>
    <Strength>0</Strength>
    <Defence>0</Defence>
    <Ranged>0</Ranged>
    <Looting>0</Looting>
  </ModItemCombatDataXML>
</ArrayOfModItemCombatDataXML>

ItemModelData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModItemModelDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModItemModelDataXML>
    <ItemModelType>Block</ItemModelType>
    <Scale>2.2</Scale>
    <HandOffset>
      <X>0</X>
      <Y>0.03331069</Y>
      <Z>-0.04895301</Z>
    </HandOffset>
    <HandYPR>
      <X>0</X>
      <Y>-1.35</Y>
      <Z>0</Z>
    </HandYPR>
    <HUDScale>1</HUDScale>
    <HUDOffset>
      <X>0</X>
      <Y>-0.06391386</Y>
      <Z>-0.0002981975</Z>
    </HUDOffset>
  </ModItemModelDataXML>
</ArrayOfModItemModelDataXML>

SkillData.xml :
Code: [Select]
<?xml version="1.0"?>
<ArrayOfModSkillDataXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ModSkillDataXML>
    <ItemID>SteelSword</ItemID>
    <MineReq>0</MineReq>
    <UseReq>10</UseReq>
    <UseSkill>Building</UseSkill>
    <CraftReq>10</CraftReq>
    <CraftSkill>Building</CraftSkill>
  </ModSkillDataXML>
</ArrayOfModSkillDataXML>

I know I haven't added a texture in yet but the aim of this is for it to be a negative light block. This means that it will get rid of all light around it. I made an ideas topic found here ages ago but I'm planning on making a mod for it now :P

Cheers,
Crab.

You won't be able to create a negative light block from xml, the games lighting engine doesn't support it.

Notes:
1. You don't need to supply the ItemCombatData.xml and ItemModelData.xml files unless you're actually modding that data, which you typically wouldn't do when modding a block.
2. Blocks generally don't have Durability, StrikeDamage or StrikeReach.
3. In ItemTypeData.xml, Class is typically None for blocks. Model and Swing are typically Block, and Equip is typically LeftHand for blocks.
4. ItemID in SkillData.xml should be NegativeLightBlock.

Does that mean that it is possible to mod it, just not using xml files? If so, could you expand on that please?

Cheers,
Crab.
You know that part that you bolded? Yeah, what does it say right after that?

Not Actually Atlas

  • Extreme Member
  • *****
  • Posts: 5775
  • Atlas Telamon
  • Awards 4 years on site 3 years on site Awarded to exemplary forum members 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 1 year on site Former MotM winners Month 1 members w/25+posts (4/21/13-5/12/13)
    • View Profile
    • Awards
  • Xbox: atlh3
  • Steam: The_Green_Condom
Re: TM PC Modding API
« Reply #72 on: December 08, 2016, 04:13:25 AM »
To use textures, would I have to make a whole texture pack? Or can I replace individual textures?


Miner of the Month for January 2014
But you can call me the salaminizer!
#BanAtlas

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6650
  • Dig Deep
  • Awards Developer 5 years on site 4 years on site 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: TM PC Modding API
« Reply #73 on: December 08, 2016, 04:42:31 AM »
To use textures, would I have to make a whole texture pack? Or can I replace individual textures?
You can replace individual textures. Note, there is no support yet for replacing textures only on nominated texture packs, so it would replace the texture on all texture packs.

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6650
  • Dig Deep
  • Awards Developer 5 years on site 4 years on site 3 years on site 2 years on site Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: TM PC Modding API
« Reply #74 on: December 08, 2016, 04:43:18 AM »
Does that mean that it is possible to mod it, just not using xml files? If so, could you expand on that please?
It would require programming, which is not yet supported so I can't expand any further.