Author Topic: Character name .cre/.chr mod problem  (Read 1784 times)

XzPePijNzX

  • Guest
Character name .cre/.chr mod problem
« on: December 31, 2006, 11:05:03 AM »
Yeah as a practice i decided to make myself a simple npc,
sadly enough it brought up some huge problems a bit too much for a beginner to comprehend.

However, this certain npc (Elizabeth) was greatly created and all the first time. Until i installed i kinds of odd BP mods (TDD, SOS, etc) Alot of NPC's switched names like : Listen jaheira, i know your upset, but listen. Well quite annoyed, i deleted and reinstalled the enormous baldur gate package 20 times

now, after 3 days of banging my head against the pc, i got BGII SOA, TOB (patched) and a few minor mods like imoen, dungeon-be-gone, banter pack, sola mod and ease of use, up and running again. And i started to rework on my mod from scratch.

So i got a .d file, but now:
And now to my creature file. I made a character, converted it to cre, and when i open it with NearInfinity, the name gives me : no such index. And i can edit it as a string, but i can do 4-character names at max. My .chr/.cre name and apparent name give 'no such index' in nearinfinity, but they show up as Elizabeth in shadowkeeper as the right character name

What is a modder gotta do? I tried everything, i reinstalled soa and tob 30 times now, dont force me on another time. Im just asking for the simpelest of things, how can i get my .cre file a name without error messages showing up like crazy.

Help me please?

Offline berelinde

  • Planewalker
  • *****
  • Posts: 1188
  • Gender: Female
    • Gavin, cleric of Lathander, for Tutu
Re: Character name .cre/.chr mod problem
« Reply #1 on: December 31, 2006, 11:25:49 AM »
Are you doing the chr/cre conversion with NI or SK?

It sounds as if you are trying to use NI to edit a cre that is stored in a directory that is not your game directory, like your mod folder stored in your documents directory. That directory does not contain your game, or the related files, so you're not going to be able to use NI to edit it there. How do I know this? The obvious answer is probably correct.

What I would do if I were you: start a multiplayer game, get your chr set up, then export her. Use SK to open the chr file, make whatever changes you want, then convert her to a cre with SK. Save the cre to the override.

Now, use NI to open the cre in the override, do what you have to do to finish converting her from a pc to an npc, and save her to your override.

Open up your override directory, find the file, and copy it to the mod folder in your documents directory.

Sure, you could create dummy files for the required game files in your mod folder, but it works just as well this way, and it's easier to explain (at least for me).

XzPePijNzX

  • Guest
Re: Character name .cre/.chr mod problem
« Reply #2 on: December 31, 2006, 12:03:30 PM »
thanks for the reply, i tried this. and it didn't work for me however
i pre-generated a char, exported it, opened it with SK (shadowkeeper), and changed it to a .cre in my override folder.
Then, when i opened that same file with NI, the name still gave me 'no such index'

which leaves me with these questions:
could i have messed up my game forever by installing certain mods once, then uninstalled and reinstalled the game a couple of times? How could my files be messed up and how to fix it?

How come certain npc's get wrongly assigned names caused by certain mods? How to fix it

If id edited the dialog.tlk file and added an extra string, would somebody else get that same string, even if that string was already reserved for another text (which is why i avoided this quite crude fix to my problem at first)

Offline berelinde

  • Planewalker
  • *****
  • Posts: 1188
  • Gender: Female
    • Gavin, cleric of Lathander, for Tutu
Re: Character name .cre/.chr mod problem
« Reply #3 on: December 31, 2006, 12:22:45 PM »
Oh, my. I think I see your problem.

When you install/uninstall/install/and-repeat the dialog.tlk gets pretty messed up.

Best bet: uninstall the game. Delete the whole Black Isle folder and everything in it (move portraits and custom soundsets somewhere else if you dont want to lose them), and reinstall from scratch. You aren't going to be able to get anywhere with your current installation.

Here's what's happening. SK is looking at the chr in your characters folder. That's fine. NI is trying to open the cre in your override, but it's pretty scrambled after repeated installations/uninstallations, etc.

XzPePijNzX

  • Guest
Re: Character name .cre/.chr mod problem
« Reply #4 on: December 31, 2006, 01:00:25 PM »
Hmm, that seems logical enough
was it not only that i DID delete the entire black isle folder along with everything in it, the only thing i backupped were my save games...
i do not see why my dialog.tlk file won't allow me to make more strings with anything more than 4 characters...



