View Single Post
Old 05-14-2007, 06:19 PM   #45
stoffe
Network Caretaker
 
stoffe's Avatar
 
Status: Administrator
Join Date: Apr 2002
Posts: 5,833
Helpful! 10 year veteran! Notable contributor 
Some minor things I've figured out while poking around the game data, in case someone is interested:

How to make a new essence gem
  1. Add two new entries to dialog.tlk, one with the name and one with the description.
  2. Add a new line to the gems.2da - set the columns:
    • Set the Level column to a value between 1-6 (I think this is for how late in the game they appear)
    • Set the CombatOnly column to 1 if the effects only should be applied during combat (0 for all the time).
    • Don't know what the UpgradeCost column is used for.
    • The Upgrade column seems to point to the row label of the next gem in a "family" (Flawed -> Inferior etc) of gems, or 0 if there is no more powerful of the same type.
    • Set the Effect0 column to a row label from effects.2da of the type of effect you want the gem to grant.
    • Set the Parameter0 column to the parameter of that effect as needed (for example the magnitude of a bonus granted)
    • Set the Duration0 column to 0, since all gem effects are permanent while equipped.
    • Similarly set Effect1 and Effect2 (and their parameters) if you want the gem to grant up to 3 effects.
    • Set the UniqueSet column to a line number in unique.2da to only allow one gem if this type to be equipped (or 0 to allow multiple).
    • Set the MinAlignment column to the lowest alignment (open palm/closed fist) value to allow equipping this gem. Scale goes from 0 (Max Closed Fist) to 255 (Max Open Palm).
    • Set the MaxAlignment column to the highest alignment value to allow equipping this gem.
    • Set the AlignmentSRTREF column to a StrRef to show if attempting to equip the gem while falling outside those specified alignment boundraries.
  3. Add a new line to items.2da - set the columns:
    • Set the TYPE column to gems (makes it use gems.2da)
    • Set the ID column to the row label in gems.2da of your new line for your gem.
    • Set the COST column to its base silver value when bought/sold.
    • Set the 3DMODEL column to w_icon_Damulet. (Model in world when appearing from smashed container)
    • Set the ICON column to the name of a TXB or TGA file with an icon to be used on the Amulet screen.
    • Set the STRREF_NAME column to the StrRef of the new dialog.tlk entry holding the name you added.
    • Set the STRREF_DESC column to the StrRef of the new dialog.tlk entry holding the description you added.
    • Set the SCRIPT column to **** (not used for gems)
  4. To add the gem as a reward in-game, find the ar_*.2da file for the area you have in mind, locate the reward event line where you want the gem given out, and add the items.2da row label number of your new row to the Item column. If a number already exists here you can add several separated by commas.

Non-standard effects
I wanted my gem to grant a new type of damage shield, similar to the Cyclone gem but with another visual and doing other damage. I wanted it to use the blue cloud and halo effect used to symbolize the Open Palm instead of a whirling particle cloud, and wanted it to drain some Chi from the victim as well.

To do this:
  1. Add a line to DamageArmor.2da:
    • The Duration column does not seem to matter for this purpose since gem effects are permanent duration.
    • Set the Health, Chi and Focus columns to how much of that type to drain from the attacker when hit.
    • Set the DurationVFX column to a row label number from visualcrusts.2da for the visual to play while the effect is active.
    • Set the ImpactVisualEffect column to a row label number from visualeffects.2da of a visual to play when the attacker gets wounded by the shield.
  2. On the line for the gem in gems.2da set one of the Effect# columns to 60 (DamageArmor effect) and the Parameter column to the line number in DamageArmor.2da you added for the new damage shield. Make sure the CombatOnly column is set to 1 for your line so the shield only will be active while in combat.

The result in-game:


In general the 2da column in effects.2da determine what the effect parameter values are used for. The numbers in this column are line numbers from 2das.2da, which tell the game the name of a 2da file to either look up your parameter in, or specify more closely what the effect should do (see below).

If the row column in effects.2da is set to **** your parameter value is the line number in the 2DA file indicated by 2das.2da.

If the row column is set to a value in effects.2da that value is the line number in the 2DA file indicated by 2das.2da, and your parameter is usually just a number that determines how much bonus or penalty the effect should grant.


How to make a new technique
Fairly similar to how to make a new spirit gem, though somewhat more limited since it can only grant two effects, and is limited in what effects it can grant.
  1. Add two new entries to dialog.tlk, one with the name and one with the description.
  2. Add a new line to the improvements.2da - set the columns:
    • Set the effect0 column to a row label number from effects.2da for the effect to grant. Note that only Body/Mind/Spirit, Health/Chi/Focus, Charm/Intuition/Intimidate modifiers seem to work well to grant with techniques. Other types of effects seem to often be lost as soon as you load a savegame.
    • Set the parameter0 column to the magnitude of the effect set in effect0. This is usually how much bonus to grant.
    • Set the storewarningstrref column to a dialog.tlk StrRef of a string to show in a confirm dialog if this technique grants both bonuses and penalties to allow the the player to undo gaining it. StrRef 106958 is usually used for this.
    • Repeat for effect1/parameter1 if you want the technique to grant two effects.
  3. Add a new line to items.2da - set the columns:
    • Set the TYPE column to improve (makes it use improvements.2da)
    • Set the ID column to the row label in improvements.2da of your new line for your technique.
    • Set the COST column to its base silver value when the technique is bought.
    • Set the ICON column to the name of a TXB or TGA file with an icon to be used on the Techniques screen.
    • Set the STRREF_NAME column to the StrRef of the new dialog.tlk entry holding the name you added.
    • Set the STRREF_DESC column to the StrRef of the new dialog.tlk entry holding the description you added.
    • Set the SCRIPT column to j99_improvement. This is a standard script that applies the technique effects when the technique is gained.
  4. To add the technique as a reward in-game, find the ar_*.2da file for the area you have in mind, locate the reward event line where you want the technique given out, and add the items.2da row label number of your new row to the Item column. If a number already exists here you can add several separated by commas.

* * *

I'll post some more of what I've figured out later if anyone has any interest in reading it. I've successfully added some "new" (re-using existing animations, but behaving differently) martial and magic styles that works fine when used in game.

If anyone has figured out how other things fit together, please post about it and describe how.

Last edited by stoffe; 05-24-2007 at 03:09 PM.
stoffe is offline   you may: quote & reply,