Jump to content


Photo

Converting .CHR to .CRE


  • Please log in to reply
7 replies to this topic

#1 Alexander

Alexander
  • Member
  • 68 posts

Posted 19 February 2004 - 02:30 AM

OK, I'm new to modding and have again found out how little I know. I've just converted my NPC's .CHR file into .CRE and saved it to the override directory. Is that the right place for it? More importantly, I've been following Ghreyfain's tutorial, but it then says,
"Once it's in .cre format, you can assign it its Death Variable, Dialogue file,
Scripts (if any), and Name. This is all fairly simple, so I don't think I need to
explain any further."

Unfortunately, I also seem to be fairly simple, so could someone explain to me what I need to set these to?
Thanks :)
"Carrot Cake, Carrot Cake, have you any nuts?"
"the carrot cake contains...No nuts"


"Have ye heard of the beast known as the Coo?"
"A cow? yes"
"Well did ye know that from it's teat a liquor may be procured?"
"Milk?"
"YE KNOW TOO MUCH!"
-Little Britain

#2 Seifer

Seifer

    The best Anti-Paladin weapon is a tin opener...!

  • Member
  • 4505 posts

Posted 19 February 2004 - 05:00 AM

All actions in the game are scripted. Scripts are the BCS scripts that you might have seen floating around the game via the override folder. The death variable for your NPC is what any script will use to summon him, move him or whatever. This is an example:-

IF
Global("DeathVariable","ARxxxx",0)
THEN
RESPONSE #100
SetGlobal("NPCExists","ARxxxx",1)
CreateCreature("DeathVariable",[000.000],0)
END


His dialogue file is what he needs to speak. Thus, if you want him to approach the party when he see's them, your character script will contain it whilst you dialogue file (DLG ingame, .D uncompiled)

Scripts are where you can programme any actions at various points, This has a wide range of possibilities and there are a load of tutoruials that cover this.

And the name is pretty self explanatory.

how come you always look so damn cool in every photo I see you in?!?


Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.


Still a cyberjock, still hacking the matrix, still unsure of what that means.

TeamBG member - http://www.teambg.eu

#3 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 19 February 2004 - 05:13 AM

I'm pretty sure when you CreateCreature() you use the .cre file name and not the death variable.

A death variable is a unique identifier (ok, it doesn't *have* to be unique, but for a joinable NPC it should be). It's used in scripting/dialog triggers and actions and is generally some form of the NPC's name (although, again, it doesn't *have* to be).

If you're using Near Infinity, you'd open up your .cre file and click on the edit tab to input those variables/names.

Your .cre file will eventually need to end up in the override, but if you're planning on making a distributable mod it's better to set up a mod directory in your BG2 main directory and have stuff copied over via the .tp2 file.

#4 Seifer

Seifer

    The best Anti-Paladin weapon is a tin opener...!

  • Member
  • 4505 posts

Posted 19 February 2004 - 05:19 AM

You can use both as far as I am aware. This is how the game has multiple versions of the same NPC depending on level. I've never had a use for it though =)

how come you always look so damn cool in every photo I see you in?!?


Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.


Still a cyberjock, still hacking the matrix, still unsure of what that means.

TeamBG member - http://www.teambg.eu

#5 -Sim-

-Sim-
  • Guest

Posted 19 February 2004 - 07:55 AM

You can use both as far as I am aware. This is how the game has multiple versions of the same NPC depending on level. I've never had a use for it though =)

No, that's done through a special system using NPCLEVEL.2DA and the GAM file. CreateCreature will only work with CRE names, while death variable is used to refer to something already existing ingame.

#6 Alexander

Alexander
  • Member
  • 68 posts

Posted 19 February 2004 - 08:35 AM

Well, thanks for helping, I think I've got a better understanding of what I need to do. However, I just managed to F**K my game up good and proper so I've had to completely uninstall it. I think I might leave my game alone for a while until I can understand what I'm meddling with a bit better.
"Carrot Cake, Carrot Cake, have you any nuts?"
"the carrot cake contains...No nuts"


"Have ye heard of the beast known as the Coo?"
"A cow? yes"
"Well did ye know that from it's teat a liquor may be procured?"
"Milk?"
"YE KNOW TOO MUCH!"
-Little Britain

#7 Vedran

Vedran
  • Member
  • 11 posts

Posted 23 February 2004 - 02:55 AM

Heh, we all managed to do that once or twice, don't let that discourage you. ;)

#8 Alexander

Alexander
  • Member
  • 68 posts

Posted 23 February 2004 - 10:12 AM

Unfortunately I'm back at college now, so I've got two essays, two mocks, and a piece of coursework to do this week before I continue, but continue I shall. :D
"Carrot Cake, Carrot Cake, have you any nuts?"
"the carrot cake contains...No nuts"


"Have ye heard of the beast known as the Coo?"
"A cow? yes"
"Well did ye know that from it's teat a liquor may be procured?"
"Milk?"
"YE KNOW TOO MUCH!"
-Little Britain