Contingency spells/ enchants

Feedback on past, current, and future development.
Post Reply
hlamas
Posts: 7
Joined: 25 Oct 2016, 20:16

Contingency spells/ enchants

Post by hlamas » 14 Dec 2016, 20:17

It would be interesting to see Contingency effects in OpenMW, similar to the ones featured in Baldur’s Gate 2.

If your health drops below 15, your enchanted shield automatically casts a healing spell.

If you get hit by a fireball, your robe temporarily raises your fire resistance.

You jump off a cliff and your Dwemer Boots of Floating automatically cast a Slowfall, when you reach lethal speed.

Would have to be balanced against existing "Cast on Use", "Constant Effect" enchantments. Not sure how difficult to implement. Would be fun to play a mage with such a setup.

User avatar
jirka642
Posts: 117
Joined: 23 Aug 2014, 11:39
Location: Czech Republic
Contact:

Re: Contingency spells/ enchants

Post by jirka642 » 14 Dec 2016, 20:59

This would probably require some kind of build-in simple spell scripting in engine. And would need changes in how spell-crafting and enchanting (and maybe even spells itself) currently work. Definitely post-1.0 stuff...

(Also, this thread with request for extended spell customisation might be relevant .)
On GitHub as kunesj, on GitLab as kunesj.
OS: Linux Mint 18, CPU: Intel Core i5-3330, RAM: 16GB, GPU: GeForce GTX 650Ti, OpenMW: from source

User avatar
DestinedToDie
Posts: 1163
Joined: 29 Jun 2015, 09:08

Re: Contingency spells/ enchants

Post by DestinedToDie » 15 Dec 2016, 10:15

Some of these you can already do. If your shield player->onequip = 1, if health < 15, player->addspell shieldheal. With some additional tweaks like checking if you already have the shield heal ongoing it could work just as you describe.

Fire resistance would be harder to pull off. You'd need a script on your robe that checks for specific spells and there are multiple fire spells in game. Maybe resource-heavy to pull off in unmodded Morrowind, but not so if you design the game around the idea of enemies mostly using 1 specific fire spell.

These kinda situation specific things are definitely going to need scripts. Maybe we need better script functions (check for fire damage, instead of specific spell).

User avatar
sjek
Posts: 440
Joined: 22 Nov 2014, 10:51

Re: Contingency spells/ enchants

Post by sjek » 15 Dec 2016, 20:42

reading https://en.wikipedia.org/wiki/The_Long_Dark as pal linked twitch channels
  • Tools and items degrade over time, forcing the player to make careful decisions regarding their condition and their eventual need for repair. Fire, being a primary component, is necessary for warmth and cooking. The player has to forage for wood and fuel on a regular basis to stay alive. The player can also get sick from food poisoning and disease.The Long Dark simulates a full day/night cycle which is a fundamental part of the game. The game also simulates temperature and windchill, both of which are random during every playthrough, encouraging the player to monitor the weather carefully at all times to prevent death from exposure.
detecting dmg type would greatly simplify that + springs would allow defining those even on the fly. the question if it's global or local would be for the modder to decide, but then again bigger question is could making the gamefiles and scripting interactive solve, script running every frame, problem in this case.

edit: going over the topic here but this could be then expanded
https://wiki.openmw.org/index.php?title ... #Scripting
  • More advanced events handling: instead of script checking for event every frame, allow for functions to be attached as event handlers. Also, allow more than one event handler for an event, attaching and deleting event handlers programmatically (i.e., from a script), list event handlers for an object, etc.
for example, activating a backpack and giving the player customised inventory would go as calling specific layout from event or script. both having their usage in avoiding name collisions between mods. althought savest way would be to contain scripts / object ID's and so worth into data files, but would that need separation in filetype level, don't know.

another example would be cast on swing or in the fire resistance counter, cast on hit. getting mesh files and animation keys can be kinda tricky if not baked separately. something in data level, so that you could make army to fight and get bucket of water to pour over them every time idle animation / effect counter is played. event described in data and that executing script to handle the bucket sounds minimal in run times.

and other one, that backpack or totem giving player health points when near and playing ancestral ghost sound + restoration spell effect on player position once.
"life is crazy"
"craziness has beauty which only crazies understand" some movie clip in the head.
https://wiki.openmw.org/index.php?title=Testing

Post Reply