Aller au contenu

Photo

Changing placeables.2da lines


  • Veuillez vous connecter pour répondre
28 réponses à ce sujet

#26
Kheflin Truarc

Kheflin Truarc
  • Members
  • 22 messages
 I realize I am very late to the party, but this placeables stuff is killing me. I dowloaded the Trinity__Custom_Placeables_Pack and copied and pasted the 12800-12833 lines (filling in all of the blank ones in between 4642 through 12799 with the blank 4-asterisks per column) into the placeables.2da file, which is in the hak in the 0 position in the modules hak list. I then dropped all of the other files (dds, mbs and utp) into the override folder in NWN2 folder in My Documents directory.

What I get is the items showing up in the toolset placeables list, but trying to use them gives me no appearance, and most times a string error message that I can only assume means the placeables.2da file is wrong.

If I could just understand how this all works, I would be having a lot more fun using the toolset to make mods, but almost every time I try to add custom content to the toolset, I spend days trying to just figure out how to get it to work right. Any help here would be great. Noobs, huh...!

#27
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
This is how i do it...

( and this is using custom software i wrote to handle this for me which is still classified as beta, but should work fine for this portion, been using it this way for about 4 years now for personal use )

I just posted a more complete version of this on the vault, with detailed information on the UPD file format syntax

First install never launcher
  • First download this Never Launcher
  • Then extract the application and open the exe in the folder. It's self contained, your prefs go into a text file where apps should save them per your OS, and the rest never leaves it's folder so you can just delete it when you are done.


Second, generate a upd file
  • Click "Build - Toolset" button on the main screen, or select the "Build" menu item in the file menu.
  • Click "Open File"
  • Navigate to the 2da file with the modifications you want. ( technically you can drag the 2da file on the Neverlauncher app as well)
    Posted Image
  • Wait while it opens the file ... can take a while as it's designed to open even the most corrupt 2da file and is reading every cell into memory up front. ( I am opening the combined 2da which is just plain huge anyway so you might have to be patient - if it shows a dialog with an number that is me trying to figure out how to speed it up by showing the ticks spent, not sure if that is showing in the released version )
  • Using the Compare Menu, select NWN21.23.1765XP2 and wait a bit for this to process ( should be pretty fast )
    Posted Image
  • Using the Compare Menu, select Extract Diff
    Posted Image
  • This creates a diff file, with ALL the differences set up as a script.
    Posted Image
    #example of just a few lines
    #Difference Summary:
    #this sets the target file
    use: placeables.2DA
    
    
    # does a single edit in the middle of the 2da, it's by cell
    # Row 585 CityBDock,Good
    SetRow: 585
    set: currow, Label to CityBDock,Good
    
    #this is a completely new line
    # Row 4568 RWS_Mezzo_Temple_3
    SetRow: 4568
    set: currow, id to 4568
    set: currow, Label to RWS_Mezzo_Temple_3
    set: currow, StrRef to ****
    set: currow, PlaceableModelType to 0
    set: currow, Fade to 0
    set: currow, NWN2_ModelName to PLC_MC_RWSTEMPLE03
    set: currow, NWN2_LowGore to ****
    set: currow, NWN2_PartsCount to 0
    set: currow, NWN2_Skeleton to ****
    set: currow, AttachedModelName to ****
    set: currow, DefaultDoor to ****
    set: currow, DefaultAccessory to ****
    set: currow, IsAccessory to 0
    set: currow, ModelName to ****
    set: currow, LightColor to ****
    set: currow, LightOffsetX to ****
    set: currow, LightOffsetY to ****
    set: currow, LightOffsetZ to ****
    set: currow, SoundAppType to ****
    set: currow, ShadowSize to ****
    set: currow, BodyBag to ****
    set: currow, LowGore to ****
    set: currow, Reflection to ****
    set: currow, InterfacePT to ****
    set: currow, BlockLOS to 0
    set: currow, SELECTION_SIZE to ****
    
    ( there is other syntax to add rows, do custom tlk entries based on flags, etc )
    
  • Close the placeables.2da
  • Save the UPD files created for future use, or just leave it open. This syntax should be simple enough to review, so any extraneous lines, or anything you don't like can be reviewed. ( very hard to sneak any changes you don't know about using this system )
  • Repeat on all the 2da's you want to use, i save these so later on when i do more merging i can keep track of where each change came from.

Third Run the UPD script to Create a combined placeables.2da
  • Open the UPD file ( just like you did placeables.2da )
  • The UPD editor has 2 options, first is "Open Files" which makes it target an open file, the other is "NWN21.23.1765XP2" which opens the vanilla 2da file provided. If you use open files, make sure you have just one placeables.2da open on which to run the script.
  • Click run ( it runs very fast, you might want to scroll down to the lines it's going to edit just to see it happen )
  • Repeat for all the upd files you want to use, yes this is all merged ( This was used by me to do the combined 2da which has just about all the NWN2 placeables in it ) Note this will not deal with conflicts, but you can just edit the number in the script.
  • Save the placeables.2da file ( there is a preference to choose tab or space delimited, both work fine in NWN2, NWN1 requires space delimited, excel prefers tab delimited.

This will take care of everything for you, and makes whatever edits were done by the author into something portable you can run on another 2da file, even merging lots of these ( obviously if they edit the same cell, the last edit done is used, but most obey reserved ranges )

Note that this is something which can automatically extract the 2da edits on really old 2da files from old versions, and migrate them to the current version, and deal with very complicated issues. I am preparing to process ALL the files on the vault using this system so that the 2da files will be dynamically created on installation, so even 2da files in modules from 10 years ago will work on the current 1.69 assuming there are no collisions. So while complicated, it actually will work for all content, yet also gives options for authors to control how their content gets merged.

But in the mean time, following this step by step, you should get a perfect 2da file. ( there also is a fix line numbers command, which is helpful since the line numbers are off by one in the official version which is probably one of the issues causing you problems )

Modifié par painofdungeoneternal, 17 juillet 2013 - 05:50 .


#28
Kheflin Truarc

Kheflin Truarc
  • Members
  • 22 messages
Wow! That's a lot. I will give it a shot and get back to you...if my head doesn't explode...when I figure it out. Thanks for the step by step. I just hope I can follow everything you have here, as I am pretty new to all of this.

#29
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
Make sure you attach the hak to your module as well. ( placeables.2da just sets up the reference, it still needs to load the content somehow, via override, hak, etc.