lfnetwork.com mark read register faq members calendar

Thread: Can someone explain the mathematics behind the combat?
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-25-2009, 11:31 AM   #1
Arcesious
Trolololololololololololo
 
Arcesious's Avatar
 
Join Date: Aug 2007
Location: NE
Posts: 1,876
Current Game: Mass Effect
A lot of modding questions...

I'm planning on heavily modding the weapons of KOTOR II, TSL. However, I'll probabably be remodding weapons from a whole ton of different mods I have, so I probably couldn't release it. Just call it a 'personnal mod'.

Anyways, what I want to do with this little mod for myelf is make the enemy weapons far more potent. No more minimum attacks of 1-5 up 10-20

I want to make the enemies do have minimum attack capabilities of about 30+ damage per hit. It's just that I feel so sorry for the enemies I fight when I deal over a hundred damage in one turn. I like to play the game at maximum difficulty, with my guy being completely lvl'd up to 50 (Then with kotor tool, lvl 100) with extremely insane attributes of about 230 each. So, I basically love playing God mode in the game, but I'd like for the enemies to be far, far tougher and deal far more damage so that, even in God mode, I have a decent challenge.

I always play lightside, so I'll upgrade a lot of darkside, melee, droid, and blaster weapons.

"So, I bet you're asking, why can't he figure this out himself? It sounds like a simple enough mod to make."

Well, there are some wierd mathematics behind the combat in the game I'd like to know explanations for, such as the chance of critical hit system, The DC and saves stuff, etc, etc. Also, is it possible for me to stack attributes on stuff? I'd like to, for example, make the standard red lightsaber increase all attributes by about 150, so I'd have to have 90 statements adding +10 to each attribute via that lightsaber. Would that work?

Also, with grenades and mines, I know that they use spells, and you can't just make 'new spells' with more power. So is it possible for me to stack the same spells more than once to perhaps make a mine/grenade 10x more deadly?

Another question, with blaster weaponry, could someone tell me what each projectile type is/looks like? All I see in the description name of each projectile type is '*****".

I've also tried modifying NPCs in KOTOR tool before, but the changes I make, such as changes to appearance, equipped items, attributes, feats, and powers, never take effect in the game. How come?

BTW, an off-topic question; why can't I change Handmaiden's appearance in KOTOR tool?


Please feed the trolls. XD

Last edited by Arcesious; 01-25-2009 at 11:56 PM. Reason: Title needs change after topic becoming broader
Arcesious is offline   you may: quote & reply,
Old 01-25-2009, 01:08 PM   #2
Star Admiral
N7 Commando
 
Star Admiral's Avatar
 
Join Date: Oct 2008
Location: Omega 4 Relay
Posts: 656
Current Game: Mass Effect 2
Folder extraordinaire Helpful! 
Very ambitious project. But why not? I've done something similar for K1, just not nearly to the same god-mode extent you're planning to do. Prepare for an absurdly long post.

The critical hit system. When performing an attack on a character, the game engine uses a dice roll from 1-20 as the base attack roll before adding the various strength/weapon modifiers. An attack roll of 1 is an automatic miss, a roll of 20 is an automatic hit. With me so far?

Depending on the type of weapon you have, the dice numbers from 17-20 have a special significance. All weapons have a critical threat range. The double-bladed lightsaber, for example, has a threat range of 1, while an ordinary lightsaber has a threat range of 2. What this means is that for a double-bladed lightsaber, whenever the dice roll is 20, in addition to being a automatic hit, the hit is also a critical hit, dealing extra damage. How much extra damage? That depends on the critical multiplier number, which all weapons also have. In general, all weapons have an x2 critical multiplier, so they deal double damage on a critical hit. Some select weapons have an x3 critical multiplier, so they deal triple damage on a critical hit. For an ordinary lightsaber, with a critical threat range of 2, the same applies as a double-bladed lightsaber, but the extra damage will be dealt on either a roll of 19 or 20. Note that a critical hit is not the same as a automatic hit. While an ordinary lightsaber can get a critical hit on a roll of 19 or 20, the automatic hit will only occur on a roll of 20.

