• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Duplicate tags, ignore or prune?

risner

Well-known member
I've got something that I'm doing pulltags on, and sometimes I'll get duplicates of the same tags.

I've got questions on this:
1) Do I care enough to prune the tags? The duplicates don't seem to be causing a problem.
2) Can I get pulltags to ignore tags that already exist?
3) Is there a way to do "sClass.?" and auto remote the duplicates?
 
Depends on exactly what tags you're working with - in some cases, the count of the tags is important, and in other cases, it isn't.

Pruning usually isn't an option, though - there just aren't any good ways to do it.

I don't understand #3 - please clarify.
 
Depends on exactly what tags you're working with - in some cases, the count of the tags is important, and in other cases, it isn't.

Pruning usually isn't an option, though - there just aren't any good ways to do it.

I don't understand #3 - please clarify.

I'm doing a script to copy tags (sClass.?) inside a foreach thing loop and apply those tags on the current context.

I'm seeing duplicates, but the duplicates of sClass.? don't seem to hurt things.

Code:
foreach thing in BaseClHelp where "CasterSrc.Divine"
  perform eachthing.pulltags[sClass.?]
  nexteach

My real questions are:
1) Do I care?
2) Is there a way to do it in the foreach to not copy if already there?
 
Ok I found code that cleans it up.
Get the Tag Id's, and delete them with str.

I'm making the assumption that the additional time to do tagids/deletestr is less than the associated overload of having a few hundred additional tags.

Code:
foreach thing in BaseClHelp where "CasterSrc.Divine"
  t = eachthing.tagids[sClass.?]
  perform deletestr[t]
  perform eachthing.pulltags[sClass.?]
  nexteach
 
I'm making the assumption that the additional time to do tagids/deletestr is less than the associated overload of having a few hundred additional tags.

Anytime you use a string, that's lots of computer cycles. Using a string operation to manage tags - deletestr[] vs. delete[], for example, even worse.

Having the tag there, and finding it with the normal tag operations like tagis[], pulltags[], etc., that's few computer cycles
 
Back
Top