Jump to content

Only demi-orc for my itm


StrongArmand

Recommended Posts

Well, with usabilities, you NEED to have "True Class" selected, all alignments you want (all) and all classes you need to use, as well as races. Try checking EVERY box and only unticking the race boxes.

 

Next, check everything else is OK, like it isn't 2handed with a 1handed animation, or vice versa, and make sure that it is specified as a weapon to begin with.

 

 

Icen

Link to comment

Maybe i've found an answer to my own asking. I've seen a piece of tp2 in amber's mod and I trying to reproduce it. But weidu send me an error (at the end of tp2). I post it here :

 

 

COPY_EXISTING_REGEXP GLOB ~^.+\.cre$~ ~override~

READ_BYTE 0x272 "race"

 

 

COPY_EXISTING ~#vsku1.itm~ ~override~

READ_LONG 0x6a "fx_off"

READ_SHORT 0x70 "fx_num"

WRITE_SHORT 0x70 ("%fx_num%" + 1)

INSERT_BYTES ("%fx_off%" ) 0x30 // insert new global effect

WRITE_SHORT ("%fx_off%" ) 180 // disallow item

WRITE_BYTE ("%fx_off%" + 0x02) 1 // target: self

WRITE_BYTE ("%fx_off%" + 0x0c) 2 // instant/while equipped

WRITE_BYTE ("%fx_off%" + 0x12) 100 // probability

WRITE_EVALUATED_ASCII ("%fx_off%" + 0x14) "%exclude_file%" // file

// this tree simply adds a display string based on the race type

PATCH_IF ("%race%" = 1) BEGIN // if human

SAY ("%fx_off%" + 0x04) @803

END ELSE

PATCH_IF ("%race%" = 2) BEGIN // if elf

SAY ("%fx_off%" + 0x04) @803

END ELSE

PATCH_IF ("%race%" = 3) BEGIN // if half-elf

SAY ("%fx_off%" + 0x04) @803

END ELSE

PATCH_IF ("%race%" = 4) BEGIN // if dwarf

SAY ("%fx_off%" + 0x04) @803

END ELSE

PATCH_IF ("%race%" = 5) BEGIN // if halfling

SAY ("%fx_off%" + 0x04) @803

END ELSE

PATCH_IF ("%race%" = 6) BEGIN // if gnome

SAY ("%fx_off%" + 0x04) @803

END

END

BUT_ONLY_IF_IT_CHANGES

 

Well, this block should be allow to forbidden this weapon to all race exept for half-orcs. Thanks in advance for your help.

Link to comment

You've got one END too many just before BUT_ONLY.

But that code will not do what you want. At least not well.

 

It's better to use the usability flags for this.

As I recall, DLTCEP inverts the flags. Everything that is checked in the usability window can use the item and everything that isn't checked can't use the item. If you were to look at the item with e.g. NI or another "faithful" editor, you'd see the opposite (an item only usable by half-orcs would have everything but half-orc checked).

Link to comment
Yes but as I've already said half-orc flag doesn't work...

Huh, half-orcs apparently count as humans. The half-orc flag doesn't seem to have any effect on them (like you said).

 

Maybe someone more savvy than me can help you, but I can't think of a good way and don't really want to suggest a bad way. You'd probably need to do something with scripts and spells and stuff, however. I don't think using weidu to patch in opcodes 180 would work out well.

Link to comment

First off, don't make items from scratch. Find an already-existing item, so you KNOW that it works, and then flag it as unusable by most races. Make no other changes. Save it under a different name, and then test it. If it crashes the game, then there's something weird going on.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...