Hi, so I'm trying to make a magic mod. Have a few things going for me so far, but I'm kind of stuck at this one part. So I have tried in various positions in the .gun file to add Code: "statusEffects" : [ { "kind" : "curespell", "duration" : 5, "Amount" : 5 } ] , I know that works, as I got it working on a .sword and a .consumable. But as all my spells so far are .gun so that energy can be consumed. I've managed many work around but I can't seem to get firing the gun to affect the player. Here is what I got so far. .gun Code: { "itemName" : "curespell", "inventoryIcon" : "curespell.png", "shortdescription" : "Cure Light Wounds", "description" : "A spell to heal minor wounds", "dropCollision" : [-8.0, -3.0, 8.0, 3.0], "maxStack" : 1, "level" : 3.5, "rarity" : "Common", "inspectionKind" : "gun", "weaponType" : "Level.1 Conjuration", "image" : "curespell.png", "recoilTime" : 0.1, "handPosition" : [-3, -1], "firePosition" : [-3, -1], "fireTime" : 1, "twoHanded" : false, "projectileType" : "selfspell", "projectile" : { "power" : 20, "speed" : 1, "color" : [10, 255, 10] }, "statusEffects" : [ { "kind" : "curespell", "duration" : 5, "Amount" : 5 } ] , "muzzleEffect" : { "animation" : "/animations/2hswordhitspark/2hswordhitspark.animation", "fireSound" : [ { "file" : "/sfx/tech/tech_doublejump.wav" } ] } } And the projectile. Code: { "projectileName" : "selfspell", "frames" : "selfspell.png", "animationCycle" : 0.5, "damageKindImage" : "selfspellicon.png", "frameNumber" : 4, "level" : 3, "power" : 50, "speed" : 70, "timeToLive" : 0, "bounces" : 0, "piercing" : false, "damagePoly" : [ [-9, 0], [-6, -6], [0, -9], [6, -6], [9, 0], [6, 6], [0, 9], [-6, 6] ], "damageKind" : "slash" } Any help would be awesome, kind of at a loss.
Yep I created a projectile called selfspell. The idea is when I need to affect myself I would use this projectile template, as it does no damage. I am looking to affect self only. Custom status affect is as follows stolen from the bandage. Code: { "kind" : "curespell", "duration" : 10, "primitives" : [ { "name" : "Health", "mode" : "Max", //don't stack "amount" : 0.1000 } ], "effectSources" : [ "health" ], "mainInterfaceIcon" : "/interface/statuses/heal.png" } I tried putting it in the projectile, still no go... might be healing enemies.
Explosions do not harm the user is your issue.(Ive made snowballs spawn large meteors and they did not damage me) Projectiles also seem not to effect the user. I remember a way to accomplish a healing effect from a weapon but I forget what it was. EDIT: There is a health grenade under items/throwables. That could work.
Health Grenade doesn't affect the user, sadly. I have given that a shot, and yeah I am noticing that .projectiles seem to avoid the user entirely. The .gun seems to have the same error as it doesn't seem to affect the user. I can get a .sword to work, but that doesn't eat up energy so doesn't work with the magic system I have designed.
Like you said, projectiles/explosions completely ignore the user. liquids/placables don't though, but i don't know how to convert a projectile into a object. but for liquids, simply add: "actionOnReap" : [ { "action" : "liquid", "liquidId" : 1, "quantity" : 500 } ] , and then create a custom liquid in the asset/liquid file that heals and adjust the liquid id according. won't be the prettiest option but it should work.
Have you tried to put your healing effect under the muzzle effect call? "muzzleEffect" : { "animation" : "/animations/muzzleflash/bulletmuzzle3/bulletmuzzle3.animation", "fireSound" : [ { "file" : "/sfx/melee/swing_dagger.wav" } ] }
If you look under status effects the health.statuseffect does nothing.... Nothing I try could cause anything but a, consumable item, to cause an effect to the player. It must be written in the engine, the status pod projectile will not heal the player, healingstatusprojectile has no affect on the player. The only way I could think off getting what you want is to put "ammo" on a consumable and set it to 0.00.....1, and put "power" and set that to what ever magic use value you want. I will test this out later.
Metal Links The problem is that power on a consumable will not cause energy to be used. Only on a gun, or a tech. Metaspy Yep and in the muzzle effect it doesn't work sadly. Wurmheart I could get it working with a sword and any melee weapon but that doesn't cause energy usage (though it is fun to have a sword that when swung heals you).
The liquid idea works with throwables too. There is a water projectile, its listed under projectiles/weather. I've been using the snowball for my testing, guns seem to be more finicky... Also, a projectile will not work on a consumable(and vice versa) it loads perfectly fine but the attribute isn't used. EDIT: I've got it to work for a projectile, well a throwable... First a made a new liquid(I edited the health.statuseffect so it has a value): // healingWater "8" : { "name" : "healingWater", "texture" : "/watertex.png", "blockGenerationChance" : 0.000, "blockOptions" : [ "sand2" ], "drawMinimum" : 0.1, "color" : [79, 175, 41, 190], "bottomLightMix" : [0, 78, 255], "bottomLightMultiplier" : 2, "textureMovementFactor" : 8, "breathable" : "notBreathable", "ontouchStatusEffects" : [ { "kind" : "health" } ] } Then I made a new projectile(notice physics is gas): { "projectileName" : "healingwater", "physics" : "gas", "frames" : "water.png", "level" : 3, "animationCycle" : 0.5, "frameNumber" : 2, "actionOnReap" : [ { "action" : "liquid", "liquidId" : 8, "quantity" : 500 } ], "damageKind" : "default" } Then I went to my humble snowball file and edited it(the power and level is from my other testing ignore it.): { "itemName" : "snowball", "rarity" : "Common", "inventoryIcon" : "snowballicon.png", "image" : "snowballicon.png", "shortdescription" : "snowball", "description" : "A snowball. Begging to be thrown.", "ammoUsage" : 1, "edgeTrigger" : true, "windupTime" : 0.0, "cooldown" : 0.0, "projectileType" : "water", "projectileConfig" : { "speed" : 1, "level" : 10, "power" : 60 } } With speed set to 1 it is only working when I crouch, i will try to adjust that. Using physics type of gas stops it from making a pool, if your outside... I am trying to find a better way to get a "time to live" instead of using gas physics to have the healing carried away.
Well I got it working thanks to your brilliant summon water solution. Small issues, like you need to crouch and use it on the ground to summon the water to heal. But other than that, it works looks like my magic mod is well on it's way... Anyway to make a projectile with power do no damage?
try setting "power" : 0 , though most times i tested it power seemed to barely affect anything. or use "damageType" : "hitTest", this should negate dmg this projectile does and cause it to trigger the onreap when hit still. it won't negate dmg the onreap does, but liquids shouldn't deal dmg anyway.
you could put the dispensing pod projectile it projects a lava or water or matter blocks in a circle it will sure heal you
My lord, I had tried the damageKind : HitTest.... not damageType. Thank you! All of you have helped make this mod possible!
I few things I've notice in my testing is the intialtick has to be true or set the time for >1 second for the heal.statuseffect. Projectile speed has to be greater then 1... You could try making your own physics in projectiles/physics.config. I haven't tested it but try weather or friendly bubble for the physics setting. There is a 'timeToLive' attribute, I doubt it would affect healingWater or the water.projectile. Damage seems to come from level and power....Don't know how it's derived.