Get the item abilities dialog working and updated for new stuff

- Add additional treasure type for "unique" items
- Main item dialog now shows the item ability's display name, and also has more space for the item's full name
- (Game) No-ammo missiles (eg slings) are now counted as weapons by shops
- (Dialog Engine) Fix LED groups being drawn when invisible
This commit is contained in:
2015-01-21 14:04:40 -05:00
parent fb607f83c1
commit 311a3c0702
13 changed files with 713 additions and 427 deletions

View File

@@ -2,15 +2,12 @@
<?xml-stylesheet href="dialog.xsl" type="text/xsl"?>
<!--<!DOCTYPE dialog SYSTEM "dialog.dtd">-->
<dialog skin='light' defbtn='okay' debug='true'>
<field name='str' top='88' left='183' width='77' height='16'/>
<button name='okay' type='regular' top='266' left='471'>OK</button>
<button name='cancel' type='regular' top='266' left='405' def-key='esc'>Cancel</button>
<!--
NOTE: All these LEDs have been shifted 100 pixels left to account for the labels swapping sides
-->
<button name='okay' type='regular' top='281' left='471'>OK</button>
<button name='cancel' type='regular' top='281' left='405' def-key='esc'>Cancel</button>
<text name='use-title' top='140' left='8' width='135' height='13'>Item use properties</text>
<group name='use-type'>
<led name='use0' state='off' top='143' left='164' width='100'>Help using PC</led>
<led name='use1' state='off' top='158' left='164' width='100'>Harm using PC</led>
<led name='use0' state='off' top='143' left='164' width='100'>Help single PC</led>
<led name='use1' state='off' top='158' left='164' width='100'>Harm single PC</led>
<led name='use2' state='off' top='173' left='164' width='100'>Help whole party</led>
<led name='use3' state='off' top='188' left='164' width='100'>Harm whole party</led>
</group>
@@ -18,17 +15,20 @@
<led name='magic' state='off' top='159' left='415' width='100'>Magical</led>
<led name='cursed' state='off' top='174' left='415' width='100'>Cursed</led>
<led name='conceal' state='off' top='189' left='415' width='100'>Conceal ability</led>
<led name='no-sell' state='off' top='204' left='415' width='100'>Shops won't buy</led>
<pict type='dlog' num='16' top='8' left='11'/>
<text size='large' top='6' left='50' width='158' height='16'>Edit Item Abilities</text>
<text top='8' left='222' width='111' height='14'>Item number:</text>
<text name='num' top='8' left='340' width='37' height='14'/>
<button name='weapon' type='large' top='58' left='333'>Weapon Abil.</button>
<text size='large' top='63' left='8' width='142' height='13'>Item special ability:</text>
<text name='abilname' framed='true' top='63' left='161' width='163' height='13'/>
<text top='17' left='486' width='45' height='14'/>
<text top='84' left='8' width='168' height='27'>Ability strength: (Usually 0-10, see instructions)</text>
<text top='140' left='8' width='135' height='13'>Item use properties</text>
<text top='156' left='21' width='123' height='39'>Only used for item abilities which are used (like healing).</text>
<text name='abilname' framed='true' top='63' left='161' width='250' height='13'/>
<text name='str1-title' framed='true' top='84' left='8' width='185' height='16'/>
<field name='str1' top='83' left='200' width='77' height='16'/>
<button name='str1-choose' type='large' top='80' left='290'>Create/Edit</button>
<text name='str2-title' framed='true' top='110' left='8' width='185' height='16'/>
<field name='str2' top='109' left='200' width='77' height='16'/>
<button name='str2-choose1' type='regular' top='107' left='290'>Choose</button>
<button name='str2-choose2' type='regular' top='107' left='358'>Priest</button>
<text top='140' left='292' width='121' height='13'>Other properties:</text>
<text top='209' left='10' width='155' height='42'>Item treasure class: (0 is lowest level of treasure, 4 is highest)</text>
<!--
@@ -39,15 +39,16 @@
<led name='type1' state='off' top='228' left='208' width='140'>Type 1: Lousy, 1 - 20 gp</led>
<led name='type2' state='off' top='243' left='208' width='140'>Type 2: So-so, 20-200 gp</led>
<led name='type3' state='off' top='258' left='208' width='140'>Type 2: Good, 200+ gp</led>
<led name='type4' state='off' top='273' left='208' width='140'>Type 4: Greate, 2500+ gp</led>
<led name='type4' state='off' top='273' left='208' width='140'>Type 4: Great, 2500+ gp</led>
<led name='type5' state='off' top='288' left='208' width='140'>Type 5: Unique/Rare, Not left</led>
</group>
<text top='25' left='50' width='145' height='14'>Current item name:</text>
<text name='name' top='25' left='198' width='196' height='14'/>
<text top='41' left='50' width='145' height='14'>Current item variety:</text>
<text name='variety' top='41' left='198' width='196' height='14'/>
<button name='general' type='large' top='57' left='441'>General Abil.</button>
<button name='usable' type='large' top='83' left='333'>NonSpell Use</button>
<button name='missile' type='large' top='107' left='441'>Missiles</button>
<button name='reagent' type='large' top='108' left='333'>Reagents</button>
<button name='spell' type='large' top='82' left='441'>Spell Usable</button>
<button name='clear' type='large' top='6' left='441'>Clear Abil.</button>
<button name='weapon' type='large' top='32' left='441'>Weapon Abil.</button>
<button name='general' type='large' top='58' left='441'>General Abil.</button>
<button name='usable' type='large' top='84' left='441'>Usable Abil.</button>
<button name='reagent' type='large' top='110' left='441'>Reagents</button>
</dialog>

