Steve Jackson Games - Site Navigation
Home General Info Follow Us Search Illuminator Store Forums What's New Other Games Ogre GURPS Munchkin Our Games: Home

Go Back   Steve Jackson Games Forums > Roleplaying > GURPS > GURPS Character Assistant

Reply
 
Thread Tools Display Modes
Old 07-18-2021, 11:38 AM   #1
Darkclaw
 
Darkclaw's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Default Kick with Boots and Brawling/Karate, newmode directly on equipment?

I've been updating my data file so that gauntlet and boot equipment items with the appropriate level of DR add an entry to the weapon tables, like Brass Knuckles do.

(Yes, I'm aware of the modifiers that can be added to the skills and to the equipment items, but that adds a lot of modifier information to the equipment/skill lists when exported to FoundryVTT—adding a new mode directly from the equipment is much cleaner and less confusing on the VTT character sheet.)

Simply copying the Brass Knuckles newmode over to the various gauntlets worked great.

However, I'm running into an issue when trying to make the Boots newmode where it doesn't increase the damage correctly when adding Brawling or Karate skill.

Here's what I've been using:

Code:
newmode(Boot Kick,_
	damage(thr+1 + _
		@max(_
			@if(me::charskillused = "SK:Brawling" THEN @if("SK:Brawling::level" > ST:DX+1 then @basethdice(ST:Kick) ELSE 0) ELSE 0),_
			@if(me::charskillused = "SK:Karate" THEN @if("SK:Karate::level" = ST:DX then @basethdice(ST:Kick) ELSE @if("SK:Karate::level" > ST:DX then 2 * @basethdice(ST:Kick) ELSE 0)) ELSE 0)_
		)_
	), damtype(cr), reach(C,1), parry(No), minST(*), break(0), skillused(ST:DX-2, SK:Brawling-2, SK:Karate-2, SK:Kicking (Karate), SK:Kicking (Brawling)))
When I add a piece of equipment with this to an otherwise blank character, it correctly adds a weapon table entry with +1 damage over the normal kick.

However, if I then add Brawling at DX+2, or Karate at DX or DX+1, the damage doesn't increase.

Anyone have any idea what I'm missing?

Also, a related question—is it possible to get the weapon table entry to list the name of the mode, rather than the name of the equipment? So, "Boot Kick" instead of "Boots, Leather"?

Thanks all!
__________________
"The dreamers of the day are dangerous men, for they may act on their dreams with open eyes, to make them possible."
T.E. Lawrence
Darkclaw is offline   Reply With Quote
Old 07-19-2021, 02:49 PM   #2
Armin
GCA Prime
 
Armin's Avatar
 
Join Date: Aug 2004
Location: Portland, OR
Default Re: Kick with Boots and Brawling/Karate, newmode directly on equipment?

No thoughts jump right out at me. I thought you might be missing skillused(), but then I saw it there.

I am pretty sure the @if statements in the @max, such as "@if(me::charskillused = "SK:Brawling" " are not working as expected, because @if can't do a string comparison like that. But if that works elsewhere, it may be failing in a way that still works for the rest of the code.

If you post the entire Boots entry here, I'll play with it and see if I can figure it out.

Quote:
Originally Posted by Darkclaw View Post
Also, a related question—is it possible to get the weapon table entry to list the name of the mode, rather than the name of the equipment? So, "Boot Kick" instead of "Boots, Leather"?
Not in a reliable way. Things could be changed so that it always printed the mode name, but I believe most single-mode entries don't use a mode name, so that would be actively counter-productive. Things could be changed to only use the mode name if it exists, but a bunch of stuff use placeholder names for various reasons, and those also aren't desirable.

I could probably add a tag to specify that the mode name is the desired usage when it's a single mode item, and that way it's up to the author to specify.
__________________
Armin D. Sykes | My GCA page
I am working on the new GCA as fast as my life allows. I post updates here.
Armin is offline   Reply With Quote
Old 07-19-2021, 03:14 PM   #3
ericbsmith
 
ericbsmith's Avatar
 
Join Date: Aug 2004
Location: Binghamton, NY, USA. Near the river Styx in the 5th Circle.
Default Re: Kick with Boots and Brawling/Karate, newmode directly on equipment?

Quote:
Originally Posted by Armin View Post
No thoughts jump right out at me. I thought you might be missing skillused(), but then I saw it there.

I am pretty sure the @if statements in the @max, such as "@if(me::charskillused = "SK:Brawling" " are not working as expected, because @if can't do a string comparison like that. But if that works elsewhere, it may be failing in a way that still works for the rest of the code.
That's how it's set up for the Punch and Kick attributes... and that coded doesn't seem to be working for those attributes, which is utterly mitigated by the fact that Brawling, Boxing, and Karate hide the combat table entries for those attributes when the skills are added and high enough to surpass them. I just hadn't noticed that code wasn't working because they get hidden.

I think what needs to be done is to remove the @if() which looks for the charskillused. Simply using @max() will catch the highest damage bonus without having to look at which skill is actually giving it.
__________________
Eric B. Smith GURPS Data File Coordinator
GURPSLand
The future keeps telling us what the past was about. You make the past mean different things by what you do with the time that comes after.
ericbsmith is online now   Reply With Quote
Old 07-19-2021, 04:52 PM   #4
Armin
GCA Prime
 
Armin's Avatar
 
Join Date: Aug 2004
Location: Portland, OR
Default Re: Kick with Boots and Brawling/Karate, newmode directly on equipment?

Quote:
Originally Posted by ericbsmith View Post
That's how it's set up for the Punch and Kick attributes... and that coded doesn't seem to be working for those attributes, which is utterly mitigated by the fact that Brawling, Boxing, and Karate hide the combat table entries for those attributes when the skills are added and high enough to surpass them. I just hadn't noticed that code wasn't working because they get hidden.

I think what needs to be done is to remove the @if() which looks for the charskillused. Simply using @max() will catch the highest damage bonus without having to look at which skill is actually giving it.
I think perhaps a $textindexedvalue() instead of the @if() might do the trick, if checking what skill is being used is desirable. But, yes, I believe you are correct.
__________________
Armin D. Sykes | My GCA page
I am working on the new GCA as fast as my life allows. I post updates here.
Armin is offline   Reply With Quote
Old 07-19-2021, 11:22 PM   #5
Darkclaw
 
Darkclaw's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Default Re: Kick with Boots and Brawling/Karate, newmode directly on equipment?

Well, I'm at least glad that I wasn't missing something totally obvious—thanks to you both!

FYI, it looks like the Brass Knuckles in both the Characters and Low-Tech data files are using the @if(me::charskillused), so those might need to be updated.

In my particular use-case, always pulling the highest skill is just fine, so the following works great:

Code:
"Boots, Leather", techlvl(1), location(Feet), dr(2*), basedr(2*), impalingdr(1*), basecost(80), baseweight(3), don(6), holdout(-4), mods(Equipment, Armor, Armor - Organic, Armor - Leather), description(DR:2* Locations: Feet Notes: -1 DR vs. impaling.), page(LT:IA16),itemnotes({-1 DR vs. impaling.}),_
	newmode(Boot Kick,_
		damage(thr+1 + _
				@max(_
					@if("SK:Brawling::level" > ST:DX+1 then @basethdice(ST:Kick) ELSE 0),_
					@if("SK:Karate::level" = ST:DX then @basethdice(ST:Kick) ELSE @if("SK:Karate::level" > ST:DX then 2 * @basethdice(ST:Kick) ELSE 0))_
				)_
			), damtype(cr), reach(C,1), parry(No), minST(*), break(0), skillused(ST:DX-2, SK:Brawling-2, SK:Karate-2, SK:Kicking (Karate), SK:Kicking (Brawling)))

Quote:
Originally Posted by Armin View Post
Not in a reliable way. Things could be changed so that it always printed the mode name, but I believe most single-mode entries don't use a mode name, so that would be actively counter-productive. Things could be changed to only use the mode name if it exists, but a bunch of stuff use placeholder names for various reasons, and those also aren't desirable.

I could probably add a tag to specify that the mode name is the desired usage when it's a single mode item, and that way it's up to the author to specify.
That makes sense. I'm not sure it would be worth the effort to implement something new—pondering it more, most equipment items that I can think of adding a weapon mode like this to would be pretty obvious what the intended attack would be with just the name of the equipment.

Thanks again!
__________________
"The dreamers of the day are dangerous men, for they may act on their dreams with open eyes, to make them possible."
T.E. Lawrence
Darkclaw is offline   Reply With Quote
Old 07-20-2021, 11:32 AM   #6
Armin
GCA Prime
 
Armin's Avatar
 
Join Date: Aug 2004
Location: Portland, OR
Default Re: Kick with Boots and Brawling/Karate, newmode directly on equipment?

Quote:
Originally Posted by Darkclaw View Post
Well, I'm at least glad that I wasn't missing something totally obvious—thanks to you both!
You're welcome!


Quote:
Originally Posted by Darkclaw View Post
FYI, it looks like the Brass Knuckles in both the Characters and Low-Tech data files are using the @if(me::charskillused), so those might need to be updated.
We'll have to go through and update a few things. Thanks!


Quote:
Originally Posted by Darkclaw View Post
In my particular use-case, always pulling the highest skill is just fine, so the following works great:
Yeah, I can't think of any situation off the top of my head where that wouldn't work just fine.

Glad you're all set.
__________________
Armin D. Sykes | My GCA page
I am working on the new GCA as fast as my life allows. I post updates here.
Armin is offline   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
Fnords are Off
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:41 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2021, vBulletin Solutions, Inc.