Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

We need your feedback on the new forum text editor switch.
Neverwinter Nights: Enhanced Edition has been released! Visit nwn.beamdog.com to make an order. NWN:EE FAQ is available.
Soundtracks for BG:EE, SoD, BG2:EE, IWD:EE, PST:EE are now available in the Beamdog store.
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

2da StrRef?

zordren3742zordren3742 Member, Array Posts: 140
I have read a bit about it and I am looking for a bit more info on what it is and whether you can or should use it on custom placeables.
more info on stringrefs can be found here http://nwn.wikia.com/wiki/StringRef

Post edited by zordren3742 on

Comments

  • LaputianBirdLaputianBird Member Posts: 101
    StrRefs should be avoided every time the specific 2da uses the LABEL string instead (which usually requires setting the StrRef field to ****.

    String references to a tlk file are used by the engine for localization, as the engine can load a different tlk based on the chosen install language, and hence can mass-replace the default english strings without the need to edit the 2das that refer them.
    However it is pretty much useless for custom content, as there isn't a similar localization mechanism for custom tlk tables (the player would need to manually replace the custom tlk with a localized version, which the content creator should provide).

    The only reason to use them is that some 2das won't fallback to the LABEL field in case the SreRef is blank.

    Placeables and creature appearances however do, so you shouldn't bother with tlk references. If your label includes any whitespace, add double quotes " around the label string.

    zordren3742
  • zordren3742zordren3742 Member Posts: 140
    Thank you for the info, even though that all went right over my head. I am working on placeables right now and i don't know anything about how to make a custom tlk. I guess i will have to try this at some point.

  • LaputianBirdLaputianBird Member Posts: 101
    Sorry, I didn't want to make things sound complex.

    The essence of what I said is that using StrRefs gives no advantages and only has drawbacks, and should be avoided at all costs.

    That said, some 2das require the use of StrRefs (spells.2da, for instance), but not placeables.2da

    zordren3742
  • zordren3742zordren3742 Member Posts: 140
    Ok that is good to know. I read somewhere that it can be used for online, something about less bytes,so I was just checking.

  • LaputianBirdLaputianBird Member Posts: 101
    You can safely assume that there is no performance gain whatsoever by using StrRefs instead of labels. Server sends placeables data to its clients by placeable appearance ID (the row number), which isn't affected by whether you're using StrRefs or labels

    Grymlorde
Sign In or Register to comment.