Page 13 of 14

Re: Daggerfall Mechanics thread: Volunteers welcome

Posted: Fri May 11, 2018 7:41 am
by ifkopifko
No problem man. It never hurts to re-check twice. :)

Re: Daggerfall Mechanics thread: Volunteers welcome

Posted: Fri May 11, 2018 9:14 pm
by Midknightprince
I hope this is the right place to put this..
I was testing the magic, in DFU, the magic looks like it stacks, like 1 levitate spell for maybe 2 rounds will go to 4 if you cast it twice.
Same with AOE spells, like if you hit yourself with a DOT by accident.
I really dont rem how it is in classic, so you guys are gonna have to tell me :)
I'm just letting you know how its playing.

Re: Daggerfall Mechanics thread: Volunteers welcome

Posted: Fri May 11, 2018 9:30 pm
by Jay_H
My earlier testing indicated durations are supposed to stack when cast multiple times, so that's working as intended. Good question.

Re: Daggerfall Mechanics thread: Volunteers welcome

Posted: Fri May 11, 2018 9:56 pm
by Interkarma
Yep, that's exactly how classic works. Most spells with a Duration component will just stack duration. The effect scripting system is pretty flexible so this can be changed easily at any time if I get it wrong.

Internally, the effect system has a special type of class called IncumbentEffect. For any effect that wants to follow this behaviour, the script only needs to inherit from IncumbentEffect and implement two things: a) what happens when becoming incumbent, and b) what happens when a duplicate effect is applied.

Have a look at the Levitate.cs script to see how this is done. When a second copy of the effect is applied to entity, it will call AddState(). In this case, it just stacks duration. Could do literally anything here instead. Effects are crazy flexible. :)

Re: Daggerfall Mechanics thread: Volunteers welcome

Posted: Fri May 11, 2018 11:37 pm
by Jay_H
So when we want (next year) to add in custom spell effects, what'll that look like system-wise? Adding a new .cs file to the rig that the game could detect? Or is it too early to tell?

Re: Daggerfall Mechanics thread: Volunteers welcome

Posted: Sat May 12, 2018 12:41 am
by Interkarma
Jay_H wrote: Fri May 11, 2018 11:37 pm So when we want (next year) to add in custom spell effects, what'll that look like system-wise? Adding a new .cs file to the rig that the game could detect? Or is it too early to tell?
That's pretty much it. My plan right now is that you will script effects in C# and package them up as a .dfmod. The mod will need to register them into the EntityEffectBroker (using a hook that hasn't been exposed yet). The scripts themselves just need to inherit from EntityEffect, IncumbentEffect, DiseaseEffect, etc. and override some virtual functions to run their payload. Effect scripts can be very simple (e.g. HealHealth) or rather elaborate (e.g. base DiseaseEffect).

The core scripts that are part of the base game will benefit from tightest integration with core systems. But effect script mods can still touch anything in game the usual mod system can touch - which means effect scripts can do loads of cool stuff from the very mundane to the absolutely fantastical. It just depends how much time and effort the developer wants to put into them. And because they're a mod, you can bundle textures, models, shaders, sound effects - pretty much anything you want - to deliver that effect to the player.

There are a few bits that technically aren't part of effect system. For example, you can't add new element types or target types to spellmaker. This is just part of the basic game design. But in terms of what an effect can do there are few limits. I'm looking forward to seeing what people do with it in future.

Re: Daggerfall Mechanics thread: Volunteers welcome

Posted: Mon May 14, 2018 4:13 pm
by Biboran
I don't know if is this right place toask, but I readed a little bit about daggerfall crime and punishment system
http://www.tesguides.com/tes2/misc/legaltip.htm
Looks like vanilla daggerfall had two major problems with it - that guards continue to attack player while court UI shown so you will get worse condition ammunition after relise from prison and second - that guards hunt after you for last type of crime you did, i.e.:
If there’s no way to get away from the guards, pick their pockets before the surrender message pops up. The game records the last crime you committed as the crime you are charged with. Thus, you can kill everyone in town and all but one of the guards, pick that guard’s pocket and you’ll be charged with one count of pickpocketing instead of premeditated mayhem
It be possible to fix or change in unity? Like you will be impisoned for most horrible type of crime you did, not the last one and that guards will not attack you while you in court

