|
Post by 10101 on Feb 2, 2013 17:11:51 GMT -5
oh, i see. Looks like no MOD_ITEM
|
|
|
Post by Kyzrati on Feb 2, 2013 21:28:54 GMT -5
Item traits should be modifiable through a MOD_ITEM effect, but I hadn't added it yet since there aren't all that many modifiable item stats, that and there aren't a whole lot of item-targeting effects either, so its usefulness is limited. Really it should be added, though.
10101's idea would also theoretically work by swapping between SAs (fire/reload), but I can't see a way to make it compatible with PROJ_SHOOT right now since you wouldn't want the swap to occur until after the weapon was confirmed fired.
Now that 8.6 will come with variable-burst attacks, do you still need a way to do this?
|
|
|
Post by Aves Dominari on Feb 2, 2013 21:29:42 GMT -5
Not really, no ;p
|
|
|
Post by 10101 on Feb 3, 2013 3:26:41 GMT -5
I don't think you would need to swap those SAs. Either you would not be able to reload when there's already ammo in the weapon (checking itemtrait) or the ammo already in the weapon gets lost (set the new value overwriting the first) or there simply is no ammo to reload the weapon and you have to live with what is in it already.
Just some quick thoughts. I'll think about it more when there is an MOD_ITEM and as it seems to not being needed there is no reason to hurry with it.
|
|
|
Post by Kyzrati on Feb 3, 2013 4:14:14 GMT -5
Why wait? MOD_ITEM can be found in 8.6, just released ;p It's only compatible with the TRAIT stat, btw.
|
|
|
Post by 10101 on Feb 3, 2013 4:49:25 GMT -5
So it's time for some testing.
|
|
|
Post by 10101 on Feb 3, 2013 8:15:17 GMT -5
Looks like i can SET an Itemtrait with MOD_ITEM, but not SUB or ADD.
|
|
|
Post by Kyzrati on Feb 3, 2013 8:25:03 GMT -5
Hm, sure you're testing it right? The code looks fine, I believe, though I admit I didn't test any of those yet. Seems like you'd be doing it right if one is working and the others aren't...
|
|
|
Post by 10101 on Feb 3, 2013 8:37:14 GMT -5
Despite having to put the ammo in the other hand, reloading seems to work. But as i shoot the TRAIT(Ammo) doesn't seem to be reduced.
SAb_Rifle2 "Shoot quick" USE_ON_CELL I_TRAIT(Ammo)>0 SELECT=1|TU_TYPE=PERCENT|TU_COST=30|METHOD=MANUAL|RANGE=60|VIS=ENT_FOV|RADIUS=0 - - - MOD_ITEM - STAT=TRAIT(Ammo)|OPERATOR=SUB|VALUE=1 - - - + PROJ_SHOOT - ITEM=SAb_Shot|FAIL%=00|BASE_HIT=60 DEFAULT DEFAULT "[name] shoots the SAb-Rifle quick." + FLUFF_ACTOR I_TRAIT(Ammo)==10 CONTINGENCY=PASSED_LAST DEFAULT DEFAULT "[objpron] rifle has 10 Ammo left." + FLUFF_ACTOR I_TRAIT(Ammo)==9 CONTINGENCY=PASSED_LAST DEFAULT DEFAULT "[objpron] rifle has 9 Ammo left." + FLUFF_ACTOR I_TRAIT(Ammo)==8 CONTINGENCY=PASSED_LAST DEFAULT DEFAULT "[objpron] rifle has 8 Ammo left." + FLUFF_ACTOR I_TRAIT(Ammo)==7 CONTINGENCY=PASSED_LAST DEFAULT DEFAULT "[objpron] rifle has 7 Ammo left." + FLUFF_ACTOR I_TRAIT(Ammo)==6 CONTINGENCY=PASSED_LAST DEFAULT DEFAULT "[objpron] rifle has 6 Ammo left." + FLUFF_ACTOR I_TRAIT(Ammo)==5 CONTINGENCY=PASSED_LAST DEFAULT DEFAULT "[objpron] rifle has 5 Ammo left." + FLUFF_ACTOR I_TRAIT(Ammo)==4 CONTINGENCY=PASSED_LAST DEFAULT DEFAULT "[objpron] rifle has 4 Ammo left." + FLUFF_ACTOR I_TRAIT(Ammo)==3 CONTINGENCY=PASSED_LAST DEFAULT DEFAULT "[objpron] rifle has 3 Ammo left." + FLUFF_ACTOR I_TRAIT(Ammo)==2 CONTINGENCY=PASSED_LAST DEFAULT DEFAULT "[objpron] rifle has 2 Ammo left." + FLUFF_ACTOR I_TRAIT(Ammo)==1 CONTINGENCY=PASSED_LAST DEFAULT DEFAULT "[objpron] rifle has 1 Ammo left." + FLUFF_ACTOR I_TRAIT(Ammo)==0 CONTINGENCY=PASSED_LAST DEFAULT DEFAULT "[objpron] rifle's Ammo is depleted." SAb_Rifle4 "Reload" USE_ON_ITEM I_TRAIT(Ammo)==0|E_HELD_ITEM_CONSUME=="SAb_Rifle Ammo" SELECT=1|TU_TYPE=ABSOLUTE|TU_COST=15|METHOD=REFLEX - - - MOD_ITEM - STAT=TRAIT(Ammo)|OPERATOR=SET|VALUE=6 DEFAULT DEFAULT "[name] reloads the SAb-Rifle, it now contains 10 Ammo."
Also, i'm not sure about wether i should PASSED_LAST all Ammo tracking messages or only the first one and FAILED_LAST the following.
PS: There is no way to get a connection to the Ammotrait in the message soon, is it?
|
|
|
Post by Kyzrati on Feb 3, 2013 8:49:36 GMT -5
You're trying to combine USE_ON_CELL with MOD_ITEM, which attempts to modify items in the target cell (or held by whoever is in the target cell), not the item that was used. Modifying the item used itself must be done with the REFLEX method, as you've done correctly through SAb_Rifle4 and that's why "Reload" works, but I see no way of combining this with any USE triggers--it's just not possible under the current system. Due to how the program segments SA data and passes it around, much of the trigger information is not available to the effect, so enabling this feature would be a non-trivial task. EDIT: Oh, and for future reference, you don't need any CONTINGENCYs there at all since you have explicit condition checks. EDIT: And no, there's no way to get trait info in the message right now.
|
|
|
Post by 10101 on Feb 3, 2013 10:05:39 GMT -5
Hm, tried to get it done with an explosion, but looks like you can't hit items held in an entities hand by EXPL_HIT_ITEM..
|
|
|
Post by Kyzrati on Feb 3, 2013 10:15:42 GMT -5
EXPL_HIT_ITEM only affects those in the cell inventory. To affect items held by an entity, try using the EXPL_HIT_ENT instead, which when combined with item-targeting SA effects should target held items. Invisible explosions sure are an interesting way to get around a good number of limitations in the system...
|
|
|
Post by 10101 on Feb 3, 2013 11:05:02 GMT -5
Now i had an idea, but there seems to be no ranged version of the SA MELEE_E_ATK_ENT.. The good news is, that it's working now. SAb_Rifle "Shoot aimed" USE_ON_CELL I_TRAIT(Ammo)>0 SELECT=1|TU_TYPE=PERCENT|TU_COST=75|METHOD=MANUAL|RANGE=60|VIS=ENT_FOV|RADIUS=0 DEFAULT DEFAULT "[name] shoots the SAb-Rifle aimed." EXPLODE - EXPLOSION=E_AmmoReduce - - - + PROJ_SHOOT - ITEM=SAb_Shot|FAIL%=00|BASE_HIT=75 - - - SAb_Rifle2 "Shoot quick" USE_ON_CELL I_TRAIT(Ammo)>0 SELECT=1|TU_TYPE=PERCENT|TU_COST=30|METHOD=MANUAL|RANGE=60|VIS=ENT_FOV|RADIUS=0 DEFAULT DEFAULT "[name] shoots the SAb-Rifle quick." EXPLODE - EXPLOSION=E_AmmoReduce - - - + PROJ_SHOOT - ITEM=SAb_Shot|FAIL%=00|BASE_HIT=50 - - - SAb_Rifle3 "Reload" USE_ON_ITEM I_TRAIT(Ammo)==0|E_HELD_ITEM_CONSUME=="SAb_Rifle Ammo" SELECT=1|TU_TYPE=ABSOLUTE|TU_COST=15|METHOD=REFLEX - - - MOD_ITEM - STAT=TRAIT(Ammo)|OPERATOR=SET|VALUE=10 DEFAULT DEFAULT "[name] reloads the SAb-Rifle, it now contains 10 Ammo." SA_AmmoReduce - EXPL_HIT_ENT - - - - - MOD_ITEM I_TRAIT(Ammo)==10 STAT=TRAIT(Ammo)|OPERATOR=SUB|VALUE=1 DEFAULT DEFAULT "The SAb rifle has 9 Ammo left." + MOD_ITEM I_TRAIT(Ammo)==9 CONTINGENCY=FAILED_LAST|STAT=TRAIT(Ammo)|OPERATOR=SUB|VALUE=1 DEFAULT DEFAULT "The SAb rifle has 8 Ammo left." + MOD_ITEM I_TRAIT(Ammo)==8 CONTINGENCY=FAILED_LAST|STAT=TRAIT(Ammo)|OPERATOR=SUB|VALUE=1 DEFAULT DEFAULT "The SAb rifle has 7 Ammo left." + MOD_ITEM I_TRAIT(Ammo)==7 CONTINGENCY=FAILED_LAST|STAT=TRAIT(Ammo)|OPERATOR=SUB|VALUE=1 DEFAULT DEFAULT "The SAb rifle has 6 Ammo left." + MOD_ITEM I_TRAIT(Ammo)==6 CONTINGENCY=FAILED_LAST|STAT=TRAIT(Ammo)|OPERATOR=SUB|VALUE=1 DEFAULT DEFAULT "The SAb rifle has 5 Ammo left." + MOD_ITEM I_TRAIT(Ammo)==5 CONTINGENCY=FAILED_LAST|STAT=TRAIT(Ammo)|OPERATOR=SUB|VALUE=1 DEFAULT DEFAULT "The SAb rifle has 4 Ammo left." + MOD_ITEM I_TRAIT(Ammo)==4 CONTINGENCY=FAILED_LAST|STAT=TRAIT(Ammo)|OPERATOR=SUB|VALUE=1 DEFAULT DEFAULT "The SAb rifle has 3 Ammo left." + MOD_ITEM I_TRAIT(Ammo)==3 CONTINGENCY=FAILED_LAST|STAT=TRAIT(Ammo)|OPERATOR=SUB|VALUE=1 DEFAULT DEFAULT "The SAb rifle has 2 Ammo left." + MOD_ITEM I_TRAIT(Ammo)==2 CONTINGENCY=FAILED_LAST|STAT=TRAIT(Ammo)|OPERATOR=SUB|VALUE=1 DEFAULT DEFAULT "The SAb rifle has 1 Ammo left." + MOD_ITEM I_TRAIT(Ammo)==1 CONTINGENCY=FAILED_LAST|STAT=TRAIT(Ammo)|OPERATOR=SUB|VALUE=1 DEFAULT DEFAULT "The SAb rifle's Ammo is depleted."
You need an item that contains those SAs, an item that is used as ammo and an invisible explosion that triggers the SA_AmmoReduce and one item as projectile being shot. To make it work i had to exchange the effects EXPLODE and PROJ_SHOOT as the explosion only triggered when the projectile actually hit an entity. CONTINGENCY is needed, as without you would deplete all ammo with one shot. (It's because, every condition reduces the Ammo by one, enabling the condition of the next one) PS: A much more easy way to do that is: Simply use a normal weapon with normal ammo and eventually put SAs on the ammo triggering in impact. But HEY! I got it working
|
|
|
Post by Kyzrati on Feb 3, 2013 20:27:51 GMT -5
CONTINGENCY is needed, as without you would deplete all ammo with one shot. (It's because, every condition reduces the Ammo by one, enabling the condition of the next one) True, as per the order you have now, but if you just reversed the order of your effects you'd no longer need any CONTINGENCY. Start from check #1 and go to #9. Doesn't really matter too much since it works in its current state. But HEY! I got it working You are very persistent, 10101 Now i had an idea, but there seems to be no ranged version of the SA MELEE_E_ATK_ENT.. While I don't see much use for this under normal circumstances, I can see how it could be used to affect a weapon fired by an attacker. Thinking of something else? I should add this one eventually, but there aren't going to be any more releases for a while unless some serious bug pops up in 8.6.
|
|
|
Post by Aves Dominari on Feb 7, 2013 23:45:40 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)
Is there a special ability trigger that targets the attacker of the entity that has the ability? I have an entity that is covered in spikes, so any time someone makes a melee attack against it they have a chance of taking a bit of MS damage in return; is this possible right now?
|
|