Quick Questions, Quick Answers - Thread #37

Post » Sat Apr 26, 2014 1:29 pm

Previous Threads:

Spoiler
http://www.gamesas.com/topic/1348211-the-quick-ck-questions-thread/ | http://www.gamesas.com/topic/1353350-quick-ck-questions-thread-2/ | http://www.gamesas.com/topic/1365336-quick-questions-quick-answers-the-3rd/ | http://www.gamesas.com/topic/1373468-quick-questions-quick-answers-thread-4/ | http://www.gamesas.com/topic/1395667-quick-questions-quick-answers-thread-5/ | http://www.gamesas.com/topic/1406245-quick-questions-quick-answers-thread-6/ | http://www.gamesas.com/topic/1411305-quick-questions-quick-answers-thread-7/ | http://www.gamesas.com/topic/1414436-quick-questions-quick-answers-thread-8/ | http://www.gamesas.com/topic/1418982-quick-questions-quick-answers-thread-9/ | http://www.gamesas.com/topic/1424574-questions-quick-answers-thread-10/ | http://www.gamesas.com/topic/1427837-quick-questions-quick-answers-thread-11/ | http://www.gamesas.com/topic/1432221-quick-questions-quick-answers-thread-12/ | http://www.gamesas.com/topic/1434686-quick-questions-quick-answers-thread-13/ | http://www.gamesas.com/topic/1437011-quick-questions-quick-answers-thread-14/ | http://www.gamesas.com/topic/1439381-quick-questions-quick-answers-thread-15/ | http://www.gamesas.com/topic/1442236-quick-questions-quick-answers-thread-16/ | http://www.gamesas.com/topic/1444947-quick-questions-quick-answers-thread-17/ | http://www.gamesas.com/topic/1449652-quick-questions-quick-answers-thread-18/ | http://www.gamesas.com/topic/1458015-quick-questions-quick-answers-thread-19/ | http://www.gamesas.com/topic/1462459-quick-questions-quick-answers-thread-20/ | http://www.gamesas.com/topic/1464441-quick-questions-quick-answers-thread-21/ | http://www.gamesas.com/topic/1466681-quick-questions-quick-answers-thread-22/ | http://www.gamesas.com/topic/1468752-quick-questions-quick-answers-thread-23/ | http://www.gamesas.com/topic/1470372-quick-questions-quick-answers-thread-24/ | http://www.gamesas.com/topic/1471891-quick-questions-quick-answers-thread-25/ | http://www.gamesas.com/topic/1473830-quick-questions-quick-answers-thread-26/ | http://www.gamesas.com/topic/1476163-quick-questions-quick-answers-thread-27/ | http://www.gamesas.com/topic/1477693-quick-questions-quick-answers-thread-28 | http://www.gamesas.com/topic/1479205-quick-questions-quick-answers-thread-29/ | http://www.gamesas.com/topic/1480911-quick-questions-quick-answers-thread-30/ | http://www.gamesas.com/topic/1483264-quick-questions-quick-answers-thread-31/ | http://www.gamesas.com/topic/1485279-quick-questions-quick-answers-thread-32/ | http://www.gamesas.com/topic/1486930-quick-questions-quick-answers-thread-33/ | http://www.gamesas.com/topic/1491074-quick-questions-quick-answers-thread-34/ | http://www.gamesas.com/topic/1497701-quick-questions-quick-answers-thread-35/ | http://www.gamesas.com/topic/1499078-quick-questions-quick-answers-thread-36/



Have a quick question? Need a quick answer? If you have not had any luck with the http://www.creationkit.com/Main_Page, post away and hopefully someone will have the answer(s) you seek.

User avatar
Stefanny Cardona
 
Posts: 3352
Joined: Tue Dec 19, 2006 8:08 pm

Post » Sat Apr 26, 2014 8:28 am

These things are because Armor objects don't actually exist in the loaded game. Every piece of armor you are able to interact with (read: run a script on) is actually an ObjectReference, which doesn't extend Armor.

If you're trying to use armor methods on an object, you would probably have to do something like this in the script:

((self as Form) as Armor).ArmorFunction()

Also, keep in mind that you'll be editing the base form with whatever ArmorFunction() you use in that case, not the specific object reference which the script is attached to. If you want to edit only the objectReference, you are limited to using the methods of ObjectReference (or WornObject) script.

User avatar
Tasha Clifford
 
Posts: 3295
Joined: Fri Jul 21, 2006 7:08 am

Post » Sat Apr 26, 2014 1:33 pm

Thanks. And I am very aware of that. I got the Maintenance Quest thing worked out. =)

User avatar
Chica Cheve
 
Posts: 3411
Joined: Sun Aug 27, 2006 10:42 pm

Post » Sat Apr 26, 2014 1:16 pm

I am using the removeItem script to remove all potions from the player. I do this by first removing those items from the vanilla game that I placed in a formlist, so

player.removeItem(allPotions, 99999, tempchest)

where allPotions is a formlist. THe problem is, this isn't adding the potions to the tempchest, although it is removing them from the player. I have setupTempChest as either an alias.getReference or as an objectReference property, both of which point to the right chest, but, still no luck. Is it impossible to move items using remove item with a formlist?

User avatar
Tamara Primo
 
Posts: 3483
Joined: Fri Jul 28, 2006 7:15 am

Post » Sat Apr 26, 2014 10:07 am

try:

player.removeItem(allPotions, 99999, akOtherContainer = tempchest)
User avatar
Jessica Thomson
 
Posts: 3337
Joined: Fri Jul 21, 2006 5:10 am

Post » Sat Apr 26, 2014 9:51 pm

Should be:

player.removeItem(allPotions, 99999, true, tempchest)

edit: or what egocarib said

