lfnetwork.com mark read register faq members calendar

Thread: FP Cost Per Target Hit
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 01-23-2012, 07:53 PM   #1
Kl0kw3rk
Rookie
 
Join Date: Jul 2007
Posts: 33
FP Cost Per Target Hit

For my Force Power mod I'm trying to change the aoe powers to use FP per target hit rather than the flat array value. To do this I need to get an alignment modified FP in the sp1_force_inc. Is there a known way to do this? I could do it with just the alignment value.
Kl0kw3rk is offline   you may: quote & reply,
Old 01-23-2012, 08:20 PM   #2
VarsityPuppet
Master of Puppets
 
VarsityPuppet's Avatar
 
Join Date: May 2009
Location: MN
Posts: 1,253
Current Game: Chrono Trigger
Contest winner - Modding Forum Veteran Veteran Modder Helpful! 
I know there's a way to do it, but the operations elude me atm... I'll get back to you on it.

VarsityPuppet is offline   you may: quote & reply,
Old 01-28-2012, 07:42 AM   #3
Kl0kw3rk
Rookie
 
Join Date: Jul 2007
Posts: 33
In my script I have it correctly charging the cost of Storm via self-inflicted eForce damage for each additional target after the first. Now I need a way to check the caster's FP pool to break if it runs out. Anyone know a variable that holds that?
Kl0kw3rk is offline   you may: quote & reply,
Old 01-28-2012, 11:34 AM   #4
VarsityPuppet
Master of Puppets
 
VarsityPuppet's Avatar
 
Join Date: May 2009
Location: MN
Posts: 1,253
Current Game: Chrono Trigger
Contest winner - Modding Forum Veteran Veteran Modder Helpful! 
GetCurrentForcePoints(GetFirstPC()) will return the PC's current force points.

So something like:

Show spoiler


I'm assuming the cost is 25 FP for each enemy, but you might have chosen a different number.

VarsityPuppet is offline   you may: quote & reply,
Old 01-28-2012, 09:58 PM   #5
Kl0kw3rk
Rookie
 
Join Date: Jul 2007
Posts: 33
The final solution as applied to Storm:

Show spoiler


The compiler apparently does not recognize smaller variables than "int".
Kl0kw3rk is offline   you may: quote & reply,
Old 01-29-2012, 12:23 AM   #6
Kl0kw3rk
Rookie
 
Join Date: Jul 2007
Posts: 33
I made a few tweaks to the above. Heal was a bit more work.
Show spoiler


-Initial FP cost is refunded if caster is uninjured.
-Dead PCs incur no FP cost.
- I still have to factor in the effect removals.

Last edited by Kl0kw3rk; 01-29-2012 at 02:01 PM.
Kl0kw3rk is offline   you may: quote & reply,
Old 02-01-2012, 08:00 PM   #7
Kl0kw3rk
Rookie
 
Join Date: Jul 2007
Posts: 33
For adding or removing effects, as in Insanity, I'm still looking for a function that gets the effects on a target. Otherwise retrying to get everything in a mob will be rather costly and cures will have to be free.
--------
I've been trying to change the buff powers into toggles. I tested this:
Code:
effect eDamage = EffectDamageForcePoints(-10);
...
SP_InterativeDamage(eDamage, 9999, oTarget);
That should start a noticeable drain/gain of 10 FP per second. I can't figure why that would not work. OBJECT_SELF as the object argument also did not work.

Last edited by Kl0kw3rk; 02-01-2012 at 10:46 PM.
Kl0kw3rk is offline   you may: quote & reply,
Old 02-03-2012, 03:59 AM   #8
Kl0kw3rk
Rookie
 
Join Date: Jul 2007
Posts: 33
I'm finding the functions to check things in nwscript, though for my own game I decided to remove the alignment modifier because it breaks RP having to choose dialogs just to get cheaper powers. Horror/Insanity are giving me a hard time. I just need to get those working for the release.

For the non-vanilla version I'm thinking of making the normally useless Int attribute a factor in some powers. So, genius toons would be more viable with hardcore mods.
Kl0kw3rk is offline   you may: quote & reply,
Old 02-07-2012, 10:20 PM   #9
Kl0kw3rk
Rookie
 
Join Date: Jul 2007
Posts: 33
Here is the beta version for K1.
I'm also fixing all the bugs and junk from the original script.

Last edited by Kl0kw3rk; 02-07-2012 at 10:44 PM.
Kl0kw3rk is offline   you may: quote & reply,
Old 02-08-2012, 10:58 AM   #10
Qui-Gon Glenn
Necessary Roughneck
 
Qui-Gon Glenn's Avatar
 
Join Date: May 2007
Location: Thessia
Posts: 1,465
Current Game: ME3MP, Arkham Origins
Folder extraordinaire Helpful! Forum Veteran Veteran Modder 
Did you figure out how to Remove Specific Effects? This is a common head-scratcher, which was "fixed" for TSL by indexing the effects. Alas, K1 lacks this, so it has to be done by looping. nw_io_lightningbolt.nss contains an example of this; you can also find a thread here in HL I made on the subject a couple years ago.

Glad to see things are working forward for you! Considering your successes thus far, this post is probably TLTL


Want to play a game of ME3MP?
Qui-Gon_Glenn on the software of which we shall not name.... add me and the enemy shall fall in chunks of crimson salsa
Qui-Gon Glenn is offline   you may: quote & reply,
Old 02-12-2012, 11:25 PM   #11
Kl0kw3rk
Rookie
 
Join Date: Jul 2007
Posts: 33
I haven't seen how TSL does it yet. The Sp_RemoveSpecificEffect function does it in K1. What is wonky is that it uses a loop to cycle every effect and check whether it is x. You would think there would just be a flag for each effect. Silly programmers. What I needed was just to check whether the effect was there to verify the need to charge FP. Thankfully that function is actually in k_inc_force. So, I can either copy that function and change it a bit or maybe add flags to the effect application part. We'll see.
Kl0kw3rk is offline   you may: quote & reply,
Old 02-13-2012, 07:43 AM   #12
Qui-Gon Glenn
Necessary Roughneck
 
Qui-Gon Glenn's Avatar
 
Join Date: May 2007
Location: Thessia
Posts: 1,465
Current Game: ME3MP, Arkham Origins
Folder extraordinaire Helpful! Forum Veteran Veteran Modder 
In k1, yes sadly, using that function or making your own like I did... Is the only way to do it

If you are successful working it out via "flags", that would be interesting!


Want to play a game of ME3MP?
Qui-Gon_Glenn on the software of which we shall not name.... add me and the enemy shall fall in chunks of crimson salsa
Qui-Gon Glenn is offline   you may: quote & reply,
Old 02-14-2012, 08:29 PM   #13
Kl0kw3rk
Rookie
 
Join Date: Jul 2007
Posts: 33
It will be virtually irrelevant until some AI work anyway.

I was going to add a Force Body for K1 and then changed my mind because it is essentially a heal cheat.

I'm messing around with scaling of various aspects of powers by Int, Wis and Cha attributes. I'm using Int to alter strength/duration of powers. It's just a question of which attributes should go into DC and which should go into strength. The easiest is using Int for strength and leaving DC as is. That said, I use no clothing items with stats when I play. The house rules of the user make a big difference.

For the toggled buff idea I found that "SP_InterativeDamage" only works on enemies due to a GetIsEnemy condition.
Kl0kw3rk is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > FP Cost Per Target Hit

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 -4. The time now is 01:50 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.