|
Post by Kyzrati on Feb 8, 2013 0:46:43 GMT -5
(Sorry about all the questions, but I'm sitting down for a few hours and just grinding through this; I've been spending too much time on UFO and TFTD ;p) Time well spent! And no problem asking questions; happy to answer them, especially since they often lead to new mod content and/or useful new engine features. That's the whole point of this forum ;p I have an entity that does something similar to what you are referring to (Ypaezroth, one of the Greater Demons), but through an invisible explosion, so it would hurt everyone around it instead of just the attacker. (It shoots out spikes when under melee attack.) Unfortunately we're missing the trigger you need, along with a number of other trigger versions that would affect alternate targets. Right now there's only ENT_HIT_BY_MELE, which targets the victim, and later I'll add a second version for targeting the attacker. But I'm not planning on any releases soon since I'm in the middle of updating the engine, so don't wait for this. I can't think of any way around this right now except for the explosion method.
|
|
|
Post by Kyzrati on Feb 8, 2013 2:31:02 GMT -5
No problem, sorry about that. We'll get a full complement of triggers later on. If you'd caught me before I started on a new track I could've continued adding them now (since it's not very hard to insert new triggers), but as it is I'd like to hold off on incremental updates for a while to put something bigger together, like R9.
|
|
|
Post by Kyzrati on Feb 9, 2013 5:27:41 GMT -5
Wow, how nice of you 10101. Very useful for everyone. One point: The header on the first page says "TARGETS", but those aren't targets, those are the objects that can carry each of those triggers, I guess you'd call them the "OWNER". Because you're such a nice guy, I'll give you more to play with. Here's a list of the *actual* targets that go with each trigger, as well as the related object that conditions apply to (note that those that do not specify an explicit condition-applicable entity but have an actor can still use entity conditions on the actor). This is straight from the source, including some comments about each that might provide you with extra information about how each works. I never intended to copy this to the public though, so there are some comments to myself scattered in there I'm sure. The formatting probably looks like crap as usual, but it should hopefully look nice if copied to somewhere with 4-space tabs (I really need to find a code tag script with a horizontal scrollbar for this forum... Maybe the new version of proboards, coming out soon, will have something).
// condition-applicable object target // --------+---------------------- ------------------------------- // actor* entity prop item pos entity prop item pos notes "MOVE", // mover - - - - mover - - - triggered immediately after entering a new Cell "MOVE_ON_CELL", // mover - - - pos - - - pos triggered immediately after entering a new Cell (for large Ents, triggered for each Prop at base z-level), ignores EMPTY_CELL "DEATH", // deadEnt - - - - deadEnt - - - "PROP_DESTROYED", // - - prop - - - prop - - "ITEM_DESTROYED", // - - - item - - - item - only triggered by explosion effect in cell, not through all calls to Item::destroy() "ATTACK_ENT", // attacker target - - - target - - - triggered just before attacking an Ent (melee/shooting, before attack text), mostly useful for flavor text "MELEE_ATK_ENT", // attacker - - - - target - - - triggered whether attack will hit or miss (necessary for chryssalid zombify attack) "MELEE_E_ATK_ENT", // attacker - - - - attacker- - - as above, but targets attacker (triggered immediately after the attack particle created) "MELEE_HIT_ENT", // attacker - - - - victim - - - triggered after hit message, but before any damage or other effects applied "MELEE_HIT_ENT2", // attacker - - - - attacker- - - as above, but targets attacker instead of victim "MELEE_HIT_PROP", // attacker - - - - - prop - - triggered after hit message, but before any damage or other effects applied "MELEE_HIT_CELL", // attacker - - - - - - - pos triggered after hit message, but before any damage or other effects applied "ENT_ATK_BY_MELE", // victim - - - - victim - - - triggered as soon as an Ent attacks this one (the target) whether attack will hit or miss "ENT_ATK_BY_PROJ", //victim - - - - victim - - - triggered as soon as an Ent attacks this one (the target) whether attack will hit or miss (excludes explosions) "ENT_ATTACKED", // target - - - - target - - - triggered as soon as an Ent attacks this one (the target) whether attack will hit or miss (applies to both melee and projectiles--excludes explosions) "ENT_HIT", // victim - - - - victim - - - triggered on being hit by melee/projectile/explosion, even if undamaged "ENT_HIT_BY_MELE", // victim - - - - victim - - - triggered if hit by a melee attack, even if undamaged "ENT_HIT_BY_PROJ", // victim - - - - victim - - - triggered if hit by a projectile/explosion, even if undamaged "PROP_HIT", // (shooter)- prop - - - prop - - triggered if hit by melee/projectile/explosion, even if undamaged (checked before damage applied) "PROP_HIT_OKAY", // (shooter)- prop - - - prop - - as above, but triggered after any damage applied (thus only if prop was not destroyed) "PROJ_HIT_ENT", // shooter - - - - victim - - - triggered after hit message, but before any damage or other effects applied (could consider adding another trigger checked *after* damage applied if still alive/conscious?) "PROJ_HIT_ENT2", // shooter - - - - shooter - - - as above, but targets shooter instead of victim "PROJ_HIT_PROP", // shooter - - - - - prop - - triggered before any damage or other effects applied "PROJ_HIT_CELL", // shooter - - - - - - - pos triggered before any damage or other effects applied "PROJ_HIT_OBJECT", // shooter - - - - - - - - triggered on collision with *any* object (Ent/Prop/Cell), triggered before any damage or other effects applied (naturally incompatible with most effects since it provides no definite object parameter, but can be useful for at least spawning) "EXPL_HIT_ENT", // (shooter)victim - - - victim - - - triggered after hit message, but before any damage or other effects applied "EXPL_HIT_PROP", // (shooter)- prop - - - prop - - triggered before any damage or other effects applied "EXPL_HIT_ITEM", // (shooter)- - item - - - item - triggered before any damage or other effects applied "EXPL_HIT_CELL", // (shooter)- - - pos - - - pos triggered before any damage or other effects applied (though after other cell contents affected) "ENT_KILLS_ENT", // attacker - - - - attacker- - - killed target Ent by *any* means processed through die() (note that ent arg for effect is actually *attacker*!!!) "KILL_ENT", // attacker - - - - victim - - - killed target Ent by *any* means processed through die() (alternate version of above for having a special effect on target); does *not* trigger if victim is unconscious "MELEE_KILLS_ENT", // attacker - - - - victim - - - killed target Ent with melee; does *not* trigger if victim is unconscious "MELEE_KILLS_E2", // attacker - - - - attacker- - - as above, but targets attacker instead of victim "PROJ_KILLS_ENT", // shooter - - - - victim - - - killed target Ent with projectile; does *not* trigger if victim is unconscious "PROJ_KILLS_ENT2", // shooter - - - - shooter - - - as above, but targets shooter instead of victim "EXPL_KILLS_ENT", // (shooter)victim - - - victim - - - killed target Ent with explosion; does *not* trigger if victim is unconscious "E_MOV_BYTHIS_E1", // adj ent mover - - - mover - - - triggered when Ent enters a Cell adjacent to (incl. diagonal) an Ent with this SA (note: currently checked in Entity::move(), when really it should be checked in changePos() to catch all situations (like falling, etc), but that may cause some chaos since changePos() is pretty low level...) "E_MOV_BYTHIS_E2", // mover - - - - adj ent - - - as above, but targets adjacent Ent "E_MOV_BY_E1", // mover adj ent - - - mover - - - triggered when Ent with this SA enters a Cell adjacent to (incl. diagonal) another Ent (note: currently checked in Entity::move(), when really it should be checked in changePos() to catch all situations (like falling, etc), but that may cause some chaos since changePos() is pretty low level...) "E_MOV_BY_E2", // mover - - - - adj ent - - - as above, but targets adjacent Ent "E_MOV_BYTHIS_P1", // mover - prop - - mover - - - triggered when Ent enters a Cell adjacent to (incl. diagonal) a Prop with this SA (excludes on top of! use _ON_PROP for that) (note: currently checked in Entity::move(), when really it should be checked in changePos() to catch all situations (like falling, etc), but that may cause some chaos since changePos() is pretty low level...) "E_MOV_BYTHIS_P2", // mover - prop - - - prop - - as above, but targets prop itself "E_MOV_BY_P1", // mover - prop - - mover - - - triggered when Ent with this SA enters a Cell adjacent to (incl. diagonal) another Prop (excludes on top of! use _ON_PROP for that) (note: currently checked in Entity::move(), when really it should be checked in changePos() to catch all situations (like falling, etc), but that may cause some chaos since changePos() is pretty low level...) "E_MOV_BY_P2", // mover - prop - - - prop - - as above, but targets prop itself "E_MOV_ONTHIS_P1", // mover - prop - - mover - - - triggered when Ent enters a Cell occupied by a Prop with this SA (note: currently checked in Entity::move(), when really it should be checked in changePos() to catch all situations (like falling, etc), but that may cause some chaos since changePos() is pretty low level...) (for large Ents, triggered for each Prop at base z-level) "E_MOV_ONTHIS_P2", // mover - prop - - - prop - - as above, but targets prop itself "E_MOV_ON_P1", // mover - prop - - mover - - - triggered when Ent with this SA enters a Cell occupied by a Prop (note: currently checked in Entity::move(), when really it should be checked in changePos() to catch all situations (like falling, etc), but that may cause some chaos since changePos() is pretty low level...) (for large Ents, triggered for each Prop at base z-level) "E_MOV_ON_P2", // mover - prop - - - prop - - as above, but targets prop itself "ENT_CASTED", // caster - - - - caster - - - triggered when Ent with this SA uses an intrinsic SA, to target/affect self in some way (checked before DESTROY_COUNT/REMOVE_COUNT tested/applied)--if not limited by SA_CONDITION_SA_NAME, will apply to *all* casting by default! "ENT_USED", // user - - - - user - - - triggered when Ent with this SA uses an item-based SA, to target/affect self in some way (checked before DESTROY_COUNT/REMOVE_COUNT tested/applied)--if not limited by SA_CONDITION_SA_NAME, will apply to *all* using by default! "CAST_ON_ENT", // caster - - - - target - - - "CAST_ON_PROP", // caster - - - - - target - - "CAST_ON_ITEM", // caster - - - - - - target - reflexive intrinsics target the item in caster's SLOT_MANIPULABLE_1 slot, or SLOT_MANIPULABLE_2, or no effect "CAST_ON_CELL", // caster - - - - - - - target "USE_ON_ENT", // user - - - - target - - - "USE_ON_PROP", // user - - - - - target - - "USE_ON_ITEM", // user - - - - - - target - "USE_ON_CELL", // user - - - - - - - target "USE_MEDKIT", // user - - - - patient - - - triggered when user performs a (u)se action on an item with this SA (not handled through normal use triggers because it could target an unconscious Ent body)--only inteded for use with SA_EFFECT_OPEN_MEDKIT (is a GM check on this); this must be the *first* SA trigger listed for the item! otherwise it won't be detected in chooseSpecialAbility() (any item that has a SA_TRIGGER_USE_MEDKIT trigger must also have at least one SA_TRIGGER_MEDKIT_FUNCTION trigger, too! (otherwise has no functions...), there is a GM check on this requirement for medkit items) (see CMedkit for more); this trigger should not be put on items with other use/intrinsic triggers (the others will be ignored) "MEDKIT_FUNCTION", // user - - - - patient - - - special trigger for medkit functions (*not* for activating the medkit itself) (obviously intended for use with SA_EFFECT_MEDKIT_ saEffectTypes, but really you could combine it with almost any Ent-targeting effect, SA_EFFECT_MOD_ENTITY probably being among the more useful) "ENT_MANIP", // user - - - - user - - - triggered when user manipulates another Ent with this SA (must be facing them and use manipulate action) "ENT_MANIP2", // user - - - - used - - - as above, but targets used Ent itself "PROP_MANIP", // user - - - - user - - - triggered when user manipulates a Prop at his pos (checked first) or in front of him "PROP_MANIP2", // user - - - - - prop - - as above, but targets used Prop itself "ENT_FELL", // faller - - - - faller - - - triggered on impact before damage applied (only if *not* already dead/unconscious) "PROP_FELL", // - - prop - - - prop - - triggered on impact before damage applied "ITEM_FELL", // - - - item - - - item - triggered on impact after any normal/explosive effects (Item::moveToCell(ITEM_MOVE_FELL or ITEM_MOVE_THROWN))--so if it explodes immediately, will never trigger "ITEM_THROWN", // - - - item - - - item - triggered on impact after any normal/explosive effects (Item::moveToCell(ITEM_MOVE_THROWN *only*))--so if it explodes immediately, will never trigger "ITEM_ACQUIRED", // actor - - item - - - item - triggered when item is moved from *ground* to actor inv "SPOT_ENT", // actor spotted - - - actor - - - triggered *at beginning of turn* (after SA_TRIGGER_ENTITY_NEW_TURN) on spotting another Ent (would almost always be restricted by conditions and limited in use); for AI-controlled Factions, not triggered until immediately before the individual actor's turn--these are not allowed to have particles, since not carrying them out sequentially "ENT_NEW_TURN", // actor - - - - actor - - - triggered just before the beginning of Faction's turn (handled sequentially in case they have particles; if a single Ent has more than one, though, all those are carried out at once)--by default, these are currently even checked before the first round "ENT_NEW_TURN_E", // actor - - - - targets - - - as above, but targets all applicable Ents in range "ENT_NEW_TURN_P", // actor - - - - - targets - - as above, but targets all applicable Props in range "ENT_NEW_TURN_I", // actor - - - - - - targets - as above, but targets all applicable Items in range--this actually operates on only the first item in Cell inventory, as per applySpecialAbility() (this would probably be easy to expand/change) "ENT_NEW_TURN_C", // actor - - - - - - - targets as above, but targets all applicable Cells in range "ENT_NEW_TURN2", // actor - - - - actor - - - same as _TURN pair, but triggered after Ent stats already updated (like TU/EN restoration) (handled sequentially in case they have particles; if a single Ent has more than one, though, all those are carried out at once); this is mostly for special use, like modifying an Ent's TU for a given turn--by default, these are currently even checked before the first round "ENT_NEW_TURN2_E", // actor - - - - targets - - - "ENT_END_TURN", // actor - - - - actor - - - triggered just after the end of Faction's turn (handled sequentially in case they have particles; if a single Ent has more than one, though, all those are carried out at once) "ENT_END_TURN_E", // actor - - - - targets - - - as SA_TRIGGER_ENTITY_END_TURN, but targets all applicable Ents in range "ENT_END_TURN_P", // actor - - - - - targets - - as above, but targets all applicable Props in range "ENT_END_TURN_I", // actor - - - - - - targets - as above, but targets all applicable Items in range--this actually operates on only the first item in Cell inventory, as per applySpecialAbility() (this would probably be easy to expand/change) "ENT_END_TURN_C", // actor - - - - - - - targets as above, but targets all applicable Cells in range "PROP_NEW_ROUND", // - - prop - - - prop - - triggered at the beginning of each new round (handled sequentially in case they have particles; if a single Ent has more than one, though, all those are carried out at once)--by default, these are currently even checked before the first round "PROP_NEW_RND_E", // - - prop - - targets - - - as SA_TRIGGER_PROP_NEW_ROUND, but targets all applicable Ents in range "PROP_NEW_RND_P", // - - prop - - - targets - - as above, but targets all applicable Props in range "PROP_NEW_RND_I", // - - prop - - - - targets - as above, but targets all applicable Items in range--this actually operates on only the first item in Cell inventory, as per applySpecialAbility() (this would probably be easy to expand/change) "PROP_NEW_RND_C", // - - prop - - - - - targets as above, but targets all applicable Cells in range "ITEM_NEW_ROUND", // - - - item - - - item - triggered at the beginning of each new round (handled sequentially in case they have particles; if a single Ent has more than one, though, all those are carried out at once)--by default, these are currently even checked before the first round; you'll almost always want to combine a SA_CONDITION_ITEM_LOCATION_TYPE with these to limit their triggerable situations "ITEM_NEW_RND_E", // - - - item - targets - - - as SA_TRIGGER_PROP_NEW_ROUND, but targets all applicable Ents in range "ITEM_NEW_RND_P", // - - - item - - targets - - as above, but targets all applicable Props in range "ITEM_NEW_RND_I", // - - - item - - - targets - as above, but targets all applicable Items in range--this actually operates on only the first item in Cell inventory, as per applySpecialAbility() (this would probably be easy to expand/change) "ITEM_NEW_RND_C", // - - - item - - - - targets as above, but targets all applicable Cells in range
|
|
|
Post by Kyzrati on Feb 9, 2013 20:05:03 GMT -5
Wow, nice chart. The only thing I'd mention is it doesn't include what I believe you are calling "sources", if by that you mean owning object. That was on your other chart.
As a reference for anyone looking at this chart, a simple rundown:
If there's an actor, you can use actor variables in messages like "[name]", "[objpron]" etc. Those in parenthesis are not safe to use variables from because they may be gone, but are included to indicate the actor used for effect data like FACTION=SOURCE.
Condition-applicable target means conditions used on that trigger will apply to that object. Actor is the stand-in entity object if there is otherwise no entity object indicated (and actor is not in parenthesis). You can technically use any condition on any trigger, and the game will use whatever object is most relevant, like the prop at an actor's location, for example. (This also goes for effects--any condition can be used and the game will look for an appropriate object, but if none found the condition automatically fails.)
Target is obviously the target of the effect, and can thus only be used with effects that target that kind of object.
I'll include your charts with the modpack later, and post them in the main modpack thread.
|
|
|
Post by Kyzrati on Feb 11, 2013 20:59:18 GMT -5
Nope. That's something to add I guess, but it would take some time since it has to integrate properly with the targeting code. I'll put it in the notes...
And I think you mean -1, for a parabolic shot, or 2+ for a guided shot. Right now it's straight shots only.
|
|
|
Post by Aves Dominari on Feb 21, 2013 18:57:54 GMT -5
More of an AI question, but does the AI use special abilities? I know the Ethereal in Rookie's Tale can mind control people, but if I have (for example) a CAST_ON_CELL ability that PROJ_SHOOT, then give that ability to an entity on the ALIEN side, will it ever try to use the ability? (Also, what's the abbreviation for stamina, for use in MOD_ENT?)
EDIT: I've also run into a conundrum. I have a 'sleep' SA, which drains all the TUs of the afflicted entity every turn. It will wear off eventually (through another SA that removes both itself and the first one), but I want a third ability that will trigger whenever the afflicted unit is hit by an attack and which also wakes it up. I can't do that, as far as I know, because you can only reference abilities loaded before the current one; I can have one or another, but not both. I could have the attack SA come before the time SA, and while there would be no functional difference the player would get two "name has woken up" messages; that might be confusing. tl;dr: Can I reference abilities that come after an SA on the list in any way?
|
|
|
Post by Kyzrati on Feb 21, 2013 20:28:17 GMT -5
Hm, both of your initial questions have been answered before, but this forum's search functionality is pretty horrendous: No, aliens currently cannot use SA, you have to somehow make them passive, or apply them to a natural weapon; and stamina is "EN"/"EN_MAX".
Unfortunately you can't yet reference SA that come after another. I'll see about adding that feature in the next version, it was just easier to leave it out for now since I wasn't sure how many such possible references there would be.
I see what you mean--you'd like to have both the timer and passive hit be able to remove each other when one of them is triggered. One workaround I see (somewhat convoluted, but it works) is to put the hit SA before the timer, and when it's activated it sets a trait on the object which, when the timer goes off, prevents the timer from showing its message through a conditional check by the timer (but the timer still removes itself when it's done). Make any sense? Traits are good for working around all kinds of problems, since they're so flexible.
|
|
|
Post by 10101 on Feb 22, 2013 3:13:27 GMT -5
Interesting, i would have made it the other way round. I'd give the entity the trait 'sleeping' (being the condition for triggering everything but the remove of those SAs) that gets removed by whatever condition gets triggered first.
Or: whichever condition triggers first removes that entity completly and replaces it with another one. (See sleeping drunk in rookies tale -> no prop/entity, no SA to worry about)
|
|
|
Post by Aves Dominari on Feb 22, 2013 17:40:39 GMT -5
The problem with that particular solution, 10101, is that there's dozens of entities that can end up sleeping; replacing each individual one would be a pain ;p (Not that I don't appreciate the help!) That does make sense, Kyzrati; only trigger the message as long as there's the 'asleep' trait. Thanks for the help! (Sorry for asking redundant questions; I tried to look, at least ;~
|
|