making a monster question

If you have a module that you'd like comments on or would like to know how to create your very own module, post here

Moderator: Moderator

Post Reply
Message
Author
Jaorin
Halfling
Posts: 102
Joined: Wed Jun 27, 2007 12:54 pm
Contact:

making a monster question

#1 Post by Jaorin »

Is it possible to make a monster that is unaffected by ranged skills? Not just immune, but the attack would go right through them?

FACM
Higher
Posts: 65
Joined: Sun Jan 24, 2010 5:54 pm

Re: making a monster question

#2 Post by FACM »

Possible? Yes.

How you'd implement such a thing would vary, though. Are you working on the ToME module, or your own game from scratch?

Jaorin
Halfling
Posts: 102
Joined: Wed Jun 27, 2007 12:54 pm
Contact:

Re: making a monster question

#3 Post by Jaorin »

I'm playing around with the ToME module as a template.

Edit: I'm trying to make a WoW-like hunter class and need to be able to shoot through my pet.

Edit: Maybe a better way would be to make a shot that didn't hit a friendly.

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: making a monster question

#4 Post by Shoob »

there is a friendly fire tag you could use for the talent (friendly_fire=false, I think, I (or you) would need to look at some talents in t4 to confirm this)
Oliphant am I, and I never lie.

Jaorin
Halfling
Posts: 102
Joined: Wed Jun 27, 2007 12:54 pm
Contact:

Re: making a monster question

#5 Post by Jaorin »

Thanks Shoob.

I've set that to true but that only prevents you from targeting them (and yourself for that matter). It still hits them if I aim through them. I'll keep looking.

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: making a monster question

#6 Post by Shoob »

what happens if you make the talent a beam? I suspect that that flag has to do with ball spells, but I am not sure.

another option you have is to make a special damage, and then give the AC immunity to that :P
Oliphant am I, and I never lie.

Jaorin
Halfling
Posts: 102
Joined: Wed Jun 27, 2007 12:54 pm
Contact:

Re: making a monster question

#7 Post by Jaorin »

I was thinking about the beam/immunity thing. That would make the shots unresistable by everything else and beams can be very powerful.

Antagonist
Higher
Posts: 71
Joined: Sun May 23, 2010 9:55 am

Re: making a monster question

#8 Post by Antagonist »

I had a quick look at the source code.

I ASSUME that what you want is for bolts to pass by friendlies, and to hit enemies. In the code however, the way bolts work is that they stop at the first square that is considered move blocking. Actors, all actors, by default are this.

There are 3 ways to get around this. First is just making your spell use "hit" targetting instead. This means it will damage your enemy past your pet, but unfortunately also means that you can damage enemies past other enemies.

Secondly define a custom damagetype or defaultprojector that your pet is immune to. This will make it resist beams, but the bolts will still hit it instead of passing by. Actually, friendlyfire flag will have it resist beams anyway I think.

Thirdly, you can override the ActorProject:project() method to respect friendlyfire tag for bolts. If I read it correctly its just a modification to line 64 of /class/interface/ActorProject.lua. bolts work by being set stop_block. I would actually advise that DarkGod perhaps make this change to the base engine, IF I am reading this correctly. I havn't really tested this yet.

Post Reply