Aller au contenu

Photo

items variables


  • Veuillez vous connecter pour répondre
11 réponses à ce sujet

#1
Werkaldegim

Werkaldegim
  • Members
  • 19 messages
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 :)


PS.
Sorry for bad english 

#2
Kato -

Kato -
  • Members
  • 392 messages
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 .


#3
Werkaldegim

Werkaldegim
  • Members
  • 19 messages
How does Leto can help me with that? I have no clue....

#4
Kato -

Kato -
  • Members
  • 392 messages
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 .


#5
Baragg

Baragg
  • Members
  • 271 messages
You could create the item in some inaccessible area of the module get the variable you need then destory the item.

#6
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

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 :)


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 .


#7
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
<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>

#8
henesua

henesua
  • Members
  • 3 882 messages
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.

#9
Werkaldegim

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

#10
Baragg

Baragg
  • Members
  • 271 messages
You could also store the data as a substring in the resref of the item.

#11
henesua

henesua
  • Members
  • 3 882 messages
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 .


#12
Baragg

Baragg
  • Members
  • 271 messages
Indeed, you are correct.