Page 1 of 1

Please help - weapon effects

Posted: Wed Jun 04, 2014 4:07 am
by The Doppelgamer
I'm trying to set up all my weapons for a custom game I'm making, and I've hit a brick wall:
I can't seem to make custom weapons with effects like life leech or the shock effect from the Dismantler.

The weapon I'm having trouble with in particular is a flail that I want to have the shock damage of the Dismantler for.

cloneObject{
name = "mace_calamity", baseObject = "dismantler", uiName = "Calamity",
model = "assets/models/items/flail.fbx", gfxIndex = 87,
skill = "maces",
attackSound = "swipe", impactSound = "impact_blunt",
attackPower = 26, coolDownTime = 4.0, accuracy = -10, vitality = 2,
requiredLevel = 20,
}

The weapon works fine, except I've attacked about a hundred times with it and have yet to see the shock effect (and I assume that means the extra shock damage isn't procing either). This may also mess up another weapon I've made, but the solution to one should fix both. I haven't done ANY scripting yet, so if this is something that requires scripting (hopefully not), please bear with me ^^;

thanks

Re: Please help - weapon effects

Posted: Wed Jun 04, 2014 4:11 am
by Darsithis
You're going to have to learn scripting! You'll never be able to make any decent puzzles without it.

Have you tried something like damageType = "lightning" ? I'm not that familiar with effects on weapons, either; the few weapons I've made for my mods are usually fake weapons and items used to solve alcove puzzles.

Re: Please help - weapon effects

Posted: Wed Jun 04, 2014 4:56 am
by Allanius2
I looked at Dismantler definition in the Asset Pack and I see nothing that indicates any shock damage. Perhaps you should start with the original definition, see if that works and then slowly change things to your liking.

Code: Select all

	defineObject{
		name = "dismantler",
		class = "Item",
		uiName = "The Dismantler",
		model = "assets/models/items/dismantler.fbx",
		description = "A legendary claymore forged deep in the underground magma furnaces.",
		skill = "swords",
		requiredLevel = 15,
		gfxIndex = 85,
		attackPower = 27,
		accuracy = 0,
		coolDownTime = 4,
		attackMethod = "meleeAttack",
		attackSwipe = "horizontal",
		attackSound = "swipe_special",
		impactSound = "impact_blade",
		weight = 4.8,
		achievement = "find_dismantler",
	}

Re: Please help - weapon effects

Posted: Wed Jun 04, 2014 5:18 am
by The Doppelgamer
That's odd, it certainly has an effect in game, so if it's not in the asset definition, it would definitely be a script.

Well if anyone knows of a script that could do that, or could point me in the right direction, I would greatly appreciate it. Also I could really use an example of how to use the "onEquipItem" definition, particularly for weapons equipped to the right/left hand.

Re: Please help - weapon effects

Posted: Wed Jun 04, 2014 5:32 am
by msyblade
The dismantler's lightning damage is indeed hardcoded (meaning, it is done under the hood, in a manner that we do not have access to), along with many other "special properties" of powerful items. (ie: glow in the radiance orb, exp boost in the pendant, etc.) However, it CAN be scripted manually to have a similar effect. In fact, Isaac's foundry (ORRR2) contains many magical weapons, so, if I were you, I would start with the ORRR2 sources and see how he and Diarmuid pulled it off.

Hope this helps!

Re: Please help - weapon effects

Posted: Wed Jun 04, 2014 8:07 am
by LocalFire
Well Akroma has done alot of work in this area heres a link to his thread: viewtopic.php?f=14&t=4088