Author Topic: Adding NPCs to areas  (Read 2416 times)

Offline Fyorl

  • Planewalker
  • *****
  • Posts: 28
Adding NPCs to areas
« on: May 19, 2006, 07:10:58 AM »
I've been following <a href="forums.pocketplane.net/index.php?topic=52.0">this</a> tutorial on how to create a basic NPC and I've got the dialogues and stuff working but I can't get the NPC to appear in that area. This is the ar1000.baf code that I'm using:

Code: [Select]
IF
Global("J#VondoExists","AR1000",0)
THEN
RESPONSE #100
SetGlobal("J#VondoExists","AR1000",1)
CreateCreature("J#Vondo",[2527.209],3)
END

But when I compile the mod and go to ar1000 in the game, there's no NPC at that point. I'm new to this so I just wondered what I was doing wrong.

Offline Kismet

  • Devil's Minion #5
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 653
  • Gender: Female
  • Veni; Vidi; Velcro.
    • Pocket Plane Group
Re: Adding NPCs to areas
« Reply #1 on: May 19, 2006, 07:17:01 AM »
Check and make sure that you can actually reach that point or that it's a valid point for that particular map.
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Adding NPCs to areas
« Reply #2 on: May 19, 2006, 07:17:52 AM »
Did you copy the creature file to the override?
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Fyorl

  • Planewalker
  • *****
  • Posts: 28
Re: Adding NPCs to areas
« Reply #3 on: May 19, 2006, 07:22:25 AM »
Did you copy the creature file to the override?

The TP2 file did that and I can create the NPC in-gme using the CLUAConsole

Check and make sure that you can actually reach that point or that it's a valid point for that particular map.

I went to the area and Ctrl-Xed a valid spot and put them in.

Offline Kismet

  • Devil's Minion #5
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 653
  • Gender: Female
  • Veni; Vidi; Velcro.
    • Pocket Plane Group
Re: Adding NPCs to areas
« Reply #4 on: May 19, 2006, 07:23:58 AM »
Are you using a saved game where you've already visited AR1000?  If so, start a new game or use a save game where you haven't already visited the area.
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Adding NPCs to areas
« Reply #5 on: May 19, 2006, 07:24:59 AM »
Are you using a saved game where you've already visited AR1000?  If so, start a new game or use a save game where you haven't already visited the area.
Uh, he's appending by script, so that shouldn't matter...
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Fyorl

  • Planewalker
  • *****
  • Posts: 28
Re: Adding NPCs to areas
« Reply #6 on: May 19, 2006, 07:28:05 AM »
Could it be that lowercase thingo? Maybe it can't find AR1000.bcs so creates a new one and puts it in the override?

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Adding NPCs to areas
« Reply #7 on: May 19, 2006, 07:31:41 AM »
Um, I read in a couple of places that Wine makes bgmain.exe case-insensitive. Did you run tolower.sh in your game directory? I've had reports that if you turn everything lowercase then weidu installation should work.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Fyorl

  • Planewalker
  • *****
  • Posts: 28
Re: Adding NPCs to areas
« Reply #8 on: May 19, 2006, 07:35:17 AM »
I ran it in the data directory but not the main one and just changed the files that WeiDu was giving errors on to lowercase in the main directory (like dialog.tlk)...

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Adding NPCs to areas
« Reply #9 on: May 19, 2006, 07:40:26 AM »
Try running it in the main directory, that should help (IE, in case there's an ar1000.are with a different spelling in the override). before doing so, be sure to rm -r your override directory and restore from a backup - if you don't have it, get either SoAbackup.rar or ToBbackup.rar from http://mirror.spellholdstudios.net/bigg/ for a clean backup of override (and other files).
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Fyorl

  • Planewalker
  • *****
  • Posts: 28
Re: Adding NPCs to areas
« Reply #10 on: May 19, 2006, 07:58:35 AM »
heh, I ran it and found out that it doesn't account for spaces in file or directory names  ::) I'll try and fix it but I don't know much about bash

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Adding NPCs to areas
« Reply #11 on: May 19, 2006, 08:04:40 AM »
Don't worry about it for now, I'll rewrite it in Ocaml, together with the lowercase_chitin stuff  :)
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline Fyorl

  • Planewalker
  • *****
  • Posts: 28
Re: Adding NPCs to areas
« Reply #12 on: May 19, 2006, 08:53:50 AM »
Thank ^_^

Offline horred the plague

  • Planewalker
  • *****
  • Posts: 41
Re: Adding NPCs to areas
« Reply #13 on: May 19, 2006, 09:19:38 PM »
IE itself is not case-sensitive on filenames (though certain editors are). If it were, every file saved by DLTCEP would potentially be invalid (they aren't). Even global names w/in scripts are not case sensitive.

Sometimes the coordinates you click on with ctrl-x are a "few nodes off" from in-game. I went through a bitch of a time getting Jaheira and Minsc to stay in their cells (at Jonny's Dungeon), back in the days of BP-BGT--because what would appear valid when in-game (when I clicked ctrl+x) would not appear in the "exact same place" next game (off by a hair, enough to show up when small prison cells were involved). Mouse-pointer inaccuracy, undoubtedly.

Make doubly sure your coordinates are't any where near a tree, a cliff, a big rock, a lake, and so on (something with a defined search region). This might not be your problem, but I've added hundreds of CRE's the exact same way you have, w/o this issue.

Offline devSin

  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Adding NPCs to areas
« Reply #14 on: May 19, 2006, 09:59:58 PM »
The poster is using Linux (case-sensitive fs). I would honestly toss pride out the window and use Windows. Trying to fight WeiDU and BG on Linux just doesn't seem at all worthwhile.

Avenger comes to say, "Liar! It's best ever!" ;-)

Offline Fyorl

  • Planewalker
  • *****
  • Posts: 28
Re: Adding NPCs to areas
« Reply #15 on: May 20, 2006, 05:44:40 AM »
Yup I've noticed that IE isn't case-sensitive after I made all the files in the BG2 directory lowercase and BG2 ran fine.

Also, BG2 works fine under Linux as does WeiDU (the windows version also runs fine under cedega but I prefer the Linux version for obvious reasons). The only problem being that I can't seem to add NPCs to areas for whatever reason. When the chitin.key lowercase thingo's done, I'll try manually recompiling the area script in NearInfinity and seeing if it makes a difference, otherwise it's probably me making the NPC incorrectly or something.

(oh, and if you check the co-ordinates I've used in the Government district, you'll see it's in a big open space so I doubt the mouse-inaccuracy  would make much difference :P)

Using Linux isn't a matter of pride, it's a matter of preference. Funnily enough, running BG2 on my dad's Windows PC has crashed more often than it has on my Linux laptop.

 

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)?: