Saracoth on 27/10/2012 at 16:17
Summary: When DML adds receptrons to something that already has them, it adds twice as many
and duplicates an existing receptron.
I've whittled down the reproducable effect to a two-statement DML file. It causes frobbing the compass create a servant 5 units in front of Garrett. This makes the doubling effect pretty visible, since doubling the receptron on Garrett results in two servants instead of one.
Code:
DML1
// unconditionally add a Knockout stim, which Garrett doesn't normally respond to, to the compass
++StimSource -3853 "Knockout"
{
Intensity 1.0
Propagator "Contact"
{
Shape
{
"Contact Types" Frob in Inv
"Velocity Coeff" 0.0
"Frob Time Coeff" 0.0
}
}
}
// Garrett responds to a Knockout stim of 1 by creating a servant 5 units in front of him, facing away from him
// using + or ++ makes no difference; I've seen the doubling effect occur either way
/*
IDs to add the receptron to and observable effects:
-2099 is Garrett. Doubling will be observed.
-3993 is the superclass for difficulty settings. It has no properties, receptrons, or anything, but any changes to it will affect Garrett on all difficulty settings. No doubling will be observed, even for new receptrons, because it had none to begin with.
-3994 is the metaproperty for Normal difficulty settings. Doubling will be observed, and when in effect you will also observe that healing potions restore 4 health per "pulse" instead of 2
*/
/*
Other Target object IDs to create, such as if you wanted to add more than one receptron:
-141 (fire crystal)
-2547 (healing potion)
*/
+Receptron -2099 "Knockout"
{
Min 1.0
Max None
Target -555
Agent Me
Effect "create_obj"
{
"Position" 5.0, 0.0, 0.0
"Heading" 0.0
"Pitch" 0.0
"Bank" 0.0
}
}
Steps to reproduce assume no fan missions/mods for simplicity, but I originally noted the issue with a fan mission and its mission-specific miss20.gam.dml file.
* Create either a dark.gam.dml
or gamesys.dml file in your Thief 2 installation directory, pasting in the above sample DML. Do not create both.
Be sure to include a trailing empty line.* Start a new game. Save your game.
* Use the compass. Note a single servant. Blackjack to confirm there's not another one hiding inside.
* Do one of the following: load your saved game, restart the mission, quit to the main menu and start another new game, or use Ctrl+Alt+Shift+End to skip to the next mission.
* Use the compass. Note two servants.
* Quit the game entirely.
* Start it up again and load your saved game.
* Note a single servant once more.
These effects seem to not be tied to saved games or anything other than how many times New Dark had opportunities to look at the gamesys and/or DML. You can save your game when the effect is visible, then exit the program completely. When you load that save, the doubling is gone. Of course, if you load it a second time or do anything else in the above list, the doubling will return again.
It also never becomes more than a doubling, and I've only noted this when modifying something that already had receptrons. If it has no receptrons, I can safely add as many was I want without any doubling at all.
I've
not yet taken steps to confirm any of the following:
* Is even a single pre-existing receptron enough to trigger the issue? Are there more specific trigger conditions, like certain kinds of receptrons?
* Is the effect limited to receptrons, or can it also affect links and sources? So far, I've only added links and sources to objects that didn't have any links or sources of their own.
* Can the effect occur when modifying existing receptrons, without the intent to add any new ones at all?
If you add a "apply_dbmods 1" line to your dromed.cfg, this can be more clearly observed there. I've never gotten the dbmod_load command to work; it's looking in the path '' and says that path can't be found. I'm probably overlooking something simple. In any case, I'd expect apply_dbmods more closely mirrors the behavior of Thief2.exe. It does seem that when starting DromEd with a blank mission, you see only a single modification. When you load a mission after that, however, the doubling becomes apparent.
In the course of viewing the effects in DromEd, I noticed an even more disturbing effect. Not only are all new receptrons doubled, but exactly one of the pre-existing receptrons also seems to be doubled. Specifically, Garrett's amplification of a BashStim of 8 or more. I was also able to observe that all doubled receptrons also had duplicate IDs. For example, both BashStim receptrons were 0020000E and both new Knockout receptrons were 002000DE (or whatever they end up being).
When I experimented with the normal difficulty metaproperty instead of Garrett, the RestoreStim was duplicated in DromEd. This was easy to verify in-game. When only a single servant was created, health potions restored the expected two shields at a time. When doubling was in effect, it restored four shields at a time.
Another DML sample file for testing the doubling of the RestoreStim amplification on Normal difficulty. It also creates a fire crystal and healing potion, to confirm that all new receptrons are doubled in addition to the RestoreStim one. Finally, the compass inflicts some damage, to make it easy to test the healing potion(s) you create.
Code:
DML1
++StimSource -3853 "Knockout"
{
Intensity 1.0
Propagator "Contact"
{
Shape
{
"Contact Types" Frob in Inv
"Velocity Coeff" 0.0
"Frob Time Coeff" 0.0
}
}
}
++StimSource -3853 "BashStim"
{
Intensity 10.0
Propagator "Contact"
{
Shape
{
"Contact Types" Frob in Inv
"Velocity Coeff" 0.0
"Frob Time Coeff" 0.0
}
}
}
++Receptron -3994 "Knockout"
{
Min 1.0
Max None
Target -555
Agent Me
Effect "create_obj"
{
"Position" 5.0, 0.0, 0.0
"Heading" 0.0
"Pitch" 0.0
"Bank" 0.0
}
}
++Receptron -3994 "Knockout"
{
Min 1.0
Max None
Target -141
Agent Me
Effect "create_obj"
{
"Position" 0.0, 0.0, 0.0
"Heading" 0.0
"Pitch" 0.0
"Bank" 0.0
}
}
++Receptron -3994 "Knockout"
{
Min 1.0
Max None
Target -2547
Agent Me
Effect "create_obj"
{
"Position" 0.0, 0.0, 0.0
"Heading" 0.0
"Pitch" 0.0
"Bank" 0.0
}
}
A work-around may be possible in some cases. In the specific case of Garrett and receptrons, for example, one can use the M-GarrettDiffSettings metaproperty instead. It will still influence Garrett in the end, no matter what difficulty setting is chosen, but since it has no receptrons of its own it is not affected by the issue. Depending on the intended modifications, however, there may be no alternative to making .GAM modifications instead of or in addition to a .DML file.