View File

@@ -5,87 +5,89 @@
<!--
TODO: Assign numeric types (type = 'int' or 'uint') to fields as appropriate
-->
<field name='full' top='30' left='163' width='126' height='16'/>
<field name="short" top='30' left='458' width='125' height='16'/>
<field name='picnum' top='62' left='140' width='52' height='16'/>
<field name='level' top='199' left='161' width='52' height='16'/>
<field name='awkward' top='223' left='161' width='52' height='16'/>
<field name='bonus' top='247' left='161' width='52' height='16'/>
<field name='prot' top='271' left='161' width='52' height='16'/>
<field name='charges' top='295' left='161' width='52' height='16'/>
<field name='flag' top='199' left='366' width='52' height='16'/>
<field name='value' top='223' left='366' width='52' height='16'/>
<field name='weight' top='247' left='366' width='52' height='16'/>
<field name='class' top='271' left='366' width='52' height='16'/>
<button name='okay' type='regular' top='337' left='509'>OK</button>
<button name='cancel' type='regular' top='337' left='434' def-key='esc'>Cancel</button>
<button name='prev' type='left' top='337' left='13'/>
<button name='next' type='right' top='337' left='76'/>
<field name='full' top='30' left='163' width='226' height='16'/>
<field name="short" top='54' left='163' width='125' height='16'/>
<field name='picnum' top='82' left='140' width='52' height='16'/>
<field name='level' top='219' left='161' width='52' height='16'/>
<field name='awkward' top='243' left='161' width='52' height='16'/>
<field name='bonus' top='267' left='161' width='52' height='16'/>
<field name='prot' top='291' left='161' width='52' height='16'/>
<field name='charges' top='315' left='161' width='52' height='16'/>
<field name='flag' top='219' left='366' width='52' height='16'/>
<field name='value' top='243' left='366' width='52' height='16'/>
<field name='weight' top='267' left='366' width='52' height='16'/>
<field name='class' top='291' left='366' width='52' height='16'/>
<button name='okay' type='regular' top='357' left='509'>OK</button>
<button name='cancel' type='regular' top='357' left='434' def-key='esc'>Cancel</button>
<button name='prev' type='left' top='357' left='13'/>
<button name='next' type='right' top='357' left='76'/>
<!--
NOTE: All these LEDs have been shifted 100 pixels left to account for the labels swapping sides
-->
<group name='variety'>
<led name='none' state='off' top='89' left='106' width='90'>No Item</led>
<led name='weap1' state='off' top='104' left='106' width='90'>1-Hand weapon</led>
<led name='weap2' state='off' top='119' left='106' width='90'>2-Hand weapon</led>
<led name='gold' state='off' top='134' left='106' width='90'>Gold</led>
<led name='bow' state='off' top='149' left='106' width='90'>Bow</led>
<led name='arrow' state='off' top='164' left='106' width='90'>Arrows</led>
<led name='thrown' state='off' top='179' left='106' width='90'>Thrown missile</led>
<led name='potion' state='off' top='89' left='218' width='90'>Potion/Magic Item</led>
<led name='scroll' state='off' top='104' left='218' width='90'>Scroll/Magic Item</led>
<led name='wand' state='off' top='119' left='218' width='90'>Wand</led>
<led name='tool' state='off' top='134' left='218' width='90'>Tool</led>
<led name='food' state='off' top='149' left='218' width='90'>Food</led>
<led name='shield' state='off' top='164' left='218' width='90'>Shield</led>
<led name='armor' state='off' top='179' left='218' width='90'>Armor</led>
<led name='helm' state='off' top='89' left='336' width='90'>Helm</led>
<led name='gloves' state='off' top='104' left='336' width='90'>Gloves</led>
<led name='none' state='off' top='109' left='106' width='90'>No Item</led>
<led name='weap1' state='off' top='124' left='106' width='90'>1-Hand weapon</led>
<led name='weap2' state='off' top='139' left='106' width='90'>2-Hand weapon</led>
<led name='gold' state='off' top='154' left='106' width='90'>Gold</led>
<led name='bow' state='off' top='169' left='106' width='90'>Bow</led>
<led name='arrow' state='off' top='184' left='106' width='90'>Arrows</led>
<led name='thrown' state='off' top='199' left='106' width='90'>Thrown missile</led>
<led name='potion' state='off' top='109' left='218' width='90'>Potion/Magic Item</led>
<led name='scroll' state='off' top='124' left='218' width='90'>Scroll/Magic Item</led>
<led name='wand' state='off' top='139' left='218' width='90'>Wand</led>
<led name='tool' state='off' top='154' left='218' width='90'>Tool</led>
<led name='food' state='off' top='169' left='218' width='90'>Food</led>
<led name='shield' state='off' top='184' left='218' width='90'>Shield</led>
<led name='armor' state='off' top='199' left='218' width='90'>Armor</led>
<led name='helm' state='off' top='109' left='336' width='90'>Helm</led>
<led name='gloves' state='off' top='124' left='336' width='90'>Gloves</led>
<!--
TODO: Why are there two shields?
-->
<led name='shield2' state='off' top='119' left='336' width='90'>Shield 2</led>
<led name='boots' state='off' top='134' left='336' width='90'>Boots</led>
<led name='ring' state='off' top='149' left='336' width='90'>Ring</led>
<led name='necklace' state='off' top='164' left='336' width='90'>Necklace</led>
<led name='poison' state='off' top='179' left='336' width='90'>Weapon Poison</led>
<led name='nonuse' state='off' top='89' left='448' width='90'>Non-Use Object</led>
<led name='pants' state='off' top='104' left='448' width='90'>Pants</led>
<led name='xbow' state='off' top='119' left='448' width='90'>Crossbow</led>
<led name='bolt' state='off' top='134' left='448' width='90'>Bolts</led>
<led name='missile' state='off' top='149' left='448' width='90'>Missile (no ammo)</led>
<led name='special' state='off' top='164' left='448' width='90'>Special Item</led>
<led name='unused2' state='off' top='179' left='448' width='80'>Unused</led>
<led name='shield2' state='off' top='139' left='336' width='90'>Shield 2</led>
<led name='boots' state='off' top='154' left='336' width='90'>Boots</led>
<led name='ring' state='off' top='169' left='336' width='90'>Ring</led>
<led name='necklace' state='off' top='184' left='336' width='90'>Necklace</led>
<led name='poison' state='off' top='199' left='336' width='90'>Weapon Poison</led>
<led name='nonuse' state='off' top='109' left='448' width='90'>Non-Use Object</led>
<led name='pants' state='off' top='124' left='448' width='90'>Pants</led>
<led name='xbow' state='off' top='139' left='448' width='90'>Crossbow</led>
<led name='bolt' state='off' top='154' left='448' width='90'>Bolts</led>
<led name='missile' state='off' top='169' left='448' width='90'>Missile (no ammo)</led>
<led name='special' state='off' top='184' left='448' width='90'>Special Item</led>
<led name='unused2' state='off' top='199' left='448' width='80'>Unused</led>
</group>
<pict name="pic" type='dlog' num='16' top='8' left='11'/>
<text size='large' top='6' left='50' width='158' height='16'>Edit an Item Type</text>
<text top='8' left='222' width='111' height='14'>Item number:</text>
<text name='num' top='8' left='340' width='37' height='14'/>
<text top='31' left='50' width='107' height='14'>Item Full Name:</text>
<text top='31' left='298' width='155' height='14'>Item Unidentified Name:</text>
<text top='63' left='8' width='120' height='14'>Item picture:</text>
<button name="choosepic" type='large' top='58' left='201'>Select Icon</button>
<text size='large' top='87' left='8' width='86' height='16'>Item type:</text>
<text top='200' left='8' width='148' height='14'>Item level: (0 - 50)</text>
<text top='224' left='8' width='148' height='14'>Awkwardness: (0-20)</text>
<text top='248' left='8' width='148' height='14'>Bonus: (0-10)</text>
<text top='272' left='8' width='148' height='14'>Protection: (-10 - 20)</text>
<text top='296' left='8' width='148' height='14'>Charges: (0-100)</text>
<text top='200' left='220' width='137' height='13'>Type flag: (0-1000)</text>
<text top='224' left='220' width='141' height='13'>Value: (0-10000)</text>
<text top='248' left='220' width='141' height='13'>Weight: (0-250)</text>
<text top='272' left='220' width='141' height='13'>Special class: (0-100)</text>
<text name='missile-title' top='200' left='440' width='140' height='16'>Missile type:</text>
<field name='missile' top='223' left='463' width='50' height='16'/>
<pict name='missile-pic' type='missile' num='3' top='223' left='440'/>
<button name='choosemiss' type='regular' top='220' left='521'>Choose</button>
<text name='skill-title' top='250' left='440' width='140' height='16'>Weapon key skill:</text>
<field name='weap-type' top='271' left='440' width='73' height='16'/>
<button name='choosetp' type='regular' top='268' left='521'>Choose</button>
<text top='293' left='221' width='363' height='40'>
<text top='55' left='2' width='155' height='14'>Item Unidentified Name:</text>
<text top='56' left='298' width='80' height='14'>Item Ability:</text>
<text name='abilname' framed='true' top='55' left='387' width='185' height='14'/>
<text top='83' left='8' width='120' height='14'>Item picture:</text>
<button name="choosepic" type='large' top='78' left='201'>Select Icon</button>
<text size='large' top='97' left='8' width='96' height='16'>Item type:</text>
<text top='220' left='8' width='148' height='14'>Item level: (0 - 50)</text>
<text top='244' left='8' width='148' height='14'>Awkwardness: (0-20)</text>
<text top='268' left='8' width='148' height='14'>Bonus: (0-10)</text>
<text top='292' left='8' width='148' height='14'>Protection: (-10 - 20)</text>
<text top='316' left='8' width='148' height='14'>Charges: (0-100)</text>
<text top='220' left='220' width='137' height='13'>Type flag: (0-1000)</text>
<text top='244' left='220' width='141' height='13'>Value: (0-10000)</text>
<text top='268' left='220' width='141' height='13'>Weight: (0-250)</text>
<text top='292' left='220' width='141' height='13'>Special class: (0-100)</text>
<text name='missile-title' top='220' left='440' width='140' height='16'>Missile type:</text>
<field name='missile' top='243' left='463' width='50' height='16'/>
<pict name='missile-pic' type='missile' num='3' top='243' left='440'/>
<button name='choosemiss' type='regular' top='240' left='521'>Choose</button>
<text name='skill-title' top='270' left='440' width='140' height='16'>Weapon key skill:</text>
<field name='weap-type' top='291' left='440' width='73' height='16'/>
<button name='choosetp' type='regular' top='288' left='521'>Choose</button>
<text top='313' left='221' width='363' height='40'>
Enter properties for this item type.
For a detailed description of the fields, see the documentation.
Click Edit Abilities to edit item abilities.
</text>
<button name="abils" type='large' top='337' left='155'>Abilities</button>
<button name="abils" type='large' top='357' left='155'>Abilities</button>
</dialog>

