You are here

Hak troubles continue

15 posts / 0 new
Last post
StraightOuttaAvernus
Hak troubles continue

Alright. Here's an odd one for you. Loaded up my module with the latest, otherwise-complete version of the hak -- in prep for the (again rescheduled) server beta test for Anderfell. I've discovered a problem that, during the last few weeks of development and bugtesting, somehow went completely under my nose:

Placeables.

Specifically, the fact that none of the placeables are showing. At all. It's quite troubling and problematic. 
This does 'not' appear to be a bug associated with the module, as it had been previously.
The 2da file doesn't immediately seem to have any issues.
-and it's not crashing on any models, it's just not showing certain models altogether, which leads me to believe it isn't a model-related issue.

Has anyone encountered this before? placeables 2da posted for ease of reference in case I missed something stupid. My 'assumption' is that I maay have made a mistake that the 2da editing program I use doesn't detect -- which has somehow corrupted the file; but that doesn't tell me what the error is.

 

http://www.filedropper.com/placeables

Current development head of the Anderfell PW project, habitual player of halfdragons, and novice NWscripter

"Keep it simple, stupid" 

  • up
    50%
  • down
    50%
Tarot Redhand

My first impression of that 2da is - what's with the huge gap between the label column and the rest of the data. My second is what line number is the start of your data. placeables.2da is really too large to go searching for your stuff. Let us know and I'll take another look tomorrow (it's gone midnight here in the UK).

TR

 

  • up
    50%
  • down
    50%
StraightOuttaAvernus

I'm assuming you're meaning "where it last was when it worked". Finding that 'is' admittedly a tough one - but I believe that the entries I had to manually input (as opposed to copying from an existing 2da) begin at entry 13182 (or, Line number 13186). I'll shamefully and begrudgingly admit that almost every model after that line was taken from existing combo hakpaks which didn't come with their 2da file - either because I couldn't find the original or because I didn't want to put the work in. Because some servers keep their 2da's native for... some reason, naturally that meant "doing it all myself".

As far as that "gap" you mentioned between that and the rest of the data... I believe it is a consequence of how the program automatically organizes newly-input rows (aligns all of them based on the largest data entry in each column -- so I can have something that's small like "Armoire" and something much longer like "NWN2_Placeables_Chair_4" (not an actual line))

I'm almost 100% sure it's the 2da now though. I did my usual method of 2da checking, which is simply to load the incorrect 2da file into a blank hak and put it in a module to check for repeated results without any outside interference. The same result turns up.

Thanks for offering your help in any case. I know, for obvious reasons, how much time can be involved in digging through this file.

  • up
    50%
  • down
    50%
Tarot Redhand

Perhaps it's me but I can't see anything wrong with your 2da. I did notice that you have some model names in upper case though. Have you tried them with lower case? By not showing up do you mean they are not showing in appearances in the blueprint properties or that they are showing there but nothing appears in the toolset when you try to place them?

On win 7 I used WinMerge (it works differently on win 10) to compare your 2da with the standard bioware one. Which threw up enough differences (but probably not problems) to make me ask did you base your 2da on somebody else's (for example CEP)? BTW what is the name of the 2da editor that you are using? I ask because I just use notepad++.

Sorry for not being much help and asking all those questions.

TR

  • up
    50%
  • down
    50%
Vanya Mia

Haven't looked at the file but a quick suggestion would be around the use of inverted commas/quote marks around placeable names, should you be using them of course. If you miss one off you end up with a 'Bad Stref'. A quick way to check if this is an issue is to look for any models with that name, and if you have them export them in an erf. You can then look at the erf in NWN explorer and check the model line number or name, and reference back to your 2da.

If that falls flat I'd suggest loading into notepad and looking for even column format and the length of the rows. It's a less likely issue but I never trust these editing programmes because of this and similar 2da issues. I'm with Tarot on using Notepad as I've not found an editor so far that can cope with a mixture of spaces and tabs for columns when merging without buggering up column separation format, or just flat assumes one or the other, or also assumes the replacing of one with the other. It's just possible the values for two columns have become merged into one as a result.

"I took Skill Focus: Craft Disturbing Mental Image as my feat last level." Belkar, OOTS

  • up
    50%
  • down
    50%
orth
orth's picture

Couple things about your 2da:

The line 8614 Ceiling Moonlight -- The "Ceiling Moonlight" closing quotation is missing.

You go from line 14404 to line 12893-12950 then back to 14951 at the end of the 2da.

  • up
    100%
  • down
    0%
Tarot Redhand

@orth Good catch. I was too busy looking at the data it seems. If I remember correctly, the line numbers thing is less of a priority because I remember reading somewhere that the NwN engine ignores them and that they are there more for us humans. My guess is that it is that missing quotation mark that is the real problem.

TR

  • up
    50%
  • down
    50%
Zwerkules
Zwerkules's picture

Maybe your labels (or the tabs and spaces between the labels and the next coloumn) are just too long with over 200 characters.

The numbering is wrong in some places, which doesn't affect how the game reads the lines, but it makes it harder for humans to read.

Line 4186 has a missing quotation mark and less spaces between columns than the other lines. Same with line 8614.

You also have labels without quotation marks that contain ",", "-", and ":". While this might probably work, it would be better to put these into quotation marks.

 

 

  • up
    50%
  • down
    50%
StraightOuttaAvernus

Well, I revised some of the things pointed out here. I don't know exactly what did it, but between this and Symphony's help (since I've got contact with them and asked -- thanks Symph!~)? It's working again. Eventually I'll modify a 2da without breaking it. xD

  • up
    50%
  • down
    50%
Vanya Mia

As an aside Tarot is correct on the line numbers not mattering thing. We had this happen in D20 haks where one editor dropped in lines without adjusting or accounting for line numbers. No one noticed until a subsequent correction in a later version when a lot of buggering about became necessary to maintain compatibility for previously released modules. Keeping them 100% accurate is a guide to us humans is necessary if you don't want a situation where the chairs in earlier versions to suddenly become fountains. wink

  • up
    100%
  • down
    0%
Tarot Redhand
OK just gone through your 2da again. Came across this
 
1459  Track_BigBear                             ****   plc_foot_d            ****       ****         ****         ****         ****         1          0       PLC_W02       ****        1      
1560  Track_Cat                                 ****   plc_foot_e            ****       ****         ****         ****         ****         1          0       PLC_W02       ****        1      
 
All your line numbers for quite a way are out by 100 after this for quite some time.
 
More worryingly there is this block. Each Label has one or more non-printing characters which may well give NwN indigestion. Also the preceding 2 line numbers are 9370 followed by 9094 then this block.
 
9372  Floor�Designs�01                         ****   PLC_T07_Grn           29         0.003984     0.010825     0.126938     ****         1          0       ****          ****        1      
9373  Floor�Designs�02                         ****   PLC_T08_Grn           1          0.003984     0.010825     0.160159     ****         1          0       ****          ****        1      
9374  Floor�Designs�03                         ****   PLC_T09_Grn           29         0.003984     0.010825     0.123705     ****         1          0       ****          ****        1      
9375  Floor�Designs�04                         ****   PLC_T07_Blu           29         0.003984     0.010825     0.126938     ****         1          0       ****          ****        1      
9376  Floor�Designs�05                         ****   PLC_T08_Blu           1          0.003984     0.010825     0.160159     ****         1          0       ****          ****        1      
9377  Floor�Designs�06                         ****   PLC_T09_Blu           29         0.003984     0.010825     0.123705     ****         1          0       ****          ****        1      
9378  Floor�Designs�07                         ****   PLC_T07_Yel           29         0.003984     0.010825     0.126938     ****         1          0       ****          ****        1      
9379  Floor�Designs�08                         ****   PLC_T08_Yel           1          0.003984     0.010825     0.160159     ****         1          0       ****          ****        1      
9380  Floor�Designs�09                         ****   PLC_T09_Yel           29         0.003984     0.010825     0.123705     ****         1          0       ****          ****        1      
9381  Floor�Designs�10                         ****   PLC_T07_Pnk           29         0.003984     0.010825     0.126938     ****         1          0       ****          ****        1      
9382  Floor�Designs�11                         ****   PLC_T08_Pnk           1          0.003984     0.010825     0.160159     ****         1          0       ****          ****        1      
9383  Floor�Designs�12                         ****   PLC_T09_Pnk           29         0.003984     0.010825     0.123705     ****         1          0       ****          ****        1      
9384  Floor�Designs�13                         ****   PLC_T07_Tnr           29         0.003984     0.010825     0.126938     ****         1          0       ****          ****        1      
9385  Floor�Designs�14                         ****   PLC_T08_Tnr           1          0.003984     0.010825     0.160159     ****         1          0       ****          ****        1      
9386  Floor�Designs�15                         ****   PLC_T09_Tnr           29         0.003984     0.010825     0.123705     ****         1          0       ****          ****        1      
9387  Floor�Designs�16                         ****   PLC_T07_Twi           29         0.003984     0.010825     0.126938     ****         1          0       ****          ****        1      
9388  Floor�Designs�17                         ****   PLC_T08_Twi           1          0.003984     0.010825     0.160159     ****         1          0       ****          ****        1      
9389  Floor�Designs�18                         ****   PLC_T09_Twi           29         0.003984     0.010825     0.123705     ****         1          0       ****          ****        1      
9390  Floor�Designs�19                         ****   PLC_T07_Mul           29         0.003984     0.010825     0.126938     ****         1          0       ****          ****        1      
9391  Floor�Designs�20                         ****   PLC_T08_Mul           1          0.003984     0.010825     0.160159     ****         1          0       ****          ****        1      
9392  Floor�Designs�21                         ****   PLC_T09_Mul           29         0.003984     0.010825     0.123705     ****         1          0       ****          ****        1      
9393  Floor�Designs�22                         ****   PLC_T07_Ora           29         0.003984     0.010825     0.126938     ****         1          0       ****          ****        1      
9394  Floor�Designs�23                         ****   PLC_T08_Ora           1          0.003984     0.010825     0.160159     ****         1          0       ****          ****        1      
9395  Floor�Designs�24                         ****   PLC_T09_Ora           29         0.003984     0.010825     0.123705     ****         1          0       ****          ****        1      
9396  Mystic�Forge�Green                       ****   PX2_E01_Grn           ****       ****         ****         ****         26           1          0       ****          ****        1      
9397  Mystic�Forge�Multicolored                ****   PX2_E01_Mul           ****       ****         ****         ****         26           1          0       ****          ****        1      
9398  Mystic�Forge�Orange                      ****   PX2_E01_Ora           ****       ****         ****         ****         26           1          0       ****          ****        1      
9399  Mystic�Forge�Pink                        ****   PX2_E01_pnk           ****       ****         ****         ****         26           1          0       ****          ****        1      
9400  Mystic�Forge�Purple                      ****   PX2_E01_Pur           ****       ****         ****         ****         26           1          0       ****          ****        1      
9401  Mystic�Forge�Red                         ****   PX2_E01_Red           ****       ****         ****         ****         26           1          0       ****          ****        1      
9402  Mystic�Forge�Teal                        ****   PX2_E01_Tel           ****       ****         ****         ****         26           1          0       ****          ****        1      
9403  Mystic�Forge�Twilight                    ****   PX2_E01_Twi           ****       ****         ****         ****         26           1          0       ****          ****        1      
9404  Mystic�Forge�White                       ****   PX2_E01_Wht           ****       ****         ****         ****         26           1          0       ****          ****        1      
9405  Mystic�Forge�Yellow                      ****   PX2_E01_Yel           ****       ****         ****         ****         26           1          0       ****          ****        1      
9406  Portal�Blue                              ****   Plc_d07_Blu           ****       ****         ****         ****         ****         1          0       ****          ****        1      
9407  Portal�Green                             ****   Plc_d07_Grn           ****       ****         ****         ****         ****         1          0       ****          ****        1      
9408  Portal�Orange                            ****   Plc_d07_Ora           ****       ****         ****         ****         ****         1          0       ****          ****        1      
9409  Portal�Pink                              ****   Plc_d07_Pnk           ****       ****         ****         ****         ****         1          0       ****          ****        1      
9410  Portal�Purple                            ****   Plc_d07_Pur           ****       ****         ****         ****         ****         1          0       ****          ****        1      
9411  Portal�Red                               ****   Plc_d07_Red           ****       ****         ****         ****         ****         1          0       ****          ****        1      
9412  Portal�Teal                              ****   Plc_d07_Tel           ****       ****         ****         ****         ****         1          0       ****          ****        1      
9413  Portal�Twilight                          ****   Plc_d07_Twi           ****       ****         ****         ****         ****         1          0       ****          ****        1      
9414  Portal�White                             ****   Plc_d07_Wht           ****       ****         ****         ****         ****         1          0       ****          ****        1      
9415  Summoning�Circle�Blue                    ****   PX2_G01_Blu           ****       ****         ****         ****         26           1          0       ****          ****        1      
9416  Summoning�Circle�Blue�2                  ****   PX2_G01_Blu_NC        ****       ****         ****         ****         26           1          0       ****          ****        1      
9417  Summoning�Circle�Blue�3                  ****   PX2_G01_Blu_SE        ****       ****         ****         ****         26           1          0       ****          ****        1      
9418  Summoning�Circle�Blue�4                  ****   PX2_G01_Blu_SENC      ****       ****         ****         ****         26           1          0       ****          ****        1      
9419  Summoning�Circle�Green                   ****   PX2_G01_Grn           ****       ****         ****         ****         26           1          0       ****          ****        1      
9420  Summoning�Circle�Green�2                 ****   PX2_G01_Grn_NC        ****       ****         ****         ****         26           1          0       ****          ****        1      
9421  Summoning�Circle�Green�3                 ****   PX2_G01_Grn_SE        ****       ****         ****         ****         26           1          0       ****          ****        1      
9422  Summoning�Circle�Green�4                 ****   PX2_G01_Grn_SENC      ****       ****         ****         ****         26           1          0       ****          ****        1      
9423  Summoning�Circle�Orange                  ****   PX2_G01_Ora           ****       ****         ****         ****         26           1          0       ****          ****        1      
9424  Summoning�Circle�Orange�2                ****   PX2_G01_Ora_NC        ****       ****         ****         ****         26           1          0       ****          ****        1      
9425  Summoning�Circle�Orange�3                ****   PX2_G01_Ora_SE        ****       ****         ****         ****         26           1          0       ****          ****        1      
9426  Summoning�Circle�Orange�4                ****   PX2_G01_Ora_SENC      ****       ****         ****         ****         26           1          0       ****          ****        1      
9427  Summoning�Circle�Pink                    ****   PX2_G01_Pnk           ****       ****         ****         ****         26           1          0       ****          ****        1      
9428  Summoning�Circle�Pink�2                  ****   PX2_G01_Pnk_NC        ****       ****         ****         ****         26           1          0       ****          ****        1      
9429  Summoning�Circle�Pink�3                  ****   PX2_G01_Pnk_SE        ****       ****         ****         ****         26           1          0       ****          ****        1      
9430  Summoning�Circle�Pink�4                  ****   PX2_G01_Pnk_SENC      ****       ****         ****         ****         26           1          0       ****          ****        1      
9431  Summoning�Circle�Purple                  ****   PX2_G01_Pur           ****       ****         ****         ****         26           1          0       ****          ****        1      
9432  Summoning�Circle�Purple�2                ****   PX2_G01_Pur_NC        ****       ****         ****         ****         26           1          0       ****          ****        1      
9433  Summoning�Circle�Purple�3                ****   PX2_G01_Pur_SE        ****       ****         ****         ****         26           1          0       ****          ****        1      
9434  Summoning�Circle�Purple�4                ****   PX2_G01_Pur_SENC      ****       ****         ****         ****         26           1          0       ****          ****        1      
9435  Summoning�Circle�Red�2                   ****   PX2_G01_Red_NC        ****       ****         ****         ****         26           1          0       ****          ****        1      
9436  Summoning�Circle�Red�3                   ****   PX2_G01_Red_SE        ****       ****         ****         ****         26           1          0       ****          ****        1      
9437  Summoning�Circle�Red�4                   ****   PX2_G01_Red_SENC      ****       ****         ****         ****         26           1          0       ****          ****        1      
9438  Summoning�Circle�Teal                    ****   PX2_G01_Tel           ****       ****         ****         ****         26           1          0       ****          ****        1      
9439  Summoning�Circle�Teal�2                  ****   PX2_G01_Tel_NC        ****       ****         ****         ****         26           1          0       ****          ****        1      
9440  Summoning�Circle�Teal�3                  ****   PX2_G01_Tel_SE        ****       ****         ****         ****         26           1          0       ****          ****        1      
9441  Summoning�Circle�Teal�4                  ****   PX2_G01_Tel_SENC      ****       ****         ****         ****         26           1          0       ****          ****        1      
9442  Summoning�Circle�Twilight                ****   PX2_G01_Twi           ****       ****         ****         ****         26           1          0       ****          ****        1      
9443  Summoning�Circle�Twilight�2              ****   PX2_G01_Twi_NC        ****       ****         ****         ****         26           1          0       ****          ****        1      
9444  Summoning�Circle�Twilight�3              ****   PX2_G01_Twi_SE        ****       ****         ****         ****         26           1          0       ****          ****        1      
9445  Summoning�Circle�Twilight�4              ****   PX2_G01_Twi_SENC      ****       ****         ****         ****         26           1          0       ****          ****        1      
9446  Summoning�Circle�White                   ****   PX2_G01_Wht           ****       ****         ****         ****         26           1          0       ****          ****        1      
9447  Summoning�Circle�White�2                 ****   PX2_G01_Wht_NC        ****       ****         ****         ****         26           1          0       ****          ****        1      
9448  Summoning�Circle�White�3                 ****   PX2_G01_Wht_SE        ****       ****         ****         ****         26           1          0       ****          ****        1      
9449  Summoning�Circle�White�4                 ****   PX2_G01_Wht_SENC      ****       ****         ****         ****         26           1          0       ****          ****        1      
9450  Summoning�Circle�Yellow                  ****   PX2_G01_Yel           ****       ****         ****         ****         26           1          0       ****          ****        1      
9451  Summoning�Circle�Yellow�2                ****   PX2_G01_Yel_NC        ****       ****         ****         ****         26           1          0       ****          ****        1      
9452  Summoning�Circle�Yellow�3                ****   PX2_G01_Yel_SE        ****       ****         ****         ****         26           1          0       ****          ****        1      
9453  Summoning�Circle�Yellow�4                ****   PX2_G01_Yel_SENC      ****       ****         ****         ****         26           1          0       ****          ****        1      
9454  Summoning�Circle�Test                    ****   PX2_G01_Tes           ****       ****         ****         ****         26           1          0       ****          ****        1      
 
TR
  • up
    50%
  • down
    50%
Tarot Redhand

Having now used a number of online hex editor/viewers I can now tell you that each one of those white '?' embedded in a black diamond actually represent three non-printing characters - (in hex) EF BF BD (decimal) 239 191 189 (binary) 11101111 10111111 10111101 (separated characters) ï ¿ ½. I've also accidentally discovered that the very first three characters of your 2da file (I re-downloaded it using your link in the first post of this thread) are not '2da'. There are actually 3 hidden characters - (hex) EF BB BF (decimal) 239 187 191 (binary) 11101111 10111011 10111111 (separated characters) ï » ¿. I double checked against 2da files from my projects and those three characters are not the first three characters of my files.

Thought you ought to know.

The characters are pretty easy to remove using  notepad++. Just highlight the square character that notepad++ uses to represent the erroneous ones and press 'Ctrl' and H. This will take you to the find and replace dialogue. If all has gone well you should see the three characters that I mentioned earlier, in the Find What: textbox. Either put a single character such as the underscore ('_') or completely clear the Replace With: textbox. Click the Replace button. Once you are happy with the result you can get rid of all the dodgy characters by clicking the Replace All button.

(link is external)

 

TR

  • up
    100%
  • down
    0%
Vanya Mia

Glad I didn't look at the 2da, would have had to take some chill pills and go for a lie down. frown

Accurate column formatting is your friend, that way you can be sure you haven't missed anything required.

Correct line numbering is paramount in a large file, as if you if you try to track a model back from an ERF it won't give you the correct line. It's also way to easy to insert new stuff that you don't believe overlaps and bump your lines down, thus buggering up your templates.

Those control characters Tarot found are probably the result of the original compiler using one 2da resource to examine the file and then you using another one. Some see spaces as separators and others don't. Some ignore tabs. At least one I tried stripped the inverted commas around names where they were used as it saw them as separators. I'd really recommend going old school with Notepad as suggested too.

Plus inverted commas around your labels are also likely to be the way to go. It's simpler than using the TLK references for longer descriptions and allows you access to more characters in the description. Just remember to close them too.

  • up
    50%
  • down
    50%
Tarot Redhand

In the process of debugging a 2da error finder and discovered this totally borked line in your 2da. FYI it is line number (ignoring what the line itself says) 7749. - following text up to the last **** is all one line -

8614  "Ceiling Moonlight          ****   db_shaft_moon       ****         ****           ****           ****           ****           1            0         ****      ****         1"                                                ****   ****                  ****       ****         ****         ****         ****         ****       ****    ****          ****        ****  

At first I couldn't understand why my program wasn't flagging it up as a short line but then I noticed the second double quote... So I scrolled the window to the right... Arrrrgh!!!!! So how do you code to detect something like this? Because of the quotes it reads that it has the right number of columns. I can test the number of characters between the quotes but what limit should I set? As it stands there are 174 characters between those double quotes. I am thinking that 64 and below is a reasonable number to test for.

TR

  • up
    50%
  • down
    50%
meaglyn

There's nothing in the spec about the length of string entries.  It does say to use spaces not tabs fwiw.

Anything you pick for a length will be arbirtrary.  One thought is to instead check for **** in the quoted string.  That's very likely to be an error.  But a long string may not be.  Or maybe a long string with **** in it as well...  

At some point you have to decide that you can't fix every possible mistake someone trying to bork it can come up with.  You could easily make a valid row between the quotes in your example using less than 64 characters. It only takes one space to separate each column.

  • up
    50%
  • down
    50%