Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - User Projects

Notices

Reply
 
Thread Tools Display Modes
nullPointer
Member
 
Join Date: Sep 2014
Location: Toronto Ontario
Posts: 68

Old February 16th, 2015, 06:37 AM
I would think (rules wise) that it would be the latter
Simply put, the 7th level ability is actually "Enhance Mind Blade +1", which would put it to +3
This way it'll work with Gestalt too, or with other classes or feats which may raise Mind Blade in the future
nullPointer is offline   #11 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,410

Old February 16th, 2015, 10:31 AM
Quote:
Originally Posted by TCArknight View Post
One standard I would like to ask about, and this may be a general coding one.

When for example, the 7th level Enhanced Mind Blade (+3) class ability is replaced, does the next instance remain the +4, or should it become the +3 and increment from there?
So current script logic is:
Code:
<eval phase="Final" priority="10000"><![CDATA[
field[abValue].value += field[xCount].value
field[livename].text = "Enhanced Mind Blade +" & field[abValue].value
field[abSumm].text = "You can enhance your Mind Blade with a total enhancement bonus of +" & field[abValue].value & "."
field[listname].text = "Enhanced Mind Blade +" & field[xIndex].value]]></eval>
The above I never noticed is a little off as it has no stop logic. Here is the "basic" class script I always start from and it should run at Post-Levels/10000 not final. Final is WAY too late to do any testing actually. What if we need to know what "Plus" we are at from other scripts. Currently we would be running so late we couldn't do much with that Plus value.
Code:
~Set the list name
field[listname].text = field[thingname].text & " " & signed(field[xIndex].value)

~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] <> 1)
~ if we've been disabled, get out now
doneif (tagis[Helper.SpcDisable] <> 0)

field[abValue].value += field[xCount].value
field[livename].text = field[thingname].text & " " & signed(field[abValue].value)
With the above logic in place the the "live" version of cSknEnhMB will always be the most "current" and accurate version.

Does that answer the question?

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   #12 Reply With Quote
psych777
Senior Member
 
Join Date: Aug 2011
Posts: 362

Old February 16th, 2015, 01:29 PM
so trying to follow along with the pdf to work with github, i cleared out what i had done before and created a new folder like the pdf described. i installed pathfinder in the new folder and then installed the 3PP pack. after configuring in SourceTree when i try to pull down the files in SourceTree i get the following message:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
From https://github.com/shadowchemosh/HL-Pack-3PP
* [new branch] master -> origin/master

* [new tag] v1.0 -> v1.0
* [new tag] v1.1 -> v1.1
* [new tag] v1.2 -> v1.2
* [new tag] v1.4 -> v1.4

git -c diff.mnemonicprefix=false -c core.quotepath=false pull origin master
From https://github.com/shadowchemosh/HL-Pack-3PP
* branch master -> FETCH_HEAD

error: Untracked working tree file 'COM_3PPPack - Helper Things.user' would be overwritten by merge.

Completed with errors, see above.

-------
in the tab in the middle i see no branch...added screenshot...

is this because i didn't setup the basic pack and copy the COM files over as i see you just posted a couple posts ago? or did i do something else wrong?
Attached Images
File Type: jpg sourcetree.jpg (112.1 KB, 2 views)
psych777 is offline   #13 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,410

Old February 16th, 2015, 02:08 PM
@psych777 So please "unstage" all those objects you have staged as those are the "LW" Files which we don't want. You have 1,885 files staged to be PUSHED to GitHub.

Wwhat the message is saying is that you already have a file named "COM_3PPPack - Helper Things.user" in the local folder already. So sourcetree does not know what to do about it. Are you sure you are pointing to the new "fresh" Folder? I can't tell from the picture. Double check that your Local Repository is the new clean folder.

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.

Last edited by ShadowChemosh; February 16th, 2015 at 02:15 PM.
ShadowChemosh is offline   #14 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,410

