Aller au contenu

Photo

Question about updating item blueprints that are assigned to inventory


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

#1
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Curious if anyone knows the answer to this: if I have a custom item assigned to a companions inventory, and I make a change to the item blueprint, will the item in the inventory be updated when the companion is spawned in-game, or do I need to remove the item from the companion's blueprint and re-add it to the inventory?



#2
4760

4760
  • Members
  • 1 204 messages

No, the changes made to the item blueprint after it has been assigned to the companion's inventory will not be reflected to the copy in the inventory. At least, that's how it seems to work for me.



#3
Tchos

Tchos
  • Members
  • 5 030 messages

Spawn the item on the creature by script to get around it, or put RecreateItemsFromBlueprint() from "ginc_item" in the creature's spawn script.  This is one of several reasons why I prefer not to place items directly in a creature or object's inventory, instead adding them by script.  My On Client Enter script that spawns creatures at waypoints handles spawning of special inventory on those waypoints as well.



#4
kamal_

kamal_
  • Members
  • 5 238 messages

Update instances?

 

update_blueprint.jpg


  • GCoyote et ColorsFade aiment ceci

#5
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

I like the idea of RecreateItemsFromBlueprint(). I may have to try that. 

 

I figured the solution would be spawning. I spawn every creature/NPC in my modules. I learned the other day that it's also better to spawn stores, for the same reasons, so you can make changes. 

 

I've been spawning some items on my companions for testing purposes, since they have to level up automatically, etc., because it speeds up testing. So it shouldn't be an issue to create a spawn in script that loads the proper stuff. 

 

Thanks guys. 



#6
ColorsFade

ColorsFade
  • Members
  • 1 267 messages

Update instances?

 

update_blueprint.jpg

 

That works? Hell, I'll have to try that... 



#7
kevL

kevL
  • Members
  • 4 052 messages
make a backup, just sayin' ...