What about numbers 17 and 18? Currently the game has only two or three weapons that come with a critical threat range of 3, namely the disruptor pistols and rifles. That means again that a critical hit will result on a roll of 18, 19, or 20. Number 17 only comes into play when you apply a Keen upgrade onto a weapon. The Keen property doubles the critical threat range of any weapon it is applied to. So if it is applied to a double-bladed lightsaber, the threat range goes from 1 to 2, and if it is applied to an ordinary lightsaber, the threat range goes from 2 to 4, with a critical hit resulting from a roll of 17, 18, 19, or 20. Now you're probably thinking that for disruptor weapons with a critical threat of 3, applying a Keen upgrade would increase the critical threat to 6. Logical, but unfortunately wrong. Due to game mechanics, the maximum for a threat range is 4. The reason for this is due to the Critical Strike line of feats.

Master Critical Strike, if you recall, quadruples the critical threat range of the weapon used in the attack. Let's say you use an ordinary lightsaber with a Keen upgrade, resulting in a threat range of 4. Using Master Critical Strike results in a threat range of 16, meaning that a critical hit will result on any number from 5-20 (80% chance). If it were possible to have a threat range of 5 or 6, using Master Critical Strike would give a threat range of 20 and 24, respectively, meaning that it would a guaranteed chance of doing a critical hit, not very realistic, to say the least. So for practical purposes, the maximum threat range of all weapons would be 4.

Now that was long to cover simply one topic. This would practically become a tutorial on combat mechanics. I'll edit this post and continue in a bit later.

For stacking attributes on the same item, I believe that it is not possible. The game doesn't like stacking attributes on the same item for some reason, though it has no problem stacking damages. Don't ask why. I believe that having a +10 modifier for one item is the maximum, though you could apply the effect to multiple items, such as one for the main-hand weapon, one for the off-hand weapon, one for the armor, one for the masks, etc. In that situation, it will stack properly.

For the grenades and mines, the damages they deal is governed by scripts. While what you suggested in stacking scripts is not possible, editing scripts is possible. The files you're looking for are k_sup_grenades.nss for grenades and k_trp_generic.nss for mines. Check for some scripting tutorials in the Holowan Labs, or ask if you need some help figuring out the language.

Not sure about the projectile animations.

For the modified NPCs, did you put the changed files inside the Override folder? Did you load a game before the NPCs either join your party or are spawned in the module you are in? If the NPCs are already loaded into the game, they can't be changed by using KT, though any new ones not yet spawned will have the changes. Same goes for the Handmaiden's appearance.

- Star Admiral
Star Admiral is offline   you may: quote & reply,
Old 01-25-2009, 07:54 PM   #3
Arcesious
Trolololololololololololo
 
Arcesious's Avatar
 
Join Date: Aug 2007
Location: NE
Posts: 1,876
Current Game: Mass Effect
That explains a lot.... Are Sniper feats the same as Critical Strike feats then?

Oh and I have couple other questions too...

I love dxun. It's my favorite lvl, and I wish it never had to end. So, making more modules for dxun is not an option, as it is too hard to do. but there is something I'd like to do... Infinite enemy respawns. Essentially, I would like to edit Dxun to turn cannoks into Wraids, Maalrass into Mykals, and Bomas into Dewbacks or Kataarns. I also want to make it so that whenever the dxun jungle & dxun landing lvls reload as I go through them, all the enemies will respawn again. How would I do this?

I'm not afraid to learn scripting.... If it's coded in one of the forms of Basic then I could probably figure it out quite easily...

Also, I've tried changing enemies before starting a new game, and it doesn't work. Yes, I put the files in the override folder. Is the only way to modify the appearance of things by modifying the appearence.2da then?

If so, could someone explain to me exactly what each line of the appearance.2d's settings in KOTOR tool does? Also, how would I modify these settings?

I'm thinking that, if I want to turn cannoks into wraids, it would be a simple matter of changing the cannok line in the appearance.2da to look almost just like the lines for wraids? Would this work, or is there more to it? Also, what should I be careful not to change/be cautious in changing?


Please feed the trolls. XD

Last edited by Arcesious; 01-25-2009 at 11:19 PM.
Arcesious is offline   you may: quote & reply,
Old 01-25-2009, 11:19 PM   #4
Da_man
CHEATER (Apparently)
 
