Author Topic: Dynamic Forest Area  (Read 928 times)

Legacy_AstoundingArcaneArcher

  • Jr. Member
  • **
  • Posts: 64
  • Karma: +0/-0
Dynamic Forest Area
« on: September 07, 2011, 09:21:56 am »


               I was wondering whether dynamic forest areas could be created, you areas that are different every time. I just want the forest of my module to seem big without tons of areas.

Thanks in advance,

AstoundingArcaneArcher.
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Dynamic Forest Area
« Reply #1 on: September 07, 2011, 10:50:40 am »


               NWNX would work for this.

You wouldnt be able to make it so that the area content is dynamic (unless you use placeable trees)

However, you could make an everlasting forest/woods.

eg - One forest area, connects to another forest area, which connects to another forest area.

nwn.org
Look for the nwnx_areas plugin.


It allows for the dynamic creation of areas from resref templates.
You could make 5 forest templates
and have the system randomly choose 1 of the 5

When a player tries to enter the next area, it picks number 3
When a player moves from that area to the next area, it could pick number 1 etc

meaning you get an ever expanding forest, with randomly chosen design.
               
               

               
            

Legacy_virusman

  • Sr. Member
  • ****
  • Posts: 448
  • Karma: +0/-0
Dynamic Forest Area
« Reply #2 on: September 07, 2011, 11:24:20 am »


               Actually, you can create dynamic areas with (nwnx_)ruby+nwn-lib.
Edit GFF data (tile numbers) with nwn-lib, then copy .are+.git files to resman folder and load with nwnx_areas.
Writing a randomizer that'd properly arrange tiles may be a problem though.
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Dynamic Forest Area
« Reply #3 on: September 07, 2011, 11:44:26 am »


               :-(  And its not available for windows.
               
               

               
            

Legacy_virusman

  • Sr. Member
  • ****
  • Posts: 448
  • Karma: +0/-0
Dynamic Forest Area
« Reply #4 on: September 07, 2011, 02:27:31 pm »


               Ruby, nwn-lib, resman, areas are available for Windows
There is no nwnx_ruby plugin for Windows, but it's possible to work around that.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Dynamic Forest Area
« Reply #5 on: September 07, 2011, 07:04:21 pm »


               <taking the path less traveled...>

AstoundingArcaneArcher wrote...
I was wondering whether dynamic forest areas could be created, you areas that are different every time. I just want the forest of my module to seem big without tons of areas.

There is another possibility that involves less technical knowhow, but more work scripting:

Using a variation on the Travel Builder network system, you design a very large network of forest nodes.  Each node is of a type representing a template area you built in the toolset. The more templates you have, the greater the variety of forest... basically, you are making a "tileset" of areas and "painting" them in the scripted network. Each of the templates would have area variables on them with creature/item spawn info, but would otherwise be empty.  They are populated only OnEnter and depopulated when appropriate. (Edit: My bad... variables are stored on the travel node, so each area is persistently and uniquely populated.)

With that framework, you could turn a small number of template areas (Say, 36) into a truly vast forest.  In addition, you can make particular nodes unique, custom areas... "destination" areas with all the cool plot/script stuff. They would fit seamlessly into the network.  

One of the great advantages to this approach is that it is *not* random, but crafted from the beginning. When your PCs travel, they will always find the same landmarks to know where they are and how far until they reach the "Village in the Gorge"...

And, of course, they may take short-cuts (once they learn them, and where you allow).

<...down the long and windy road>
               
               

               


                     Modifié par Rolo Kipp, 07 septembre 2011 - 07:45 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Dynamic Forest Area
« Reply #6 on: September 07, 2011, 08:42:02 pm »


               <dreaming...>

In fact, I can even envision something like TarynWinterblade's Terrain Builder taking an image and translating the pixels into node values to generate the network... draw a patch of "Deep Forest, west edge mountain" and the appropriate region of the network would be populated with areas of the proper template... Draw a road and areas with roads through them... Road-crossers...

LOL, a meta tileset, indeed! Now we just have to have meta-walkmesh :-)

