Author Topic: Is it possible to make a new constant for a base item type?  (Read 312 times)

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
Is it possible to make a new constant for a base item type?
« on: October 11, 2012, 08:46:57 pm »


               So there are these different types of items called Torch/Flags/HolySymbols, Shield* which don't appear to have a constant already defined. I see BASE_ITEM_TORCH, which seems to be what is used for Torch/Flags/HolySymbols, however it doesn't seem to apply to these other types of torches (the ones that allow shield AC). Anyone have an idea on how to make a constant for this?
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Is it possible to make a new constant for a base item type?
« Reply #1 on: October 11, 2012, 08:57:44 pm »


               line in baseitems.2da

to identify a line if it isnt clear from the Label, check the name collumn with the text in TLK
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
Is it possible to make a new constant for a base item type?
« Reply #2 on: October 11, 2012, 09:05:40 pm »


               Fantastic Shadoow, thank you. It looks like it is just TORCH_SHIELD, I will give adding that constant a try. I assume I should add it as a constant string? Like so?
const string BASE_ITEM_TORCH_SHIELD = "BASE_ITEM_TORCH_SHIELD";
?
               
               

               


                     Modifié par Lazarus Magni, 11 octobre 2012 - 08:08 .
                     
                  


            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
Is it possible to make a new constant for a base item type?
« Reply #3 on: October 11, 2012, 09:13:07 pm »


               Or no... that doesn't work, how do you add a constant for a base item type?
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
Is it possible to make a new constant for a base item type?
« Reply #4 on: October 11, 2012, 09:42:05 pm »


               Well...
const int BASE_ITEM_TORCH_SHIELD = 367;
Seems to work (compile anyways, will have to test), thanks for pointing me in the right direction Shadooow.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Is it possible to make a new constant for a base item type?
« Reply #5 on: October 11, 2012, 09:52:41 pm »


               

Lazarus Magni wrote...

Well...
const int BASE_ITEM_TORCH_SHIELD = 367;
Seems to work (compile anyways, will have to test), thanks for pointing me in the right direction Shadooow.

 That looks correct.
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
Is it possible to make a new constant for a base item type?
« Reply #6 on: October 12, 2012, 08:15:18 pm »


               Yep this worked, Cheers!