Old February 16th, 2015, 02:13 PM
I hate to ask this but when you guys are doing the new scripts or making changes can we "line" up the scripts please. I spent allot of time aligning them in the XML. If you ever opened a script done by LW you will see the code is RIGHT justified like so:

Code:
     field[abValue].value += field[xCount].value
     field[livename].text = "Enhanced Mind Blade +" & field[abValue].value
     field[abSumm].text = "You can enhance your Mind Blade with a total enhancement bonus of +" & field[abValue].value & "."
     field[listname].text = "Enhanced Mind Blade +" & field[xIndex].value
The reason is so that it lines up correctly when you view it in RAW XML.

Take a look at this LINK on GitHub you can see the scripts where just changed (in green) and they are now left justified instead of where you can see the old "red" code was right justified.

Ok I am probably being a little "OCD" on this but it just looks so much nicer when viewed in XML.

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   #15 Reply With Quote
psych777
Senior Member
 
Join Date: Aug 2011
Posts: 362

Old February 16th, 2015, 02:38 PM
ah ha!

yeah i had clicked on the staged trying to see if that would fix things. unchecked them. then realized my mistake from what you mentioned, i had actually installed the 3pp pack on the new folder through herolab, which downloads a set of the files. so uninstalled the third party pack and redid the pull and looks just fine now

about the right justified. is it just some spaces you put in before the code? how many?
Attached Images
File Type: jpg sourcetree.jpg (300.0 KB, 2 views)
psych777 is offline   #16 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,410

Old February 16th, 2015, 02:52 PM
Quote:
Originally Posted by psych777 View Post
ah ha!

yeah i had clicked on the staged trying to see if that would fix things. unchecked them. then realized my mistake from what you mentioned, i had actually installed the 3pp pack on the new folder through herolab, which downloads a set of the files. so uninstalled the third party pack and redid the pull and looks just fine now
Sweet that looks much better!

Quote:
Originally Posted by psych777 View Post
about the right justified. is it just some spaces you put in before the code? how many?
In the editor the first character should align with the first character for the Priority and you would add one "blank" line first.. I can get a picture/example once I get home.

In the XML it looks like this:
Code:
<eval phase="PostLevel" priority="10000"><![CDATA[
  ~ If we're disabled, do nothing
  doneif (tagis[Helper.FtDisable] <> 0)
  ~ If we have not chosen then get out now
  doneif (field[usrChosen1].ischosen <> 1)
  var iX as number
  ~ Calculate the array value which is class level minus one
  ~ as we start at zero
  iX = field[usrChosen1].chosen.field[cTotalLev].value - 1
  ~ Increase class ready number by one
  field[usrChosen1].chosen.field[cKnowTot].matrixvalue[iX,1] += 1
  ]]></eval>
The first character aligned with the "v" in the word <eval. Following LW standards indenting should always be "two" characters:

Code:
If (1 = 1) then
  ~ do something
Endif
My only thing is you will see LW use this standard where they line up the 'endif' with the indented code:
Code:
If (1 = 1) then
  ~ do something
  Endif
Personally I think that is outdated and hard to read. So I never do that unless I am giving something to LW to add officially.

So pretty much just asking that we "try" and keep things consistent. So if you want to use three spaces to indent that is fine. But always use three spaces then.

I won't actually "do" code reviews but if you see me push changes to GitHub with a comment of "align scripts" you will know what I am doing.

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   #17 Reply With Quote
psych777
Senior Member
 
Join Date: Aug 2011
Posts: 362

Old February 16th, 2015, 02:58 PM
yeah the endif being indented has really made me struggle when reading some of the code examples lol
psych777 is offline   #18 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,410

Old February 16th, 2015, 03:52 PM
So "foreach" loops. Want to talk about them for a minute here. I would like people to consider Foreach loops the MOST EVIL thing ever invented! In other words they should be the "LAST" type of script we write instead of the first type of script we write.