Still, can you envision a forest that is 256 areas wide and long and each area is, say, 16 tiles?

That's roughly 66 thousand (large) areas built from, perhaps a hundred areas.

And you set the Grand Poobah Tower of Fantastic Experience somewhere deep in the middle...

<...big>
               
               

               


                     Modifié par Rolo Kipp, 07 septembre 2011 - 07:43 .
                     
                  


            

Legacy_AstoundingArcaneArcher

  • Jr. Member
  • **
  • Posts: 64
  • Karma: +0/-0
Dynamic Forest Area
« Reply #7 on: September 07, 2011, 08:53:47 pm »


               You sir, are a god of NWN scripting. Methinks I'll be taking the Travel Builder option. The module isn't going to be called Infinite Forests, ya know.
               
               

               


                     Modifié par AstoundingArcaneArcher, 07 septembre 2011 - 07:56 .
                     
                  


            

Legacy_QlippothVI

  • Full Member
  • ***
  • Posts: 197
  • Karma: +0/-0
Dynamic Forest Area
« Reply #8 on: September 16, 2011, 05:45:44 am »


               Again, I can't seem to stop mentioning Universe of Arlandia by TheRack. He uses NWNX and a DB to create multiple worlds, the first of which you start in is a 41x41 area grid of 22x22 tile sized areas. He more than what baalos mentions above, and creates the world dynamically the first time the module is run with a new database. It's also available for download if you visit the download link on the left of the page:
http://www.simtotal.com/uoa

Note that it can seem a little monotonous, with each area type: forest, foothills, river, mountains, dungeon, desert, crypt, cave, frozen land, hills, houses, rural, swamp, it goes on and on... (even SPACE! ... ACE .. ACe .., ace....) being identical to the next, but it was designed to be easy to programatically (what's the word?) generate the worlds. I suppose you could easily add other template areas for variety.

If you plan on having a lot of players on a server all at once you'll need more template areas, since each area can only be used the same number of times as the number of template areas in the module. So I think it has 4 Forest template areas, which means only 4 separate forest areas can be in use by players at any one time.

It even has a page for examining the players progress through each world, with map tiles loading dynamically each time a new area is discovered by the players, viewable on your web page by all. From the link I provide above, click on Arland in the upper right hand corner to see what people had discovered ion his server before he took it down.

I also occassionally run it on my server, so if you want to see it running let me know, though you can easily run it yourself. It's very easy to set up, too.

He uses placeables to allow you to build your own little city, with some RTS elements. Some words are foreign to me  (casern? Which is where you can hire troops), so I'm not sure exactly what they are all for. I think it uses NESS or something similar to simulate creature camps, and reboots every few hours to change these spawns to simulate these groups moving around the worlds.
It's also very efficient, since it will only create creatures in areas that have players, and despawn them and all of the placeables for that area when the player is no longer in that area.

- Qlippoth
               
               

               


                     Modifié par QlippothVI, 16 septembre 2011 - 04:59 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Dynamic Forest Area
« Reply #9 on: September 16, 2011, 04:46:14 pm »


               <breaking out the hammer & pick...>

QlippothVI wrote...
Again, I can't seem to stop mentioning Universe of Arlandia by TheRack. He uses ...

Oh, nice. I like what he did.

Note that it can seem a little monotonous, ...
but it was designed to be easy to programatically (what's the word?) generate the worlds.
I suppose you could easily add other template areas for variety.

"Algorythmically" might be more hifalutin ;-)

Monotony is DEATH! Arrrrggg! <he feels strongly on this subject> Hush.
The main problem with randomly generated stuff is... it's random.  There is no over-arching plan, nor underlying laws/rules/design-principles that manifest in a meta-form as "Feel".

That said, TheRack has a very powerful engine (that incorporates the NwN engine, that, in turn... heh. Sorry), that has definite potential for a greater synergy :-)

More than adding numbers of templates, you need a method of inserting finely crafted areas *as they are built*, destination areas that make exploration rewarding. There are many types of players, but those who are pure explorer types are pretty rare. If you don't have elements of greed, er, self-interest, you are really only half motivating people to explore your half-vast empire ;-)

