Jump to content


Photo

Ace's very long NPC creation guide


59 replies to this topic

#1 theacefes

theacefes

    XTREME METAL ROCKER PUNK CHICK WITH ULTRA SURFBOARD

  • Gibberling Poobah
  • 2706 posts
  • Gender:Female
  • Location:Irvine, CA, USA

Posted 28 May 2008 - 09:54 AM

UPDATE: I've moved this guide to my new site page. The code is slightly updated and it's a bit easier to read with more step by step instructions than probably necessary. I'll keep the older one up in case people like that better.

Hello again!

I'm sure many of you have seen my NPC tutorial for how to get an NPC in the game and give it basic dialogue. A while back, I put together a longer and more detailed version of an NPC guide that goes through a bit more on how to make your NPC XTREME and working correctly.

This guide can be found in the Wiki, but I figured it might be easier viewed here. I've tested everything in the guide, so I know it works, but I don't dare claim that everything you could ever want to know is in here. Awhile ago, I invited anyone who was interested to update the file in the Wiki to however they like, so that eventually we might have something easy for the very beginner to follow. Now, no one has done such a thing yet, for many reasons including time restrictions, not really caring to do so, etc. So this leads me to a simple conclusion, should anyone with coding knowledge find something wrong or something that needs to be added in the tutorial:

Don't complain about it. Fix it! :) It will be our little..."community project" har har (that was a good one :D )

Okay, seriously, here it is. It's got basic creation, banter, interjections, PIDs, flirts, basic (BASIC!!) scripting, music, sounds, portraits, and some other stuff that I can't remember without looking at it again.

Ace's NPC Creation Guide

Ace's slightly updated NPC Creation Guide (a little easier to follow)


UPDATE: New link, fixed some typos that would have caused errors upon installation.

Edited by theacefes, 19 March 2011 - 09:08 PM.

-Ace

My Music Reels (mod-related and others)

----

DO ~SetGlobal("omgBbqRomanceActive","GLOBAL", 2)~

#2 Shaitan

Shaitan

    Bad bad nurse.

  • Members
  • 1549 posts
  • Gender:Male
  • Location:Copenhagen, Denmark

Posted 28 May 2008 - 10:38 AM

I love you
"You're dumb as a mule and twice as ugly. If a strange man offers you a ride I say take It"
-Grandpa Simpson

#3 Western Paladin

Western Paladin

    Time of Troubles theorist

  • Members
  • 249 posts
  • Gender:Male
  • Location:West of the Unapproachable East

Posted 28 May 2008 - 05:22 PM

Cool! I haven't read the whole thing yet, but the layout is easy to read and it looks very thorough. :)
"Is such a thing even possible?"

#4 theacefes

theacefes

    XTREME METAL ROCKER PUNK CHICK WITH ULTRA SURFBOARD

  • Gibberling Poobah
  • 2706 posts
  • Gender:Female
  • Location:Irvine, CA, USA

Posted 28 May 2008 - 06:00 PM

I love you


rotfl!

Just think of it as my subtle way of saying "I want new material for NPCs!" to everyone.

Cool! I haven't read the whole thing yet, but the layout is easy to read and it looks very thorough. smile.gif


I hope it is. I would like it to be improved on, because I know that there is always room for improvements. :)
-Ace

My Music Reels (mod-related and others)

----

DO ~SetGlobal("omgBbqRomanceActive","GLOBAL", 2)~

#5 Sir_Carnifex

Sir_Carnifex
  • Members
  • 30 posts

Posted 02 June 2008 - 10:47 PM

Glad to see the guide back up. It's very useful for (ahem) simpletons like me who can't figure out anything for themselves. At least I am getting much better at detecting typos now. :cool:

One thing I want to mention...

It says in there that WeiDu tends to indicate that the error is about 5 lines below where it actually is. In my case, WeiDu usually says that the error is about 5 lines above where it actually is (varies some, but generally works this way). Perhaps this depends on the text editor used?

#6 Miloch

Miloch

    Barbarian

  • Modders
  • 4715 posts
  • Gender:Male
  • Location:At Large

Posted 03 June 2008 - 12:07 AM

In my case, WeiDu usually says that the error is about 5 lines above where it actually is (varies some, but generally works this way). Perhaps this depends on the text editor used?

Yeah, it can; you can turn off line wrapping to get the true line count. Though WeiDU does lie sometimes. I just spent about 5 minutes looking for a bug in a line WeiDU kept returning that was fine - the actual error was 5 lines back.
Mod Contributions
Aurora (new release!) * BG1 NPC * Gnomes * Haiass * Level 1 NPCs * Lost Items * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * In Progress: Adjusted Portraits * DSotSC (Tutu)
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * PSPad Highlighters * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Wherefore do ye toil; is it not that ye may live and be happy? And if ye toil only that ye may toil more,
when shall happiness find you?" -H.P. Lovecraft, The Quest of Iranon

#7 theacefes

