Author Topic: items variables  (Read 361 times)

Legacy_Werkaldegim

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
items variables
« on: June 15, 2012, 10:32:34 pm »


               Hi everyone,

how to get a variable from not yet created item (existing in palet) and compare it with skill in database?
In item variables is FORGE_DIFFICULTY integer whitch determines what level of blacksmithing player need to sucesfull made it, but I can't get it, and I don't know why... thx for help '<img'>


PS.
Sorry for bad english 
               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
items variables
« Reply #1 on: June 15, 2012, 11:12:11 pm »


               I guess you would need Leto to do this. Still, depending how your system works, you could create the desired item, retrieve the variable, then delete the item if needed...

Kato
               
               

               


                     Modifié par Kato_Yang, 15 juin 2012 - 10:16 .
                     
                  


            

Legacy_Werkaldegim

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
items variables
« Reply #2 on: June 16, 2012, 05:52:50 pm »


               How does Leto can help me with that? I have no clue....
               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
items variables
« Reply #3 on: June 16, 2012, 06:08:13 pm »


               Take a look at Funky's sticky: How to Mass Edit and Data Mine your Module. For an example of using Letoscript directly in code instead of through Moneo, take a look at HGLL. Maybe there are a few other systems too but they are rather rare, since Letoscript is a bit complex and old, thus not much in use anymore. It is a truly powerful system nonetheless.

You might also consider a simpler solution: With a good naming convention, you could retrieve the info you need from the tag or ref of your items instead of from a variable. Or you could store your items in a DB table with all the infos you wish.

Kato
               
               

               


                     Modifié par Kato_Yang, 16 juin 2012 - 05:39 .
                     
                  


            

Legacy_Baragg

  • Sr. Member
  • ****
  • Posts: 496
  • Karma: +0/-0
items variables
« Reply #4 on: June 16, 2012, 11:35:52 pm »


               You could create the item in some inaccessible area of the module get the variable you need then destory the item.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
items variables
« Reply #5 on: June 17, 2012, 07:18:51 pm »


               

Werkaldegim wrote...

Hi everyone,

how to get a variable from not yet created item (existing in palet) and compare it with skill in database?
In item variables is FORGE_DIFFICULTY integer whitch determines what level of blacksmithing player need to sucesfull made it, but I can't get it, and I don't know why... thx for help '<img'>


PS.
Sorry for bad english 



Since you can not get the Variable from a blueprint and once the item is created you no longer need the variable, Have you considered the perhaps you have just chosen the wrong place to store the data.   

Perhaps If your  crafting system was 2da  driven it would solve your problem.    
               
               

               


                     Modifié par Lightfoot8, 17 juin 2012 - 06:21 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
items variables
« Reply #6 on: June 17, 2012, 07:34:19 pm »


               <wiping a little...>

A good place to store that kind of variable would be on the recipe or tools needed to craft the item. Not only could you check the base difficulty of creating the item, but different tools/recipes could vary the difficulty. Crafting with a masterwork hammer lowers difficulty. Pounding on an ingot with a stone sledge would increase it. No calculations needed (after you have the system tweaked) because the difficulty is tool/recipe based, rather than a base difficulty on the item modified by multiple modifiers...

<...flour from his nose>
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
items variables
« Reply #7 on: June 17, 2012, 07:38:44 pm »


               You can store this data in a variety of methods and still have access to it via script. If you want to access the data you entered on the blueprints, you'll need to place these objects somewhere in game. However, I recommend that you put all of the data in a script. And include this script in others that need access to it.
               
               

               
            

Legacy_Werkaldegim

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
items variables
« Reply #8 on: June 18, 2012, 02:23:38 am »


               Well, thanks henesua, this is the easiest way (why didn't I think of that '^_^')
               
               

               
            

Legacy_Baragg

  • Sr. Member
  • ****
  • Posts: 496
  • Karma: +0/-0
items variables
« Reply #9 on: June 20, 2012, 10:43:02 pm »


               You could also store the data as a substring in the resref of the item.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
items variables
« Reply #10 on: June 20, 2012, 11:06:38 pm »


               Baragg, that is not an optimal suggestion as the RESREF can only have 16 characters. More importantly it creates a chicken/egg problem for the OP. If they knew the resref then they don't need the item for the data. But since the OP doesn't know the data ahead of time, they couldn't spawn the item in order to get the data.
               
               

               


                     Modifié par henesua, 20 juin 2012 - 10:07 .
                     
                  


            

Legacy_Baragg

  • Sr. Member
  • ****
  • Posts: 496
  • Karma: +0/-0
items variables
« Reply #11 on: June 21, 2012, 02:17:29 pm »


               Indeed, you are correct.