If you plan on having a lot of players on a server all at once you'll need more template areas, since each area can only be used the same number of times as the number of template areas in the module. So I think it has 4 Forest template areas, which means only 4 separate forest areas can be in use by players at any one time.


There are other mechanisms you can use.  Two I am doodling with are the "Slush area" and the "Mobius Encounter".

The "Slush area" idea has a back-up set of generic areas that bumped parties get shunted to until the destination is free. It only comes into play if the TB system determines that the appropriate template area is already in use *and* that it is in use on a different node (location) than the requested destination. I'm not thrilled with this one, but I don't want rarely used copies of every template, either.

The "Mobius Encounter" is simply a never-ending series of "random" encounters that delay a party from reaching a congested template until the template is available.  Whenever they attempt to travel to a node whose template is in use, they will run into encounters. If they turn aside to another destination, everything is fine.  If they work through the encounter, they gain exp & perhaps loot... it's not a waste.

It even has a page for examining the players progress through each world, with map tiles loading dynamically each time a new area is discovered by the players, viewable on your web page by all. From the link I provide above, click on Arland in the upper right hand corner to see what people had discovered ion his server before he took it down.

I like :-)

I also occassionally run it on my server, so if you want to see it running let me know, though you can easily run it yourself. It's very easy to set up, too.

He uses placeables to allow you to build your own little city, with some RTS elements. Some words are foreign to me  (casern? Which is where you can hire troops), so I'm not sure exactly what they are all for. I think it uses NESS or something similar to simulate creature camps, and reboots every few hours to change these spawns to simulate these groups moving around the worlds.
It's also very efficient, since it will only create creatures in areas that have players, and despawn them and all of the placeables for that area when the player is no longer in that area.
 - Qlippoth

But does it respawn the same creatures when you return to a particular node? Does it remember the state of that creature? Level it up? Kill it? Etc.

The possibilities are fantastic...

There was an old initiative Guillaume & I  were working on (2000-2001) - NPSee - that would algorythmically create NPCs.  It would *really* create them, each with a backstory, motivations and places in several hierarchies (political, economic,underworld, arcane, divine). We had hoped we'd have some way (like REXX) to use the app to consistently spawn-despawn NPCs in NwN... *thousands* of deeply developed NPCs. And MySQL happens to be a language I speak...

A combination of TB, TheRack's world generator and my own Meta-Tiles™ idea could be a powerful synergy!

It really looks like NwNx is the tool we were missing. :-/ Although I am strongly focused on SP and DM'd mods, I might just have to dig into NwNx... :-)

<...and handing them out to an army of golems>
               
               

               


                     Modifié par Rolo Kipp, 16 septembre 2011 - 03:48 .
                     
                  


            

Legacy_QlippothVI

  • Full Member
  • ***
  • Posts: 197
  • Karma: +0/-0
Dynamic Forest Area
« Reply #10 on: September 16, 2011, 06:47:34 pm »


               Monotony, yeah, the main City is crafted, but he didn't use the city doors for areas that could be bought or rented, which would have added incentive. though I guess the thrust is to get players to build their own houses using the Domain system built into the module, so...

There really should have been more hand-crafted areas. I also find a lack of focus for the player, since there is all dynamic content and no story. It would have been nice to start the player out with a common goal, like building up the city you start in, or it's defenses, etc. Or just finding and selling it resources. With no common goal, or at least a common authority present, it's confusing and leads to diffusion of the player experience, leaving it all up to them. Which means you either WANT to build your own Domain, and see if you can reach that 99 henchmen cap, and become the world leader, or you're just piddling around beating rocks for resources.

I've been to about 1/10th of the first worlds surface (can't afford a ship, airship, starship yet, or even just a ticket to space), but can't find the shop keeper who sells Talents, which I need to not get lost on the surface (Rangers and Druid get this Talent for free, but I'm a dwarven fighter). I can map out the coordinates with pen and paper, but it's tedious to explore when you're not sure where you are. And that means I need to find a new area in order to the use the web map to find my coordinates.

