|
Post by 10101 on Dec 23, 2012 13:38:44 GMT -5
I wanted to create some 'medical sorcery' not bound to an item, but as CAST_ON_ENT. It worked so far with the OPEN_MEDIKIT - command but only so far that he did not throw errors. He didn't actally open it and trying to include the secondary abilities he said the would be incompatible with entities.
Then i started to make it a MOD_ENT myself but i could only make him heal some health. I didn't find something to heal critical wounds. Is there any posibility for healing criticals without the help of the medikit?
|
|
|
Post by Kyzrati on Dec 23, 2012 21:13:04 GMT -5
Yeah, the medkit is really only meant to be used with items. I could extend it later, but it's pretty limited for now. Fortunately, there IS a way to fix criticals through MOD_ENT, it's STAT=WOUNDS. The effect location has to be randomly determined, however, since there's no interface like the medkit. Here's what the operators do: 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
As an example of a healing spell, here's something from my own mod (I have a ton of spells you'll be able to reference for ideas):
S_Cure_Light_Wounds "Cure Light Wounds" CAST_ON_ENT COOLDOWN>=1 SELECT=1|TU_TYPE=PERCENT|TU_COST=25|EN_COST=30|METHOD=MANUAL|RANGE=10|VIS=ENT_FOV|RADIUS=0 DEFAULT DEFAULT "[name] casts %1. (Cooldown: 1 min)" MOD_ENT E_TRAIT(Undead)==0 STAT=HP|OPERATOR=ADD|VALUE=10|PARTICLE=S_Cure_Light_Wounds DEFAULT DEFAULT "[name] feels better." + MOD_ENT E_TRAIT(Undead)==0 STAT=WOUNDS|OPERATOR=SUB|VALUE=1 - - - + MOD_ENT E_TRAIT(Undead)!=0 STAT=HP|OPERATOR=SUB|VALUE=15|DMG_TYPE=LA|IGNORE_ARMOR=1|PARTICLE=S_Cure_Light_Wounds DEFAULT DEFAULT "[name] is struck with holy pain." (I think I added EN_COST after 8.2, so you can't use that yet, but the other features should be available.) EDIT: I see IGNORE_ARMOR in there, too--that's also new for 8.3, though it doesn't have to do with the healing part ;p
|
|
|
Post by Kyzrati on Dec 29, 2012 21:27:15 GMT -5
I haven't added that kind of item checking, but I probably should since it would be useful.
I steered away from it initially since it could potentially be very expensive (calcluation-wise) if you have a lot of items like that, as they have to be checked for every such item, every turn, but really it shouldn't be that bad since they'd be for special cases anyway. It's just a matter of putting in the infrastructure to handle it, like props have. (To save processing time I have to properly maintain a separate list of all such item instances in existence.)
I'll add something like this in the first update after R8.3. Not enough time to fit it in now.
Obviously it's nice to have an ability like this on an item, which is more mobile/controllable in-game, but you can achieve some pretty interesting/fun effects using props to do this instead (for now). The key is to send out an invisible explosion that carries the desired effect, which can then do just about anything you want to whatever it hits nearby, since explosions have triggers for hitting any kind of object. I used this and similar methods to do some cool things in my mod, which I'll explain soon on the forum.
For everyone's reference, here are the full lists of triggers, conditions, and effects. Keep in mind that these are my current lists, and not all of this is available in 8.2 (you can tell which are new and not available until 8.3 since they won't be syntax highlighted in NP++). You can also actually see the current list of triggers/effects at the bottom of special_abilities.xt--it's the commented reference chart that shows all the possibilities. You'll see more examples of most of these in my mod.
Triggers:
"MOVE", "MOVE_ON_CELL", "DEATH", "PROP_DESTROYED", "ITEM_DESTROYED", "ATTACK_ENT", "MELEE_ATK_ENT", "MELEE_E_ATK_ENT", "MELEE_HIT_ENT", "MELEE_HIT_PROP", "MELEE_HIT_CELL", "ENT_ATK_BY_MELE", "ENT_ATK_BY_PROJ", "ENT_ATTACKED", "ENT_HIT", "ENT_HIT_BY_MELE", "ENT_HIT_BY_PROJ", "PROP_HIT", "PROP_HIT_OKAY", "PROJ_HIT_ENT", "PROJ_HIT_PROP", "PROJ_HIT_CELL", "PROJ_HIT_OBJECT", "EXPL_HIT_ENT", "EXPL_HIT_PROP", "EXPL_HIT_ITEM", "EXPL_HIT_CELL", "ENT_KILLS_ENT", "KILL_ENT", "MELEE_KILLS_ENT", "PROJ_KILLS_ENT", "EXPL_KILLS_ENT", "E_MOV_BYTHIS_E1", "E_MOV_BYTHIS_E2", "E_MOV_BY_E1", "E_MOV_BY_E2", "E_MOV_BYTHIS_P1", "E_MOV_BYTHIS_P2", "E_MOV_BY_P1", "E_MOV_BY_P2", "E_MOV_ONTHIS_P1", "E_MOV_ONTHIS_P2", "E_MOV_ON_P1", "E_MOV_ON_P2", "CAST_ON_ENT", "CAST_ON_PROP", "CAST_ON_ITEM", "CAST_ON_CELL", "USE_ON_ENT", "USE_ON_PROP", "USE_ON_ITEM", "USE_ON_CELL", "USE_MEDKIT", "MEDKIT_FUNCTION", "ENT_MANIP", "PROP_MANIP", "ENT_FELL", "PROP_FELL", "ITEM_FELL", "ITEM_THROWN", "ITEM_ACQUIRED", "SPOT_ENT", "ENT_NEW_TURN", "ENT_NEW_TURN_E", "ENT_NEW_TURN_P", "ENT_NEW_TURN_I", "ENT_NEW_TURN_C", "ENT_NEW_TURN2", "ENT_NEW_TURN2_E", "ENT_END_TURN", "ENT_END_TURN_E", "ENT_END_TURN_P", "ENT_END_TURN_I", "ENT_END_TURN_C", "PROP_NEW_ROUND", "PROP_NEW_RND_E", "PROP_NEW_RND_P", "PROP_NEW_RND_I", "PROP_NEW_RND_C",
Conditions:
"RANDOM", "COUNT", "SA_LIFETIME", "LIFETIME", "COOLDOWN", "DMG_TYPE", "DMG_AMT", "E_NAME", "E_RACE", "E_SIZE", "E_MASS", "E_GENDER", "E_UNCONSCIOUS", "E_FACTION", "E_FACTION_COUNT", "E_KNEELING", "E_STUN", "E_WOUNDS", "E_HELD_ITEM", "E_HELD_ITEM_CONSUME", "E_CARRY_ITEM", "E_MOTION", "E_FIRE", "E_TU", "E_TU_MAX", "E_TU_PERCENT", "E_EN", "E_EN_MAX", "E_EN_PERCENT", "E_HP", "E_HP_MAX", "E_HP_PERCENT", "E_HP_DAMAGE", "E_ST", "E_BR", "E_MO", "E_RE", "E_FA", "E_TA", "E_PS", "E_PK", "E_ME", "E_ARMOR_NAME", "E_ARMOR_FRONT", "E_ARMOR_PERCENT", "E_TRAIT", "E_SA_COUNT", "E_FACTION_RANGE", "E_FACTION_RANGE_Z", "E_FACTION_SPOT", "E_ENEMY_RANGE", "P_NAME", "P_INTEG", "P_MASS", "P_ROOT", "P_MATERIAL", "P_FIRE_RESIST", "P_FIRE", "P_TRAIT", "P_SA_COUNT", "P_FACTION_RANGE", "P_FACTION_RANGE_Z", "I_NAME", "I_ENCUMBRANCE", "I_INTEG", "I_TRAIT", "I_SA_COUNT", "C_NAME", "C_INTEG", "C_MATERIAL", "C_FIRE_RESIST", "C_FIRE", "C_BLOCKED1", "C_BLOCKED2", "C_TRAIT", "C_OPEN_SKY",
Effects:
"EXPLODE", "MOD_ENT", "MOD_PROP", "MOD_CELL", "DAMAGE_CELL", "DAMAGE_PROP", "KILL_ENT", "DESTROY_ENT", "DESTROY_PROP", "DESTROY_ITEM", "DESTROY_CELL", "REVEAL_CELL", "MUTATE", "MUTATE_DELAYED", "CONVERT_PROP", "CONVERT_ITEM", "CONVERT_CELL", "SPAWN_ENT", "SPAWN_PROP", "SPAWN_ITEM", "TELEPORT_ENT", "TELEPORT_PROP", "TELEPORT_ITEM", "SCANNER", "MIND_PROBE", "OPEN_MEDKIT", "MED_PAINKILLER", "MED_STIMULANT", "MED_HEAL", "PANIC_ATTACK", "SWITCH_FACTION", "PROJ_SHOOT", "PROJ_RAIN", "GIVE_SA_ENT", "GIVE_SA_PROP", "GIVE_SA_ITEM", "REMOVE_SA_ENT", "REMOVE_SA_PROP", "REMOVE_SA_ITEM", "FLUFF", "FLUFF_ENT", "FLUFF_ACTOR", "FLUFF_PROP", "FLUFF_ITEM", "FLUFF_CELL", "SPECIAL", It's really mostly useful to look at examples of these in the mods, since almost all of them require their own data parameters to make them work, but there is not yet any documentation for which need what.
|
|
|
Post by Kyzrati on Dec 30, 2012 5:23:17 GMT -5
Yeah, not the greatest system for those right now. -ONTHIS versions are for prop-based SA, while ON is for ent-based -P1 targets the entity while P2 targets the prop (and thus determines what effects are compatible with the ability) I use them profusely in my own mod, so there will be a ton of examples for suggested uses.
Overall the constant names should be re-organized/re-worded to make a bit more sense later, something to do once the list is more complete so we can see what patterns emerge that can inform a better naming system. (I generally don't like using numbers and esoteric constants, but I did want to set a max length on those strings so they don't take up too much room in the scripts--in the source they can be 40+ chars.)
|
|
|
Post by 10101 on Dec 30, 2012 5:29:08 GMT -5
Ok, seems i failed due to the scoringsystem not being completly finished. Wanted to try to make a little experiment with alternative scoring (silly things like search'n rescue/protect and escape with props as rescue zone, King of the Hill, CTF, etc.)
But for it to work i would have to be able to trigger scores from special abilities. Like. ACTIVATE_TRAIT TRAIT_NAME=="MISSION_SCORE"
|
|
|
Post by Kyzrati on Dec 30, 2012 5:40:56 GMT -5
Ok, seems i failed due to the scoringsystem not being completly finished. Wanted to try to make a little experiment with alternative scoring (silly things like search'n rescue/protect and escape with props as rescue zone, King of the Hill, CTF, etc.) But for it to work i would have to be able to trigger scores from special abilities. Like. ACTIVATE_TRAIT TRAIT_NAME=="MISSION_SCORE" Yep, happened to be sitting around and saw your post ;p Interesting idea for trying an alternative scoring system, since I did add some dynamic support for it through traits. But right now the only special dynamic score records I check for are DYNAMIC_DEATH_ and DYNAMIC_KILLED_ (what you see in _scenario.xt), i.e. the game only checks for them when someone dies or is killed, so other things won't trigger. I really don't want to be adding a whole bunch of new features to the scoring system, because it will be removed entirely. But your post does bring up a good point, that I should definitely integrate it closely with the SA system so that once you've defined your own scoring items, you can then use SA to modify/interact with it in all the unique ways that system is capable of. Essentially there will be a new SA EFFECT for messing with score results, that can then be attached to anything.
|
|
|
Post by 10101 on Dec 30, 2012 8:36:33 GMT -5
That would make the whole thing much more interesting, as it then would be possible to add mini/hidden quests within the game. And people can go search for them.
For example: There's an important politician in that area. If you find him, protect him and get him out.
Then there's some Civillian called "Politician" that must be brought to the skyranger and if he's there at mission's end the player gets extra points (which is calculated in the relationship of the countries as far as i know)
|
|
|
Post by Kyzrati on Dec 30, 2012 9:19:17 GMT -5
Most definitely. Stuff like that. As you put it, that's also more meaningful for the metagame.
As it is right now with only single missions, score perhaps means less and you can instead reward the player *within* the level for achieving certain goals. The primary reward in this case would of course be a boost to your power through allies, weapons/abilities, or literally stat boosts. That's what I'm using to make my own mod a lot more interactive and dynamic. You don't just find occasional weapons--there's a huge range of ways you can interact with the world that will provide benefit within that particular map.
For your hypothetical politician, under the current system you can already have him follow X-COM, get to a certain area in the level, and perhaps from there use his authority to call for a one-time supply drop from the local military, or call in some paratroopers to help mop up.
|
|
|
Post by Kyzrati on Jan 2, 2013 10:38:27 GMT -5
What does the condition COUNT actually count? (Or E_SA_COUNT, P_SA_COUNT, I_SA_COUNT ) The COUNT condition checks against the number of times *all* trigger conditions for the SA have been met (and therefore the SA was triggered). So you'll see me using a lot of COUNT==0, which means that ability will only ever trigger once, especially useful if that condition follows other conditions, since the count will be incremented only once those are all true. That last group you mention is new to 8.3--they count the number of SA that match said name on the relevant/given object, so you can also use that to test whether the object actually has a certain SA or not.
|
|
|
Post by Kyzrati on Jan 4, 2013 9:07:49 GMT -5
Ok, seems i failed due to the scoringsystem not being completly finished. Wanted to try to make a little experiment with alternative scoring (silly things like search'n rescue/protect and escape with props as rescue zone, King of the Hill, CTF, etc.) Okay, despite what I said not long ago, I went ahead and put this in, because really it took very little effort for the amount of potential cool stuff that can come out of it. After all, it's much more interesting to have alternate ways to earn points rather than always killing everything! Was about to add scoring to my mod and figured I could benefit greatly from this as well, so there's now an SA effect "SCORE" that allows you to add score items and values dynamically: You can set SCORE_TYPE, SCORE_NAME, and SCORE_VALUE. Yay for variety!
|
|
|
Post by Kyzrati on Jan 4, 2013 13:46:29 GMT -5
That would be a pretty big one, eh? I could add it, though I'm running short on time for 8.3 so it may have to wait until 8.4.
Right now in 8.3 there is already another way to end a mission, by using a scenario.xt-specified item or prop. Not as dynamic as you describe, but already a lot more interesting and useful. That's what I'm using, but I'm assuming you haven't actually beaten the mod yet? ;p
|
|