Opened 11 years ago

Closed 11 years ago

#705 closed bug (fixed (in master))

Randart activations make reference to the artifacts they are derived from

Reported by: takkaria Owned by: magnate
Milestone: 3.1.1 beta Keywords: randarts
Cc:

Description

Not sure what to do about this.

Change History (9)

comment:1 follow-up: Changed 11 years ago by magnate

Do you mean that it's possible to tell the source artifact by the activation of the randart? My plan has always been to randomise activations eventually, which would solve this problem. But if you mean something else ...

comment:2 in reply to: ↑ 1 Changed 11 years ago by GabeCunningham

Replying to magnate:

Do you mean that it's possible to tell the source artifact by the activation of the randart? My plan has always been to randomise activations eventually, which would solve this problem. But if you mean something else ...

Yes -- I just activated a randart hard leather cap, and the activation message was "Dethanc is covered in sparks".

comment:3 Changed 11 years ago by magnate

  • Owner set to magnate
  • Status changed from new to assigned

Ah, thank you - that's a change to the activation code which I had not noticed. I'll try to fix this so it uses the artifact's current name.

comment:4 Changed 11 years ago by magnate

  • Keywords randarts added

comment:5 Changed 11 years ago by takkaria

Having a quick look through the actication messages in artifact.txt, it looks like something fairly simple can be done here. ATM, each activatable artifact has a line like:

M:Taratol glows bright green...
M:The Quarterstaff of Olorin glows brightly...
M:Your Gauntlets are covered in sparks...
M:The amulet lets out a shrill wail...

If there were certain strings which got expanded when printing the message, then all the activations in artifact.txt could be rewritten to use them.

{name} would expand into the name of the artifact, which in the case of 'quoted' names, is just the bit between quotes, but otherwise is the full name ('the spear of Hurin').

{kind} would expand into the item kind of the artifact ('crossbow', 'boots', 'cloak'), and {is} would expand into 'is'/'are' depending (so '{kind} {is}' could be "spear is" or "gauntlets are").

With this scheme, we could rewrite the above lines as:

M:{name} glows bright green...
M:{name} glows brightly...
M:Your {kind} {is} covered in sparks...
M:The {kind} lets out a shrill wail...

And it wouldn't matter what they got assigned to.

comment:6 Changed 11 years ago by magnate

Ok, this should be fixed - hoping to commit the changes today. I see this as an interim solution though, because one day randarts will have random activations, which will be chosen from list-effects.h, not from artifact.txt. We will therefore need messages for those activations which don't appear in artifact.txt. I can see two solutions to this, but happy to hear more:

  1. Add a field to list-effects.h which gives the activation text (the M: lines in artifact.txt), add new ones for activations not used in artifact.txt, and change the activation code to take the text from this new field.
  1. Simply write a structure of a dozen or two activation messages, and pick one at random for each artifact. This would be simpler, and there is sufficiently little specificity about them that this would not noticeably affect flavour. (At the moment they are all {name} or {kind} + {verb} + {colour} or {sound} etc.) Having said that, I prefer the first solution as it feels more thorough and correct.

comment:7 Changed 11 years ago by takkaria

FWIW, I'm strongly in favour of the latter solution. As I see it, the activation text in artifact.txt is entirely divorced from what the effect actually is (they're about the physical change in the artifact on activation, rather than anything to do with the effect per se).

comment:8 Changed 11 years ago by magnate

  • Summary changed from Randart activations make reference to the artifaacts they are derived from to Randart activations make reference to the artifacts they are derived from

Oh well then, that's easy. No reason I can't do that straight away! Will have a go and see what people think.

comment:9 Changed 11 years ago by magnate

  • Resolution set to fixed
  • Status changed from assigned to closed

Well, [0f4f166] (SVN r1279) fixes this particular bug, but still relies on the M: lines in artifact.txt for activation messages. When I randomise artifact activations, I'll change this to use the second solution described above - a randomly-selected activation message, which is applied at item creation.

Note: See TracTickets for help on using tickets.