"But does it respawn the same creatures when you return to a particular node? Does it remember the state of that creature? Level it up? Kill it? Etc."

It seems to remember everything that occurs during that particular server run. Note that I mentioned that it restarts the server every few hours, so this cleans up the mess left behind when PCs do stuff. It also makes persistent those creatures that have been created for a quest (there's fetch or kill quests randomly generated by a Plotgiver NPC in each town or city). So on restart entering the location of the creature spawns it again with a handy *<name> so you know which creature you must kill or retrieve.

So if I return to an area I will still see the objects and bodies from my battle earlier. At least until the server autoresets.

I don't know enough to alter his systems, as I'm a newb scripter just learning. I'd like to use his systems to create a dynamic module where the player starts as part of something, I'm starting with a simple "build an outpost" goal. Where the players and NPCs clear out a safe area and patrol, while looking for resources with which to build their outpost, it's buildings, etc. Find the mine for metals for crafting better weapons and armor. Find a quarry or use stone from the mine to build the walls and buildings. Find good forested areas for lumber for building, etc...
I'm leaning towards limitng the healing per day based on sleeping arraangements, so building the barracks helps your N/PC followers heal a few more hitpoints per night instead of a tent. Or less if on the ground without shelter.

The question is, I'll probably need to swap out the area as the outpost is built, at least for walls in the tileset. The building can use placeables, though then you have other issues with NPCs.
I also have a problem where I want gates to be repairable, and most of the gate doors don't have an Anim_Close? animation, so they stay invisible to the PCs while they are within 6-8 tiles of the gate object.

I also want to avoid using the save game feature of NWN, as I've heard of long term stability issues after many saves. I'd like to save everything persistently in a DB and be able to alter the module as I build, opening new areas for players to explore. Each new area would be scripted to initiate creature spawn when entered, then the DB keeps track of them from there.
This also makes it easier to fix the module, since I'm not sure how swapping out the module file affects saves. I believe it does nothing to affect those reas already used by the player.

New creatures would "enter" the module from outside; an Ogre and his goblin troops come down from the mountains, or an enemy faction sending scouting or raiding parties to hamper or destroy your development of a stronghold in the area (module). Or even reinforcements from your sponsoring kingdom, though likely you'll need resources or gold to hire them, such as random wandering heroes, guards, or mercenaries. Anyway, working with NPC Activities 6.2 (Deva: 6.1, then PKBusby developed 6.2 in actingFenora) jjst for the creature creation and behaviors. Mainly wandering around the module so far, and I'm trying to develope rules for generating new creature groups, and capping the number of groups in the module at any given time.

For playbalance it will likely be low level and low magic (for equipment), maybe E6 D20 system  if I can manage it in NWN.

-Qlippoth
               
               

               


                     Modifié par QlippothVI, 16 septembre 2011 - 06:11 .
                     
                  


            

Legacy_QlippothVI

  • Full Member
  • ***
  • Posts: 197
  • Karma: +0/-0
Dynamic Forest Area
« Reply #11 on: September 16, 2011, 07:11:33 pm »


               Separating this since I got so verbose up there:
"There was an old initiative Guillaume & I  were working on (2000-2001) - NPSee - that would algorythmically create NPCs.  It would *really* create them, each with a backstory, motivations and places in several hierarchies (political, economic,underworld, arcane, divine). We had hoped we'd have some way (like REXX) to use the app to consistently spawn-despawn NPCs in NwN... *thousands* of deeply developed NPCs. And MySQL happens to be a language I speak..."

Yeah, I think Kosmous was working on a meme based system for creature motivations, but he kinda fell off the earth with it. Might have gotten frustrated with working within the limitations of the NWN engine (lots of Clear All Actions in the scripting?
My forum is on my own server at home at http://qlippoth.dyndns.org/forum/
Feel free to look for his comments here: http://qlippoth.dynd...9f1f0620770caf4


"A combination of TB, TheRack's world generator and my own Meta-Tiles™ idea could be a powerful synergy!"

You can ask him, he's got a fantasy version of this module still running on Saturdays only, with DMed sessions. He's got a new job, so I haven't received a reply in about a week. I'm sure he would be happy to let you put his systems to work in a new project (given appropriate credit for his works in the new project, I would think).

Like he said on his UoA news page, server is closed and he's interested in hearing if anyone else runs it.

Lemme know if you need a QA Engineer if you do something. '<img'>
 - Qlippoth
               
               

               


                     Modifié par QlippothVI, 17 septembre 2011 - 05:41 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Dynamic Forest Area
« Reply #12 on: September 17, 2011, 06:04:01 pm »


               <posts an IT note...>

QA Engineers are always needed :-) Even if they are amateurs called "Meandmyfriends" :-P

This is a major project that has been percolating in the back of my head for a while, but it is something I really want to pursue.

First, however, I want to finish (in order):
 + My Gaian avatar (4th aspect due by Sep 30th! Yikes!)
 + The Forester module (test-bed for some rather tricky ecology stuff). (Hopefully by Xmas)
 + The Trollsbane I module (test-bed for some rather tricky economy/political stuff). (We'll see)

Eventually, I intend to create a series of linked modules that are persistent and dynamic and will permit *me* to enjoy endless hours exploring *my* world, which means a heavy reliance on db and emergent behavior not only in creatures, but in the area creation and theme-spawning...

If other people enjoy it... bonus! =)

<...and promptly forgets where he put it>
               
               

               


                     Modifié par Rolo Kipp, 17 septembre 2011 - 05:08 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Dynamic Forest Area
« Reply #13 on: September 17, 2011, 06:42:36 pm »


               <dripping...>

As a side note, have you looked into hosting your boards with drupal? Open source, robust, easily searchable and MySQL based (store things forever, if you want...).

<...wet>
               
               

               


                     Modifié par Rolo Kipp, 17 septembre 2011 - 05:43 .
                     
                  


            

Legacy_QlippothVI

  • Full Member
  • ***
  • Posts: 197
  • Karma: +0/-0
Dynamic Forest Area
« Reply #14 on: September 18, 2011, 05:48:07 am »


               I've seen some things created with Drupal, but the phpBB3 forum package I use now is free and was easy to set up. All data is stored in mySQL now, it's free, and for now the limit of my ability to set up. As you can see it seems I'm the only one to actually post to it, except for someone else every 6 months or so. '<img'>
It has Advance Search in the upper right of the page. I've not had any issue with the search function. If you did have issues let me know, I may simply need to reindex the forum DB (In fact I'll check that out now). I tend to just back up the whole VM every few months.

