Need Suggestions on Making a Necromancer

A forum for discussing map making ideas and problems for the Myth series.
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: Need Suggestions on Making a Necromancer

Post by fildred13 »

Thanks everyone for all your help, this has been a frustrating but ultimately enjoyable and rewarding project.

I've been hard at work on this testing it over and over again, but still I am failing. I have gotten much closer, but I'm still failing. Attached is the loathing script for what I have so far. I know it is messy, and I plan to clean it up and add much more to it, but right now this is just a test for me to make sure I can find a body and bring it back to life. In this case, I am just trying to find a warrior body and replace it with a new warrior.

To that end, I have created a necromancer who shoots a projectile onto the ground. The map action then finds the projetile and stores its location. Then a geom searches around it to make sure that there is a body there, and if there is, it stores the body location (for later scripting use, not yet implemented). When it finds a body I search for the necromancer projectile a second time, and this time store its location as a dest. A MOMA moves an invisible unit I created called the S Necro Thrall Creator to the location of the projectile. A Geom then searches for the body AGAIN and stores its location this time as a wayp. Then, the S Necrom Thrall Creator attacks the ground at the body's location with a short range projectile attack, and when his projectile comes to rest, that little SOB promotes into a warrior. TADA!!!

Just kidding, its sloppy and broken somewhere, but hey I'm trying here.

That little unit control I do to make him visible is just to test that everything up to that point is working, and it is. He becomes visible, but NEVER ATTACKS. If I set the attack ground location manually ALL WORKS WELL. The error is, apparently, in the storage of the WHERE TO RAISE variable. It may store, it may not, but whatever the case, he never attacks the location. This is the #1 issue. Anyone who can solve it would have my thanks a thousand times over.


Issue #2, less important: this script is sloppy as old people having sex. For one, I have to store the projectile location with two different geom's, and I have to store the wamd (warrior dead body) location with two separate Geoms. Pyro, I tried just using one storage action for each and making multiple geom's store different locations at once but when I did that anything that linked to those actions was broken. Ex., I would try to make a single storage container: Raise dead projectile location, and use 1 Geom to store it as a dest there and 1 Geom to store it as a cent there. But then the "warrior bodies around?" action just refused to work. Any ideas as to why that is happening would be great too.

Thanks in advance for any insights anyone can provide.
~fildred13

The code:

=====NECROMANCER CRAP=====
{
}

Make Creators Invisible [Unit Control]
initially_active
deactivates_on_successful_execution
0.00, 0.00
{
Monsters
10094 (S Necro Thrall Creator)
Invisible Flag
true
Uncontrollable
true
}

Where is the projectile? [Geometry Filter]
initially_active
deactivates_on_successful_execution
0.00, 0.00
{
Entire Map
Object Type
s nr
Activates on Success
Warrior Bodies Around?
Results Action Identifier
Raise Dead Projectile Location
Maximum Number of Items
1
Choose Random Items
Tested Items Inside Location Field Name
cent
}

Raise Dead Projectile Location
{
}

Warrior Bodies Around? [Geometry Filter]
deactivates_on_execution
0.00, 0.00
{
Circle Centerpoint
Link
Raise Dead Projectile Location
Circle Radius
6.000
Object Type
wamd
Results Action Identifier
Warrior Body Location
Activates on Success
Where should spawner move?
Tested Items Inside Location Field Name
dest
Maximum Number of Items
1
}

Warrior Body Location
{
}

Where should spawner move? [Geometry Filter]
deactivates_on_successful_execution
0.00, 0.00
{
Entire Map
Object Type
s nr
Activates on Success
Move Thrall Creator1
Results Action Identifier
Where to spawn!
Maximum Number of Items
1
Tested Items Inside Location Field Name
dest
}

Where to spawn!
{
}

Move Thrall Creator1 [Move Marker]
only_initial_delay
deactivates_on_trigger
2.00, 2.00
{
Destination
Link
Where to spawn!
Subject
10094 (S Necro Thrall Creator)
Activates on Success
Make Thrall Creator Visible
Where to Raise?
}

Make Thrall Creator Visible [Unit Control]
deactivates_on_trigger
0.00, 0.00
{
Monsters
10094 (S Necro Thrall Creator)
Visible Flag
true
}

