Changing Item Type


Questions, Explanations, Howtos

Shoals Surfer

Posts: 293

Joined: Tuesday, 25th October 2011, 05:04

Post Saturday, 5th November 2011, 19:11

Changing Item Type

I want to give the new race I'm developing an ability that gives a piece of weapon or armour the "Dwarven" tag. I planned to copy TSO's ability for this but I can't find it. What file would this be in? Has anyone tried to implement an ability like this before?
User avatar

Dungeon Master

Posts: 4031

Joined: Thursday, 16th December 2010, 20:37

Location: France

Post Sunday, 6th November 2011, 08:56

Re: Changing Item Type

The function is _bless_weapon in godprayer.cc. You want to use

  Code:
set_equip_race(wpn, ISFLAG_DWARVEN);
<+Grunt> You dereference an invalid pointer! Ouch! That really hurt! The game dies...

For this message the author galehar has received thanks:
File200

Shoals Surfer

Posts: 293

Joined: Tuesday, 25th October 2011, 05:04

Post Saturday, 12th November 2011, 01:35

Re: Changing Item Type

How do I create a menu (like the function "prompt_invent_item") that will list weapons, armour, and missiles, together, but nothing else?

E: N/M, don't need a menu at the moment.

Also, strange bug: when I use OBJ_ARMOUR in the inventory prompt, it doesn't return robes or other non-body armour, like boots and helmets.

Return to Coding

Who is online

Users browsing this forum: No registered users and 7 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.