Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
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] 1) Code:
perform this.child[boostrapid].appenddesc[description,"blah"] Code:
perform gizmo.child[boostrapid].appenddesc[description,"blah"] Code:
foreach pick in hero where "thingid.boostrapid" eachpick.appenddesc[description,"blah"] endif nexteach |
#1 |
Senior Member
Join Date: Apr 2010
Location: Lemont, IL
Posts: 320
|
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. |
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
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] 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. |
#3 |
Senior Member
Join Date: Apr 2010
Location: Lemont, IL
Posts: 320
|
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?
|
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
Quote:
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. |
|
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
I just confirmed that:
Code:
#appenddesc[thingid,"blah"] |
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
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. |
#7 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
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. |
#8 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
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. |
|
#9 |
Senior Member
Volunteer Data File Contributor
Join Date: Jun 2010
Posts: 623
|
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 Skip the additional check in the foreach loop Code:
foreach pick in hero if (compare(this.idstring, eachpick.root.idstring) = 0) then |
#10 |
|
|