Content Phase 3: The Scripting
- John Adams
- Retired
- Posts: 4583
- Joined: Wed Aug 28, 2013 9:40 am
- Location: Phoenix, AZ.
- Contact:
Content Phase 3: The Scripting
Scripting will be huge; putting a placeholder "teaser" here just so you know it's coming, hopefully sooner than later.
Brief points:
Spells: Abilities for damage, buffs, heals, movement, etc.
Spawns: NPC interaction, talking, starting quests and dialogs, conversations, and NPC Movement
Quests: Where the quest steps, requirements, and rewards are configured
Chunks: Location boundaries, triggers, teleporters, etc.
Items: Things that go "click"
I'll flesh these out more as we draw closer to Scripting.
Brief points:
Spells: Abilities for damage, buffs, heals, movement, etc.
Spawns: NPC interaction, talking, starting quests and dialogs, conversations, and NPC Movement
Quests: Where the quest steps, requirements, and rewards are configured
Chunks: Location boundaries, triggers, teleporters, etc.
Items: Things that go "click"
I'll flesh these out more as we draw closer to Scripting.
- John Adams
- Retired
- Posts: 4583
- Joined: Wed Aug 28, 2013 9:40 am
- Location: Phoenix, AZ.
- Contact:
Re: Content Phase 3: The Scripting
I've been working extensively on getting Spawn, Ability and Quest Lua Script editors implemented into DBE, and while I have a ways to go, here's some updates just to make things formal (from my own learning curve).
For VGOEmulator Project "Official Server" content development, at least - this is our folder structure for storing all Scripts:
First, this folder structure is relative to WorldServer.exe. So if WorldServer.exe is in C:\VGOEmu --
Note the naming convention of the different types of scripts - this is to ensure uniqueness and readability, for the most part.
Spells:
The "spell_name" is parsed to remove anything but Alphanumeric symbols. "Backstab I" becomes "Backstab", and the upgrades within the line use the same script "Backstab.lua" - and the increasing potency of the ability is handled by passed in Lua parameters (spell_data, TBD).
Chunks
Chunk scripts use the database field `chunks`.`shortname` since they are already unique and "clean". These are the same names you use when you .rift by name, for example: "TurshVillage.lua", "WardshipoftheSleepingMoon.lua" and so forth. Generally, chunk names are not very wordy, so there was no reason to break them into underscores
Items
Items (like Quests) have a different naming convention because some of the names are ridiculous. Take for example this item (though I am sure it is not scripted, just an example):
I'm not keen on using IDs for file names, because they are harder to manage - though DBE could handle them fine, I think "people" would get confused.
Quests
Similar problem exists for Quests with some of the quest names being rather long, so I'm opting for the underscore separator here as well.
Spawns
Spawns are easy, just like abilities and chunks, just removing anything not alphanumeric and slapping a .lua on the end.
The "Common" folders
Spells, Quests and Spawns all have a "Common" folder, however. I'll just use Spawns as an example now, because I still have to figure out common scripting for the others - it may not be necessary at all for Quests.
"Spawns/Common/" will be for things like random movement scripts
This means this NPC, regardless of it's name or chunk location, will execute commands inside circle_clockwise_small_01.lua.
"Spells/Common/" will be for spells that ALL races and classes can use - like Sprint, or Recall, etc.
One final thing to keep in mind: You reserve the right to name the scripts anything you wish, should you not agree with the DBE suggested names. However, I must insist the "folder structure" remain as designed or we'll have a mess trying to find anything. Change the filename if you need more clarity, just not the parent folder, class or chunk folders. They must be there for DBE to work.
Content SVN
Bet you didn't know we had one, did you? It's pretty barren currently, but the goal of this SVN is to be the source for all the content this team designs. Weekly, a backup of the Content database is made, along with table schema and data-only dumps, plus all scripts are added and committed to SVN automatically. Anyone seeking the latest/greatest content will simply need to do SVN Updates from our Content SVN into their World folder and apply any DB changes (we're working on automating this as well) and they have what we have.
Content SVN: https://svn.vgoemulator.net/svn/vgocontent/trunk (user: anonymous, no password) once this goes live; for now, it's Private
If there are any questions, please start a new post asking as I am leaving this topic just for documentation purposes. Also note this _is_ the process, it is not open for debate. If you have a brilliant idea, present it and if it fits into the Big Picture, I will definitely consider it for VGO content design work flow. Until then, stick with the above.
For VGOEmulator Project "Official Server" content development, at least - this is our folder structure for storing all Scripts:
First, this folder structure is relative to WorldServer.exe. So if WorldServer.exe is in C:\VGOEmu --
Spells/ - parent folder for Spells/Abilities scripts
Spells/{CLASS} - the class the Spells/Abilities belongs to, and all their scripts within
Spells/{COMMON} - Spells/Abilities that are ALL/ALL
Spells/{RACIAL} - Racial Abilities and Inheritances
Chunks/ - Since there is only 1 script per chunk, they all live in the Chunks folder
Items/ - All item scripts in 1 folder, unless it becomes unbearably cluttered
Quests - the parent folder for Quest scripts
Quests/{CHUNK} - the chunk that the Quest belongs to (based on starting chunk)
Quests/{COMMON} - any common functionality used across multiple quests (includes)
Spawns/
Spawns/{CHUNK} - the chunk that the Quest belongs to (based on starting chunk)
Spawns/{COMMON} - any common functionality used across multiple spawns (includes)
An example of each:Code: Select all
/Spells/Rogue/Backstab.lua
/Chunks/IsleofDawn.lua
/Items/journey_boots.lua
/Quests/IsleofDawn/go_to_kiri_tentrees.lua
Spawns/IsleofDawn/TanFenGreatcloud.luaNote the naming convention of the different types of scripts - this is to ensure uniqueness and readability, for the most part.
Spells:
The "spell_name" is parsed to remove anything but Alphanumeric symbols. "Backstab I" becomes "Backstab", and the upgrades within the line use the same script "Backstab.lua" - and the increasing potency of the ability is handled by passed in Lua parameters (spell_data, TBD).
Chunks
Chunk scripts use the database field `chunks`.`shortname` since they are already unique and "clean". These are the same names you use when you .rift by name, for example: "TurshVillage.lua", "WardshipoftheSleepingMoon.lua" and so forth. Generally, chunk names are not very wordy, so there was no reason to break them into underscores
Items
Items (like Quests) have a different naming convention because some of the names are ridiculous. Take for example this item (though I am sure it is not scripted, just an example):
"Artisan's Sophistcated Studded Workshirt of Problem Solving"becomes
"ArtisansSophistcatedStuddedWorkshirtofProblemSolving.lua"-OR-
"artisans_sophistcated_studded_workshirt_of_problem_solving.lua"-OR-
"1022344.lua"(which is the item_id)
I'm not keen on using IDs for file names, because they are harder to manage - though DBE could handle them fine, I think "people" would get confused.
Quests
Similar problem exists for Quests with some of the quest names being rather long, so I'm opting for the underscore separator here as well.
"All Harakhan's Scarabs and All Harakhan's Men"becomes
"all_harakhans_scarabs_and_all_harakhans_men.lua"inside of it's appropriate Chunk_Short_Name subfolder
Spawns
Spawns are easy, just like abilities and chunks, just removing anything not alphanumeric and slapping a .lua on the end.
Tan Fen Greatcloudbecomes
TanFenGreatcloud.lua
The "Common" folders
Spells, Quests and Spawns all have a "Common" folder, however. I'll just use Spawns as an example now, because I still have to figure out common scripting for the others - it may not be necessary at all for Quests.
"Spawns/Common/" will be for things like random movement scripts
circle_clockwise_small_01.luaIf a Designer wants to assign this script to a spawn, they would ignore the spawn script path and file name suggested by DBE, and type
Spawns/Common/circle_clockwise_small_01.luainto the Script Assignment page (for Spawns, there are 3 - works the same for any of the 3 assignment types).
This means this NPC, regardless of it's name or chunk location, will execute commands inside circle_clockwise_small_01.lua.
"Spells/Common/" will be for spells that ALL races and classes can use - like Sprint, or Recall, etc.
One final thing to keep in mind: You reserve the right to name the scripts anything you wish, should you not agree with the DBE suggested names. However, I must insist the "folder structure" remain as designed or we'll have a mess trying to find anything. Change the filename if you need more clarity, just not the parent folder, class or chunk folders. They must be there for DBE to work.
Content SVN
Bet you didn't know we had one, did you? It's pretty barren currently, but the goal of this SVN is to be the source for all the content this team designs. Weekly, a backup of the Content database is made, along with table schema and data-only dumps, plus all scripts are added and committed to SVN automatically. Anyone seeking the latest/greatest content will simply need to do SVN Updates from our Content SVN into their World folder and apply any DB changes (we're working on automating this as well) and they have what we have.
Content SVN: https://svn.vgoemulator.net/svn/vgocontent/trunk (user: anonymous, no password) once this goes live; for now, it's Private
If there are any questions, please start a new post asking as I am leaving this topic just for documentation purposes. Also note this _is_ the process, it is not open for debate. If you have a brilliant idea, present it and if it fits into the Big Picture, I will definitely consider it for VGO content design work flow. Until then, stick with the above.
John Adams
VGOEmulator - Project Ghost
"Everything should work now, except the stuff that doesn't" ~Xinux
VGOEmulator - Project Ghost
"Everything should work now, except the stuff that doesn't" ~Xinux