Where to Raise? [Geometry Filter]
deactivates_on_execution
0.00, 0.00
{
Circle Centerpoint
Link
Raise Dead Projectile Location
Circle Radius
6.000
Object Type
wamd
Results Action Identifier
Warrior Raise Location
Tested Items Inside Location Field Name
wayp
Maximum Number of Items
1
Activates on Success
Thrall Creator Creates!
}

Warrior Raise Location
{
}

Thrall Creator Creates! [Attack]
deactivates_on_successful_execution
0.00, 0.00
{
Attackers
10094 (S Necro Thrall Creator)
Attack Ground Location
Link
Warrior Raise Location
}
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
User avatar
Fury IX
Posts: 254
Joined: Thu Oct 19, 2006 7:37 pm

Re: Need Suggestions on Making a Necromancer

Post by Fury IX »

I did not read it all... but noticed a few things

Im not sure why you need to moma a unit in, if you are using a monster promotion projectile


The dodge script looks similar to this, you might open up a ww2 map (like the camp) and copy that

The starting geom should likely be set to never deactivate, and the 2nd geom should be set to deactivate on execution

For promoting unit (in theory):

Geom 1 - Never - Look for bullet
- Results to geom 2
- field location cent
triggers:

Geom 2 - Execution - Look for bullet near body
- Results = Attack Ground and Pickup Body- (in order)
- field location = wayp and cent(in order)
- Results = Pickup Body
- field = proj
triggers:

Attack Ground
triggers:

Geom 3 - execution - Look for new unit (slight delay)
-Results = Pickup body
-inside field = subj
Triggers:

Unit Control Pickup body
Image
Image
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Re: Need Suggestions on Making a Necromancer

Post by Pyro »

You should not have to look for the same result twice. You can even feed the results straight to the actions that will use it instead of linking them. As for the Fury said, sometimes you want your actions to always run... this might not be one of them. It depends on how you intend to use it. If you have only one necromancer, then you don't need it running forever as long as it gets retriggered by the script at some point. For example when a unit is spawning, it can also retrigger the first part of the necro script to form a nice loop. You also want the projectile you are using as a "marker" for the summon location to get removed or die at some point. You could give it a short lifespan of say 2.0 seconds. Enough time for a GEOM to grab its location before it dies. If it never vanished, you would just have more and more of these markers sticking around that might not be near any dead body.

I rewrote your script into the following, since what you pasted was incomplete, you will still need to add to this one as well. Try this maybe:

=====NECROMANCER CRAP=====
{
}

ThrallCreator1
{
(subj, monster_identifier)
10094 (S Necro Thrall Creator)
}

Make Creators Invisible [Unit Control]
initially_active
deactivates_on_trigger
0.00, 0.00
{
Invisible Flag
Uncontrollable
true
Link
ThrallCreator1
}

Where is the projectile? [Geometry Filter]
initially_active
deactivates_on_successful_execution
0.00, 0.00
{
Entire Map
Object Type
s nr
Activates on Success
Warrior Bodies Around?
Results Action Identifier
Warrior Bodies Around?
Move Thrall Creator1
Maximum Number of Items
1
Tested Items Inside Location Field Name
cent
dest
}

Warrior Bodies Around? [Geometry Filter]
deactivates_on_execution
0.00, 0.00
{
Circle Radius
6.000
Object Type
wamd
Results Action Identifier
Thrall Creator Creates!
Activates on Success
Move Thrall Creator1
Tested Items Inside Location Field Name
wayp
Maximum Number of Items
1
}

Move Thrall Creator1 [Move Marker]
deactivates_on_trigger
0.00, 0.00
{
Activates on Success
Make Thrall Creator Visible
Link
ThrallCreator1
}

Make Thrall Creator Visible [Unit Control]
deactivates_on_trigger
0.50, 0.50
{
Visible Flag
Activates on Execution
Thrall Creator Creates!
Link
ThrallCreator1
}

Thrall Creator Creates! [Attack]
deactivates_on_execution
1.00, 1.00
{
Link
ThrallCreator1
}
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: Need Suggestions on Making a Necromancer

Post by fildred13 »

