New trove, can this be improved w/ Lua?


If you are interested in helping with tiles, vaults, patches or documentation, this is the place for that.

User avatar

Snake Sneak

Posts: 104

Joined: Thursday, 16th May 2013, 12:57

Post Friday, 8th January 2016, 04:47

New trove, can this be improved w/ Lua?

  Code:
NAME:   trove_trog
: if trove.weapon_skills() >= trove.spell_skills() and trove.weapon_skills() >= you.skill("Unarmed Combat") then
WEIGHT: 15
: else
WEIGHT: 5
: end
ORIENT: encompass
TAGS:   no_item_gen no_monster_gen allow_dup no_species_fe
ITEM:   acquire:trog weapon / any useful weapon good_item / any weapon w:2
KITEM:  e = acquire:trog weapon / any useful weapon good_item / any weapon w:2
NSUBST: d = 4:e / *:d
KPROP:  e = bloody
NSUBST: ' = 4:' / *:.
KPROP:  ' = bloody
KFEAT:  _ = altar_trog
: trove.setup_features(_G)
: set_border_fill_type("endless_lava")
MAP
   .
 .....
..'d'..
.ddddd.
.dd_dd.
.ddddd.
.''d''.
.'''''.
..'''..
 ..A..
  .<.
ENDMAP

So, I'm shooting for an alternative to the existing weapon troves that uses Trog acquirements instead of standard ones. What I'd like to do is have the game reroll if "any useful weapon" or "any weapon" generate with pain brand, since Trog will never gift pain. Ditto if it generates unrands that he doesn't like, e.g. Wucad Mu. Can this be done with Lua?

Why am I doing this? The existing 3 weapon troves all use standard acquirements for their high-end loot. Trog acquirements weight the top-tier base types (e.g. triple blades) lower, but on average start with a higher enchantment. They also, obviously, are much more likely to get the antimagic brand, which is rare for non-Trog worshipers, and also a very good brand. As I see it, the loot here should be of comparable quality to the existing weapon troves, while still remaining distinctive. Comments and criticisms welcome!

Ziggurat Zagger

Posts: 8786

Joined: Sunday, 5th May 2013, 08:25

Post Saturday, 9th January 2016, 04:41

Re: New trove, can this be improved w/ Lua?

you should change those to ammo instead since trog gifts assloads of ammo now even if you have no ranged skills

Spider Stomper

Posts: 217

Joined: Thursday, 2nd June 2016, 00:52

Post Saturday, 10th September 2016, 18:51

Re: New trove, can this be improved w/ Lua?

I think that this is a great idea, but maybe something else that identifies it as trog, like burning spellbooks.

Also maybe have manuals for melee skills? (Because trog book acquirement always gives manuals.) Just an idea.
I'm with tasonir on this one.
User avatar

Snake Sneak

Posts: 104

Joined: Thursday, 16th May 2013, 12:57

Post Saturday, 10th September 2016, 20:31

Re: New trove, can this be improved w/ Lua?

Yeah, throwing a book in there with a flame cloud on it would be a simple matter. Would probably want the book to just contain Magic Dart or something, so the player isn't rewarded with useful spells in a Trog trove.

As for manuals, off the top of my head I'm not sure if "acquire:trog book" would generate a spellbook or not. If it does, the manuals would need to be weighted by hand, which I'm not a huge fan of. I personally think the RNG should determine the loot when troves are concerned.

Still though, the sticking point is vetoing generation of brands Trog hates.

Return to Contributions

Who is online

Users browsing this forum: No registered users and 3 guests

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