Jump to content

Home

Jade Empire modding (see first post for info summary)


stoffe

Recommended Posts

\o/ Yay for stoffe! Did you answer your own question then?

 

More or less, I figured out how to replicate the behavior reasonably using array indexes instead. :)

 

The quick converter utility seems to work reasonably well on the few TXB textures I've tried to convert with it. I've uploaded it for now in case someone else wants to help test it and determine how well it works: Txb2Tga.

 

Use at your own risk. It seems to work OK, but I've only tested it on a handful of different TXB files. If you encounter any file it can't convert properly please let me know which file that was.

 

* * *

 

On more general notes it seems the NWNNSSCOMP for KOTOR (at least the variant tk102 did) works fine to compile scripts for Jade Empire if you use the nwscript.nss file found in the override folder and fix the couple of syntax errors it contains. :emodanc:

 

Jade Empire also seems to use a mix of the traditional plaintext 2DA V2.0 format, and the same binary 2DA V2.b format used with KOTOR. So the binary files can be edited with KotorTool, or converted to text using tk102's excel plugin or my quick converter utility.

Link to comment
Share on other sites

  • Replies 438
  • Created
  • Last Reply

Still can't get it to work. I converted Radiant Jen Zi's body and edited it, then saved it as TGA image named P_Li01 which is the same as the txb file. I also tried naming it P_Li01.txb which I knew wouldn't work and it didn't. I deleted the actual txb file thinking it might just be loading that one first, and that didn't work either. Her body came up black, so I replaced it. Any Ideas?

Link to comment
Share on other sites

Thanks for all your hard work, nowhere else is even close to this far for texture editing yet. But how do you get these new textures into the game now? Do you need to change them back to txb's? If so, how?

 

It should work to put both the TGA and TXI file in the override folder directly. Make sure there isn't a corresponding TXB file located in the override folder as well, since it will take precedence over the TGA's. Many of the player appearance textures are located in the override folder as well as in players.mod (where those in override will be used since it has higher priority than the BIF/RIM/MOD files).

 

I did a quick test and recolored the shirt of my character green, moved p_blossom01.txb out of the override folder and put p_blossom01.tga and p_blossom01.txi in the override folder, and she turned up with a green shirt in-game.

 

(I.e. you shouldn't need to remove the TXB file from within the data files for the TGA to be used, just make sure one doesn't exist in the override folder.)

 

 

Edit: I did a quick reskin of the character you mentioned as well, and it showed up fine in-game:

masteradiantmb9.th.jpg

Link to comment
Share on other sites

Seems like Jade Empire has added yet another data type to the GFF format (still without changing the version number :roleyess:). Type 18 appears to be a StrRef type, similar to ExoLocString in use but only containing a dialog.tlk reference and not any localized substring data. Be warned that these fields may get messed up and stripped if using any GFF editors for NWN or KOTOR to edit Jade Empire's GFF files.

 

Aside from that it seems JE uses the Rotation and Vector field types added in KOTOR as well, which would cause trouble when using GFF editors made for NWN.

Link to comment
Share on other sites

So Field 16 and 17 exist-- that's good. Have you been able to tell if CResRef fields include up to 32 chars (like NWN2) or just 16 chars (like KotOR)? If it helps, I could modify either KGFF or NWN2GFF to include field 18. Send me a PM if you like. :)

Link to comment
Share on other sites

So Field 16 and 17 exist-- that's good. Have you been able to tell if CResRef fields include up to 32 chars (like NWN2) or just 16 chars (like KotOR)? If it helps, I could modify either KGFF or NWN2GFF to include field 18. Send me a PM if you like. :)

 

As far as I can tell Jade Empire uses 16 character ResRefs. It seems to be the same format used for KOTOR except for (at least) one new data type that looks like it holds a StrRef from a quick look at it. It would be very useful if you could make a JE-compatible version of k-gff. :)

Link to comment
Share on other sites

As far as I can tell Jade Empire uses 16 character ResRefs. It seems to be the same format used for KOTOR except for (at least) one new data type that looks like it holds a StrRef from a quick look at it. It would be very useful if you could make a JE-compatible version of k-gff. :)

KGFF v1.1.9 now supports StrRef fields (Field Type: 18). I anticipate if/when KotOR3 gets made, there is a good likelihood it will use this field type as well.

 

@Adelphus: I don't believe cchargin or Taina have devoted time to modifying their modeling tooling for Jade Empire at this point.

Link to comment
Share on other sites

stoffe, just a couple questions/comments about your TXB2TGA converter...

 

Not that it doesn't work properly or anything--and I can use it just as it is--but, I was curious as to why I get so much dithering when converting the TXBs to TGAs.

 

Also, is there any way for the converter to increase the output file size from 256x256 to the more commonly used 512x512? It just seems as if the smaller file size could be causing the dithering, but I could be completely wrong about that and the dithering is caused by something else entirely.

 

Anyway, thank you so much for this converter! Whether or not you can do anything else with it, it still works fine just as it is and I am enjoying using it a lot! ;)

Link to comment
Share on other sites