Thanks again, I used both of your ideas together and ended up with a just about working necromancer. I'm at the (i think) last obstacle, and this one is just me being retarded. How do I search the map for the new unit? I assume I'll be using a geom, but since the unit I want to search for isn't on the map yet, how can I make it the subject of a Geom? I thought I could search for a given Team Index, since he is on my team, then subtract all the units that are already a part of my PLAYER FORCES OBJE, and bam, I have only him left. But the Team Index thing seems to need subjects to test for.

What am I missing?
Thanks,
~fildred13
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Re: Need Suggestions on Making a Necromancer

Post by Pyro »

There are two GEOM parameters that deal with the team index.

Monsters From This Team Index (mont, integer) - This parameter will filter out monsters that do not belong to the team index specified.

Tests for Monsters on a Given Team Index (team, integer) - This paramter will look for all monsters on the map that belong to this team index and add them to the results.


One way to go about this is using team, integer and feed those results to a 2nd GEOM that subtracts your player forces
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: Need Suggestions on Making a Necromancer

Post by fildred13 »

I found those, that is what I was planning to use, but my question is perhaps even more simple. I can't understand how to look for a monster who is not yet on the map when the map is being created? Don't I need to, in the GEOM, set the subj's of the GEOM before I can test to see if they are on a given team or not? Normally I would put a link in my GEOM to my PLAYER FORCES SUBJ container, but since my newly created warrior isn't yet in that list, the action passes right over him.

I'm sure I am missing something obvious, but the question stands as: How do I search the map for the new unit; a unit that was not on the map at the time of creation?

I tried searching for object type wam1 and adding all of them to a list, but essentially nothing happened.

How does anyone that uses projectile into unit promotion get that unit into a subj list?
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
Graydon
Posts: 1605
Joined: Sun Mar 21, 2004 5:10 pm

Re: Need Suggestions on Making a Necromancer

Post by Graydon »

You want to create a simple GEOM filter that runs after the promotion has taken place (the unit has been created and is standing there waiting for orders).

