learn nwn1 script vs. waiting for nwn2

Moderator: Event DM

Post Reply
User avatar
Crimzonfist
Prince of Bloated Discourse
Posts: 199
Joined: Thu Aug 25, 2005 7:44 am
Location: Michigan

learn nwn1 script vs. waiting for nwn2

Post by Crimzonfist » Mon Jun 12, 2006 8:14 pm

ok ive got programing exp. though i haven't touched a programing language in about 10 years, i see no reason why we can't nest multiple p-merchant scripts onto 1 npc. so that we can organize our goods without the need to have multiple p-merchants to do it, and thus reduce lag(or at least if im not mistaken it should). Im thinking with the script that allows you to do things based on what is said and an if then loop or something to that effect.

Now what i want to know is 1 has this already been tried and determined that i can't be done or shouldn't for some reason and 2 is it worth my time to learn nwn1 scripting when nwn2 is right around the corner.

will nwn2 scripting be similar to nwn1 and so make learning it easier.

thanx for any advice and/or insite that can be given on this.

also if its simply more feasible to use multiple p-merchants and less server intensive that way i would also like to no that :)
Member - Ivory Order of the Sun
Journeyman of the AKN

"True integrity is doing the right thing, even when no ones watching."
User avatar
Silk
Co-Founder
Posts: 6662
Joined: Fri Sep 14, 2001 6:47 pm
Contact:

Post by Silk » Mon Jun 12, 2006 8:19 pm

maybe
User avatar
Crimzonfist
Prince of Bloated Discourse
Posts: 199
Joined: Thu Aug 25, 2005 7:44 am
Location: Michigan

Post by Crimzonfist » Mon Jun 12, 2006 8:28 pm

Silk wrote:
maybe
maybe to which part? that it will reduce lag, that its even possible, that nwn2 scripting will be similar enough to make it worth my time to learn a dieing script?
Member - Ivory Order of the Sun
Journeyman of the AKN

"True integrity is doing the right thing, even when no ones watching."
downsystem
Apprentice Scholar
Posts: 856
Joined: Wed Dec 29, 2004 1:16 pm
Timezone: -5
Location: Mt. Pleasant, Michigan
Contact:

Post by downsystem » Mon Jun 12, 2006 8:32 pm

Hey bro read this thread and watch the link. Plasma john says something about how the scripting works.

PlasmaJohn
Avlis - Systems Coder, NWNX Programmer


Joined: 26 Dec 2003
Posts: 5806
Location: The Garage

PostPosted: Wed May 17, 2006 2:04 pm Post subject: Reply with quote
Tangleroot wrote:
The guy also said something about 'variables' that should make for better scripting, but being a non-programmer in a horribly noisy booth, I couldn't really make out his exact meaning.

Script parameterization will help significantly cut down the number of scripts needed. The biggest win will be dialogs with conditions and actions. A complicated dialog like the crafting menus and p-merchants cost us about 100 scripts each, the vast majority of which are a single line, CallFunctionZ(1), CallFunctionZ(2), ... Our 100 scripts would drop to something more reasonable like 10 or less even.

It's a great feature, it just makes bad ad copy Very Happy

http://www.avlis.org/viewtopic.php?t=78482&highlight=
User avatar
Silk
Co-Founder
Posts: 6662
Joined: Fri Sep 14, 2001 6:47 pm
Contact:

Post by Silk » Mon Jun 12, 2006 8:33 pm

Crimzonfist wrote:Silk wrote:
maybe
maybe to which part? that it will reduce lag, that its even possible, that nwn2 scripting will be similar enough to make it worth my time to learn a dieing script?
yes
Silk

Member of the MadK@t lover's group.
User avatar
Crimzonfist
Prince of Bloated Discourse
Posts: 199
Joined: Thu Aug 25, 2005 7:44 am
Location: Michigan

Post by Crimzonfist » Mon Jun 12, 2006 9:05 pm

after watching the video downsystem pointed me to, it sounds like id be better served to wait for the nwn2 toolset to come out and learn that. thanks again for the help
Member - Ivory Order of the Sun
Journeyman of the AKN

"True integrity is doing the right thing, even when no ones watching."
dougnoel
Team Member; Retired with Honors
Posts: 6261
Joined: Fri May 14, 2004 4:59 pm
Location: VA (GMT -4)
Contact:

Re: learn nwn1 script vs. waiting for nwn2

Post by dougnoel » Mon Jun 12, 2006 10:14 pm

Crimzonfist wrote:ok ive got programing exp. though i haven't touched a programing language in about 10 years, i see no reason why we can't nest multiple p-merchant scripts onto 1 npc. so that we can organize our goods without the need to have multiple p-merchants to do it, and thus reduce lag(or at least if im not mistaken it should). Im thinking with the script that allows you to do things based on what is said and an if then loop or something to that effect.
Why would that reduce lag? Not saying it won't, I'm just not sure where you think the lag reduction comes in.
Crimzonfist wrote:Now what i want to know is 1 has this already been tried and determined that i can't be done or shouldn't for some reason
Dunno. However, only subs and Team members can make code changes.
Crimzonfist wrote:and 2 is it worth my time to learn nwn1 scripting when nwn2 is right around the corner.
If you are interested ing NWN 2 scripting, then yes. Obsidian has said that most scripts will be portable between NWN and NWN 2. So learning now will be useful. However, NWN2 will be using C#, so learning C# might also help.

As for waiting. . . NWN 2 is still 3-4 months off. Your choice.
Crimzonfist wrote:will nwn2 scripting be similar to nwn1 and so make learning it easier.
Yes.
Crimzonfist wrote:also if its simply more feasible to use multiple p-merchants and less server intensive that way i would also like to no that :)
Again, I'm not sure where the CPU-saving comes in. Number of NPCs on the map?
dougnoel
Team Member; Retired with Honors
Posts: 6261
Joined: Fri May 14, 2004 4:59 pm
Location: VA (GMT -4)
Contact:

Post by dougnoel » Mon Jun 12, 2006 10:16 pm

P.S.

This is the second NWN-related thread of yours I have moved from Avlis General Discussion. This is the appropriate forum for NWN questions. Unless you have a scripting specific question, in which case head over to the scripting forum.

Doug :)
User avatar
Krator
Elder Sage
Posts: 4935
Joined: Thu Jun 10, 2004 6:44 pm
Timezone: GMT
Location: Amsterdam

Post by Krator » Mon Jun 12, 2006 10:17 pm

Increased conversation and script size will make up for the NPC. Maybe more lag, as it'll mean more PCs closer to each other.
User avatar
Crimzonfist
Prince of Bloated Discourse
Posts: 199
Joined: Thu Aug 25, 2005 7:44 am
Location: Michigan

Post by Crimzonfist » Tue Jun 13, 2006 4:46 am

Dougnel wrote:
This is the second NWN-related thread of yours I have moved from Avlis General Discussion. This is the appropriate forum for NWN questions
ah thanx for letting me know i didn't realize. wont happen again :)
Member - Ivory Order of the Sun
Journeyman of the AKN

"True integrity is doing the right thing, even when no ones watching."
User avatar
Crimzonfist
Prince of Bloated Discourse
Posts: 199
Joined: Thu Aug 25, 2005 7:44 am
Location: Michigan

Post by Crimzonfist » Tue Jun 13, 2006 4:52 am

Crimzonfist wrote:
so that we can organize our goods without the need to have multiple p-merchants to do it, and thus reduce lag(or at least if im not mistaken it should)
Dougnel wrote:
Why would that reduce lag? Not saying it won't, I'm just not sure where you think the lag reduction comes in.
after watching a few a the nwn2 clips i was pointed at and some of the threads i was pointed at im betting combining multiple p-merchants scripts onto one pc wouldn't reduce lag. id heard that having alot of npc's in a mod increases lag but i didn't realize till just recently how much lag scripts create.

but maybe ill try to figure out how to do it anyway, just to see if i can :)
Member - Ivory Order of the Sun
Journeyman of the AKN

