Jump to content


Photo

Common mistakes


  • Please log in to reply
19 replies to this topic

#1 Seifer

Seifer

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

  • Member
  • 4505 posts

Posted 19 July 2004 - 06:03 AM

Not sure if the idea will take but it might make some sense to keep a list common mistakes people make. I'll start the list with my own lame mistake. Anyone else?

1) When spawning creatures, use the file NAME, not the Death Variable. Gets me everytime that one.

2) When APPENDing 2DA files in the tp2 file, the entry in the first column is the Death Variable and NOT a dialogue file name...

3) Make sure your CRE (for your NPC) has its enemy-ally attribute set to NEUTRAL. Also, make sure that the Export Allowed flag is NOT ticked.

4) Also, make sure that the area-script you're extending includes a variable that prevents the creature from spawning over and over and over again.

5) Never forget the tildes! (~~)

6) Save and update your information on a regular basis.

7) A note or two regarding Imoen: -
The post-Spellhold Immy's death variable is Imoen2, not Imoen!!! The .cre is IMOEN211 or IMOEN213.
SOA post-Spellhold Immy has no B file. TOB Immy does.
Please see note.

8) Creatures summoned by spell/items do not read with a valid Death Variable.

9) If your area scripts don't seem to be working it might need an entry in the MastArea.2da file. (Read up on this file!)

10) You CAN'T CREATE NEW CLASSES OR MULTI/DUAL CLASSES! However, you can SIMULATE them with kits and scripting.

11) If you're modding and testing one of the DPlayer scripts, make sure the AI is turned on.
- When making NPCs, make sure you've stripped the DPlayer scripts from the base .cre or you'll likely wind up with the multiplayer dialogs on join/part.

12) Watch for typos in BCS files. This is the bane of all scrpiters! An example, lifted from Blitz:

I wasted two hours messing with global variables and other scripts only to discover that the NPC wasn't spawning because of a "CreateCreature" name-typo.


13) When writing your scripts, keep in mind that summoned creatures don't have a DV (death variable).

14) If you are making many small changes to your code, don't forget to reinstall the mod before you test. - Thanks to Shed.

15) Remember to actually compile your dialogue files. Make's testing a lot easier...!

Edited by berelinde, 13 October 2007 - 02:56 PM.

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

#2 Seifer

Seifer

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

  • Member
  • 4505 posts

Posted 29 January 2005 - 07:53 PM

Updated. Keep 'em coming.

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 Seifer

Seifer

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

  • Member
  • 4505 posts

Posted 09 June 2005 - 02:00 PM

Updated.

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

#4 Shed

Shed

    -Shed-

  • Modder
  • 2636 posts

Posted 18 June 2005 - 12:15 PM

If you are making many small changes to your code, don't forget to reinstall the mod before you test ;) .

#5 Seifer

Seifer

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

  • Member
  • 4505 posts

Posted 01 July 2005 - 02:39 PM

Updated.

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

#6 Seifer

Seifer

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

  • Member
  • 4505 posts

Posted 31 October 2005 - 04:06 PM

Here's a classic one - remember to actually compile your .d files.

A slight mishap I had earlier..!

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

#7 Ghreyfain

Ghreyfain
  • Member
  • 137 posts

Posted 31 October 2005 - 10:52 PM

7) A note or two regarding Imoen: -
The post-Spellhold Immy's .cre is Imoen2, not Imoen!!!


Should specify that it's her DV that's 'Imoen2', not her .cre. Her .cre files are in fact imoen211.cre and imoen213.cre.

#8 Shed

Shed

    -Shed-

  • Modder
  • 2636 posts

Posted 01 November 2005 - 02:29 AM

True :). Edited.

#9 --jastey--

--jastey--
  • Guest

Posted 01 November 2005 - 09:03 AM

Here's a classic one - remember to actually compile your .d files.

A slight mishap I had earlier..!


And new scripts, and cutscenes. From all cutscenes I wrote (and there were a lot for BG1NPC alone) I only remembered to add the COMPILE command to the .tp2 for about two, for the rest I started a new game (after reinstaling the mod, at least I thought of that) and wondered why on earth the damn cutscene isn't working now. <_<

-jastey

#10 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 13 October 2007 - 02:54 PM

7) A note or two regarding Imoen: -
The post-Spellhold Immy's death variable is Imoen2, not Imoen!!! The .cre is IMOEN211 or IMOEN213.
SOA post-Spellhold Immy has no B file. TOB Immy does.


This item has since been addressed by the BG2 Fixpack at G3.

The BG2 Fixpack gives Imoen a banter file, but if you want your mod to work just fine without requiring that the BG2 Fixpack be installed, you can add these lines to your tp2, taken from the BG2 Fixpack.

// Imoen gets her groove back. And her banter file.
ACTION_IF FILE_EXISTS_IN_GAME ~mel01.cre~ THEN BEGIN

  COPY_EXISTING ~interdia.2da~ ~override~
	SET_2DA_ENTRY 17 1 2 ~BIMOEN2~ // fixes ToB version
	BUT_ONLY_IF_IT_CHANGES