Da_man's Avatar
 
Join Date: Mar 2007
Location: Sunny Arizona
Posts: 1,173
Current Game: Team Fortress 2
I think what you need to do too change the enemies is too go into the .2da file of the module in question, and modify what spawns where. I am not completely positive on that, but It's worth a try.

Da_man is offline   you may: quote & reply,
Old 01-25-2009, 11:30 PM   #5
Arcesious
Trolololololololololololo
 
Arcesious's Avatar
 
Join Date: Aug 2007
Location: NE
Posts: 1,876
Current Game: Mass Effect
Alright, what .2da files are the Dxun Jungle and Dxun Landing in? Also, if I make them all respawn every time, I wondering how these situations will be effected:

-The scene where Kreia teaches the PC about the Beast Controlling powers. Will respawning this creature trigger this cutscene every time?

-The cannoks that have eaten the peices of the Phase Core. Will respawning these give me these items each time, and thereby make the quest restart each time?

-The Zakkegg quest. Will respawning this thing every time make the zakkegg hunting quest restart each time?


Please feed the trolls. XD
Arcesious is offline   you may: quote & reply,
Old 01-25-2009, 11:59 PM   #6
Det. Bart Lasiter
obama.png
 
Det. Bart Lasiter's Avatar
 
Join Date: Mar 2005
Location: `(.)~
Posts: 7,997
Current Game: all
Forum Veteran LF Jester 
http://www.d20srd.org/
http://www.wizards.com/default.asp?x=starwars/rules
http://en.wikipedia.org/wiki/Star_Wa...s_of_the_Coast)



"No, Mama. You can bet your sweet ass and half a titty whoever put that hit on you already got the cops in their back pocket." ~Black Dynamite
Det. Bart Lasiter is offline   you may: quote & reply,
Old 01-26-2009, 12:04 AM   #7
Da_man
CHEATER (Apparently)
 
Da_man's Avatar
 
Join Date: Mar 2007
Location: Sunny Arizona
Posts: 1,173
Current Game: Team Fortress 2
Quote:
Originally Posted by Arcesious View Post
Alright, what .2da files are the Dxun Jungle and Dxun Landing in? Also, if I make them all respawn every time, I wondering how these situations will be effected:

-The scene where Kreia teaches the PC about the Beast Controlling powers. Will respawning this creature trigger this cutscene every time?

-The cannoks that have eaten the peices of the Phase Core. Will respawning these give me these items each time, and thereby make the quest restart each time?

-The Zakkegg quest. Will respawning this thing every time make the zakkegg hunting quest restart each time?
Beats me. i haven't looked at my TSL folder in almost a year and a half.

Da_man is offline   you may: quote & reply,
Old 01-26-2009, 12:42 AM   #8
Det. Bart Lasiter
obama.png
 
Det. Bart Lasiter's Avatar
 
Join Date: Mar 2005
Location: `(.)~
Posts: 7,997
Current Game: all
Forum Veteran LF Jester 
that is truly enlightening da_man



"No, Mama. You can bet your sweet ass and half a titty whoever put that hit on you already got the cops in their back pocket." ~Black Dynamite
Det. Bart Lasiter is offline   you may: quote & reply,
Old 01-26-2009, 01:45 AM   #9
Star Admiral
N7 Commando
 
Star Admiral's Avatar
 
Join Date: Oct 2008
Location: Omega 4 Relay
Posts: 656
Current Game: Mass Effect 2
Folder extraordinaire Helpful! 
Thanks for the links jmac7142. I knew there had to be an explanation somewhere; just that I couldn't find it. Saves me the trouble of writing it again.

Quote:
Originally Posted by Arcesious View Post
That explains a lot.... Are Sniper feats the same as Critical Strike feats then?

Oh and I have couple other questions too...

I love dxun. It's my favorite lvl, and I wish it never had to end. So, making more modules for dxun is not an option, as it is too hard to do. but there is something I'd like to do... Infinite enemy respawns. Essentially, I would like to edit Dxun to turn cannoks into Wraids, Maalrass into Mykals, and Bomas into Dewbacks or Kataarns. I also want to make it so that whenever the dxun jungle & dxun landing lvls reload as I go through them, all the enemies will respawn again. How would I do this?

