Store Property in an Item Reference (ObjectReference): Is it

Post » Sat Nov 17, 2012 1:34 am

I was wondering if was possible to store a Property into an ObjectReference...in particular:

Would be possible to attach a script to an item which will be "imprinted" with a certain Property by a spell?

And...how much the Property will last attached to the object?

Could this be done without resorting to the quest system?

Thanks,
Jashkar
User avatar
Vivien
 
Posts: 3530
Joined: Fri Apr 13, 2007 2:47 pm

Post » Fri Nov 16, 2012 10:17 pm

I'm not sure what your asking here?
User avatar
Ella Loapaga
 
Posts: 3376
Joined: Fri Mar 09, 2007 2:45 pm

Post » Fri Nov 16, 2012 4:09 pm

ObjectReferences can have and store variables/properties, but properties cannot be added in runtime and must be defined in the form with the script attached to it within the plugin, although variables/properties needn't be set in order to work or be set in game. Specifics would help a lot. Is there only one reference which should be affected or?
User avatar
Sun of Sammy
 
Posts: 3442
Joined: Mon Oct 22, 2007 3:38 pm

Post » Fri Nov 16, 2012 6:36 pm

ObjectReferences can have and store variables/properties, but properties cannot be added in runtime and must be defined in the form with the script attached to it within the plugin, although variables/properties needn't be set in order to work or be set in game. Specifics would help a lot. Is there only one reference which should be affected or?

I was just brainstorming a little bit, but I was thinking about the possibility of:
- Casting a spell on a corpse to gain a skull which will have attached the skills of the victim.
- If you are at lower level than the victim, you'd be able to train with it.

However...the core idea is that the skull could be "imprinted" with specific properties (and, obviously, would be a special base object)...this could be done?

Thanks,
Jashkar
User avatar
Camden Unglesbee
 
Posts: 3467
Joined: Wed Aug 15, 2007 8:30 am

Post » Fri Nov 16, 2012 2:43 pm

I like this idea...

It should be possible to create a permanent skull in the CK with your script on it. Give it properties for each available stat you wanted to be able to train. When you cast the spell, add the skull to the player, do some kind of check for on item add, and then get all the stats from the spell target and set the properties on that skull to each of those.

It SHOULD be possible with AddItem to get the specific reference of the skull added, not the base object. So, it should be possible to set the stats on each skull added to the player, so each one tracks the stats of it's "body" creature. Maybe have different models/icons for human or animal skulls.

When the player equips the skull, do a quick check to see if any of the skull's stats were greater than the player's. Have some global variables, either alone or on a quest script constantly running, for each skill. Set them to 1 if greater than the player's and 0 if not. Then, place an invisible actor at the player with conditions to have discussion topics if these variables were 1 or 0, so only the skills you can train in are shown, and initiate conversation with it.

I am guessing each skull could only be used to train one skill one time, to avoid leveling too fast. In that case, have a check in the dialogue interaction (I haven't done too much of this but I know it is possible) so that if you train a certain skill, dialogue will end, the skull is removed, and the invisible NPC moved to a holding cell somewhere.
User avatar
jennie xhx
 
Posts: 3429
Joined: Wed Jun 21, 2006 10:28 am

Post » Fri Nov 16, 2012 5:17 pm

I like this idea...

It should be possible to create a permanent skull in the CK with your script on it. Give it properties for each available stat you wanted to be able to train. When you cast the spell, add the skull to the player, do some kind of check for on item add, and then get all the stats from the spell target and set the properties on that skull to each of those.

It SHOULD be possible with AddItem to get the specific reference of the skull added, not the base object. So, it should be possible to set the stats on each skull added to the player, so each one tracks the stats of it's "body" creature. Maybe have different models/icons for human or animal skulls.

When the player equips the skull, do a quick check to see if any of the skull's stats were greater than the player's. Have some global variables, either alone or on a quest script constantly running, for each skill. Set them to 1 if greater than the player's and 0 if not. Then, place an invisible actor at the player with conditions to have discussion topics if these variables were 1 or 0, so only the skills you can train in are shown, and initiate conversation with it.

I am guessing each skull could only be used to train one skill one time, to avoid leveling too fast. In that case, have a check in the dialogue interaction (I haven't done too much of this but I know it is possible) so that if you train a certain skill, dialogue will end, the skull is removed, and the invisible NPC moved to a holding cell somewhere.

Thanks a lot. :(

I've been trying with this, but now I have a bigger problem:

The skull isn't showing the custom message box... :(

Jashkar

P.S.: My idea was to limit up to 10 skill gain per use or 100 attribute points per use, which would be the cap, but the actual gain would be (Victim skill - Activator skill) x (Victim Level x Conjuration Skill)/(100 x Activator Level).
User avatar
Horror- Puppe
 
Posts: 3376
Joined: Fri Apr 13, 2007 11:09 am


Return to V - Skyrim