END ELSE BEGIN

  APPEND ~interdia.2da~ ~IMOEN	   BIMOEN2~ // fixes SoA version
	UNLESS ~BIMOEN2~

END

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#11 Azkyroth

Azkyroth
  • Modder
  • 3496 posts

Posted 13 October 2007 - 07:03 PM

Remembering that in the RES versions of the various spell scripting actions (or at least in ReallyForceSpellRES) the "target" and "spell" elements of the parameters are in the opposite order from the non-RES versions. <_<

Putting entries in the TP2 for files you're going to make soon and then forgetting to remove them before attempting an install to test your dialogue and script compiling.

Forgetting that you have to quit WeiDU before changes in the TP2 will be loaded.

Forgetting that Infinity Explorer locks a bunch of files from editing for no apparent reason, and thus trying to do anything whatsoever with it open. <_<

Edited by Azkyroth, 13 October 2007 - 07:06 PM.

"Tyranny is a quiet thing at first, a prim and proper lady pursing her lips and shaking her head disapprovingly, asking, well what were you doing (wearing that dress, walking home at that hour, expressing those inappropriate thoughts) anyway? It's subtle and insidious, disguised as reasonable precautions which become more and more oppressive over time, until our lives are defined by the things we must avoid. She's easy enough to agree with, after all, she's only trying to help -- and yet she's one of the most dangerous influences we face, because if she prevails, it puts the raping, robbing, axe-wielding madmen of the world in complete control. Eventually they'll barely need to wield a thing, all they'll have to do is leer menacingly and we fall all over ourselves trying to placate them." -godlizard


#12 Azkyroth

Azkyroth
  • Modder
  • 3496 posts

Posted 03 November 2007 - 11:58 PM

Also: remember to read error messages carefully, even if you think they're referring to an error you anticipated possibly occurring. Helps avoid going to excessive and futile lengths to fix an issue the compiler has with "bimoem2.dlg"

"Tyranny is a quiet thing at first, a prim and proper lady pursing her lips and shaking her head disapprovingly, asking, well what were you doing (wearing that dress, walking home at that hour, expressing those inappropriate thoughts) anyway? It's subtle and insidious, disguised as reasonable precautions which become more and more oppressive over time, until our lives are defined by the things we must avoid. She's easy enough to agree with, after all, she's only trying to help -- and yet she's one of the most dangerous influences we face, because if she prevails, it puts the raping, robbing, axe-wielding madmen of the world in complete control. Eventually they'll barely need to wield a thing, all they'll have to do is leer menacingly and we fall all over ourselves trying to placate them." -godlizard


#13 @vGur

@vGur
  • Member
  • 121 posts

Posted 09 October 2009 - 07:09 AM

ALSO, as i notice with help of Miloch and Guest (he didn't tell his name)

STARTING NAME WITH A NUMBER IS A REALLY BAD IDEA!

So 111111_ is bad , BUT _111111 is ok

Edited by @vGur, 09 October 2009 - 07:57 AM.


#14 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 09 October 2009 - 10:01 AM

STARTING NAME WITH A NUMBER IS A REALLY BAD IDEA!

I suspect it's more due to possible prefix conflicts, not because it'll cause game to malfunction.

Retired from modding.


#15 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 09 October 2009 - 10:45 AM

Well normally it might work, but in this case it might be causing issues with variable evaluation or something.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#16 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 09 October 2009 - 12:09 PM

Pardon my ignorance, but how exactly?

Retired from modding.


#17 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 10 October 2009 - 06:11 AM

Not sure - might want to look at the original post.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#18 @vGur

@vGur
  • Member
  • 121 posts

Posted 10 October 2009 - 08:38 AM

When i try to find out what is wrong i created a copy of plat01 (in dltcp) and named it 1plat01 (w/o any evaluating) SO when i created it in game (via console) i only get 1 gp (2 for 2plat01 and so on)
AGAIN, starting item name with number is really bad idea.

Edited by @vGur, 10 October 2009 - 08:40 AM.


#19 Taimon

Taimon
  • Member
  • 387 posts

Posted 11 October 2009 - 03:34 AM

From G3 / Random notes:

Two more "features":
If an item name starts with a digit, its treated as misc07 (gold). atol(name) is used as the stack amount. ("123ign" => misc07 with 123 stack amount)

You can set the stack amount with the item name. "scrl69*9" will give you 9 times scrl69.



#20 Bardess

Bardess

    the Eternal Noob

  • Modder
  • 483 posts

Posted 07 April 2010 - 02:07 AM

I remember this was useful knowledge back when I was a total noob and didn't know anything about programming:

When the compiler reports an error, but you can't figure out anything wrong with the line it pointed at, look above it.

"Farewell, Charname, and may Irenicus get you!"

Mazzy to Edwin:
"When science finally locates the center of the planes, I'm sure you'll be taken aback to find that you're not it."

- Author of lil one-day Moddie fox. -