Not that it doesn't work properly or anything--and I can use it just as it is--but, I was curious as to why I get so much dithering when converting the TXBs to TGAs.

 

Hmm, I haven't noticed anything like that (but then I haven't tested it very much either :)). Which image in particular would this be noticeable for?

 

Also, is there any way for the converter to increase the output file size from 256x256 to the more commonly used 512x512?

 

The TXB files contain compressed bitmaps which come in one resolution. The converter does not do any scaling, it just grabs the bitmap, decompresses it and saves it in TGA format instead. The resolution you get in the TGA is the one the TXB was saved in. Only vector graphics can be rescaled freely without image quality loss, bitmaps are fixed in size. You'd probably get better image quality if you use an image manipulation application like Photoshop, Paintshop Pro or GIMP than if I'd try to make the converter scale them up.

 

Help! Can anybody tell me where to find the heads of the pc's? I want to change Lings head and found only the bodies. Maybe I'm blind or was looking in the wrong directory (override).

 

You can find them inside players.mod (in the data folder) if I remember correctly. You should be able to use the ERF/RIM Editor linked to in the first post in this thread to extract them from the MOD file.

Link to comment
Share on other sites

Hmm, I haven't noticed anything like that (but then I haven't tested it very much either :)). Which image in particular would this be noticeable for?

The one I was working on was Scholar Ling's body texture (her outfit).

 

The image I converted has some dithering around the colored parts, but I actually now suspect that it isn't your converter that's causing it because a few of the images I converted from the ones that already come in the Override folder have dithering too.

 

I think it may just be because the game is using graphic files that were used on the XBox first. *shrug*

 

The TXB files contain compressed bitmaps which come in one resolution. The converter does not do any scaling, it just grabs the bitmap, decompresses it and saves it in TGA format instead. The resolution you get in the TGA is the one the TXB was saved in. Only vector graphics can be rescaled freely without image quality loss, bitmaps are fixed in size. You'd probably get better image quality if you use an image manipulation application like Photoshop, Paintshop Pro or GIMP than if I'd try to make the converter scale them up.

Yes, I am using Paint Shop Pro for these (plus everything else I do :D )

 

I tried scaling them up from 256x256 to 512x512, but because of the dithering it looked worse. I think I can fix it though, using my retouch tool.

 

Anyway, thanks for the converter! :D

Link to comment
Share on other sites

I've uploaded what's hopefully the final version of my ERF/RIM Editor for Jade Empire (unless there are any bugs I have overlooked). I found a list of File Type <--> ResType associations so hopefully it should now fully recognize all data types used by the game and allow extracting/adding them properly.

 

Link is in the first post in this thread.

Link to comment
Share on other sites

  • 2 weeks later...

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.

[*]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)

[*]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.

[*]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:

jehaloeffectqc1.th.jpg

 

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.

[*]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.

[*]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. :)

Link to comment
Share on other sites

  • 2 weeks later...

 

 

Ooh, very nice. :thumbsup: That must have taken some time to write up, thank you for posting it. :) Filled in some gaps about things I hadn't figured out yet. Now I won't have to put more work into a tutorial about how to add new styles, you covered pretty much all of it and more.

Link to comment
Share on other sites

I haven't covered harmonic combos (synergy.2da), though the system looks simple. I got sidetracked into trying to decipher JE's MDL format. I've been making some progress on that, but the best I can do is just provide a structural layout of the format since I'm not a modeler (or have modeling software).

Link to comment
Share on other sites

I haven't covered harmonic combos (synergy.2da), though the system looks simple. I got sidetracked into trying to decipher JE's MDL format. I've been making some progress on that, but the best I can do is just provide a structural layout of the format since I'm not a modeler (or have modeling software).

 

The Harmonic combo data seems to follow the same pattern as the other files.... An effect column that references effects.2da to say what happens when the combo triggers, and a parameter column that specifies what 2DA line is used in the definition 2DA for that effect type. The screenshake column points to a line in visualeffects.2da. The other columns seem unused. Seems to work fine to add new rows here as well when making new styles to give them unique HC behaviors.

 

The relevant styleAS.2da columns seem to be:

 

synergyprestate - Set to 1 for the martial style attacks that can finish the Harmonic Combo. Usually only the power attack has this set, but it works on any attack.

 

synergystart - Set to a row number in synergy.2da for the effect that should happen when the Harmonic Combo triggers. This is set in the support/magic style that initiates the HC timer.

 

synergyduration - Seems to be a delay before the harmonic combo countdown initiates, in seconds.

 

The synergyeffect column appear to be unused from what I can tell.

 

If you set a synergystart and synergyprestate on the same attack the harmonic combo will trigger immediately whenever that attack is made, unless the synergyduration column is set to a value higher than 0, in which case another attack is needed to trigger the combo.

 

(I did this on my "Flame Strike" martial style where the power attack initiates an Immolation Harmonic Combo countdown after a 10 second delay, which then can be triggered with another power attack from the same style. :))

 

I'm afraid I can't offer any insight into the Jade Empire MDL/MDX format since I know very little about modeling.

 

Edit: Made some changes to fix incorrect assumptions and add some other things discovered.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...