theacefes

    XTREME METAL ROCKER PUNK CHICK WITH ULTRA SURFBOARD

  • Gibberling Poobah
  • 2706 posts
  • Gender:Female
  • Location:Irvine, CA, USA

Posted 03 June 2008 - 10:42 PM

It says in there that WeiDu tends to indicate that the error is about 5 lines below where it actually is


Actually it says this:

Normally, you’ll get what’s called a syntax error, which means that there is something typed wrong in the code. WeiDU will also give you a line number and some text that the error is near. Typically, the actual error is about 5 lines above from where the error is said to be. If you find the error, fix it, save the file, and reinstall.


-Ace

My Music Reels (mod-related and others)

----

DO ~SetGlobal("omgBbqRomanceActive","GLOBAL", 2)~

#8 Sir_Carnifex

Sir_Carnifex
  • Members
  • 30 posts

Posted 04 June 2008 - 10:44 AM

Read my post again and you'll see I did say the same thing, but in a different way. :cool:

#9 muffin-tacos

muffin-tacos
  • Members
  • 117 posts
  • Location:Sweden, a country without polar bears :P

Posted 04 June 2008 - 10:50 AM

I just thought I should say that I found this guide extremely helpful when I was making my own private NPC. So thanks very much for writing it! :cool:
For some really exciting stories and a warm and fuzzy forum visit Wayward Ink!

#10 theacefes

theacefes

    XTREME METAL ROCKER PUNK CHICK WITH ULTRA SURFBOARD

  • Gibberling Poobah
  • 2706 posts
  • Gender:Female
  • Location:Irvine, CA, USA

Posted 04 June 2008 - 11:51 AM

Read my post again and you'll see I did say the same thing, but in a different way. ;)


I'm still confused (call me stupid, but sometimes I need n00b explaining on "simple" things). I was just quoting directly from the tutorial that you stated supposedly said something else, actual word wise.

@ muffin tacos

No problem :cool:
-Ace

My Music Reels (mod-related and others)

----

DO ~SetGlobal("omgBbqRomanceActive","GLOBAL", 2)~

#11 Sir_Carnifex

Sir_Carnifex
  • Members
  • 30 posts

Posted 04 June 2008 - 02:58 PM

It's all a matter of how it was worded. Take a look at this figure:
~ blah blah blah  // error is here.
=
~ blah blah blah ~
==
~ blah blah blah ~
EXIT   // WieDu says the error is here.
Now, if you take my quote...

It says in there that WeiDu tends to indicate that the error is about 5 lines below where it actually is

...and look at the figure, you'll see that WeiDu is placing the error five lines BELOW where it is. Ok, so that's correct. Now, look at your quote...

Typically, the actual error is about 5 lines above from where the error is said to be.

...Compare it to the figure. You'll notice it works out the same. The difference is that I'm using a different subject. Therefore, I had to switch around the wording for it to mean the same thing. Yeah, I know...confusing...but I didn't feel like going back to read the tutorial again so I decided to paraphrase instead. :cool:

Of course, the whole point is that it would appear that different text editors will result in WeiDu pointing you in one direction or another.

#12 Fyorl

Fyorl

    Script Kiddie

  • Members
  • 216 posts
  • Location:Possibly nearby

Posted 04 June 2008 - 04:07 PM

Perhaps it has something to do with line-endings?

#13 theacefes

theacefes

    XTREME METAL ROCKER PUNK CHICK WITH ULTRA SURFBOARD

  • Gibberling Poobah
  • 2706 posts
  • Gender:Female
  • Location:Irvine, CA, USA

Posted 04 June 2008 - 09:37 PM

Ah, ok. I get you now.

I was confused because I saw what you had quoted was actually inaccurate word for word, not the concept. I see what you are saying, but the actual tutorial said what I had quoted.

But yeah anyway, go ahead and use this thread for contributions, too! :cool:

Edited by theacefes, 04 June 2008 - 09:38 PM.

-Ace

My Music Reels (mod-related and others)

----

DO ~SetGlobal("omgBbqRomanceActive","GLOBAL", 2)~

#14 zixi

zixi
  • Members
  • 38 posts

Posted 12 September 2008 - 02:49 PM

Just a quick thank you for the guide. I've just got my first NPC into the game and I have to say I haven't had this much fun since I got my first LISP program to run... (or perhaps that ought to be stumble). It's a great guide... I think it will be some time before game makers hammer on my door demanding I work for them but your guide is great and I'm amused by my success so far! I haven't programmed in years - I just tell other people to write code (and fast!!) but the Guide is virtually idiot proof - or at least this idiot managed fine...:laugh:

I even had a bug to start with and I've really forgotten how much joy one feels when one finally fixes it... thank you for reminding me!

#15 Vigdis

Vigdis
  • Members
  • 27 posts
  • Gender:Female
  • Location:Dirty Old Town And It Is Not Salford

Posted 29 November 2008 - 08:39 AM

Wohooo! Great great great. A miracle, ya be. Thankies! *is off to read the guide*
"Happy Christmas your arse, I pray God it's our last"
Shane McGowan



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users