Also there are two types of crime that unachivable in vanilla game
Crimes which exist in the game, but you can’t be charged with (caution! it may be possible to be charged with these crimes, but I haven’t managed to key the right sequence of events):

High Treason: one of the crimes on the wish list for many players looking forward to TES3 (tentatively titled “Morrowind”). Essentially you endanger or kill the head honcho. Can’t do it in the game, but don’t think the idea hasn’t crossed the mind of many a player.

Assault: Smacking someone (has to be a guard since townspeople only have 1 hit point), but not actually managing to kill them. I’ve never managed to be charged with assault since if I’m going to hit someone, I’m going to hit them hard enough to kill them.

Re: Daggerfall Mechanics thread: Volunteers welcome

Posted: Sat May 19, 2018 12:04 pm
by R.D.
It be possible to fix or change in unity? Like you will be impisoned for most horrible type of crime you did, not the last one and that guards will not attack you while you in court
I did the guard work so far. Yes, it could be fixed, but I was focusing on getting the original game's behavior recreated. I've never noticed guards in the original game hitting the player while in court.
Also there are two types of crime that unachivable in vanilla game
Not only two. These are crime types in the game files that I'm not aware it is possible to get:
Trespassing
Assault
Tax Evasion
Smuggling
Piracy
High Treason
Treason

Re: Daggerfall Mechanics thread: Volunteers welcome

Posted: Sun Sep 02, 2018 2:06 am
by Interkarma
ifkopifko wrote: Thu May 10, 2018 8:22 am EDIT: For the sake of completeness, I'll attach the latest excel file for spells, with correct a, b, and offsetGold values. Remember that "factor" is not needed anymore, so in future when adding new spells, remember that in MakeEffectCosts you only need to define (a, b, offsetGold).
Hey ifkopifko! :D

I'm building out a few more effects now and found the "Water Breathing 50" values in Spell Effects Edited 23 don't produce the same costs as classic. If you get a chance, is this something you'd be willing to take another look at?

So far everything else is matching fine (including Water Walking). I'll let you know if I find any other effect costs not matching classic.

You're probably also interested in knowing that Allofich/R.D. has re-implemented cost formulas from classic. I'm looking at using a fallback to classic cost calculations when the integrated effect costs are undefined. This obviously can't be used for modded effects later, but it another way of grabbing the cost value for classic effects. It's also interesting to see how this was coded in classic.

Re: Daggerfall Mechanics thread: Volunteers welcome

Posted: Sun Sep 02, 2018 7:22 pm
by ifkopifko
Hi there!

Firstly, I am very excited to see your progress. :-) (With this I mean all the contributors/developers.)

About the “Water Breathing 50”, I do not see what you mean, the match seems perfect to me in the excel file.

One thing to note though, in the whole excel file, there is a mismatch of raw values of magicka costs (those read from classic). Some are for “the effect cost”, which can go below 5 spellpoints, some are obviously for the “finished spell” (including all added effects), that cost never goes below 5 spellpoints. If I recall correctly, this has not been addressed in the formulas at the time I have messed with your code. My bad, I did not realise it at the time.
I can see it is handled in the “Allofich’s classic formula”: https://github.com/Interkarma/daggerfal ... r.cs#L1585

If there is some other disagreement for this spell effect between classic and the excel formulas, please let me know, I am not aware of any.

Thanks for the info of re-implementation of classic formulas… that seems like a clean way to match the classic. I will surely take a detailed look at it when time allows (supposing that I will be able to wrap my head around it). :-) Now you can choose which way is better to use. :-)