GEOM. Find Thrall
-Polygon/Entire Map
-Tested Items Inside Field
-Results Action
-Tests for Monsters of Type (monster header here)
-Monsters (click literally any monster on the mesh for this... it doesn't get used but has to be present, just another weird quirk)
-Activates on Success

The way I've used it on my map is to feed the results as subj straight to an ATTA, and link that in my acos.
Image
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: Need Suggestions on Making a Necromancer

Post by fildred13 »

Thanks Graydon, that was really helpful. I still managed to screw it up though. I followed your instructions basically to a T. I set up this test: When my Thrall is created it activates your GEOM which searches the whole map for wam1's, and puts them in a unit control that makes them all disappear (to make sure they were all getting affected.) Well, even with a 5 second delay on the GEOM to make SURE the unit was good and created, all my other warrior's disappear right on cue, but the warrior that was promoted from the projectile just stands there like a stack of pancakes. Is the projectile perhaps holding on to it's proj 4 letter tag? any other ideas?

Edit: I tried my own suggestion and used the projectile's 4 letter tag as the monster type in the GEOM. Ends up my thrall creator is "s nt" too. No luck with my zombie-warrior though.
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Re: Need Suggestions on Making a Necromancer

Post by Pyro »

Copy/paste that part of the script and maybe we can see what went wrong.
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: Need Suggestions on Making a Necromancer

Post by fildred13 »

I highlighted the pesky GEOM with bold.

PLAYER FORCES as OBJE
{
(obje, monster_identifier)
10010 (warrior)
10009 (warrior)
10008 (warrior)
10007 (warrior)
10006 (warrior)
10005 (warrior)
10011 (S necromancer)
10000 (bowman)
10001 (bowman)
10002 (bowman)
10003 (bowman)
10004 (bowman)
10017 (S Necro Thrall Creator)
}

=====NECROMANCER CRAP=====
{
}

ThrallCreator1
{
(subj, monster_identifier)
10017 (S Necro Thrall Creator)
}

Make Creators Invisible [Unit Control]
initially_active
deactivates_on_trigger
0.00, 0.00
{
Invisible Flag
Link
ThrallCreator1
}

Where is the projectile? [Geometry Filter]
initially_active
deactivates_on_successful_execution
0.00, 0.00
{
Entire Map
Object Type
s nr
Activates on Success
Warrior Bodies Around?
Results Action Identifier
Warrior Bodies Around?
Move Thrall Creator1
Maximum Number of Items
1
Tested Items Inside Location Field Name
cent
dest
}

Warrior Bodies Around? [Geometry Filter]
deactivates_on_execution
0.00, 0.00
{
Circle Radius
6.000
Object Type
wamd
Results Action Identifier
Thrall Creator Creates!
Activates on Success
Move Thrall Creator1
Tested Items Inside Location Field Name
wayp
Maximum Number of Items
1
Results Action Identifier
<deleted action>
Tested items Inside Field Name
proj
}

Move Thrall Creator1 [Move Marker]
deactivates_on_trigger
0.00, 0.00
{
Activates on Success
Make Thrall Creator Visible
Link
ThrallCreator1
}

Make Thrall Creator Visible [Unit Control]
deactivates_on_trigger
0.50, 0.50
{
Visible Flag
Activates on Execution
Thrall Creator Creates!
Link
ThrallCreator1
}

Thrall Creator Creates! [Attack]
deactivates_on_execution
0.00, 0.00
{
Link
ThrallCreator1
Activates on Success
Find New Warrior
}

Find New Warrior [Geometry Filter]
deactivates_on_successful_execution
5.00, 5.00
{
Results Action Identifier
Warriors disappear
Tested items Inside Field Name
subj
Activates on Success
Warriors disappear
Entire Map
Tests for Monsters of Type
wam1
Monsters (subj)
10010 (warrior)
}


Warriors disappear [Unit Control]
deactivates_on_trigger
0.00, 0.00
{
Invisible Flag
true
}
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Re: Need Suggestions on Making a Necromancer

Post by Pyro »

Hmmm... Are you sure the unit being promoted is the same type (same monster tag) as the ones you are searching for? Do you have a lot (more than 100?) of these warriors? There are limits to how many units an action can affect.
fildred13
Posts: 162
Joined: Wed Jun 03, 2009 2:03 pm
Location: Boston, MA
Contact:

Re: Need Suggestions on Making a Necromancer

Post by fildred13 »

I am doing all of these little tests on a test mesh with only 5 enemy warriors, 5 friendly warriors, and the necro. the projectile is set to promote into a warrior, nothing special, just the straight up same guy as the ones walking around the map already.
Gaming Rig: $2000
Apple Cinema Display:$1000
Using for 90% mything: priceless
User avatar
ozone
Posts: 744
Joined: Wed Mar 24, 2004 5:05 pm

Re: Need Suggestions on Making a Necromancer

Post by ozone »

instead if this:

Monsters (subj)
10010 (warrior)

try this:

Monsters (subj)
10011 (S necromancer)

I have a feeling 10010 (warrior) is dead when you run that geom
do it.
Graydon
Posts: 1605
Joined: Sun Mar 21, 2004 5:10 pm

Re: Need Suggestions on Making a Necromancer

Post by Graydon »

I didn't think that mattered oz? Could certainly be it though.

I don't know/think it matters anymore, but when I learned most of my "advanced" scripting from Khel, he always taught me to script my actions like one would read a book. At the time I think it mattered for certain GEOM parameters, and most certainly was required on any MUNG. The fact that the parameters in that GEOM are all over the board may be playing a part in its failure. That's a big ballpark guess though, the action otherwise looks correct.
Image
Graydon
Posts: 1605
Joined: Sun Mar 21, 2004 5:10 pm

Re: Need Suggestions on Making a Necromancer

Post by Graydon »

Wait I noticed something else, and I'm always unclear on ones like this. Do ATTA actions 'succeed' in the same manner a TUNI will, or does it count as successfully fired regardless of what happens?

I wonder if you changed ATTA. Thrall Creator Creates! 's ACOS to an ACOE instead, if it'd be any different.

Have you verified that the GEOM in question is ever actually triggering? And if so, verified that it's triggering at the right time? (adding a debug flag to both the ATTA and the GEOM will report the answers to those questions in your mythlog at run time. Another way is to turn on Map Action Debugging [shift ctrl F12 I think?], but that debugs every map action running on the map at any given tick.... it's easier to isolate your problem by just debugging those two actions)
Image
Post Reply