Author Topic: NwN CMS - SP or client/server?  (Read 940 times)

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
NwN CMS - SP or client/server?
« on: October 17, 2011, 05:34:13 pm »


                <putting one more apple on the scale...>

Background (in case no one has figured out what crazy ideas I'm attempting to follow): It bugs me that most mods are ephemeral. That is, except for PWs that are nearly all custom scripted, if you play a mod, you create or import a character. You play the mod through until you are done with it <one way or another>. You save your character and it's gone.  All that luscious content is just gone. All you have is whatever growth your character made... and memories.

So we're trying to put together what is, in essence, a Content Management System for NwN that will allow mod content to persist and be available to other mods. To separate out "plot" from "environment". (For more details <don't expect too much, though> and/or participation, check out the Amethyst Tapestry group in my sig.

The question: In this age of dual (or more) cores and gigabytes of RAM, <not that *he* has either :-P> Hey! I will... RSN! <heh> Anyway, how hard is the performance/memory hit of running server and client on the same machine vs. the integrated client/server of SP mods?  A *lot* of the hoops we'll have to jump through go away if we separate the two. Including making SP & MP moot points... adventure alone one day, with a friend the next. :-/

<...opposite the oranges>
               
               

               
            

Legacy_Bannor Bloodfist

  • Hero Member
  • *****
  • Posts: 1578
  • Karma: +0/-0
NwN CMS - SP or client/server?
« Reply #1 on: October 22, 2011, 03:26:23 am »


               It is doable, most especially for SP styled mods where you don't have to worry too much about multiple players etc...

The issue is going to be two fold.

1) Getting ANYONE to bother loading a server, setting that up, and then loading the client to choose an essentially SP mod.
2) Mods require access to the data.. so any mod made to work with this, would have to be modified to find the respective DB's.
3) A possible third issue relates to the type of DB you are planning on using.  If you go SQL (Most effective form) you also have to convince the player to load SQL to access the data...  If you go with Bioware's default DB, thus not requiring a 3rd party plugin to create/modify the DB, you are somewhat limited in the data types and access to the data.  I am not a DB programmer, I just remember having to run SQL on the Server side to allow access to data types that NWN does not support and to have more power in the script calls to access that data.

Seriously, I hate to say it, but I don't really believe there is that much of a call for it.  Trying to explain how to import a .erf of the necessary scripts and how to attach those scripts to the necessary db calling locations (like when you exit a store to save the new items or lost items) etc, is not very likely to happen.  Too much work, for way too little gain.
               
               

               
            

Legacy_Nob

  • Newbie
  • *
  • Posts: 13
  • Karma: +0/-0
NwN CMS - SP or client/server?
« Reply #2 on: October 22, 2011, 12:41:50 pm »


               The most likely way you'd be able to get people to do something like this is with an easy to use virtual box setup like NWNIAB.

Even then I dunno if it'd be all that useful.

I'm not even quite sure what you're after even after reading your description.

I guess hypothetically you could combine something like a use of nwnx resman and some other plugin (areas for example) to allow for continual content addition to an existing module that a player can keep running via a virtualbox.

On the other hand, I'm not really sure what the advantage of such a thing would be.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
NwN CMS - SP or client/server?
« Reply #3 on: October 22, 2011, 01:28:02 pm »


               

Rolo Kipp wrote...

The question: In this age of dual (or more) cores and gigabytes of RAM, <not that *he* has either :-P> Hey! I will... RSN! <heh> Anyway, how hard is the performance/memory hit of running server and client on the same machine vs. the integrated client/server of SP mods?  A *lot* of the hoops we'll have to jump through go away if we separate the two. Including making SP & MP moot points... adventure alone one day, with a friend the next. :-/

Not hard at all. Actually if you start LAN game its ran as a server already.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
NwN CMS - SP or client/server?
« Reply #4 on: October 22, 2011, 07:00:34 pm »


               <collecting his notes...>

Thank you, all.

@Bannor: I'm probably just a crazy old fool.  We'll see :-) My old, VLTA model was to develop a system whereby servers and mods would communicate and be inter-connectable without a great deal of work on the player's part. It would not matter if the mods were SP, MP or PW. In fact, the Gemworld system was going to be based around a PW called the Nexus that was very like what I've heard about the City of Doors. From there, a player could wander through portals to any of the open Gemworlds.  The Gemworlds themselves would have persistent mods and event mods (DM'ed or instanced), but, to the player, it would only be a question of getting to the right place and time.  

I am the only Gemworld left, though I believe Lukahn's Obsidian is still gaming faithfully via other means. But, for my faithful, if I can develop this system, they will be able to adventure offline/SP, Online/MP with small parties or online/persistent areas with all other players. And they can mix and match.

That's my goal, anyway.  Been my goal since I wrote the script for The Bard's Tale Construction Set in '87 (never credited >:-( *Not* a fan of EA).

Currently, I am leaning toward MySQL, but I'm playing with NwDBe for now.

@Nob: I'm gonna look into NwNIAB, haven't heard of it.

@Shadow: Succinct and clear :-) <redundant, old man> And an answer I like as well =) TY

<...and maybe a few other's>
               
               

               
            