Anyway i thing i found the problem. another guy's advice was:
DO NOT CHANGE THE NAME OF THE .CRE FILE, USE SAY ~name~ IN YOUR TP2 INSTEAD
(yes he did it in caps)
Was he right? If he was im gonna punch myself in the face real hard for wasting 3 days of my life looking for a solution to that single problem

Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Character name .cre/.chr mod problem
« Reply #5 on: December 31, 2006, 02:00:45 PM »
If you're using WeiDU, yes, you want to use SAY.
Code: [Select]
COPY ~myFolder/myCre.cre~ ~override~
  SAY NAME1 ~name~
  SAY NAME2 ~name~
The name value is a string reference (a 4-byte integer of the correct string to use from the dialog.tlk table), not a string. You wouldn't actually put a name there, just the number of the dialog.tlk string to use.

If you get wacky text that's obviously wrong, you may have installed the mods while the game or an editor (like NI) was open (apparently, Windows has problems with this). Make sure you don't have anything else that wants to access dialog.tlk open when installing mods.

CHR files store the name in the CHR header; the CRE name for characters created this way will always be -1 (an invalid reference, which NI will display as "No such index").

Offline berelinde

  • Planewalker
  • *****
  • Posts: 1188
  • Gender: Female
    • Gavin, cleric of Lathander, for Tutu
Re: Character name .cre/.chr mod problem
« Reply #6 on: December 31, 2006, 02:17:43 PM »
What he said.

Out of curiosity, though, why didn't you just give her whatever name you want her to have when you generate the CHR in the first place?

You're still going to want to do what devSin says, and you can also assign her sounds that way.

You might want to start looking at One-Day NPCs to see how they do what they do.

xzpepijnzx

  • Guest
Re: Character name .cre/.chr mod problem
« Reply #7 on: December 31, 2006, 03:56:29 PM »
finally i got it all set up...
Thanks guys, you made me realise some small things i looked over, it would've saved me alot of hours if i knew this before now...

At the curiosity question: I did actually, but the .cre file uses a different string reference then the .chr file, rendering my name useless.

Oh 2 small questions i was pondering about earlier:
1. digging in some other mod .tp2 files i figured people tend to use SAY NAME @1 rather than SAY NAME ~This is my name~, what the hell is up with that?

2. Were i to make a new string. Like 'hey there!' and i used the displaystringhead command, which prompts you for a string reference number. How can i be sure the displaystringhead commands still uses the correct string, if i gave that mod to somebody else, that had a different value assigned to that specific string number, which means dialog.tlk returns a different text for the displaystringhead

Anyway, thanks a bunch, you guys made my day...
Oh and i'm looking into the one-day npcs  :)

Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Character name .cre/.chr mod problem
« Reply #8 on: December 31, 2006, 06:15:24 PM »
At the curiosity question: I did actually, but the .cre file uses a different string reference then the .chr file, rendering my name useless.
CHR files don't use string references for the character name but use literal strings in the CHR header (which doesn't exist in CRE files). The CRE name should have always been invalid (even if the CHR name was correct) since BioWare had no way of guessing you'd want to name your PC "Long-Pu," and therefore, that string isn't going to be in dialog.tlk. :)

Oh 2 small questions i was pondering about earlier:
1. digging in some other mod .tp2 files i figured people tend to use SAY NAME @1 rather than SAY NAME ~This is my name~, what the hell is up with that?
That's a TRA reference. You can look at the WeiDU read me for more information, but these mods will be accompanied by one or more TRA files. These files specify strings to use (@0 = ~Hello.~; @1 = ~Mr. Shadow~; @2 = ~Die, evil bunny!~; etc.), and WeiDU automatically retrieves the strings when they're specified in this manner. This is done to aid in translating strings (translators only need the TRA file).

2. Were i to make a new string. Like 'hey there!' and i used the displaystringhead command, which prompts you for a string reference number. How can i be sure the displaystringhead commands still uses the correct string, if i gave that mod to somebody else, that had a different value assigned to that specific string number, which means dialog.tlk returns a different text for the displaystringhead
Using WeiDU, you need to compile the script at install-time and do something like DisplayStringHead(Myself,~Not in my grocery store!~) or DisplayStringHead(Myself,@55) (where there is a defined string @55 in a relevant TRA file). When you do things this way, WeiDU scans the user's dialog.tlk for a matching string; if one is found, WeiDU retrieves the string reference (the 4-byte index) and substitutes that value (so if the string existed and was String 6541, WeiDU compiles or writes DisplayStringHead(Myself,6541)); if a matching string isn't found, WeiDU will add the string to dialog.tlk and return the reference (so if the dialog.tlk had 250 strings and your string didn't exist, WeiDU would add it to dialog.tlk and compile or write DisplayStringHead(Myself,251)).

xzpepijnzx

  • Guest
Re: Character name .cre/.chr mod problem
« Reply #9 on: December 31, 2006, 06:27:13 PM »
Wow  :o
You have quite the knowledge of weidu stuff...

Thanks alot dude, this IS really going to help me putting IE mods together




 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: