Editing attacks through plotscripting?

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
Feenicks
Metal Slime
Posts: 696
Joined: Tue Aug 10, 2010 9:23 pm
Location: ON THE AIR IN THE AIR
Contact:

Editing attacks through plotscripting?

Post by Feenicks »

So I was looking through the plotscripting dictionary, looking for a way to directly edit attacks [say, if I want to add an element to all a hero's skills, or boost up the damage of a skill if a hero is wearing a specific piece of equipment]... and there isn't any that I could see. Is there any particular reason for this omission?
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Post by sheamkennedy »

I don't see a way to do this directly.

Depending on how you want your game to be you could maybe do a workaround. What I had in mind is maybe you could make it so when a weapon is equipped it teaches you a spell which is of the the weapon's element.

The spell could be called "slash" for example but depending which sword you have equipped it could be a "slash(ice symbol)" or a "slash(fire symbol)" or if you just have a plain old sword it would simply be "slash". This requires you to have many variations on the attack for each element. It also assumes your not using your spell slot for actual spells and that you don't mind your normal attack not being elemental (I'd have some sort of backstory to account for this, like your "spell" attacks summon forth the blade's elemental essence to perform an elemental strike, hence you can only use said spell so many times...)

This type of thing would be accomplished with the teach spell and forget spell coding functions. Or you can just do the teach spell in the engine as it's one of the item's bitsets but I think you need the forget spell to remove it when the weapon is unequipped.
Last edited by sheamkennedy on Sat Nov 14, 2015 7:18 am, edited 1 time in total.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Post by sheamkennedy »

Oh, I also see another method for a workaround that might be better.

You could have the equipped weapon turn a tag on. Then you could chain the attack using the "conditional" feature found under chaining in the editor. The attack will then chain to an additional attack which is of elemental nature, thus performing additional elemental damage after the original attack. This is better since it will work with the default attack and you only have to create one attack and just switch on or off a bunch of tags in your script.

This requires the use of both the regular chain and else-chain if I understand it correctly. Thus you chain through all elements but they are only carried out if the tag is on when the attack gets to that part of the chain. If I'm understanding this correctly you could even set multiple tags true and thus have a multi-element attack (like from equipping a fire-water sword). This would be cool.

Also I see the chaining has an "and" condition for tags too. This could have other great effects like: check if you are dual wielding weapons of different elements and carry out an attack accordingly, or perhaps check if you have "sword X" and it's companion equipment "jump shoes" thus causing your character to carry out "X-Jump" using the instead-chain... you get the idea, there's a lot of neat stuff that could be done.
Last edited by sheamkennedy on Sat Nov 14, 2015 7:17 am, edited 1 time in total.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

It's something that we never got around to, aside from reading attack name and description.

The upshot of the fact that we never added any is that it's still easy to make changes to the data format. For example we could replace Blunt/Sharp/etc damage types with a more flexible ATK*X% - DEF*Y% formula or presets without a whole lot of worrying about being back-compatible with existing script commands, which typically strongly lock in existing features and hinder improvements. So there is sort of a reason for the omission, but the main reason is never getting around to it: people not expressing enough interest. Do you want specifically the examples you gave?

Once you can attach scripts to attacks to calculate damage, chaining, or other effects it might actually offer a better way to achieve many of the same things you might otherwise do by editing attacks. And I think that could easily happen sooner.
User avatar
Feenicks
Metal Slime
Posts: 696
Joined: Tue Aug 10, 2010 9:23 pm
Location: ON THE AIR IN THE AIR
Contact:

Post by Feenicks »

I'd be fully prepared to abuse the ability to attach scripts to attacks... but for now, even just the ability to change elements or attack damage based on variables (a Traveler-style ability, or skills that change up through things not easily tracked via tags, are things that immediately come to mind) would be fantastic.
Post Reply