Jump to content


Photo

Is it possible to assign an item in a existing cre


  • Please log in to reply
3 replies to this topic

#1 klaussner

klaussner
  • Member
  • 114 posts

Posted 14 April 2003 - 08:00 AM

I'd wish to use Weidu to put an item in the inventory of an existing cre file, without having to replace that file.
Is there a command that allows Weidu to put an item in a free slot of a cre file?

#2 japheth

japheth

    Codewalker

  • Member
  • 317 posts

Posted 14 April 2003 - 08:41 AM

Nope, unfortunately at this time there's no way to add an item to a character's inventory "on the fly".

And this can't really be done by using WRITE_BYTE/SHORT/LONG either since the offsets are always changing depending on the number of items in the character's inventory, the number of spells he or she knows, etc.

The only way to do it is to use ShadowKeeper or Near Infinity to add the items beforehand and then simply copy the cre over.
Check out BG1Tutu.

#3 weimer

weimer
  • Member
  • 1569 posts

Posted 24 April 2003 - 04:11 PM

I have implemented Japh's request for expression-based offsets. Maybe he'll put "'give a CRE an ITM" in his READ_BYTE tutorial.

Personally, I think it's starting to look like deep black magic ... but if it keeps things compatible and is vaguely understandable, so much the better.

#4 japheth

japheth

    Codewalker

  • Member
  • 317 posts

Posted 24 April 2003 - 05:38 PM

Yep, it is possible now thanks to Weimer. ^_^

I've successfully added an area entry to the worldmap file using some simple expressions. I'm going to (re)-write the docs tomorrow. I'll try and include an example of how to add an item to an existing cre "on the fly".
Check out BG1Tutu.