The reason you ask? Good question. The amount of CPU it takes is massive. Apply this onto the iPads or a small windows tablet and it will BURN through the battery or simply cause the iPad to close. Then I get nasty grams from gamers say how the "Community" stuff broke the iPad.

In a small way they are right because we use far too many foreach loops to solve problems. They are everywhere in almost every script.

So here is an example. Sorry I just saw this posted to GitHub and its the perfect situation to talk about:

The ability is trying to give Mind Blades the Agile special ability.
A nimble blade of 7th level treats his mind blade as if it had the agile weapon special ability. This does not count toward the nimble blade’s mind blade’s enhancement bonus. This replaces the mind blade enhancement increase gained at 7th level.

We see the code is doing a Foreach loop to find all the mind blades.
Code:
<eval phase="PostLevel" priority="10000"><![CDATA[
  ~ If the hero doesn't have this ability, ignore the following.
  doneif (tagis[Helper.ShowSpec] = 0)

  foreach pick in hero from BaseWep where "IsWeapon.wMindBlade"
    perform eachpick.assign[DamageOpt.aDEX]
  nexteach
  ]]></eval>
In this case we have access to all the "Things" that make up the Mind Blade weapon. What we should be doing instead is setting a bootstrap of the "Agile" Item Power onto each Mind Blade weapon. Then setting a bootstrap condition that says if it finds the "MindBlade.Agile" tag on the hero then allow the bootstrap for Agile to work. So this means the "agile" text will get displayed on the Mind blade and no foreach loop required.

In matter of fact the above script simply becomes:
Code:
<eval phase="First" priority="100"><![CDATA[
  ~we're earlier than the normal test for whether we've reached the correct level, so we'll recreate that test here
  doneif (root.linkage[varies].field[cTotalLev].value + field[xExtraLev].value + field[xEffectLev].value < tagvalue[ClSpecWhen.?])

  ~ Set agile tag onto the hero
  perform hero.assign[MindBlade.Agile]
  ]]></eval>
If we don't want to deal with "Bootstrap" conditions we could instead set this script on to the Mind Blade weapon:
Code:
~ Pre-levels/10000
~ If we should have the Agile weapon property give Dex to damage
if (hero.tagis[MindBlade.Agile] = 1) then
  assign[DamageOpt.aDEX]
endif
Then the above argument could be made that we have 4 mind blade weapons so we would have to add the above script "four" times. What if something in the future changes then we have to adjust four scripts. Ah well this is why they invented Procedures. A procedure which can now easily be seen and worked with in the editor "General->*Procedures" allows you to write the script "ONE" time and call it from all the mind blades. If in the future we need to change or enhance the script we do it in one place.

You will find all current procedures for Psionics in "COM_3PPPack_UltimatePsionics - Procedures.user". If you look HERE you will see we already have a procedure designed to run at Pre-Levels/10000 called SetMindBl. So really the last script just needs to be added to the SetMindBl procedure and no "Foreach" loop needed.

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   #19 Reply With Quote
Asandir
Senior Member
 
Join Date: Dec 2010
Location: Virginia, USA
Posts: 311

Old February 16th, 2015, 06:47 PM
Ok, I am going to ask some of the proverbial dumb questions here.

1) I got both the basic and the 3PP directories setup using new installations of Herolab. So the files I have created in another directory, can I just copy those new ones over that I have created into the new Github linked 3PP directory on my machine?

2) Since I am now adding new "books" I presume I am supposed to also edit the relevant .1st file correct?

3) Also, is there a file I should be editing to reflect the changes I have made/submitted?

4) Also on the data files, should I be adding something, checking something to denote Herolab community sets?

Minutus cantorum, minutus balorum, minutus carborata descendum pantorum.

Last edited by Asandir; February 16th, 2015 at 06:53 PM. Reason: additional questions.
Asandir is offline   #20 Reply With Quote
Reply

Thread Tools
Display Modes

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:50 AM.


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