by Gez » Fri Jun 26, 2009 9:46 am
As discussed in the
Additions to skill definition thread. This patch adds a new skill property to skill definitions: ReplaceActor.
Example of use:
Code: Select all
skill test
{
spawnfilter = 4
name = "Massive upgrade!"
ReplaceActor = "ZombieMan", "ShotgunGuy"
ReplaceActor = "ShotgunGuy", "ChaingunGuy"
ReplaceActor = "Demon", "Spectre"
ReplaceActor = "Fatso", "BaronOfHell"
ammofactor = 2
dropammofactor = 1
}
Skill-based replacements are not transitive: zombies are replaced by sergeants, and sergeants by commandos, but zombies aren't replaced by commandos.
The implementation has the skill replacements applied first, followed by any DECORATE replacement. For example, if the above MAPINFO code is combined with this DECORATE code...
Code: Select all
Actor Imp : DoomImp replaces ChaingunGuy {}
Actor FirstAid : Medikit replaces ShotgunGuy {}
... then in the level the sergeants will be replaced by imps, not with medikits. But the former humans will end up being replaced by medikits.
This implementation only changes the FActorInfo::GetReplacement and GetReplacee functions, instead of altering many other functions. As such it is I think the cleanest it can be.
As discussed in the [url=http://forum.zdoom.org/viewtopic.php?f=15&t=18446&start=15]Additions to skill definition[/url] thread. This patch adds a new skill property to skill definitions: ReplaceActor.
Example of use:
[code]skill test
{
spawnfilter = 4
name = "Massive upgrade!"
ReplaceActor = "ZombieMan", "ShotgunGuy"
ReplaceActor = "ShotgunGuy", "ChaingunGuy"
ReplaceActor = "Demon", "Spectre"
ReplaceActor = "Fatso", "BaronOfHell"
ammofactor = 2
dropammofactor = 1
}[/code]
Skill-based replacements are not transitive: zombies are replaced by sergeants, and sergeants by commandos, but zombies aren't replaced by commandos.
The implementation has the skill replacements applied first, followed by any DECORATE replacement. For example, if the above MAPINFO code is combined with this DECORATE code...
[code]Actor Imp : DoomImp replaces ChaingunGuy {}
Actor FirstAid : Medikit replaces ShotgunGuy {}[/code]
... then in the level the sergeants will be replaced by imps, not with medikits. But the former humans will end up being replaced by medikits.
This implementation only changes the FActorInfo::GetReplacement and GetReplacee functions, instead of altering many other functions. As such it is I think the cleanest it can be.