|
Post by Aves Dominari on Oct 18, 2012 12:08:07 GMT -5
Seeing as the AI is stupid, you could have a 'Disguise' ability that turns the caster into an enemy that just wanders for a while before turning back into your original actor. You'll have to be sure it won't attack (SCOUT AI, perhaps?) and your other guys might end up shooting him in the back, but in theory at least it could work.
|
|
|
Post by Kyzrati on Oct 18, 2012 19:22:15 GMT -5
In fact it could be interesting to add "camouflage" system in the core mechanics. I know this is not so XCOMish but it could nice ! Some armor could have a camouflage percentage as it is in Jagged Alliance game for example... Yeah that would be a possibility along with adding visibility as a core mechanic. I should've mentioned I do plan to probably do that eventually, it's just not on the list for near-term implementation, and I didn't build it into the game when I created the FOV system. Part of the argument for keeping it simple, at least for the basic game, is that X-COM has a very simple system which is easy to understand for tactical purposes: Aliens *always* see targets at 20 cells, and X-COM always sees at either 20 (day) or 10 (night). Once you add a lot of variability, it can be more difficult for the player to determine what they should and shouldn't be able to see from where. Certainly would make stealth-based mods a lot more viable, though
|
|
|
Post by Aves Dominari on Oct 18, 2012 20:16:06 GMT -5
Just a quick clarification. Does the ENT_ATTACKED trigger include melee and ranged attacks?
|
|
|
Post by Kyzrati on Oct 18, 2012 20:57:11 GMT -5
Strait from the "source": SA_TRIGGER_ENTITY_ATTACKED: 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)
|
|
|
Post by draxis on Nov 3, 2012 17:47:23 GMT -5
Does the SPOT_ENT trigger have knowlege of the spotted entity or the spotter?
|
|
|
Post by Kyzrati on Nov 3, 2012 20:20:02 GMT -5
In most cases, each trigger is only allowed to provide knowledge of a single object for its effect. I'll need to add a new version of the SPOT_ENT trigger that allows the target to be affected, as the existing version always affects the spotter. There are several triggers that should come in multiple versions, but I didn't add them all yet. SPOT_ENT is one of those triggers...
Do you need a SPOT_ENT that impacts the spotted target?
(Note that SPOT_ENT is only triggered at the beginning of a faction's turn.)
|
|
|
Post by draxis on Nov 3, 2012 20:23:47 GMT -5
I don't understand what "impacts the spotted target" is, but I am trying to make units follow around any officers they see.
|
|
|
Post by Kyzrati on Nov 3, 2012 20:52:37 GMT -5
The way triggers and effects work together: A trigger goes off under certain conditions and provides information about a single target object. Whatever that target object is determines which object will be targeted by the ability's effect(s). So while the SPOT_ENT trigger is triggered when the entity sees another, any attached effect actually targets the spotter.
There is no "follow" effect yet, except for the hack "SPECIAL" effect I used in Cataclysm whereby "Civ"-traited entities follow adjacent X-COM units.
I want to keep away from adding too much AI-related code in other parts of the game because the AI will have to be scrapped later and I'd have to refactor any such parts.
The only way to implement following right now is to set it up at spawn time using the [LEADER]/[FOLLOW] commands. (And don't forgot that units *can* follow those in other areas on the map.)
|
|
|
Post by draxis on Nov 4, 2012 21:50:49 GMT -5
For MOD_ENT, what would be the STATs for Psi Skill and Psi Strength?
|
|
|
Post by Kyzrati on Nov 4, 2012 21:57:12 GMT -5
For MOD_ENT, what would be the STATs for Psi Skill and Psi Strength? Straight from the source: // Object stats that may be affected by SA_EFFECT_MOD_ saEffectTypes enum saStatModType { // ENTITY // (attributes: all bound by ATTRIB_CAP, except where noted--however, if the initial stat val is already outside the bound, it will not be affected by that bound and still modified normally) STAT_TIME_CUR = 0, // allowed to exceed max, and no upper limit // (progressMultiturnAction() always called immediately on cur TU mods to apply/take advantage of any new TU) STAT_TIME_MAX, // if max lowered below current, current reduced STAT_STAMINA_CUR, // allowed to exceed max, and no upper limit STAT_STAMINA_MAX, // if max lowered below current, current reduced STAT_HEALTH_CUR, // if OPERATOR_SUB, handled through takeDamage() and requires damageType // if OPERATOR_ADD, handled normally (not allowed to exceed max) // (other operators not allowed) STAT_HEALTH_MAX, // if max lowered below current, current reduced STAT_STRENGTH, STAT_MORALE, STAT_BRAVERY, STAT_REACTIONS, STAT_ACCURACY, STAT_THROWING, STAT_PSI_STRENGTH, STAT_PSI_SKILL, STAT_MELEE, // (other) STAT_ARMOR_ALL, // armorLevel for all armorPartTypes (val bound by armor max) STAT_ARMOR_FRONT, // armorLevel for ARMORPART_FRONT (val bound by armor max) STAT_ARMOR_RANDOM, // armorLevel for a random armorPartType (val bound by armor max) STAT_STUN_LEVEL, STAT_CRITICAL_WOUNDS,// ADD applied to random body part // MULT applied to a random wounded part // SUB applied to as many random wounded parts as necessary // DIV applied to total # wounds then subtracted from parts as necessary // CELL STAT_SMOKE, // smokCount (increasing from 0 will snuff any fire) // ALL OBJECTS (ENTITY, PROP, CELL) STAT_FIRE, // fireCount (for Cells/Props, increasing from 0 disperse any smoke) STAT_TRAIT, // param-specified trait // (SUB/DIV to <= 0 removes that trait, // ADD will create it if it doesn't exist) STAT_TOTAL }; const string SA_STAT_MOD_TYPE_NAME[STAT_TOTAL] = { // for xt file reading "TU", "TU_MAX", "EN", "EN_MAX", "HP", "HP_MAX", "ST", "MO", "BR", "RE", "FA", "TA", "PS", "PK", "ME", "ARMOR_ALL", "ARMOR_FRONT", "ARMOR_RANDOM", "STUN_LEVEL", "WOUNDS", "SMOKE", "FIRE", "TRAIT", }; The stat abbreviations are the same as those which used to be used in the HUD.
|
|
|
Post by 10101 on Dec 5, 2012 2:30:37 GMT -5
To make the AI use special abilities there needs to be a new kind of Type or even an secondary Type called Type_AI. So think of: ENEMY_INSIGHT > obvious ENEMY_CLOSING_IN > Enemy gets within x range (too near for the use of explosives for example) ALLY_WOUNDED > Imagine the alien medic actally using medikits etcpp.
Just some brainstorming here.
|
|
|
Post by Kyzrati on Dec 5, 2012 2:45:08 GMT -5
Yes, to get the AI using special abilities will require a new layer of understanding to help it figure out what they're for and how they might be useful. I can't add that yet since the AI is only a placeholder until 0.4+ or so. For now you'll have to resort to hacked items to get AI-side entities using more interesting abilities, since you can always attach abilities to normal weapons, and/or have passive/automatically triggered abilities that belong to an entity itself. Though there are some samples in Cataclysm, I'll have quite a few more examples in my mod.
Many effects can already be faked through clever use of the existing system triggers though, including things like healing of wounded allies.
For my mod I'll have duration-based poison effects, slow effects, enemies that heal allies, along with many more environmental interactions that make the AI seem smart, and seem is always the key with AI development ;p
|
|
|
Post by 10101 on Dec 11, 2012 16:55:42 GMT -5
Is there any trigger on those special abilities that actually changes the AI stance of an entity?
Basically my firemage is on guard duty, but i want to try out setting him in aggressive mode when some orks get too close to his beloved tower..
|
|
|
Post by Kyzrati on Dec 11, 2012 20:58:11 GMT -5
Normally I would've added something like that, but since the AI will be replaced I'm trying to integrate it as *little* as possible into the game, so no changing AI types. By default when a GUARD sees an enemy they more or less behave as aggressive though, unless they lose contact with enemies, in which case they should return to their post. Have you tried it and is he doing something else instead?
One solution/hack I can see is to make TWO different mage entities, one with each type of AI you want, and combine the MUTATE effect with whatever trigger you want him to change his AI on, converting him from one entity to the other. The only strangeness that would come out of this is his TU/EN would be reset, but that shouldn't really matter since he probably hadn't engaged anyone yet anyway. The ENT_NEW_TURN trigger with an E_FACTION_SPOT condition may be what you're looking for, to have him switch when he spots an orc member.
|
|
|
Post by 10101 on Dec 12, 2012 1:45:53 GMT -5
The point is, that he can't see a lot from those windows in the tower. Esecially no entities that get close to the tower. I also don't want him to see too much as those Fireballs might not be too strong, but there sometimes are lots of them. He shall not set the town under flame himself ...
I think i let him stay on guard but try to make him move around more in his tower so it is even more of a risk to move in.
|
|