"True integrity is doing the right thing, even when no ones watching."
dougnoel
Team Member; Retired with Honors
Posts: 6261
Joined: Fri May 14, 2004 4:59 pm
Location: VA (GMT -4)
Contact:

Post by dougnoel » Tue Jun 13, 2006 1:21 pm

Crimzonfist wrote:but maybe ill try to figure out how to do it anyway, just to see if i can :)
That's the spirit!

If you are interested in some easy learning projects, you can PM IceThorn about spellhooking. We can always use subs to help us get spells hooked. It's basically taking code from Bioware's scripts and importing them into our spellhooking script to make them work with some of our systems like scribing and elemental substitution.
User avatar
CPU
Team Member; Retired with Honors
Posts: 5161
Joined: Sat Apr 05, 2003 4:27 pm
Location: NY. USA (-4GMT)

Post by CPU » Tue Jun 13, 2006 1:21 pm

Having multiple p-merchants on one NPC is not allowed in Player Housing and currently there is no method for pricing or dealing with them. The scripting does not exist. Since the p-merchant scripting replies on NPC tags, and one NPC p-merchant has only one tag, I can't imagine the database would like this and it might mess up database entries for the goods stored on the various merchants that all share the same tag. Same with the appraisal table - tag dependant, and matches to the NPC. However, I'm not a coder, your results may vary. It might not be that difficult to work around.

Needless to say, if this sort of system was ever implimeted into Avlis (custom scripts are not allowed in Player Housing - and a player rewrite of a major system in Avlis will not be allowed for a Housing request) you would still have to pay for as many p-merchants as you place on the one NPC. If, for example you have one NPC with 3 seperate p-merchant codes on him, you would not get charged 150,000 gold, you'd need to pay 450,000 gold, because you are still getting 3 seperate merchants with 3x the base amount of storage for use. The fact that it is incorporated into one NPC is moot. At least that would be how I would see it if this existed. But then, pricing a new system like that would also probably need to go for a Team discussion.
Avlis Housing Director
PM: Avlis Player Housing
Player Housing Information - This answers most questions people have. Please read this before asking.
User avatar
PlasmaJohn
CCC / Release Admin
CCC / Release Admin
Posts: 9010
Joined: Fri Dec 26, 2003 10:37 pm
Timezone: US/Eastern
Location: Negaria
Contact:

Post by PlasmaJohn » Tue Jun 13, 2006 3:52 pm

The current p-merch code only supports one store per NPC. If you want multiple stores, you need multiple NPC's.

Now, to deal with your assumptions...

An NPC's major contribution to lag is a function of their pathfinding. If there are a lot of NPC's wandering about, they have to navigate around each other. P-merchant NPCs don't wander (well, ok, shouldn't wander), so they aren't pathfinding.

Still, you have to be carefull about over-optimizations. There's a reason that my PC's store has three P-merchants: If you drop all your stores into one NPC, then you can only service one PC at a time. That's a limitation of Bioware's conversations.
Calvin: This is so cool!
Hobbes: This is so stupid.
User avatar
Crimzonfist
Prince of Bloated Discourse
Posts: 199
Joined: Thu Aug 25, 2005 7:44 am
Location: Michigan

Post by Crimzonfist » Tue Jun 13, 2006 5:13 pm

CPU wrote:
you would still have to pay for as many p-merchants as you place on the one NPC
I assumed this. Just thought it would be interesting to see if i could figure it out, wether or not avlis decided to use it, but maybe not. After what ive read *points up* this is far from a serious thing now.


PlasmaJohn wrote:
Still, you have to be carefull about over-optimizations. There's a reason that my PC's store has three P-merchants: If you drop all your stores into one NPC, then you can only service one PC at a time
That part i didn't realize. But it still seems like a good idea to be able to group items by type for ease of use whether its on one merchant or multiple merchants.

but keep in mind this is just my opinion. :wink:

P.S. It was just a just a what if kind of idea at first. at this point though i think ive been turned away from it and thus learning the code so no worries
Member - Ivory Order of the Sun
Journeyman of the AKN

"True integrity is doing the right thing, even when no ones watching."
Post Reply