Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Challenge: How does requireitemmask field work in spells.2da?

Page: 1 of 1
 tk102
03-30-2004, 7:28 AM
#1
A cookie for anyone who can figure this out. (And yes, I know 0x0040 means 'requires a lightsaber'.)
 Jackel
03-30-2004, 10:23 AM
#2
can i say "it tells you what items you require for the *spell*" and get the cookie ? :D
 tk102
03-30-2004, 2:14 PM
#3
No, you get a piece of melba toast for being a smart monkey.
 *Atris*
03-30-2004, 8:48 PM
#4
whats melba toast???
 Darth333
03-30-2004, 9:11 PM
#5
Originally posted by lowiej
whats melba toast???
It's this (http://magasin.iga.net/common/img/product/big/5695142060.jpg) :D

Sorry for being off-topic. Not knowing the answer that's the only thing i could do.
 tk102
03-31-2004, 7:35 AM
#6
Okay no one gets the cookie.

Here's the answer:

Both the forbiditemmask and the requireitemmask use the same bits to describe which baseitems have permissions to work for a spell. Those bits are defined as follows:

0x0001 - Armor_Class_4
0x0002 - Armor_Class_5
0x0004 - Armor_Class_6
0x0008 - Armor_Class_7
0x0010 - Armor_Class_8
0x0020 - Armor_Class_9
0x0040 - Lightsabers

It does not appear that there are any other baseitems defined with a bitmask.

To determine if a spell can be used, swkotor performs the following logic:
Permission =
((forbiditemmask AND baseitem) == 0) AND ((requireitemmask AND baseitem) = requireitemmask)
 Jackel
03-31-2004, 9:24 AM
#7
Originally posted by Darth333
It's this (http://magasin.iga.net/common/img/product/big/5695142060.jpg) :D

Sorry for being off-topic. Not knowing the answer that's the only thing i could do.

hmm i think ill pass on the melba toast thing
 Commas
04-02-2004, 3:42 AM
#8
so if 0x0040 includes all lightsabers, even player made ones that use a different row in baseitems.2da? i mean, logically acording to what you said it would check requireitemmask and see 0x0040 and then check baseitems and look for 8, 9, or 10 which are the three kinds of lightsabers. but would it also know to look in row 92 for a player made lightsaber?

the problem here is twofold. if there were a way to limit it to just useing the row for the player made items, that would effect everything that used 0x0040 (i.e. throw lightsaber could only throw that lightsaber) if you edited it to just include that lightsaber with the other ones then all lightsabers would be able to cast that spell, not the one specific one. perhaps some kind of script could be made?

btw, since i dont know how to do scripts, "scripts" has become the answer to any question i dont understand.

and melba toast looks... mundane to say the least. not good, not bad... just kinda meh. like real toast's unhappy older brother that still lives at home
 tk102
04-02-2004, 3:54 AM
#9
I don't know where the reference is that defines the mask for each item. I had to figure it out by trial and error. I hope it's not hardcoded. I expected to find some 2da that had the cross-reference between baseitems and itemmasks -- either that or an entry in baseitems.2da itself. But alas, it is missing.

Simple test though -- can you throw your special "Ice" lightsaber that you made? That saber used a custom made baseitem, didn't it? If you can, then some column in baseitems.2da crossreferences itemmask (perhaps itemtype?). If not, then the row entries themselves are crossreferenced to the itemmask.

[unwraps another cookie...]
 T7nowhere
04-02-2004, 5:22 AM
#10
I have made a couple of new baseitems in the past and found that If say you copyed the lightsaber row and pasted it as row 92 the lightsaber would not function like a lightsaber(I couldn't get force jump to work). It was also stated in another post about makeing a lightsaber a new baseitem that it would not use dex as the modifier, instead the new saber used strength.

Sometimes I fell like I am only seeing 75% of the game mechanics.
 Commas
04-02-2004, 6:33 AM
#11
well some how i can throw the custom lightsaber, which just makes me more confused. i have no idea how the game new it was a lightsaber, there must be something else at work... i couldnt tell you what it is tho.

also t7, i was going thru kashyyyk with my gaurdian to test something for another mod and using my saber (just cause i think its pretty) and i did a force jump using my saber, which i made by copying the lightsaber row into row 92.
Page: 1 of 1