Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
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? |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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. |
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Quote:
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 1) Do I care? 2) Is there a way to do it in the foreach to not copy if already there? |
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
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 |
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Quote:
Having the tag there, and finding it with the normal tag operations like tagis[], pulltags[], etc., that's few computer cycles |
|
#5 |
|
|