I have an HP Pavilion AMD X2 dual core from 2006, 8GB of RAM ESXi 4.1 server machine running:
1. An Ubuntu Server VM with Mantis Bug Tracker for various NWN projects, phpBB3 free forum, and TestLink (test tracker) for checking out features to stay up to date with that tool all using a  mySQL DB.
2. A UoA server (as I mentioned) on Windows 7 Pro (virtualized from a defunct machine that died), it was just handy.
3. A FreeNAS server for digital media (my music collection and recorded TV mainly).
4. An Atlassian server with various tools for me to study and my GF to store data on a Confluence Wiki. She's a Documentation Specialist.

I'm hacking/setting up a linked-clone Windows XP VM for multiple NWServer modules I'd like to check out but where there are bugs in the NWN save function due to either NWN engine issues or script bug in the module. This way I can simply suspend the VM when I want to take a break and not leave it running. A very storage heavy method, but disk space isn't really a problem, just confusing. Currently I waste a ton of space with complete clones of the WinXP VMs, gonna do the hack for a linked clone in eSXi 4 and save about 120 GB of disk space (240 if you include their backup as well). Wish me luck.

So currently no incentive to change Forum software. If I get involved in an active project that needs something better than I'll upgrade it to something else. It's all locally run and under my desk and free on a DynDNS domain. '<img'>
               
               

               


                     Modifié par QlippothVI, 18 septembre 2011 - 04:53 .