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 25th, 2013, 08:19 PM
Transition to a bootstrap from the bootstrapper? Say I bootstrap 'booted' and assign it a tag 'User.bootme'. This doesn't seem to work:
Code:
perform this.child[boostrapid].assign[User.Something]
Also I'd also like to ammend the description, and I've tried everything I can think to do:
1)
Code:
perform this.child[boostrapid].appenddesc[description,"blah"]
2) I also tried bootstrapping via a gizmo
Code:
perform gizmo.child[boostrapid].appenddesc[description,"blah"]
3) I also tried a loop:
Code:
foreach pick in hero where "thingid.boostrapid"
    eachpick.appenddesc[description,"blah"]
  endif
nexteach
Anyone have any ideas? I keep coming back to wanting to do things this way. And I've long been unable to solve the problem.
risner is offline   #1 Reply With Quote
Umarian
Senior Member
 
Join Date: Apr 2010
Location: Lemont, IL
Posts: 320

Old July 25th, 2013, 10:32 PM
I don't understand what you are trying to do with the first one.

With the description, there is a macro for that.

#appenddesc[thingid, 'desc text']

I am not at HL right now, so I am unsure if that is the exact format. You can search for the macro though.
Umarian is offline   #2 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old July 26th, 2013, 04:46 AM
I worry about multiple of the same thingid and since child[] only finds the first I worry that #appenddesc does the same or does all of them. I need a specific one to make sure I don't modify a different one I shouldn't touch.

The only way I know to get the one I am sure I want is to put something unique (tag or field) on the bootstrap and loop looking for that unique field. Then I have it on an eachpick. focus.

Mathias said:
Code:
#appenddesc[#thing,#descript] is:

perform state.thing[#thing].amendthing[description,state.thing[#thing].field[descript].text & "{br}{br}" & #descript]
I also tried .amendthing via the loop.

Does state.thing[] work like child[] where it finds the first? Or does it find all? How can I apply amendthing to the current eachpick. value?

Last edited by risner; July 26th, 2013 at 04:53 AM.
risner is offline   #3 Reply With Quote
Umarian
Senior Member
 
Join Date: Apr 2010
Location: Lemont, IL
Posts: 320

Old July 26th, 2013, 06:12 AM
What are you trying to do that there would be multiple versions of the same Thing displayed? Are you trying to adjust a spell the first time it shows? Are you wanting to change a racial special depending on the level?
Umarian is offline   #4 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old July 26th, 2013, 06:31 AM
Quote:
Originally Posted by Umarian View Post
What are you trying to do that there would be multiple versions of the same Thing displayed? Are you trying to adjust a spell the first time it shows? Are you wanting to change a racial special depending on the level?
Various tasks. For example, load an item (bootstrap) and modify it in some way. Which is better than making a separate item for each "similar" item. Other cases I've wanted to do this is to make a generic tracker and modify it's name and description to order. Otherwise I need a new tracker per thing that needs tracked.

Both of those tasks I wouldn't want to modify all those things, since only the one I bootstrapped would be an item I want to change.

I've been playing all morning with trying to make a Gizmo. Apparently the Gizmo Entity Id is predefined and the only two I can find are wSpecMagic and mSpecMagic. When I make a gizmo using either of those, and add a bootstrap below it, they do not show up.
risner is offline   #5 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old July 26th, 2013, 07:08 AM
I just confirmed that:
Code:
#appenddesc[thingid,"blah"]
Does modify all copies of thingid.
risner is offline   #6 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old July 26th, 2013, 07:57 AM
CustDesc is deprecated, but I can't get access to the existing description. I seem to only be able to modify it. So I can't just append to the end since I can't find what it is set to now.

A different problem was a tracker. I couldn't find a field I could modify that would change it's description.

Last edited by risner; July 26th, 2013 at 08:27 AM.
risner is offline   #7 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old July 26th, 2013, 10:17 AM
Unfortunately you can't directly transition from the bootstrapper to the bootstrapped thing, although you can go the other way with the root. transition. Closest thing you can do is foreach through things, check that they are bootstrapped to the thing you want, and then modify them if they are.

Also, you can't add a pick in an eval script, but you can always bootstrap that pick with a marker, and then hide or reveal it with an eval script appropriately (to make it seem like it is added under certain circumstances). This can be good if you can't do a bootstrap condition.
Aaron is offline   #8 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old July 26th, 2013, 11:26 AM
Quote:
Originally Posted by risner View Post
I just confirmed that:
Code:
#appenddesc[thingid,"blah"]
Does modify all copies of thingid.
Just to build on this your not modifying all copies as much as your modifying the "Thing" and not the "Pick".

When something is in the XML and NOT loaded yet onto a character/hero we call it a "Thing" and it has to be unique by its very design. Once added to a the hero, and based on settings, a Pick can have multiple instances of itself running each with different Field values or Tags.

So going from a Thing to Pick is like the same as instantiating a new object or a unique instance of an object in memory.

So the #appenddesc[] is actually modifying the text on the Thing which is then carried over to all the Picks. This is why if you use #appenddesc[] on a feat the changed text actually shows in the List of Feats. This is the only macro/function that I know of that can actually modify a Thing.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #9 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old July 26th, 2013, 11:27 AM
Quote:
Originally Posted by Aaron View Post
you can go the other way with the root. transition.
I believe both of these will result in the same end, but which is less CPU:

Narrow by a thingid--
Code:
foreach pick in hero where "thingid.ioRbItems"
  if (compare(this.idstring, eachpick.root.idstring) = 0) then
or

Skip the additional check in the foreach loop
Code:
foreach pick in hero
  if (compare(this.idstring, eachpick.root.idstring) = 0) then
How about the other question? Can you do amendthing inside a foreach loop? If so what is the syntax? Since in the case of an object I would like to reuse, I can't use the macro as I will have other objects I don't want to modify.
risner is offline   #10 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 09:43 AM.


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