VGOEmulator.net

A Development Project for the Vanguard:Saga of Heroes MMO

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • Portal
  • Project Manager
  • Bug Tracker
  • Server List
  • Wiki
  • Donate
  • Login
  • Register
  • Board index Development Content Development
  • Search

(Possibly) Simplified World Building Concepts

VGOEmulator content development topics.

Moderators: Moldew, Jakkal

Post Reply
Advanced search
27 posts
  • 1
  • 2
  • 3
  • Next
User avatar
John Adams
Retired
Posts: 4583
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
(Possibly) Simplified World Building Concepts
  • Quote

Post by John Adams » Fri Jan 08, 2016 2:47 pm

I keep saying to you all that building the world is really simple, there's just so much data it seems insurmountable. The reason it has taken us 18 mos (ish) to start world building is the data you see is only a mere fraction of what I've had to work with, and every time I felt comfortable with said data, I found something new we needed - thus, re-tooling, re-parsing, re-evaluating, ad nauseam. The good news:

DATA MIGRATION
This was once your 2nd biggest task (behind scripting). With the exhaustive work I've done on the raw data and building a dozen tools to analyze this and that, plus the work to "randomize" some of the data in the world server itself - this task has now become your simplest.

In the most basic of explanations -
  • Log into DBE[/*:m:3czw60ur]
  • Go to Game Data->Migrate Unreal Data[/*:m:3czw60ur]
  • Pick a chunk and set the type (pawn is all that is available)[/*:m:3czw60ur]
  • Click the filter button [img]http://editor.vgoemulator.net:9302/imag ... er_add.png[/img][/*:m:3czw60ur]
  • Find the data you wish to move, and CAREFULLY select which placements you wish to migrate
    You should no longer need to migate 2,000 placements (see below)[/*:m:3czw60ur][/list:u]
    That literally is IT for migrating data from Raw to Dev DBs.

    The Below: Thanks to another project that I was writing a mass spawning tool for, I was able to automate population of nearly every area in the game, every unique NPC+Placement within 500-1000 ticks of each other (so there was no overcrowding)

    Remember this scene?
    [attachment=0]ScreenShot_00229.JPG[/attachment]

    This is the damage Spawn These causes. It's great if there's under 100 or so placements you want to add just to have spares to work with, but in general you really should not need Spawn These anymore.



    DATA VALIDATION
    Before you start cleaning up or scripting anything, a time consuming task that must be performed, especially if you are migrating data from DBE, you must go inspect your spawns to make sure nothing migrated incorrectly. This simply means logging into the world and looking at things. Are NPCs standing where they should be (stationary ones)? Are they dressed appropriately - no naked high elves, as much as we do enjoy that. More importantly, do they have bodies?

    For doors, you want to be sure they open - but the only ones that work are hinged doors or lids. The fancier movers haven't been finished yet, like elevators or levers. I did find a sliding door that worked (Shang Village I believe) that was a surprise. Other things, called PlayerPlacedObjects (for no apparent reason, because players do not place them at all) are signs, posts, hanging things, entire houses, the plots where houses are for sale, and of course all their furnishings (which we do not spawn).

    Note on Housing: We will be replacing all constructed homes with the Cornerstone/For Sale marker before we go live - for now, they are nice to look at.

    Can you Hail hail'able NPCs? Can you attack attackable NPCs? Basically, does the content react to you the way you think it should? Keep in mind, Dialogs and Conversations will not work until you script them! So that is not a fail in validation.



    INITIAL CLEANUP
    The first thing I would do is run through your chunk and make a note of all the obviously over-populated areas, become familiar with what's out there, compare the spawn placements with the list of Quests or Tasks that the chunk offers the player - because you don't want to just start whacking things when you might need them for a quest later. My process
  • (which you do not have to follow, just a guideline):
    • Run the main roads in the chunk, start simple like that[/*:m:3czw60ur]
    • Visit the cities, towns, villages, settlements, or hubs : note the populations (how they relate to the Quests)[/*:m:3czw60ur]
    • First decision: Are these wolves and cats and birds and trees all clustered together because they are random spawns? Or is it 1 of each that just wandered into the others area? We don't want to make placeholders for NPCs that are common quest targets. Thoughts: If you .spawn combine 48 wolves, cats, birds and trees and there are 12 of each, it means any player looking for a Tree kill would have to kill up to 4+ times to get that tree to pop, because each 1 spawn in the grouping got 25% chance... that would be frustrating.
      • When to Spawn Combine:
        When you saunter up to an obvious encounter and see a Boring Old Tree standing right on top of a Super Uber Bad Ass Tree, you can bet the Boring Old Tree is a placeholder, and should be combined with the SUBAT tree. This way, the player will need to kill the lame tree a few times before the server gives up the "Boss". The server automatically calculates the percent chance of the spawn, but you can change that in DBE - under Game Content->Unreal Editor->Locations : the Entries properties. This is not super important right now, as I have some more work to do on the spawn "entries" data anyway.[/list:u][/*:m:3czw60ur]
      • Once you're sure what to combine, combine it. You can .spawn combine varying NPC IDs, thus making a placeholder group, or you can .spawn combine the same NPC IDs as a tool for mass cleansing - though I'd prefer you used .spawn remove instead.[/*:m:3czw60ur]
      • Macros are your friend. Here's some that I use:
        • Time: /say .settime 12 1
          5: /say .spawn combine 5; /say .spawn combine save
          500: /say .spawn combine 500; /say .spawn combine save
          1000: /say .spawn combine 1000; /say .spawn combine save
          Remove: /say .spawn remove
          Summon: /say .summon
          • Do not EVER summon John; very bad things happen when you disrupt what he's doing...[/list:u][/list:u][/*:m:3czw60ur]
          • You can move some things around if you don't like where they are initially. If you delete a trash NPC accidentally, there are plenty around you can .summon, or go back to DBE and Migrate 1 placement near your location.[/*:m:3czw60ur][/list:u]

            Oh, one very important thing:
            DO NOT DELETE WANDERING SPAWNS!
            DO NOT DELETE WANDERING SPAWNS!
            DO NOT DELETE WANDERING SPAWNS!

            You need them on those roads for building movement scripts!

            That's the basics of Clean Up work - this is where YOUR creativity comes into play, because how you leave it is how all VGOEmulator players will see it forever. Next up, the hard part...
You do not have the required permissions to view the files attached to this post.
Top

User avatar
John Adams
Retired
Posts: 4583
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by John Adams » Fri Jan 08, 2016 2:47 pm

As I mentioned above, a major amount of the populating work has been done for you. However, scripting is going to test your mettle It is most of the reason EQ2Emulator has only a few zones populated and scripted; it's really tedious and mind numbing.

And again, this is just how I would do it if I were doing it, but you are doing it, so do it however you wish, just get it done


BASIC LUA SCRIPTING
I would start learning Lua scripting by making things move around. Now that you have a nice clean chunk, find your first NPC and head into DBE. Go to the Game Content->Unreal Editor, find Tursh Village (for this example), and look up Jinx Niddlerun. Click on his Script tab.

Initially what you see here is an UNASSIGNED script (meaning, the NPC has no script) because "Script ID" says "New", and DBE has filled in the suggested location of Jinx's script.
[attachment=9]script_assign.jpg[/attachment]

Click the [img]http://editor.vgoemulator.net:9302/images/link_add.png[/img] button to create a link between this NPC and his new script (that you are about to create).

[attachment=8]success.jpg[/attachment]

Now that the script is assigned to the NPC, click the [img]http://editor.vgoemulator.net:9302/imag ... t_edit.png[/img] button to edit the script. Note that you have been taken to the Scripting editor -- this is actually something I hope to change soon; no need to leave the NPC

[attachment=7]new_script.jpg[/attachment]

What I want to show you here is how boring and empty this generic Spawn Script is. So don't click create just yet! Here's what you do next.

On the left, you see Dialog Generator? Click that and again select Chunk: Tursh Village, and type "Jinx" in the Name box, and filter the dialogs. When you see NPC Name of Jinx, click the "Build" link to the left.

[attachment=6]dialog1.jpg[/attachment]


Now you can see you get a much more complete script, because the Dialog Generator looked into the parsers Raw Dialogs and stitched all of this NPCs conversations together, and built a "shell" of a Lua Script for you. You're Welcome.

[attachment=5]dialog2.jpg[/attachment]


Generated Dialog Components:
Just a quick rundown of what you see here:
  • function spawn(Npc) is where you'll put the Movement Loop and other "initializers" for the spawn when it pops in the zone[/*:m:1aopjab7]
  • function hailed(Npc, Player) is exactly what it sounds like; what you want to have happen when a player Hails the NPC - this is where dialogs begin[/*:m:1aopjab7]
  • function dlg_blahblah(Npc, Player) - these are auto-generated sub-functions that are based on the different "text" the NPC might ever say. They can be called from any other function, when needed (example below)[/*:m:1aopjab7]
  • raw_dialog_headers - this is just a raw dump of anything the NPC has text-wise, be it hails, convos, or quest driven dialogs. They are there for your use during script building, and can be removed when you are done with this script ( everything between the --[[ and --]] )[/*:m:1aopjab7][/list:u]

    At this point, you can click [Create] and your new Script is written to the file system, and is already connected to your NPC. But, nothing will happen yet except him facing you (FaceTarget), until you do something more in the hailed() function.


    WARNING!!! - Do not trust any of my Generators outright. They are merely pulling together whatever I can stitch together, which is nearly an impossible task. Due to NPCs being in one type of packet (0x1) and dialogs being in another (0x2), I had to come up with a way to link the two, and it is clearly not rock solid. You have been warned.


    HAIL SCRIPTING 102
    I chose ol Jinx because his script is very simple. Looking at his 2 possible dialogs, and seeing there is nothing else he had to say to any of our collectors, I can conclude he is not a part of anything greater than a random choice of responses. That's easy.

    Take a look at what I did in function hailed()
    [attachment=4]random_response.jpg[/attachment]

    Since there are only 2 possible phrases, my random is between 0 and 1. When the player hails Jinx now, the system randomizes between 0 and 1 and whichever comes up, that dialog is called.

    You do not have to name the functions as I did here, this is merely auto-generated function names (using raw dialog IDs and sequence #s). You can call the functions anything you want, but it has to have the (Npc, Players) parameters after the name.

    [attachment=3]function_naming.jpg[/attachment]

    In fact, I'd almost prefer you named your functions something English because some of these scripts get enormous, and losing what Function you are pointing at is easy.



    MOVEMENT/LOOPS
    Scripting Movement is a bit harder because movement loops are generally a wall-of-text that gets hard to look at. Take Gobon Olmseed in Tursh Village for example. From my above post, I warned you to not delete the dozens of Gobon's in the chunk yet. Here's why.

    I purposefully placed NPCs like Gobon throughout the chunk so you can (easily) identify the wandering path. Some are very long, others are short circles. I'll start with the easy one: Short Circles
    • Generally, yard trash will amble around an area in small patterns. I have created a few "Generlc" scripts that are all slightly different from each other, giving the wandering NPCs some form of uniqueness; some wander clockwise, some counter-clockwise, and some in completely random directions - but they generally stay within 2000-5000 ticks from their spawning point. We don't want them wandering off the grid.

      Consider the Risen Farmers; one of the first encounters in Tursh. They wander around their tight little areas. What you would do is find the Risen Farmer spawn in the Unreal Editor, and on it's Script tab instead of accepting the default script name, you would replace it with

      Code: Select all

      Spawns/Generic/circle_clockwise_small_01.lua
      because that is the folder and name of one of our generic wandering scripts (seen below). Once that is in the Script Path/File box, click the Attach, and all Risen Farmers in Tursh now have this assignment.
      [attachment=2]sm_wanderer.jpg[/attachment]

      Click the script edit icon [img]http://editor.vgoemulator.net:9302/imag ... t_edit.png[/img] to see the script detail. Don't get scared.

      [attachment=1]sm_clockwise.jpg[/attachment]

      Briefly, this script gets the NPCs starting coordinates (GetX, GetY, GetZ) and makes sure they start there. Then, does a random to see which direction they will head off in first. The rest is just additional random wanderings at speed 150, with a 5 - 30 second pause - giving each placement a unique appearance to it's movement.[/list:u]



      MOVEMENT GENERATOR
      Let's get back to Gobon Olmseed from above - he's the halfling that wanders across 1/2 of Tursh chunk. Go find him in Unreal Editor, Scripts, and attach a script to him specifically (not generic this time, he's got his own agenda). Once it's attached, click the Script edit button again and this time when you see the big, blank script - notice at the bottom there's a Special Options: button [Movement]. Click it.

      A popup window appears showing you all his placements in the chunk (now with a handy map for visual help). Your job is to take all those placements and put them into Gobon's function spawn(Npc) function in his Lua Script. So let's do that. Highlight all those movement locs in the popup, and copy the text. Go back to the new Gobon Spawn Script, and in the function hail (between function and end) paste those loops.

      [attachment=0]loops.jpg[/attachment]

      Couple notes: You do not have to use the Movement Generator -at all- if it is going to confuse matters. The loops are a wall of text, and they are out of order in some respects because I cannot know the terrain so if you DO use the generator, you'll likely need to edit the loops by cut/pasting them above and below one another until his accurate path is defined.

      How >I< would do this is to look at the map provided, find an obvious starting point and go there (likely the top-most or bottom-most loop function) and walk the path - and everywhere you see a Gobon, do a /loc, see where it is, and move THAT loop into THAT position. Tedious yes, but there aren't that many big wanderers so get the hard work out of the way and move on.

      The other option is to run the path yourself and just do /loc every time the road bends or changes elevation, and build your own MovementLoopAdd() functions. Either way, wanderers are a pain in the ass!
You do not have the required permissions to view the files attached to this post.
Top

User avatar
John Adams
Retired
Posts: 4583
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by John Adams » Fri Jan 08, 2016 2:47 pm

Do you need me to lay out the dialogs/quests branching today? Let me know if my "simplified" walkthrough above is simple enough before I continue... there really is no short way to describe this stuff


ADVANCED DIALOGS/QUESTS
(soon)

Quick answer to some questions: To insert player names, races or classes in NPC dialogs, use our Lua Functions like this.

Code: Select all

Say(Npc, 'Guard Timmy says, "Good morning, ' .. GetName(Player) .. '! How are you today?"')
Breaking it apart visually:

Code: Select all

Say(Npc, 
'Guard Timmy says, "Good morning, '
 .. GetName(Player) .. 
'! How are you today?"'
)
Lua "strings" are the single quotes around the parameter of the function you are calling [ Say(Npc, 'String') ]. You must break the string and Lua "append" the Lua Function in the middle signified by .. two dots. Two does means to concat the next thing into the string, and two more dots to continue the NPCs dialog.

You can use most "Get" Lua Functions in a dialog in this way - obviously not all. Some Get's return objects. They should be pretty self explanatory.
Top

Kinshi
Posts: 52
Joined: Mon Jan 27, 2014 9:13 pm
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by Kinshi » Sat Jan 09, 2016 1:21 pm

I have a question about when pathing mobs get loaded into the world and actually start pathing....do they all get loaded and start pathing at server start regardless of player presence, or do they not start pathing until a player comes within viewing distance?

That question came to mind from a discussion I was following in cMangos regarding issue they had with pathing mobs and when they should actually load into the game world, and begin pathing and was wondering how this is handled in VGOE. (the topic there started as a result of a combination of discussion on performance as well as when certain quest-related mobs should appear and begin following their paths) Some arguments were made that mobs should not be pathing when players are not in view distance (the issue there being CPU cycles on the server being used up by mobiles pathing when no players are present)

Thanks.
Top

User avatar
John Adams
Retired
Posts: 4583
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by John Adams » Sat Jan 09, 2016 2:52 pm

[Disclaimer] VGOEmu hasn't even begun performance tuning yet, and I suspect that will be a huge task when it does come up (soon).

For now, our NPCs start pathing the moment the chunk wakes up. I understand the argument that if no player can see them, why should they be moving, but realistically, life goes on without the player there to experience it. If the server cannot perform with 1 player tucked away in a corner and 500 NPCs pathing about out of range, won't it be a shock whenever there are dozens players throughout the chunk, across multiple chunks, basically "waking everything up"?

IMO it's better to tune your server to perform full throttle than choke it for performance concerns that will be null and void when actual game play starts.

Good question, though.
Top

User avatar
Ily
Data Collector
Data Collector
Posts: 198
Joined: Tue Apr 08, 2014 6:46 pm
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by Ily » Sat Jan 09, 2016 6:24 pm

Excellent work John! <3

Would love to contribute but right now some serious family matters are at hand. Hopefully in the future.
Top

User avatar
Jakkal
Content Designer
Content Designer
Posts: 3099
Joined: Tue May 20, 2014 1:59 am
Location: Raleigh, NC
Contact:
Contact Jakkal
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by Jakkal » Sun Jan 10, 2016 10:03 am

To all content designers: If you start to work on an NPC that someone else has built the scripts for PLEASE COMMENT on that script what you've done and when you did it! Trust me this will be helpful in the long run! If you are working on an NPC and you do not want anyone to touch it while you work on it, also please comment that at the top of the file. Such as:

This is what's usually at the top of a script:

Code: Select all

--[[
	Script Name		: Spawns/Dahknarg/KogathOkari.lua
	Script Purpose	: Kogath Okari (General Goods Vendor)
	Script Author	: Jakkal
	Script Date		: 2016/01/09
	Script Notes	: Auto-Generated Conversation from PacketParser Data
--]]
If you want to put notes in, just add to the script notes: Jan 10, 2016: Jakkal modified lines 23 and 24 for additional movement locations. OR Jan 10, 2016: Jakkal is working on this NPC, please do not mess with the movement locations!
Image
Top

User avatar
Xinux
Project Leader
Project Leader
Posts: 2549
Joined: Wed Aug 28, 2013 2:20 pm
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by Xinux » Sun Jan 10, 2016 1:00 pm

Here is a quick way to do the pathing back to the starting point.

Open up OpenOffice or excel paste the current movement loop in column A then add a sort column into B like this.
mov.JPG

Then you want to click on column B and sort Z->A so it flips it. Then select expand selection.
mov1.JPG

Now that your movement loop has been flipped copy all but the first movement loop (2 to whatever) into the script and you are done.
mov2.JPG
You do not have the required permissions to view the files attached to this post.
Top

User avatar
Jakkal
Content Designer
Content Designer
Posts: 3099
Joined: Tue May 20, 2014 1:59 am
Location: Raleigh, NC
Contact:
Contact Jakkal
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by Jakkal » Tue Jan 12, 2016 10:17 am

John, you mention the location of one of the generic mob movement scripts, but you said there were others? What's the location of them?
Image
Top

User avatar
John Adams
Retired
Posts: 4583
Joined: Wed Aug 28, 2013 9:40 am
Location: Phoenix, AZ.
Contact:
Contact John Adams
Website
Re: (Possibly) Simplified World Building Concepts
  • Quote

Post by John Adams » Tue Jan 12, 2016 10:26 am

In DBE, go to Scripting, filter on type Spawn, the name "Generic" and you'll see the 2nd one I have finished. There are a dozen or so more, but I have yet to convert them from the EQ2 coordinates system.

https://svn.vgoemulator.net/svn/vgocont ... ns/Generic
(user: anonymous, no password needed)
Top


Post Reply

27 posts
  • 1
  • 2
  • 3
  • Next

Return to “Content Development”

Jump to
  • Information
  • ↳   Announcements
  • ↳   Dev Chats
  • ↳   Events
  • Community
  • ↳   General Discussions
  • ↳   VGO Team Help Requests
  • ↳   Introductions
  • ↳   Game Features
  • ↳   Wish List
  • ↳   Off-Topic
  • Support
  • ↳   How-To's
  • ↳   General Support
  • ↳   Windows
  • ↳   Linux
  • Development
  • ↳   Content Development
  • ↳   Thestra Adventuring
  • ↳   Qalia Adventuring
  • ↳   Kojan Adventuring
  • ↳   Crafting/Harvesting
  • Bugs
  • ↳   Server Bugs
  • ↳   Server Bugs (Closed)
  • ↳   Content Bugs
  • ↳   Content Bugs (Closed)
  • ↳   Database Bugs
  • ↳   Tools Bugs
  • Board index
  • All times are UTC-07:00
  • Delete cookies
  • Contact us
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD