help with kill neutral creature objective script

Maps and the art of mapmaking.
myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

help with kill neutral creature objective script

Unread postby myythryyn » 03 Oct 2006, 23:22

hello, im trying to set up an objective to kill a neutral stack of creatures on the map.

i read the documentation and it says that this objective has several variables. but doesnt say what those variables are, or give an example of how to use this objective.

im assuming the first variable is the creatures scripted name.
and im guessing the rest of the variables must be the co ordinates.

so say i have a creature stack at 47,45 floor 0.

KillNeutrals
variable 0 = scripted creaturename
variable 1 = 47 (x)
variable 2 = 45 (y)
variable 3 = 0 (floor)

would that be about right?

User avatar
Grumpy Old Wizard
Round Table Knight
Round Table Knight
Posts: 2205
Joined: 06 Jan 2006
Location: Tower Grump

Unread postby Grumpy Old Wizard » 04 Oct 2006, 02:24

Well, I think it is going to take some experimentation since the manual is so vague.

Does Kill Neutrals mean one stack at a specific location, or does it rather mean kill a certain number of neutral stacks that have a specific name?

Name is definately the first parameter, I would say. If Kill Neutrals does indeed mean one stack then the coordinates and floor location probably make up the other parameters so it may go:

Name
floor
x
y


or

Name
x
y
floor

GOW
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 04 Oct 2006, 02:58

no, its not any of those combinations.

i tried name, floor, x, y, and name, x, y, floor.

but everytime i load the game, the objective to kill the neutrals is not active.

the exact wording in documentation is....defeat neutrals - scripting name of on-map creatures. can have several parameters.

so no one yet has played around with this objective and gotten it to work? maybe is there a map out there, made by nival or whoever that has this objective working in it so we can open the map and see how its set?

User avatar
Pitsu
Round Table Hero
Round Table Hero
Posts: 1830
Joined: 22 Nov 2005

Unread postby Pitsu » 04 Oct 2006, 07:54

myythryyn wrote: the exact wording in documentation is....defeat neutrals - scripting name of on-map creatures. can have several parameters.
For me it translates as the name of creatures is the only parameter needed (why to have coordinates, if the name already specifies an object?). If you need several monsters to be defeated you can have more than one name in the parameter list. Not tried myself. There should be ways to work around it by scipts as well if necessary.

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 04 Oct 2006, 14:11

no, i just tried putting just the creature parameter in.

i choose arch-devil, and put a stack of arch devils on the map.

so i entered parameter 0 = 28

when i started the mission, i instantly won. so i checked to make sure that show completed was false, which it was, then changed instant win to false as well, and set ignore to false.

then i started mission again, and this time nothing refering to the objective was in my list.

so i have no idea what to conclude.
im thinking that the objective has to have some means of specifying where the army is you have to defeat, otherwise if you have random monsters you might end up having duplicates of those neutrals on the map, which will then all have to be defeated.
i know for assemble army objective the second parameter is number of creatures, but i dont think that that would apply to defeat neutrals, or maybe it does, and there is a way to specify "no set number" in case you have a randomly growing stack, like -1 or something.

User avatar
Pitsu
Round Table Hero
Round Table Hero
Posts: 1830
Joined: 22 Nov 2005

Unread postby Pitsu » 04 Oct 2006, 17:27

myythryyn wrote:
so i entered parameter 0 = 28
Erm, 28 is a weird name (sounds more like creature type ID not a name) for a stack so i will go it step by step. and it works perfectly in my game:

1. place a neutral stack
2. open its propertiees and GIVE IT an NAME for example Georgebush
3. open map properties tree and the objectives
3. add objective into the category you want and chose it to be DEFEAT_NEUTRALS
4. add parameters and type into it Georgebush or whatever NAME you gave that particular stack (nothing to do with monster type ID as archdevil = 28 suggests)
5. check when the objective comes visible, whether it gives an instant victory and whatever you want it to be
6. save map and play. should work

edit: as far as i know the game actually does not allow one name to be used on more than one object (although it sometimes does not give an immediate error also). That is why i assumed that there is no need to specify the coordinates. Once you give an object a name, it is found, unless it is nonexistant. Like mentioning a heros name, the hero is found without any need to specify his/her location.

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 04 Oct 2006, 20:00

Pitsu wrote: 2. open its propertiees and GIVE IT an NAME for example Georgebush
Georgebush eh? well that might make an interesting creature to defeat for an objective :)

but yes, that worked, i forgot you could place names on objects.

so i put parameter 0 = to the name i selected, and now its a listed objective that can be completed.

i wonder what the other parameters would be for.....

User avatar
Grumpy Old Wizard
Round Table Knight
Round Table Knight
Posts: 2205
Joined: 06 Jan 2006
Location: Tower Grump

Unread postby Grumpy Old Wizard » 04 Oct 2006, 20:55

Here is a bounty hunter type quest to kill 3 neutral mage stacks. The paratmeters are the ID number for the mage units and the number of stacks to kill.

Image

Image

Image
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."

User avatar
DaemianLucifer
Round Table Hero
Round Table Hero
Posts: 11282
Joined: 06 Jan 2006
Location: City 17

Unread postby DaemianLucifer » 04 Oct 2006, 21:15

:lolu: :rofl:

Btw,I thought that they delayed the editor to make it more user friendly :|

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 05 Oct 2006, 00:35

* 8| * i didnt know that Agrael works for Nival....as long as Isabel isnt in charge of anything, we should be ok...

poor academy....

but its interesting, the parameters for the seer hut defeat neutrals worked with the creature ID, not script name. while the player objective for defeat neutrals only workes with script name. i wonder why the difference. unless you can use the creature ID, as long as you provide a second parameter for number of creatures....
maybe ill try that,
parameter 0 = 28
parameter 1 = 1
which would mean one stack of arch devils.
ill see if that works. maybe you can use either value.

edit - nope just checked, you cant put a numerical value in the 0 parameter, i set the objective to instant win if successful,and when i load the map, i instantly win.

User avatar
Sir_Toejam
Nightmare
Nightmare
Posts: 1061
Joined: 24 Jul 2006

Unread postby Sir_Toejam » 19 Oct 2006, 22:10

when i load the map, i instantly win.
now that has GOT to give one a sense of accomplishment!

you should put that up as a joke map, and tell everybody that it's designed to be played on "heroic".

:-D

meows
Peasant
Peasant
Posts: 75
Joined: 11 Oct 2006

Unread postby meows » 14 Nov 2006, 21:37

myythryyn wrote:

1. place a neutral stack
2. open its propertiees and GIVE IT an NAME for example Georgebush
3. open map properties tree and the objectives
3. add objective into the category you want and chose it to be DEFEAT_NEUTRALS
4. add parameters and type into it Georgebush or whatever NAME you gave that particular stack (nothing to do with monster type ID as archdevil = 28 suggests)
5. check when the objective comes visible, whether it gives an instant victory and whatever you want it to be
6. save map and play. should work

edit: as far as i know the game actually does not allow one name to be used on more than one object (although it sometimes does not give an immediate error also). That is why i assumed that there is no need to specify the coordinates. Once you give an object a name, it is found, unless it is nonexistant. Like mentioning a heros name, the hero is found without any need to specify his/her location.
This worked perfectly in 1.3 yet trying this with new maps in 1.4 you can get resources but not if I select to give creatures. Tried many times and even went back to a 1.3 map I made and saw the Oblective Destroy Neutrals was removed.. any one else find this or is it just me?


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 6 guests