[Solved] Permanent corpses and endless beatles

Level 2
Joined
Dec 29, 2020
Messages
9
Basically, I'm trying to create a Necromancer-style class, but with massive zombie armies. I have modified Corpse Beetle spell to create zombies, that was easy. But I can't seem to get it's summon limit past 24. There doesn't seem to be any sort of Game Constant attached to it either. Is there a way to create more than 24 permanent summons?

On the adjacent note, I'm trying to populate local graveyard with limited number of permanent corpses. For this I use custom dummy unit (named, appropriately as Corpse) that designates spawn points of corpses through script (based on one from Corpse Decay prevention):
  • Make corpses
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Corpse) and do (Actions)
        • Loop - Actions
          • Unit - Create a permanent Skeletal Villager (Male 2) corpse for Neutral Victim at (Position of (Picked unit)) facing (Facing of (Picked unit)) degrees
          • Unit - Remove (Picked unit) from the game
However, this does not seem to have any sort of permanency effect. I tried it with Fleshy corpses -> they quickly decay into bones. And Skeletal corpses dissipates after what seems like default 88. For testing purposes I tried modifying bone decay to something faster, but post that I reference tells that it screws with permanent corpses, so I reverted. Didn't help in either modification

I have also tried changing order of corpse creation/unit removal, but it doesn't seem to help either. Any ideas?


Version is 1.29, if that's something worth noting
 
About the permanent corpse:
in the unit properties set:
death type: does raise, does not decay
Death time: 9999999999

about the beetle limit: \
you can create a a trigger like:
unit dies
if unit type = your unit type
if killing unit = no unit
then
set TempLoc = position of triggering unit
create 1 YourUnitType at TempLoc
Call RemoveLocation(udg_TempLoc)

I don't know if that beetle limit kills them or removes them. If it removes them without triggering death event, it wont work.
 
Level 21
Joined
Mar 29, 2020
Messages
1,235
I'm trying to populate local graveyard with limited number of permanent corpses

so basically you want something that does what the ud graveyard building does? I can think of 2 easy ways to do that: option a. see which ability it has and copy that ability to a dummy you stick in your graveyard. option b. create a copy of the graveyard building and take away all it's other abilities, and change it's model to something either almost invisible, or as a doodad you want in the graveyard (and give it the locust ability).

these are both pretty much the same thing, and very easy to do.


the way I would go about your zombie problem is slightly different then Stan. why not just have the whole ability be triggered?

create an ability based on channel and trigger it along these lines:

actions:
a unit starts the effect of an ability.
conditions:
the right ability.
there is a corpse in range x of the triggering unit.

actions:
-remove the corpse
-create 1 unit.

obviously this isn't exact and you need to add leak removal, and also some way to make sure you are removing the corpse under the unit you are creating (and not removing corpse a and creating a unit over corpse b).
(If you want to use this method I can help you flesh it out)
 
Last edited:
Level 2
Joined
Dec 29, 2020
Messages
9
About the permanent corpse:
in the unit properties set:
death type: does raise, does not decay
Death time: 9999999999
This solution has a problem mentioned in a post that I reference -- "does raise, does not decay" property makes such that a unit is actually never leaves a corpse in a first place. Neither fleshy, nor skeletal. It just dies and disappears. I think it is meant for incorporeal or flying creatures that should be able to be resurrected, but does not actually leave a corpse behind

so basically you want something that does what the ud graveyard building does? I can think of 2 easy ways to do that: option a. see which ability it has and copy that ability to a dummy you stick in your graveyard. option b. create a copy of the graveyard building and take away all it's other abilities, and change it's model to something either almost invisible, or as a doodad you want in the graveyard (and give it the locust ability).

these are both pretty much the same thing, and very easy to do.

The difference between what I want to do and undead graveyard is of permanency. Graveyard actually spawns corpses nonstop -- once every Nth second, if I'm correct. It can be perceived to be permanent, while they are not. And the building keep spawning them even after the corpses been used -- which would mean even single such spawner would provide a patient enough necromancer with unlimited supply of undead.


To both of you -- great many thanks. I decided to do it a little roundabout way. The whole reason for this debacle was to reward a player for exploration with a bunch of corpses to raise his minions from. Since player is expected to raise them as soon as he finds them (let's imagine we have solved unlimited zombies problem), I decided to create a "grave" unit that, when destroyed, spawns a default corpse. That way I can replace all my dummies with these graves, from which player would rise his army

about the beetle limit: \
you can create a a trigger like:
unit dies
if unit type = your unit type
if killing unit = no unit
then
set TempLoc = position of triggering unit
create 1 YourUnitType at TempLoc
Call RemoveLocation(udg_TempLoc)

I don't know if that beetle limit kills them or removes them. If it removes them without triggering death event, it wont work.
There's a problem in this one -- it resets HP of "killed" zombie. I want to save it, so I've modified it a little
  • Unlimited Zombies
    • Events
      • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Unit-type of (Killing unit)) Equal to No unit-type
          • (Unit-type of (Triggering unit)) Equal to Zombie
    • Actions
      • Set lastZombieHp = (Percentage life of (Triggering unit))
      • Unit - Remove (Triggering unit) from the game
      • Unit - Create 1 Zombie for Player 1 (Red) at (Position of (Triggering unit)) facing (Facing of (Triggering unit)) degrees
      • Unit - Set life of (Triggering unit) to lastZombieHp%
the way I would go about your zombie problem is slightly different then Stan. why not just have the whole ability be triggered?

create an ability based on channel and trigger it along these lines:

actions:
a unit starts the effect of an ability.
conditions:
the right ability.
there is a corpse in range x of the triggering unit.

actions:
-remove the corpse
-create 1 unit.

obviously this isn't exact and you need to add leak removal, and also some way to make sure you are removing the corpse under the unit you are creating (and not removing corpse a and creating a unit over corpse b).
(If you want to use this method I can help you flesh it out)

Sorry, but this solution seemed kinda counter-intuitive in design. Also, I would somehow know which of the corpses are used, and delete it, and all that. Thanks for the suggestion though
 
Level 21
Joined
Mar 29, 2020
Messages
1,235
this solution seemed kinda counter-intuitive in design. Also, I would somehow know which of the corpses are used, and delete it, and all that. Thanks for the suggestion though
no problem, glad it works. for future reference the way to do that would be to create a unit goup of corpses in range, pick one of them and then create the unit where that one is. also - the default of the conditions panel is 'and', so you don't need to add that there in the future...
 
Top