Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - User Projects (http://forums.wolflair.com/forumdisplay.php?f=55)
-   -   How to enter custom data (http://forums.wolflair.com/showthread.php?t=10969)

asvaldson August 7th, 2010 11:44 PM

How to enter custom data
 
I'm trying to insert the Superior Unarmed Strike feat from the Tomb of Battle, and I'm having a LOT of difficulty. Is there a printed guide on HOW to enter custom information? It is very obtuse for me at this point.

Sendric August 8th, 2010 05:46 AM

I'm still figuring it out myself, but I would start with the Monk's Belt (go to the Wonderous tab and select New (Copy) to select it) and copy the eval scripts. That should get you at least half way there. For the rest, you might go to the Class Special tab and use New (Copy) to get Improved Unarmed Damage (cMnkUnarmed) and copy that eval script. Both scripts would probably need to be edited to match the Superior Unarmed Strike feat, but that part should be relatively easy.

Hope this helps.

Lawful_g August 8th, 2010 12:23 PM

Those are both good places to start. Once you have some code, feel free to post it here for others to look at and help with, along with whether it is working or what issues you are having.

asvaldson August 8th, 2010 04:52 PM

I think that part of the problem I'm running into, is that I don't know what language the code is supposed to be in. I took 2 years of High School Programming, which was Microsoft Quick Basic, and 1 semester of college programming, which was C+, and that was 10 years ago. I familiar with the theory of coding, but NOT the details. That's like knowing that there are nouns, verbs, and adjectives in a language, but not knowing the words or the order they are supposed to be in lol.

If someone could tell me what I should study on, to familiarize myself with the format, I can at least feel a little more comfortable.


Anyway, I snatched the Eval Script from Monk's Unarmed Strike, and then edited it for the feat, and this is the script I came up with.

Quote:

if (field[xIndex].value <= 1) then
field[listname].text = "Unarmed Strike 1d4"
elseif (field[xIndex].value = 2) then
field[listname].text = "Unarmed Strike 1d6"
elseif (field[xIndex].value = 3) then
field[listname].text = "Unarmed Strike 1d8"
elseif (field[xIndex].value = 4) then
field[listname].text = "Unarmed Strike 1d10"
elseif (field[xIndex].value = 5) then
field[listname].text = "Unarmed Strike 2d6"
endif

~only perform the rest on the first copy
doneif (tagis[Helper.FirstCopy] = 0)

~ Get our unarmed strike pick, delete the damage tag from it, and assign
~ a new damage tag.
var dice as string
perform hero.child[wUnarmed].delete[wMain.?]
if (field[xAllLev].value < 4) then
perform hero.child[wUnarmed].assign[wMain.1d4_5]
dice = "1d4"
elseif (field[xAllLev].value < 8) then
perform hero.child[wUnarmed].assign[wMain.1d6_6]
dice = "1d8"
elseif (field[xAllLev].value < 12) then
perform hero.child[wUnarmed].assign[wMain.1d8_304]
dice = "1d10"
elseif (field[xAllLev].value < 16) then
perform hero.child[wUnarmed].assign[wMain.1d10_104]
dice = "2d6"
elseif (field[xAllLev].value < 20) then
perform hero.child[wUnarmed].assign[wMain.2d6_204]
dice = "2d8"
endif
field[livename].text = field[name].text & " (" & dice & ")"
It errors out when I test it, my theory is that when I changed the ELSEIF statements, when it assigns to [wMain.#d#_###], the part after the underline needs to be altered too, but I don't know what it is refering to. For instance, I changed

Quote:

if (field[xAllLev].value < 4) then
perform hero.child[wUnarmed].assign[wMain.1d6_5]
to

Quote:

if (field[xAllLev].value < 4) then
perform hero.child[wUnarmed].assign[wMain.1d4_5]

asvaldson August 8th, 2010 05:02 PM

Now, the other option, since the feat works similar to the Monk's Robe, is to edit this script.

Quote:


if (field[gIsEquip].value <> 0) then
~ If we're a monk, our AC and unarmed damage abilities get
~ 5 extra levels
if (hero.tagis[Classes.Monk] <> 0) then
hero.child[cMnkAC].field[xExtraLev].value += 5
hero.child[cMnkUnarm].field[xExtraLev].value += 5

~ Otherwise, we get 3 upgrades to our unarmed damage, and an AC bonus
~ assigned below
else
perform hero.child[wUnarmed].assign[Helper.DamageUp]
perform hero.child[wUnarmed].assign[Helper.DamageUp]
perform hero.child[wUnarmed].assign[Helper.DamageUp]
endif
endif
Again, though, I don't know where to begin. The initial IF statement would have to be changed, since it is a feat and not a piece of equipment, but I don't know what I should change it to. I know to cut the AC portion OUT of the script entirely, and to change the += to 4 instead of 5, but I don't even know HOW to begin the ELSE statement for if the user is not a monk. Do I splice in the script from the monk's unarmed damage with whatever corrections I need to make it workable?

I should have just stayed in college and pursued my computer science degree, who would have ever thought I'd want it 10 years later for gaming purposes lol.

Sendric August 9th, 2010 05:03 AM

Update: Ok, this isn't working for monk characters, but it does work for non-monk characters. I'll update if I figure it out. Also, you could probably put these two scripts together as one with an else (duh).

Ok, I think I got it working. Here's what I did:

First eval script:
Quote:

if (hero.tagis[Classes.Monk] <> 0) then
hero.child[cMnkUnarm].field[xExtraLev].value = hero.child[cMnkUnarm].field[xExtraLev].value + 4
endif
Second eval script:
Quote:

if (hero.tagis[Classes.Monk] = 0) then
~ Calculate our total character level
~ assigned to us
var level as number
level = herofield[tLevel].value

~ Get our unarmed strike pick, delete the damage tag from it, and assign
~ a new damage tag.
var result as number
var dice as string
result = hero.child[wUnarmed].delete[wMain.?]
if (level < 4) then
result = hero.child[wUnarmed].assign[wMain.1d4_4]
dice = "1d4"
elseif (level < 8) then
result = hero.child[wUnarmed].assign[wMain.1d6_5]
dice = "1d6"
elseif (level < 12) then
result = hero.child[wUnarmed].assign[wMain.1d8_6]
dice = "1d8"
elseif (level < 16) then
result = hero.child[wUnarmed].assign[wMain.1d10_304]
dice = "1d10"
elseif (level < 20) then
result = hero.child[wUnarmed].assign[wMain.2d6_104]
dice = "2d6"
else
result = hero.child[wUnarmed].assign[wMain.2d6_104]
dice = "2d6"
endif
field[livename].text = field[name].text & " (" & dice & ")"
endif
First Expr-Req:
child[Attack].field[tAtkBase].value >= 3

Second Expr-Req:
#hasfeat[fImpUnarm] <> 0


The section that actually determines damage dice seems to be the [wMain.xxx_xxx]. I fiddled around with these until they stopped giving me errors, so the damage dice for 1d4 is [wMain.1d4_4]. I don't know how to determine what they should be beyond trial and error, but maybe someone else does.

Also, you'll see I put in if statements at the beginning of each eval script. The first only functions if you are a monk, and the second only functions if you aren't. The Expr-Req lines at the bottom are, of course, the prerequisites for the feat.

As for what language it is, I have no idea. I have a very limited background in programming. I taught myself html, but most other languages I can only edit.

Sendric August 9th, 2010 05:37 AM

I've reduced the eval scripts to one script, but unfortunately, I can't figure out why the first part doesn't work. It seems to be the same as the monk's belt, but it isn't getting used. Anyone have any idea?

Quote:

var level as number
level = herofield[tLevel].value
var result as number
result = hero.child[wUnarmed].delete[wMain.?]
var dice as string

if (hero.tagis[Classes.Monk] <> 0) then
hero.child[cMnkUnarm].field[xExtraLev].value = hero.child[cMnkUnarm].field[xExtraLev].value + 4
else
if (level < 4) then
result = hero.child[wUnarmed].assign[wMain.1d4_4]
dice = "1d4"
elseif (level < 8) then
result = hero.child[wUnarmed].assign[wMain.1d6_5]
dice = "1d6"
elseif (level < 12) then
result = hero.child[wUnarmed].assign[wMain.1d8_6]
dice = "1d8"
elseif (level < 16) then
result = hero.child[wUnarmed].assign[wMain.1d10_304]
dice = "1d10"
else
result = hero.child[wUnarmed].assign[wMain.2d6_104]
dice = "2d6"
endif
field[livename].text = field[name].text & " (" & dice & ")"
endif

Stryfe August 9th, 2010 10:18 AM

maybe this?

result = hero.child[wUnarmed].delete[wMain.?]

Sendric August 9th, 2010 10:33 AM

Right. Forgot to put that in. Thanks. Unfortunately, that doesn't help the first section for if the character is a monk. It still doesn't add 4 levels for the purposes of Unarmed Damage as it should.

Stryfe August 9th, 2010 10:39 AM

maybe then this?

hero.child[cMnkUnarm].field[xExtraLev].value += 5


All times are GMT -8. The time now is 04:40 AM.

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