View File

@@ -1,18 +1,17 @@
No ability
Flaming Weapon
Demon Slayer
Undead Slayer
Lizard Slayer
Giant Slayer
Mage Slayer
Priest Slayer
Bug Slayer
Acidic Weapon
Soulsucker
Drain Missiles
Weak Weapon
Causes Fear
Poisoned Weapon
Bonus damage of type
Bonus damage against race
Heal target
Explodes
Returning missile
Farflight missile
Seeking missile
Drain magic from target
Afflict status on target
Drain life from target
Unused
Weak weapon
Cause fear
Call special when attacking
@@ -28,71 +27,36 @@ Poisoned Weapon
Protection
Full Protection
Fire Protection
Cold Protection
Poison Protection
Magic Protection
Acid Protection
Skill
Strength
Dexterity
Intelligence
Accuracy
Thieving
Giant Strength
Lighter Object
Heavier Object
Occasional Bless
Occasional Haste
Life Saving
Prot. From Petrify
Protection from damage type
Full protection
Protection from melee damage
Evasion
Martyr's shield
Awkward weapon
Protection from status effect
Boost attack skill
Boost statistic
Boost combat statistics
Boost magic statistics
Boost missile accuracy
Boost thieving skills
Giant strength
Lighter object
Heavier object
Occasional status effect
Call special when attacked
Life saving
Protect from petrification
Regenerate
Poison Augment
Disease Party
Will
Free Action
Speed
Slow Wearer
Protection from Undead
Protection from Demons
Prot. from Humanoids
Prot. from Reptiles
Prot. from Giants
Prot. from Disease
Poison Weapon
Curse/Bless User
Cure/Cause Poison
Speed/Slow User
Add/Lose Invulnerability
Add/Lose Magic Res.
Add/Lose Web
Cause/Cure Disease
Add/Lose Sanctuary
Cure/Cause Dumbfound
Add/Lose Martyr's Shield
Cure/Cause Sleep
Cure/Cause Paralysis
Cure/Cause Acid
Bliss
Add/Lose Experience
Add/Lose Skill Pts.
Add/Lose Health
Add/Lose Spell Points
Doom
Light
Stealth
Firewalk
Flying
Major Healing
Augment weapon poison
Radiance
Boost willpower
Free action
Boost speed
Slow wearer
Protect from race
Lockpicks
Drain missiles
@@ -103,37 +67,72 @@ Major Healing
Flame
Fireball
Firestorm
Kill
Ice Bolt
Slow
Shockwave
Dispel Undead
Dispel Spirit
Weapon poison
Affect status effect
Cast spell
Bliss/Doom
Affect experience
Affect skill points
Affect health
Affect spell points
Affect light level
Affect party status
Affect health and poison
Call special when used
Summoning
Mass Summoning
Acid Spray
Stinking Cloud
Sleep Field
Venom
Shockstorm
Paralysis
Web Spell
Strengthen Target
Mass summoning
Quickfire
Mass Charm
Magic Map
Dispel Barrier
Make Ice Wall
Charm Spell
Antimagic Cloud
@@ -151,144 +150,14 @@ Antimagic Cloud
Holly/Toadstool
Comfrey Root
Glowing Nettle
Crypt Shroom/Wormgr.
Crypt Shroom/Wormgrass
Asptongue Mold
Ember Flowers
Graymold
Mandrake
Sapphire
Smoky Crystal
Ressurection Balm
Lockpicks
Returning
Lightning
Exploding
Acid
Slay Undead
Slay Demon
Heal Target
Resurrection Balm