I’ve been itching to get to work on a creative project for a while now, having cut my teeth with Skyrim to learn Pascal, then C# to make programs for Fallout4, deep overhauling of leveling and gear mechanics for Fallout New Vegas, and just recently worked on Conan Exiles but abandoned due to the devs forbidding modification of DLC.
So now I’ve set my eyes on overhauling WoW like I did New Vegas and Fallout 4, so I’ve a few questions about TrinityCore, with it being in a functional state to the point that it can be extensively modified, unlike ServUO for Ultima Online which is a hardcoded mess that doesn’t even use databases. Also, I’ve tried to get into C++ before, but the documentation is terse and, if it’s not auto-generated, it’s written by people who already know how to program in C++, for people who already know how to program in C++ and just need a reminder. Unlike, say, the documentation for Delphi, where mutliple verbose examples are given for working with a particular function, or for explaining a particular statement. So this would be a good foray into getting to grips with C++.
What sort of server hardware is best? As in, does TrinityCore love having lots of slow cores, or a few fast ones? Been looking for a good deal on servers, and Hetzner has an i7 6700 with 64GB of RAM and 2x 512GB SSDs, which sounds pretty spanky. Would that be sufficient for handling TrinityCore with plenty of room to spare?
Are the mechanics related to leveling, combat, and gear hard coded, or are they freely accessible? As a comparison, in Bethesda’s games, you can’t add new variables to item records, and you also can’t modify the damage formula. Whereas in Conan Exiles, the damage formula is easily accessible in an Unreal Engine 4 blueprint, which allows you to modify it as extensively as you wish.
I cannot stand faux persistence in games. Rather than having deer actors de-spawn and new ones spawned in a different area to imitate herd migration, I’d much rather have the deer actually travel from one zone to another, with players being able to witness this if they encounter the migration. Is such persistence possible with TrinityCore? In other words, can a spawned actor directly travel from Blasted Lands to Eversong Wood, without being despawned and respawned for every zone?
How terse is the source code? Programmers love to do things like [for x := 0 to j - 1 do begin], which is arse to read as the variables are completely opaque. Contrast that to [for iCurrentActorIndex := 0 to iNumberOfActorsInArray - 1 do begin], which tells you exactly what the rest of the code will be doing, just by looking at the two variables used as the for loop’s arguments.
What I initially want to do, is wipe all actors and spawns from the game’s maps, as I will be modifying every zone, some drastically, some not. The end goal is to have a sandbox, rather than a theme park, so I’ll be needing to do a bunch of custom NPCs. Is that doable without royally screwing up TrinityCore? I assume that it is, since it makes use of databases to host the game’s content rather than hardcoding everything, but I just want to make sure.
Tough one to be honest, you can alter pretty much all formulas BUT not everything will be reflected on client side (we clearly don’t have source for wow client)
With the given example, no - any time there is a loading screen you have a new map (there is one loading screen between Eastern Plaguelands and Ghostlands) so going from Blasted Lands all the way up to Eastern Plaguelands is possible
That is your opinion, personally I have not met a single developer who gives long names to loop index variables - huge warning: NO DOCUMENTATION
Totally doable, just truncate creature and gameobject tables (and multiple related tables that reference those - another warning: NO FKS enforced on database level)
Aye, the server is overkill, but for some reason, everything under £40 is way worse, but everything over it is negligibly better, and after shopping around, it’s by far the best deal I’ve found for a dedicated server. I’m going to go for it, but just wanted to know if having four skylake cores would be enough to have some space to breathe.
I thought the formulas would all be calculated server side, with only the client receiving packets that change the size of the interface. I’ll experiment, see what happens.
So my next question about the loading screens, is can NPCs transition through load screen portals (or w/e the terminology is), like NPCs can in Skyrim for example? If not, I’ll just rejigger the map to not have a loading screen when I remake the zones.
Ah, so there’s no documentation, and the code is going to be less than verbose. Expect a bunch of questions once I get the server running.
FKs are for dictating which database is being referenced by a variable used in another database, right?
First thing you should know is that loading screen means a different map, both clientside (different terrain to load) and serverside (different Map class objects)
In theory NPCs could go from one map to another. In practice its a different story, creating a new NPC on new destination map is indistinguishable from just moving the old one to the client. This has a significant impact on code design - because updating maps is multithreaded, restricting NPC to a single map allows having no thread synchronization for better performance
Oooh, so there’s some proper multi-threading going on. Is it that each map is updated in parallel, like how EQEmulator has a loading screen between every zone and each zone is a standalone process, or the actual maps themselves are updated by multiple threads? If it’s the latter, that is exceptional, as I can just make one big continent when I redesign the maps in Noggit. If it’s the former, that’s not ideal but since I’ve my eyes on a skylake server, I’ll have plenty of single thread processing grunt, so that’s no biggie.
Then again, I’d be able to just use something like a collision box that sends an event to the server, whenever a group of NPCs collide with it and have a specific flag set, that despawns them and places new spawns in the adjacent map, supposing that functionality is possible. The reason I want to have this level of persistence, is that I’m going to focus on sandbox content, rather than themepark.
So my next question: How in-depth are the AI packages? Are we only able to have NPCs patrol in a specific radius, or can I make as complex a package as I want? And is it possible to do that without recompiling the entire server, so that I can develop and debug my custom AI packages as quickly as possible?
BFQ scores pretty much dead last in every benchmark in the article.
And nice, there is functionality for making sandbox style quests (dynamically triggered, rather than instanced per player after talking to an NPC). It’s a bit over my head since there’s no examples on the article, but there’s got to be a few kicking about that other players have made. Nice, TrinityCore has proper potential.
Just had a thought when I was making my design document. I also want to remove all the quests TrinityCore has, and make completely new ones. Is that also doable just by truncating the relevant databases, without ruining in-game functionality like character creation?
The smart AI system can be used to make creatures perform certain tasks when an event occurs, make the creature cast a spell when it enters combat, make it yell before it’s death, it’s very fast paced and easy to get into, it is also very well documented. Smart AI doesn’t require recompiling nor restarting since it’s handled through a table in the database called smart_scripts. You can read more about it here.
You could also opt for writing creature scripts in C++, that will however require recompiling.
It shouldn’t interfere with any core functionalities, however, there are some quests which are essential to players, i.e. the first forsaken quest which unfreezes you, druid bear form, hunter pet quests etc. so keep that in mind when removing quests if you don’t plan on creating custom classes.
Aaah, so they can be as broad and complex as I want. That’s really damn good. My last question about them, is there a way to have multiple scripts with conditions that dictate which one is run? Say if I have an NPC with three smart scripts in an array: smartscriptWandeInrRadius512, smartscriptGoToStormwindCity, smartscriptGoToGoldshire, is there existing functionality where I can add conditions, and the scripts are looped through every now and again to see which one should be active?
Or do I just have multiple smart scripts on a single NPC, with a master smart script that handles the update loop?
Aaah, yeah that makes sense. I’ll have to remake those class/race specific quests. That’s great; the server won’t crash on startup because a quest is missing.
Got another question, now that I’ve been spending more time on the music for my server. How much control is there over which music tracks play? For example, is the music hardcoded per zone? Or am I able to do things like implementing various combat music tracks that play depending on the health of the player, have a unique ambient track for an alleyway, that sort of thing.
Well what you wrote above would be handled using waypoints rather than smart scripts. However, waypoints can be started, stopped, paused using smart scripts, more on this in the documentation linked above.
So in this case, you could write a smart script which gets triggered on event waypointToStormwind end, the smart script would make the NPC wander in a radius, then once that waypoint is done, you would make it walk to Goldshire.
There are no master/slave communications between scripts if I'm not mistaken. They are each called separately in accordance to certain events occurring as shown in the example above.
So in order to make my new music play, I’ll have to modify the client’s archives, and then trigger it through the server. That’s perfect.
Oh we need to use waypoints. Fair enough, they are way less taxing than navmeshes. Just need to structure the events properly. Are waypoints hardcoded, or can they be added at runtime like any other object, and then linked together?
Rather than modifying already existing MPQ archives, you would create custom ones.
And they can be added and modified during runtime, there are even game master commands set in place that allow you to to add, reload and start them.
Oooh, that makes things much easier. The reloading at runtime will be extremely beneficial for another wing of the project. Can resources in one archive be overwritten by another? Say I have an MPQ that has a modified Draenei male texture, will that override the vanilla one without modifying the original MPQ?