lfnetwork.com mark read register faq members calendar

Thread: How to create a custom force power
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 06-28-2004, 02:06 PM   #1
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Fallout 2
Forum Veteran Helpful! Notable contributor 
How to create a custom force power

How to Create a Custom Force Power (by tk102, Darth333, and svösh)

Basically a Force Power is just another way to execute a script in the game with some casting animations. It's recommended that you write your own script rather than trying to customize the k_inc_force.nss. That .nss is a good place to see examples of how the existing force powers work, along with saving throws and resistances.


Writing Your Custom Script
Not covered here.
beancounter describes how to make a buff up force power in this thread.



Creating Your Custom Icon

First thing open up you paint program, I will be using Photoshop for
this, because it’s the industry standard and nothing beats it. All
short
cuts I use are for Photoshop it’s possible they work in psp as it has
copied most of Photoshop’s functionality.

Ok first thing open Kt > ERF’s > swpc_tex_gui.erf most force power
icons and feats are in the I dir\

Ok find a few icons that could work for your force power the object
here is to make an icon that fits in with the game and depicts your
powers
function so lets get started. We start with a default so you don’t have
to mess around with image size and what better way to learn to do
something then look at the originals, I strongly suggest looking at the
alpha channel as well this hill help you understand how they work.
> Black is transparent and white opaque on the alpha channel

So save some of the icons to a new dir\ or to your desktop by hitting
the write file button

Now back to your paint program.
1. file >open > desktop and open your image or images.
2. Copy the first layer by hitting ctrl +j (duplicate your layer) keep
the
original layer safe and any others that you are about to make a drastic
changes to -- while making your icon it will save you headaches latter
on.
3. Make a new layer solid black paint using bucket fill. Grab the layer
in the
layers pallet and drag it down between the "background" and background
copy. Now with the solid black as a separator, we are ready to begin.
4. Go back to you background copy layer and start editing it -- be
creative and innovative. Cut the original out so that all that remains
is your focal design. If your original design has solid background fill
an easy way to cut it away is use the wand tool. Press W on the
keyboard and click the background of the layer. All pixels the same colour are
selected. Now ctrl +x to cut them away. If it’s a busy background then
using the selection lasso will suit you better. Use the straight-lined
lasso clicking at every curve to cut away the background fast. When the
selection is closed hit shift + ctrl + I (invert selection ) to cut
away the bg, not the main design.
5. Now in this case lets say you have a design that is red and you want
to be a light side power. Ctrl + click the thumbnail Icon of the layer
and you will see an instant selection only around the design. This is
the reason we just cut it out. Now hit ctrl + u (hue /saturation ). Use
the eyedropper tool from the hue saturation window to select the red.
Now use the top slider to change all the red to blue. (Use another
light side icon to match colour tones.) Once you happy with it hit ok
and now
you have your blue icon. On to the last step...
6. Make your new alpha channel with the selection still active on you
new blue icon layer. Do this by going to > selection drop down and
choosing save selection. Don’t name it, just hit ok. Now go to the channel
palette that is behind the layers palette. At the bottom of the
channels you should see your new channel. Now delete the original alpha
channel and rename yours to alpha1 .
7. Duplicate you image by right clicking the title bar of your canvas
and choosing > duplicate image save the original as ???.psd to fix any
thing you
want later on, and flatten the copy make sure you only have the one
alpha channel save it as (name of your force power= blahblah)
ip_blahblah.tga at 32 bit with alpha channel.


Editing Spells.2da
  1. Create a new row.
  2. For the Label field, start off with "FORCE_POWER_"
  3. In the Name and Spelldesc fields, you're stuck with having to enter a dialog.tlk entry number. I recommend using ktlk.exe to search for a pertinent entry. You'll probably find something close. You can download ktlk.exe from pcgamemods.com.
  4. Forcepoints is the number of forcepoints expended per casting, before bonuses/penalites are applied.
  5. GoodEvil-- enter G or E or a single dash depending on whether bonuses/penalites should be granted, depending on the alignment.
  6. Usertype=1
  7. Prerequesites -- these are the row numbers of the force powers that the player must have before gaining access to your new force power. If more than one are needed, separate them with an underscore. If no prerequisites are needed, enter four astrisks.
  8. Masterspell isn't used (****).
  9. Guardian/Consular/Sentinel -- this is level of experience required for the jedi class to gain access to the spell.
  10. Inate -- the global level of the creature required. Just make it the same as the other classes.
  11. Maxcr -- ? Put 3, 6, or 9 down depending on how powerful you think your spell is and the levelof the force power.
  12. Category -- ? I don't know, put down a category entry of another force power that you think is similar. I haven't seen this field affect how the script is executed. Here are the values used by other powers:
    - 1808: apply to force powers and stimulants that boost the attributes
    - 1201: to force powers and items (gravity generator) that stun the ennemy but where no damage is made
    - 2201: similar to 1201: droid destroy and insanity
    - 2301: don't ask me...droid destroy, knight valor, valor ?????
    - 1011: force powers that affect the ennemyies attributes: affliction, plague, force suppres, slow
    - 1028: only used for breach
    - 1101: jump, adv. jump, kill, throw lvl 1 (offensive fp)
    - 1301: choke, push, whirlwind, wound: fp that cause damage and have a stunning effect at the same time ( one single ennemy only)
    - 1501: drain life (targets one single ennememy) ???
    - 2101: death field (targets multiple ennemies) ???
    - 2111: storm
    - 2302: wave
    - 2441: cure and heal
    - 4101: shock and adv throw...???
    - 8101: lightning
  13. Range --
    T : is used for heal, cure, shields, serums, repair kits and the Sand Person disguise! (items that can be used and FP that can be casted that have protective, regeneration effects). Actual range will be determined by the script.
    W : Weapon range? (eg. throw lightsaber)
    P : personal/party range. FP that boost attributes (valor, aura, immnunity)
    S : Spherical range of effect. The actual range will be determined by the script. (eg. Force Wave, Death Field, Force Storm)
    M : Medium range, used for offensive FP like Shock, Choke.
    L : Long range, as far as can be targeted by reticle? used for grenades, but why not force powers?
    ****: passive FP force powers: master sense, regeneration, dominate and affect mind, Cathar reflexes...(stuff that can't be selected during Battles)
  14. Iconresref -- the name of your custom icon.
  15. Impactscript -- the name of your custom script
  16. Conjtime -- milliseconds to cast spell(?). 170 is as good a number as any.
  17. Conjanim -- hand, up, dark, throw. I think this is where a glow occurs when casting.
  18. conjheadvisual,conjgrndvisual,conjsoundvfx,conjsou ndmale,conjsoundfemale -- don't appear to be used (**** for all).
  19. castanim -- self, throw, dark, jump, up. This is the animation the character will perform when using the force. Self is the most common with the outstretch arm. Dark is the 'underhanded' motion (eg. Drain Life). Up is the raising the arm upwards (eg. Force Wave). Throw and jump are used with Lightsaber throw and Force Jump.
  20. casttime -- 1330 milliseconds is standard
  21. castheadvisual -- Not used for other force powers but in theory, you could use v_con_dark, v_fpush_cas, or v_con_light.
  22. casthandvisual -- visual effect on the hand when casting. options are v_con_dark, v_fpush_cas, or v_con_light.
  23. castsound -- any sound in sounds.bif can be used here. v_useforce is the most common.
  24. catchtime, catchanim, proj, projmodel, projtype, projspwnpoint, projsound, projorientation, immunitytype, itemimmunity -- enter 0 or **** just as in the other rows in spells.2da.
  25. forcehostile -- If your force power is to be used on an enemy, you must specify an index number in this field. If two or more spells have the same index number, the one with the highest value in 'pips' is displayed in the hostile reticle.
  26. forcefriendly -- If your force power is to be used outside of combat, you must specify an index number in this field. If two or more spells have the same index number, the one with the highest value in 'pips' is displayed in the friendly force power selection window.
  27. dark_recom, light_recom -- this is the order in which 'auto-level up' will select your force power in relation to other possible force powers. No numbers in these fields should have duplicates.
  28. exclusion -- ? I believe this represents who gets excluded from the force power's effect. 0x00=no exclusion. 0x01 = humans are excluded. 0x02 = droids are excluded.
  29. requireitemmask, forbiditemmask -- these are bit masks representing which items are required or are forbidden when using this force power. Both the forbiditemmask and the requireitemmask use the same bits to describe which baseitems have permissions to work for a spell. Those bits are defined as follows:
    0x0001 - Armor_Class_4
    0x0002 - Armor_Class_5
    0x0004 - Armor_Class_6
    0x0008 - Armor_Class_7
    0x0010 - Armor_Class_8
    0x0020 - Armor_Class_9
    0x0040 - Lightsabers
    If there aren't any item requirements or restrictions, enter 0x0000 in both colums.
  30. Pips -- as mentioned in forcefriendly and forcehostile, pips are used to determine which force power is the highest priority.
  31. Itemtargeting -- set to **** for force power (this is only used for armbands/droid utilities).
  32. Hostilesetting -- if your force power is hostile, enter 1 here. Otherwise enter 0.

Testing Your Force Power

The easiest way to test your force power is to use the KotOR Savegame Editor to grant the force power to your character. To do this, first copy your modified spells.2da and your compiled script and your custom icon to override folder. Then launch KSE v1.4.1 and browse to a savegame for modification. Select your characters' force powers on the left side and make sure the "Show All Force Powers" checkbox is checked on the right pane. You should now be able to see your newly added Force power listed as you typed it in the Label field of spells.2da. Grant it your character. Hit Apply and Commit Changes. Then launch the game and go try it out.

You may find that you need to fix the script, since no one gets it right on the first try. No problem, just fix it, recompile and put it into the override. You can even do this while the game is still running.

Last edited by tk102; 10-03-2004 at 09:13 AM.
tk102 is offline   you may: quote & reply,
Old 06-28-2004, 02:40 PM   #2
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
Re: How to create a custom force power

Hope this will help people making their own FP

Here is another method i use to test the FP and to see how the whole thing looks in the level up screen: I use KSE to add the required number of experience points to level up to the proper level (you can't do that with a lvl 20 character) and then select the FP.

Quote:
You may find that you need to fix the script, since no one gets it right on the first try.
That is completely true
Quote:
No problem, just fix it, recompile and put it into the override. You can even do this while the game is still running.
...not with a 1.6 GHz CPU

Last edited by Darth333; 06-28-2004 at 08:59 PM.
Darth333 is offline   you may: quote & reply,
Old 06-28-2004, 02:43 PM   #3
Darth Khasei
Junior Member
 
Darth Khasei's Avatar
 
Join Date: May 2004
Location: Korriban
Posts: 344
Great guide!


Only the blind can see.
http://www.sunstarentertainmentinc.com
Darth Khasei is offline   you may: quote & reply,
Old 06-28-2004, 05:13 PM   #4
Lorden Darkblade
Computer Crazy
 
Lorden Darkblade's Avatar
 
Join Date: May 2004
Location: Brazil
Posts: 1,474
If I only knew how to script...
Anyone knows a site or anything that may teach me how to do it?
I would apprecitate very much.

Thanks in advance,
ReLoaD2K



Lorden Darkblade is offline   you may: quote & reply,
Old 06-28-2004, 05:18 PM   #5
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
Look at T7's sticky: Do you Want to mod SW-KotOR? Then Start here.
Under the web links section.
Darth333 is offline   you may: quote & reply,
Old 06-28-2004, 05:32 PM   #6
Lorden Darkblade
Computer Crazy
 
Lorden Darkblade's Avatar
 
Join Date: May 2004
Location: Brazil
Posts: 1,474
I looked but... Hmmmm..... Kinda greek to me.
I think I'll leave the Force Powers to you guys
Is the scripting based on what scripting language? I'll try to buy a book or something...
Maybe if I look into the scripts of other powers, but I dont think I'll learn much.



Lorden Darkblade is offline   you may: quote & reply,
Old 06-28-2004, 05:34 PM   #7
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
Start with something simple. Like recruiting an npc, adding items and stuff like that and at the same time look at the other available .nss files, especially nwscript.nss.
Darth333 is offline   you may: quote & reply,
Old 06-28-2004, 05:53 PM   #8
Lorden Darkblade
Computer Crazy
 
Lorden Darkblade's Avatar
 
Join Date: May 2004
Location: Brazil
Posts: 1,474
I heard a lot of people saying about that newscript.nss but I never saw that file.
What is it?
I know how to make a file appear in talking with someone but a Force Power is too different.



Lorden Darkblade is offline   you may: quote & reply,
Old 06-28-2004, 07:17 PM   #9
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Fallout 2
Forum Veteran Helpful! Notable contributor 
That's nwscript.nss, not newscript.nss, as in Neverwinter. It in the scripts.bif file.
tk102 is offline   you may: quote & reply,
Old 06-28-2004, 08:02 PM   #10
Mav
8-Bit Code Monkey
 
Mav's Avatar
 
Join Date: May 2004
Location: A House
Posts: 4,043
Current Game: SWTOR
WOWSER'S nice guide tk I'm sure this will lead to some good mods.


"Women are like sunsets… they’re beautiful, but there will be a different one tomorrow." - Gilder
Mav is offline   you may: quote & reply,
Old 06-29-2004, 01:30 AM   #11
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,766
Current Game: Fallout 2
Forum Veteran Helpful! Notable contributor 
Just added svösh's instructions on how to make a custom icon. Thanks svösh -- just got your email.
tk102 is offline   you may: quote & reply,
Old 06-29-2004, 01:41 AM   #12
svösh
 
svösh's Avatar
 
Join Date: Jan 2003
Location: Montreal, Canada
Posts: 733
Veteran Modder Helpful! Contest winner - Modding 
That’s great Tk Sorry about the delay , computer trouble and all glad to help out.

svösh


pixel, poly builder
svösh's kotor mods
svösh is offline   you may: quote & reply,
Old 08-05-2004, 01:28 PM   #13
Mono_Giganto
Giant Monkey of Doom™
 
Mono_Giganto's Avatar
 
Join Date: Dec 2003
Location: Florida
Posts: 2,478
Current Game: Baldur's Gate EE
Veteran Modder Helpful! 
I apologize for digging up this old thread, but would this work for making a grenade? Cause I kinda always wanted a grenade with an effect like force storm. Is that possible?




Mono_Giganto is offline   you may: quote & reply,
Old 08-05-2004, 02:00 PM   #14
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
You can add an existing force power to an item by simply editing it's properties: http://www.lucasforums.com/showthrea...65#post1589165

However, if you want to create a custom power (different effects than the force powers that are already available) and add it to a grenade, you will have to use spells.2da to refer to your new force power custom script .
Darth333 is offline   you may: quote & reply,
Old 08-05-2004, 02:33 PM   #15
Darth_ToMeR
Veteran
 
Darth_ToMeR's Avatar
 
Join Date: Feb 2004
Location: Israel
Posts: 807
Nice. Thanks!


My KOTOR Mods Site:
http://darthtomer.tripod.com
Darth_ToMeR is offline   you may: quote & reply,
Old 08-05-2004, 02:43 PM   #16
Mono_Giganto
Giant Monkey of Doom™
 
Mono_Giganto's Avatar
 
Join Date: Dec 2003
Location: Florida
Posts: 2,478
Current Game: Baldur's Gate EE
Veteran Modder Helpful! 
Well, okay I did that, but my grenade doesn't do anything when I throw it. what did I do wrong? I set the property to activate item:force storm instead of activate item:grenade:fragmentation.

Is there something else as well?

Edit: I took another look at it, seems that every grenade type has a different baseitem. Does that mean I'll need to add a baseitems.2da entry?

2nd Edit:Okay that's an improvement, but it still does not help. The grenade's a dud.





Last edited by Mono_Giganto; 08-05-2004 at 03:08 PM.
Mono_Giganto is offline   you may: quote & reply,
Old 08-21-2004, 11:54 PM   #17
maddogsz
Rookie
 
maddogsz's Avatar
 
Join Date: Aug 2004
Location: pa
Posts: 26
ben looking around alot but cant find or figur out how to + or - the dam done by a force power

is it in the k_inc_force.nss file ?

or is it some were els?
maddogsz is offline   you may: quote & reply,
Old 08-22-2004, 12:01 AM   #18
Darth333
Administraterror
 
Darth333's Avatar
 
Status: Administrator
Join Date: Feb 2004
Location: In my secret dungeon...
Posts: 8,292
Yes, you'll find examples in k_inc_force.nss. If you create a custom fore power, you will also have to create a custom script which will include the damage.
Darth333 is offline   you may: quote & reply,
Old 08-22-2004, 01:41 PM   #19
maddogsz
Rookie
 
maddogsz's Avatar
 
Join Date: Aug 2004
Location: pa
Posts: 26
ok whats the script i use for dameg iv ben looking and i cant quit figur it out

i think its some thing alon the line of int SWFP_DAMAGE

theres int SWFP_DAMAGE_TYPE that dos dameg typ but i cant fuiger how to do dameg

i noticed that all the other fp go by lvl you are like lvl 4 push dos like 9 dam lvl 16 dos 24 dam no matter what stats you have

so how do i do this and modify it iv looked at the stikys and cant fig it out


also is there a way to make force asorb?

like you take 100 SWFP_DAMAGE_TYPE = DAMAGE_TYPE_DARK_SIDE;

it stops 50 of the dam and regans 50 force power

basicly the exat oposet of wat drain dos dose dameg and heals you
this would stop dameg and heal your fp
maddogsz 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 > How to create a custom force power

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 02:44 PM.

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