Legacy_wyldhunt1

  • Sr. Member
  • ****
  • Posts: 443
  • Karma: +0/-0
NwN CMS - SP or client/server?
« Reply #5 on: October 25, 2011, 12:32:54 am »


               It sounds like you want to re-create what CoPaP did, except expand it to include single player (CoPaP was multi-player only).
Here's the thing about the thing...
In order for it to have any chance of success, you need a few things.

Thing1: Every module must use the same haks or risk crashing players when they jump to new worlds. Even if the player has all of the haks for both worlds, they run the risk of corrupt bics from line changes. Suddenly they have items equipped in the wrong slots and items stacked that shouldn't be stackable because they're suddenly using a different 2da. Thus: All Gemworlds must agree upon and use the same haks. Scripting for those haks can safely change. So, spell effects and such can be modified per worlds taste.

Thing2: There must be a universal way of transfering information between worlds. All worlds must use the same basic technique to ensure compatibility. Note that this does not require a database. In fact, with multi-player worlds, the databases are generally in different parts of the world and have no way of communicating with other linked worlds databases... Thus, you must kludge.

If you hope to store all of the history and flavor from past experiences in a database, all players would need to install a database and NWNX in order to use any single player Gemworld.

While PW's often require databases in order to maintain the huge amounts of information required for such an undertaking, you would only need the information specific to a single character. In fact, not even all of that info. Just the stuff that would be interesting to use in future mods.

I'll throw this tid-bit of wisdom out for consideration:
   Variables saved to items are saved in the bic file. Those variables will still be there the next time the character is loaded. Even in a single player game.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
NwN CMS - SP or client/server?
« Reply #6 on: October 25, 2011, 03:23:42 pm »


               <looking enormously pleased...>

wyldhunt1 wrote...
It sounds like you want to re-create what CoPaP did, except expand it to include single player (CoPaP was multi-player only).

What an intriguing and exciting post :-) <a link would have saved a few minutes searching, old man> Don't be churlish, bird.

I do indeed wish to do something very similar to what (as I understand it from the wiki) the CoPaP did. (Happy, Bother? <seldom> Sheesh). In fact, during NwN alpha, when the Gemworlds were organized, we had a sourceforge group whose purpose was (generally) to beta-test the blazes out of NwScript and (specifically) to set up the script standards for inter-server integration.

To find that someone has indeed gone in that direction thrills me :-) I *hate* re-inventing the wheel.

But that is part of the purpose of this thread, to find out what approaches have been made, and what limitations revealed and, in general, to tap into the collective wisdom of the community.

Re: single player, I want to make it *immaterial* if you play SP or MP. (hence the other thread about digital signatures, btw).

Where *I* am coming from, specifically, is the very selfish PoV of wanting to play in my own world with, now and then, some friends along for the ride. Often, that will be offline. Sometimes it will be online. And, if Amethyst(NwN) is anywhere near as popular as Amethyst(PnP), I'll want a PW core someday.  They all need to mesh.

Here's the thing about the thing...
In order for it to have any chance of success, you need a few things.

Thing1: Every module must use the same haks or risk crashing players when they jump to new worlds.
...Thus: All Gemworlds must agree upon and use the same haks. Scripting for those haks can safely change. So, spell effects and such can be modified per worlds taste.

I *think* appearances can also be inconsistent between servers, though not between mods. As an example, I *believe* my Forester mod could use (a reserved number) the Gaian Avatar, without requiring other servers to have that appearance.

Thing2: There must be a universal way of transfering information between worlds.
... Thus, you must kludge.

Yup.  That isn't really a stumbling block, at this point.  The real stumbling block I'm having is multiple mod access to the same db.  It'll be fine in if only one mod at a time is running, but if multiple server instances are running, as I understand it, the first mod locks the db until the mod exits. So running a regional mod with another, linked mod (sub-region or external region) means they can not share the db.  Don't know how the NwNx works with MySQL, but I'm hoping it doesn't bogart the db.

If you hope to store all of the history and flavor from past experiences in a database, all players would need to install a database and NWNX in order to use any single player Gemworld.

On the face of it, yes. In practice, it depends a lot on the architecture of the framework we put together.  Generally, I'd want to only communicate deltas, but they'd need to start with a baseline. OTOH, designing it to fail gracefully if the full and complete db is not available, use the small, bare-essentials included Bioware db, or do without. Likewise, if server is unavailable, drop to Sp mode (not the NwN integrated server-client, but a local server instance with limited resources).

Actually, that is pretty much the OT for this thread :-) Whether it was viable to spawn a local server rather than default to NwN SP. Shadow's answer was what I was looking for there. though, I'd be interested in other views, of course ;-)

While PW's often require databases in order to maintain the huge amounts of information required for such an undertaking, you would only need the information specific to a single character. In fact, not even all of that info. Just the stuff that would be interesting to use in future mods.

Yup. Big fan of exchanging deltas instead of complete re-iterations :-)

I'll throw this tid-bit of wisdom out for consideration:
   Variables saved to items are saved in the bic file. Those variables will still be there the next time the character is loaded. Even in a single player game.


Yup.  Now, if I could only save objects and structures... or pass through henchmen carrying objects... <sigh>

<...with the world>