I'm not afraid to learn scripting.... If it's coded in one of the forms of Basic then I could probably figure it out quite easily...

Also, I've tried changing enemies before starting a new game, and it doesn't work. Yes, I put the files in the override folder. Is the only way to modify the appearance of things by modifying the appearence.2da then?

If so, could someone explain to me exactly what each line of the appearance.2d's settings in KOTOR tool does? Also, how would I modify these settings?

I'm thinking that, if I want to turn cannoks into wraids, it would be a simple matter of changing the cannok line in the appearance.2da to look almost just like the lines for wraids? Would this work, or is there more to it? Also, what should I be careful not to change/be cautious in changing?
Yes, the Sniper Shot feats have the same properties as the Critical Strike feats.

Infinite enemy respawns should be doable. I haven't done anything like that, so I'll have to get back to you. In the interim, I'd suggest you have a look at the triggers located inside the module files; that's my guess as to where to look first.

As for transforming the cannoks into wraids, maalrass into mykals, and bomas into dewbacks, that should be a simple utc edit. Open up the module files for Dxun, locate the creatures tree, and you can edit the appearance of those creatures.

Scripting isn't hard, it's just a matter of thinking as the computer does. If you can understand how a computer works logic, you'll have no problem. The scripting language used is very similar to C.

To change the appearance of the creatures, you don't need to change the appearance.2da file, unless you add a new appearance to the game. What steps did you follow to change the appearance?

Quote:
Originally Posted by Arcesious View Post
Alright, what .2da files are the Dxun Jungle and Dxun Landing in? Also, if I make them all respawn every time, I wondering how these situations will be effected:

-The scene where Kreia teaches the PC about the Beast Controlling powers. Will respawning this creature trigger this cutscene every time?

-The cannoks that have eaten the peices of the Phase Core. Will respawning these give me these items each time, and thereby make the quest restart each time?

-The Zakkegg quest. Will respawning this thing every time make the zakkegg hunting quest restart each time?
There is no 2da file for each module. Look under the RIMs section of KT to find each module and its associated data.

As for possible issues with the events, you'll have to check the scripts used to trigger each one. Depending on how well they are coded, re-entry may or may not be possible. Off the top of my head, I don't know which scripts are what, so I'll repost once I figure something out.

- Star Admiral
Star Admiral is offline   you may: quote & reply,
Old 01-26-2009, 09:15 AM   #10
Arcesious
Trolololololololololololo
 
Arcesious's Avatar
 
Join Date: Aug 2007
Location: NE
Posts: 1,876
Current Game: Mass Effect
Thanks for the help. I don't know any C-type programming, but I'll be learning about it in my junior year! Still, there are tutorials to all those forms of programming on the internet that I can learn from. Still, it doesn't sound very hard. I'll have to check it out. Also, I'll be able to tell which module is which on Dxun simply by checking what module(s) the KOTOR Savegame Editor says I'm in on my save game, when I'm on Dxun.

I do have an idea for a mod I could make and distribute publicly through. An Attribute editing mod. My idea is: 50 Attributes at the start, +5 new Attributes per every 5 lvl ups. 50 lvl-ups total plus that 50 makes 100 total attributes.

So I'm guessing I'll have to look in Attributes.2da and Attributegain.2da (or whatever .2das the attribute settings are in) to change that, right? It sounds simple enough. With a mod like that a person could play in psuedo-God-mode, being extremely powerful and skilled, but also still have a decent challenge in conjunction with the Hardcore Difficulty mod.

edit:

Well I really have no clue as to how to do the infinite respawns. None this code makes any sense to me (I genrally using Notepad++ for coding stuff, usually simple stuff like XMLs and HTML), and I'm not sure if I'm opening the right file. There seem to be 3 different subfiles for each module...

I also can't find what files control the attribute gain-rate.


Please feed the trolls. XD

Last edited by Arcesious; 01-26-2009 at 11:12 PM.
Arcesious 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 > Can someone explain the mathematics behind the combat?

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 09:53 AM.

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