Author Topic: Writing a Persistent World  (Read 413 times)

Legacy_Tiggers.no.tail

  • Jr. Member
  • **
  • Posts: 82
  • Karma: +0/-0
Writing a Persistent World
« on: August 16, 2011, 10:26:27 pm »


                So I was just wondering how different programming a PW would be from a normal module. Are there any tutorials available over viewing the process? I know there are some available on the Vault for download, but I wanted to hear input from the people of this forum.
               
               

               
            

Legacy_Knight_Shield

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +0/-0
Writing a Persistent World
« Reply #1 on: August 17, 2011, 12:10:47 am »


               I m not sure what answer your looking for .I have only worked on a PW for 2 years now.

I would think a module would be a single player game which one would play offline and not need the persistance the PW needs.The module you can quicksave your proggress where as a PW would need scripts to be put in place to control the time advance ,save items on character incase server crashes players dont loose their dragon slippers they just found.Also journals would need to be scripted to stay persistent.So I guess only thing I can add is the mod/PW builder if building PW would have to plan on scripting it to stay persistent.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Writing a Persistent World
« Reply #2 on: August 17, 2011, 12:22:46 am »


               There are two main relevant differences. First is persistence, as Knight_Shield noted. The second is that there is more than one PC, which can complicate all sorts of things. Have a banking system? You need a way to guarantee that other PCs don't walk up and take the user's items. Want to prevent high vs low level cheese? You have to code your spells to level cap buffs based on the recipient. Have more than one instance running? You'll need a way to make sure players don't log into two instances simultaneously and du#pe their items. And so on, and so forth. The question you're asking is far too broad to answer in less than a chapter. The short answer is that you'll learn by doing.

Funky
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Writing a Persistent World
« Reply #3 on: August 18, 2011, 04:21:59 pm »


               There are quite a few bugs & exploits you should work on, or download a fix to, for Multi-Player, furthermore everything has to respawn, unlike a single player module, where if a PC kills something it's usually as good as dead, where in multi-player everything magically comes back to life.

Naturally you want to work on focusing on entertaining a large crowd, all too often single player modules are too focused on a specific type of player, or follow a theme, in Multi-Player, you should bring your best work, test & test some more, because a party of 5 players are going to bowl over most normal monsters, so naturally you should make higher quality monsters, not just put in some generic NWN Mobs, they will get owned fast.

Naturally everything has to be harder for the PCs in multi-player, you should build for parties but take care not to overwhelm people who travel alone.  Often you will find builders who, having a monster who is very hard for one person, they choose to spawn in 3+ of these monsters on a PC, so the PC is completely & utterly dominated by the encounter, which is no fun at all.

If you want to build a good module, remember you are building for both parties of PCs & players who go it alone.  Also, as a final tip, remember that X players can cause a lot of issues, especially if you don't have a powerful server computer, when you get 10+ player your scripting will really start to show, if it's buggy or laggy, the server could become consitpated, and you definitely do not want to leave NPCs laying around when PCs are done in an area, nor do you want to put a lot of placeable objects in your module.

Keep your stores all in one area where the PC's never enter, this way lag can be significantly reduced.  The larger the map, the longer the loading time, the more people transitioning large maps, the more bandwidth will be consumed on your server, so keep your maps small to medium size, not huge!  Huge is ok for some areas, but they should be few and far between.

Entertaining the crowd involves giving the crowd lots of things to do, too many builders build areas put little but some encounters in them, and call it a module, that's not entertaining at all.  Entertainment should come in many forms, not just combat & puzzles.  Everything comes into play even more in Multi-Player, remember you are building against a collective brain of players, not just one, so you can make it much more difficult, and if one PC cannot figure it out, maybe a group can, so don't worry about the complaining, solo players are going to have it rough and there is nothing you can do about that.

Hope this helped you some...
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Writing a Persistent World
« Reply #4 on: August 18, 2011, 05:18:34 pm »


               As your a beginner as far as PW Hosting goes, this might not be as useful to you as someone a little more battle scared.


nwnx is the most useful tool released for persistent world hosters.

nwnx_funcs  and nwnx_areas  are possibly the best plugins released.

nwnx_funcs allows nwnscript to add feats, skills, abilities, and all sorts of things to players, also allows the re-tagging of objects etc.
Change door tags, change waypoint tags etc

nwnx_areas allows the dynamic generation of areas from a static area template.
   When used in conjuction with nwnx_funcs, you can create castles, maps, entire islands, or planets etc, per player.  Instanced Dungeons etc

nwnx_resman  -   Also useful for advanced users
                    Allows the user to drop ncs script files into the directory, and then use them immediately in game, without requiring a reboot.


As _Guile mentioned about stores etc.

Make sure you have some sort of store cleanup going on.

The way I work mine, is that when a player acquires an item, a 'NATURAL_LOOT' int gets put on the item.
When the player sells this item to a store, the int value remains on the item.
When the designated delay expires on the store, it will destroy only NATURAL_LOOT items.
Meaning it will free up memory, and reduce lag. But will not empty the whole store of its items.


One of the challenges of PW's is making monsters/quests that scale to the players.
When a player gets all the epic loot, and levels up to level 40 -
You might be struggling to keep them entertained if they can one hit kill everything.

Balance is essential.

Epic players, need Epic Fights, and Epic Quests.
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Writing a Persistent World
« Reply #5 on: August 22, 2011, 06:25:24 am »


               Yeah you definitely don't want them bowling over the mobs, neither do you want the mobs bowling over the PCs either.. '<img'>

That's balance thing, keep it challenging but not too overwhelming.

If you see the PCs constantly drinking heals or resting, that's a good sign that things are bit too tough..
               
               

               


                     Modifié par _Guile, 22 août 2011 - 05:26 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Writing a Persistent World
« Reply #6 on: August 22, 2011, 10:53:16 am »


               There is also few PW starter modules out there for download which will help you with persistency so you can just start building.

See this:
1.69 No-Hak persistent starter module by me
1.69 / CEP v2.2 Persistent Starter Module By Genisys