A question about Randomized descriptions(Why something works)

Been trying to find some old code to dig through to find the answer for this, but havn't thus fra
I like to work with clones to make random items, and a long time ago when I started I was able to make clones with semi random descriptions, it added flavor to the treasure hordes, For example

The amulet of [#randomname] is a tarnished [#metal] with a a small [#gem] You can't guess the true value.

The code took a value randomly from a string list but wouldn't change it on each examination like various random (=PickOneStr(whatever list)) does

I know this was done at one point in the old cloning code, using a list with the r_str(whatever property) but now that I'm a bit more accomplished I'd like to know WHY it works so I can implement it better for my needs

Is it something with the ProcessText function? I don't remember using it before?

Haven't worked with clones, but I do know random...
Could you create the clone, then make the random changes to the clone?
Do the PickOneStr once to set the description...
It sounds like you are right on the edge of having it worked out, but you just need one bit to get it right.

hmm.. seems inelegant but maybe i could do that. then have it save to an alt look..then copy the look back ... will give it a shot now.. on a very simple version

edit -Seems i got a test case working, did end up using the text processing function to just read the code once and put it back as a look, now I understand why I had this sorta thing giving me alot of trouble when I was playing around with using this and script descriptions at once... Its to late to work now, so'll try more tommorow

There is something like that here:

Oops, double post

I am using this scripting for a game. I noticed when you drop an equipped weapon, it will not register the weapon as unequipped in inventory or in status pane.

I created a function to the game to call in the after drop script.


if (object = player.equipped) {
  list add (object.inventoryverbs, "Equip")
  list remove (object.inventoryverbs, "Unequip")
  object.alias = Replace(object.alias, " (equipped)", "")
  player.equipped = null

This fixed the problem as far as I can tell.
Oh. after calling the function call
described in Part two

This topic is now closed. Topics are closed after 60 days of inactivity.