User avatar
Charity Hughes
 
Posts: 3408
Joined: Sat Mar 17, 2007 3:22 pm

Post » Sat Apr 26, 2014 9:55 pm

((self as Form) as Armor).RemoveSlotFromMask(0x00000002) doesn't work.

Error: Cannot call RemoveSlotFromMask() on a None object, aborting function call

Edit: LOL nevermind. I should have stored the return value then called SetSlotMask

Edit again: Nevermind again. That doesn't explain the error though.

User avatar
Janeth Valenzuela Castelo
 
Posts: 3411
Joined: Wed Jun 21, 2006 3:03 am

Post » Sat Apr 26, 2014 6:27 am

I think that sorta worked, it's telling me I am removing potions the player does not actually have. Not sure why.

User avatar
Robert Devlin
 
Posts: 3521
Joined: Mon Jul 23, 2007 2:19 pm

Post » Sat Apr 26, 2014 12:47 pm

Using player.removeItem(allPotions, 99999, true, tempchest) would prevent messages from appearing.

User avatar
Setal Vara
 
Posts: 3390
Joined: Thu Nov 16, 2006 1:24 pm

Post » Sat Apr 26, 2014 6:52 pm

Hmm, regarding the armor error, maybe you should try self.GetBaseObject().ArmorFunction() instead?

User avatar
danni Marchant
 
Posts: 3420
Joined: Sat Oct 07, 2006 2:32 am

Post » Sat Apr 26, 2014 9:26 pm

I understand that, what I am confused on is why when I do see the message it is saying that it is removing items the player does not have and sometimes in large quantities.

User avatar
Jade Muggeridge
 
Posts: 3439
Joined: Mon Nov 20, 2006 6:51 pm

Post » Sat Apr 26, 2014 7:03 am

I have never seen those messages because I always use the setting to hide the message. I am assuming it's just a issue inherent in using form lists in the RemoveItem function and it's merely informing you of the attempt to remove them and not what's actually removed. In any case, I doubt there is anything that can be done to avoid the incorrect message while using a form list in the RemoveItem function.

User avatar
CArla HOlbert
 
Posts: 3342
Joined: Wed Feb 21, 2007 11:35 pm

Post » Sat Apr 26, 2014 10:41 am

I guess, I just found it strange, and I was a little worried. It seems to be working correctly, it's just odd.

User avatar
Oscar Vazquez
 
Posts: 3418
Joined: Sun Sep 30, 2007 12:08 pm

Post » Sat Apr 26, 2014 1:12 pm

self.GetBaseObject().RemoveSlotFromMask(0x00000002) won't compile.

Armor _armor_ = (self.GetBaseObject() as armor)

_armor_.RemoveSlotFromMask(0x00000002)

Gives errors:

Error: Unable to call GetBaseObject - no native object bound to the script object, or object is of incorrect type

Error: Cannot call RemoveSlotFromMask() on a None object, aborting function call

User avatar
Lifee Mccaslin
 
Posts: 3369
Joined: Fri Jun 01, 2007 1:03 am

Post » Sat Apr 26, 2014 3:27 pm

What does (self.GetBaseObject() as armor).RemoveSlotFromMask(0x00000002) do?

User avatar
Amiee Kent
 
Posts: 3447
Joined: Thu Jun 15, 2006 2:25 pm

Post » Sat Apr 26, 2014 7:50 am

It's probably error seeing as (self.GetBaseObject() as armor) is returning None.

Self is just useless in this case and probably just useless.

I have to make the the item a property of itself.

Edit: and type the property as Armor

Edit Again: Armor Property _t_TZ_Test_Helmet Auto

User avatar
Lovingly
 
Posts: 3414
Joined: Fri Sep 15, 2006 6:36 am

Post » Sat Apr 26, 2014 8:37 am

What is your script extending? It will have to be extending ObjectReference for that to work (self must be of type ObjectReference).

User avatar
candice keenan
 
Posts: 3510
Joined: Tue Dec 05, 2006 10:43 pm

Post » Sat Apr 26, 2014 9:13 pm

It is extending ObjectReference.

Edit: Doesn't matter. I got the script to work as intended finally after wasting hours on "self" but it didn't work out like I wanted. I could really use a better understanding of this slot business.

User avatar
Tyrel
 
Posts: 3304
Joined: Tue Oct 30, 2007 4:52 am

Post » Sat Apr 26, 2014 10:23 am

What I am learning is that if you have an armor item with slots different than it's armor addon then the item will be invisible. Which begs the question what is http://www.gamesas.com/user/929079-asterra/ doing with slot masks that gets the results http://www.gamesas.com/topic/1499078-quick-questions-quick-answers-thread-36/page-7#entry23598222? I think that answer might prove helpful to me if only to help me understand the limitations of the engine.

Also it seems that there is slot information in the nif files and that the armor addon must also use the same slots as assigned in the nif.

I have tried making a helmet that uses slot 49 and it doesn't show up. The armor addon points to the nif file, so that's not it.

Is it even possible to have models take up the same space? How is that people talk about clipping at all?

Edit: I was incorrect about the "if you have an armor item with slots different than it's armor addon then the item will be invisible" I am not sure why I got the results I did, but I just made a the helmet work... sort of... Both the Helmet and it's armor addon use slot 49, but the armor uses only slot 49 wear the addon uses 31-Hair, 41, Longhair and 43 ears. These slots are what was used in the original vanilla armor addon (not 49 ofc). The problem is that it doesn't show up with another helmet equipped. I was trying to make an item that simply changes the look but has no armor value, while allowing one to wear armor (underneath).

User avatar
meghan lock
 
Posts: 3451
Joined: Thu Jan 11, 2007 10:26 pm


Return to V - Skyrim