Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old July 15th, 2013, 08:57 AM
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?
risner is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 15th, 2013, 09:31 AM
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.
Mathias is online now   #2 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old July 15th, 2013, 07:25 PM
Quote:
Originally Posted by Mathias View Post
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?
risner is offline   #3 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old July 16th, 2013, 10:52 AM
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
risner is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 16th, 2013, 11:41 AM
Quote:
Originally Posted by risner View Post
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
Mathias is online now   #5 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:15 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.