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 03-16-2019, 12:51 AM   #1
Lord Azagthoth
 
Lord Azagthoth's Avatar
 
Join Date: Jun 2006
Location: Helmouth, The Netherlands
Default Leveled EQ modifiers with damage enhancement

Hi,

I'm trying to add similar Equipment modifiers together.

Here's an example:

I have the following three modifiers
Code:
Lens:Adegan Single, +6000, Page(TF?), group(Components - Energy Blade), shortname(Lens:Single),
 gives(_
  =+0.01 to owner::baseweight,
  =+$/textindexedvalue( $modetag(damtype), ("burn", 1d-1) ) to owner::damage$ listAs "+1d-1 to burning damage from Single Lens",
  =+1 to owner::armordivisor_
  )
Code:
Lens:Adegan Double, +12000, Page(TF?), group(Components - Energy Blade), shortname(Lens:Double),
 gives(_
  =+0.015 to owner::baseweight,
  =+$/textindexedvalue( $modetag(damtype), ("burn", 1d+1) ) to owner::damage$ listAs "+1d+1 to burning damage from Double Lens",
  =+2 to owner::armordivisor_
  )
Code:
Lens:Adegan Triple, +18000, Page(TF?), group(Components - Energy Blade), shortname(Lens:Triple),
 gives(_
  =+0.02 to owner::baseweight,
  =+$/textindexedvalue( $modetag(damtype), ("burn", 1d+3) ) to owner::damage$ listAs "+1d+3 to burning damage from Triple Lens",
  =+3 to owner::armordivisor_
  )
If want to add these three together in something like:
Code:
Lens: Adegan, +6000/+12000/+18000, upto(3), Page(TF?), group(Components - Energy Blade), shortname(),
levelnames(#List(LevelName Lenses)),
 gives(_
  =+@indexedvalue(me::level,0.1,0.15,0.2) to owner::baseweight,
  =+@indexedvalue(me::level,1,2,3) to owner:armordivisor _
  )
Under LISTS I have:
Code:
<LevelName Lenses>
"Single","Double","Triple"
But with the damage line, it doesn't work.

I tried several ways with @IF, THEN and ELSE but then either the program hangs or its only increases the weight and armordivisor.
__________________
May the Force be with us all

Dark Lord Azagthoth

Star Wars - TRPG

Last edited by Lord Azagthoth; 03-17-2019 at 01:53 AM.
Lord Azagthoth is offline   Reply With Quote
Old 03-17-2019, 09:25 AM   #2
Armin
GCA Prime
 
Armin's Avatar
 
Join Date: Aug 2004
Location: Portland, OR
Default Re: Leveled EQ modifiers with damage enhancement

As is, the damage bonus will only apply to attack modes that already do damage of type "burn", and will apply to all of those. If the damtype is not already "burn" it will not apply the damage.

If the intent is to add the burning damage to any existing attack mode, the damage line needs to be a bit different.

Could you please clarify your intent?
__________________
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 03-17-2019, 01:27 PM   #3
Lord Azagthoth
 
Lord Azagthoth's Avatar
 
Join Date: Jun 2006
Location: Helmouth, The Netherlands
Default Re: Leveled EQ modifiers with damage enhancement

I just want to save space in the gdf files. And it has the benefit of less modifiers in the modifier tab.

The parts of the equipment often come in several "levels" with the same damtype but a better damage dice.

In case of the lenses it doubles or triples the damage of a single lens. Other parts are leveled into standard, improved, expert, superior, and ultimate. Some of these have an increment in damage (e.g., none, +1d-2, +1d-1, +1d, +1d+1) but all with the same damagetype.

I already contracted the separate modifiers into leveled modifiers which don't contain this programming line, saving lots of space.
__________________
May the Force be with us all

Dark Lord Azagthoth

Star Wars - TRPG
Lord Azagthoth is offline   Reply With Quote
Old 03-17-2019, 04:25 PM   #4
Armin
GCA Prime
 
Armin's Avatar
 
Join Date: Aug 2004
Location: Portland, OR
Default Re: Leveled EQ modifiers with damage enhancement

(I'm short on sleep. Sorry if I misunderstand or miss the point.)

Um, okay.

If all the damtypes are the same, why check them? This is the simplest addition to the gives to do the damage bit, but doesn't check for "burn" damage type:

Code:
=+$indexedvalue(me::level,1d-1,1d+1,1d+3) to owner::damage$
If the item could have non-"burn" modes, then things get more complicated. I can't get some functions to work right, either, but try this version:

Code:
=+$/if( @sametext( $modetag(damtype), "burn" ) then $indexedvalue( me::level,1d-1,1d+1,1d+3 ) ) to owner::damage$
__________________
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 03-18-2019, 04:00 PM   #5
Lord Azagthoth
 
Lord Azagthoth's Avatar
 
Join Date: Jun 2006
Location: Helmouth, The Netherlands
Default Re: Leveled EQ modifiers with damage enhancement

Tnx,

The top one did the trick.

I will try out the bottom line as soon as I get to parts that do other types of damage (rad & ion)
__________________
May the Force be with us all

Dark Lord Azagthoth

Star Wars - TRPG
Lord Azagthoth 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 08:42 PM.


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