sea
inXile Entertainment
- Joined
- May 3, 2011
- Messages
- 5,698
Warning, long post.What's so janky about quest variables in Dragon Age? It sounds drastically different from NWN, where you were just setting arbitrary integers on any object. I never had the experience of variables randomly setting themselves in all my time modding that game, anyway.
(Unless by "randomly setting themselves" you mean you accidentally scripted them somewhere and forgot about it, but the way you describe it doesn't sound like a mea culpa type situation.)
Basically it comes down to a few things:
- String IDs. Anything like a line of text, value/variable on an object, etc. that is pre-defined is stored as a string with a unique ID. The main campaign has about 10 million reserved string IDs. Mods can pre-define their string IDs from a different range and the editor will randomly pick a "safe" range for a project. However, if a string ID ends up being the same between core files and a mod for any reason, there will be a conflict and something will get overwritten.
- 2DAs and M2DAs. These are basically spreadsheets that are imported by the engine and contain game data. 2DAs are "main" core files like the core rules for enemy stats. M2DAs are expanded spreadsheets that are added to the original spreadsheet afterwards by the engine. For example, if my main spreadsheet has 20 IDs from 0-19, and my add-on has 5 more numbered 20-24, that's fine. But if I number mine from 0-4, those IDs will overwrite the original sheet and break things. This is compounded by the fact that the engine arbitrarily has low limits for certain types of spreadsheets; if you end up going over that limit your data will simply be discarded or will break something else. If you have another mod that edits things and uses the same IDs as your own mod, then you get a conflict.
- Plot files. Plot files are resources which contain quest stages, generic quest variables (like if a plot is a codex entry, a main quest, a quest category, etc.), and are assigned a unique ID at random. However, despite n combinations produced by the random generator, it's possible to end up with duplicate IDs, which leads to conflicts. This can even cause conflicts with core plot files if you are exceptionally unlucky, or other mods that use plot files. There is also a bug where if you duplicate a plot file for convenience, a new UID is not generated and you end up with two files using the same UID, which caused me a ton of headaches.
- Core scripts. Almost all the gameplay logic is controlled by core scripts which can be edited, overwritten, added to, etc. You can also have things processed first by special scripts and then anything afterwards passed to the core script. For example, if you are making a quest, your quest script will have some special code in it which is executed when an event happens, before the event is passed to the core script for processing that kind of event for all the "normal" processing like making sure the journal updates. However, unless you are a pretty good programmer or scripter, and spend a lot of time studying how this operates, chances are you will end up just using the templates provided (i.e. "here's a basic plot script, put your stuff in here"). This can lead to situations where due to some weird bug or special clause in how something operates in a core script, your special script doesn't work. One example I faced was when trying to set up a party member hiring script that removed the auto-level mechanism. It turns out that despite explicitly telling the game to auto-level on hiring in one script, another script overrode this behaviour, so eventually I had to re-write/copy the entire party hiring script but remove the auto-level feature and other stuff I didn't want/need.
I think ultimately Dragon Age's mod-ability was an afterthought. BioWare gave it a good try but it's clear the game was never designed with modders in the first place and most of its convenient features for modding are legacies of the old Aurora engine, instead of down to design decisions to make things work well for modders (or even the people making the game). I also think BioWare never anticipated some idiot like me going and making a full-size game in their engine that was never made to accommodate mods of that size.
Going back to the issue with the Arceris Crypt, I investigated that nearly a year ago. Eventually I discovered that for some reason that variable was being erroneously set at some point previously, which later on caused a game-breaking issue when the script was supposed to fire but couldn't since it was already "done." There was nothing in my scripts which would have triggered this; I searched all of my scripts for any references to that quest where there shouldn't have been, and there were none. I re-wrote the quest scripts from scratch, but there was nothing wrong with them.
Another fun bug I found was when the user enters the Arceris Crypt, auto-leveling on followers got turned back on and then could not be disabled by the player. How? No idea. Why? No idea. There was nothing in my code triggering it. But like clockwork, it always happened. Eventually I just added a script to force auto-leveling off when the player visited the area and said fuck it.
Sorry, no.Do you have a download mirror for that? Other than Nexus
Last edited: