On Action Objects

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: On Action Objects

Post by LypyL »

This is my "Dungeon Object Test Project" for anyone who might be interested in using it. This is still a WIP...and hopefully in the future it will be expanded to be useful with more than just rdbObjects :lol:

What it does (differently):

DFBlock.RdbObject and its child structs are made public and serializble.

For almost every gameobject created for a dungeon in RdbLayout, a component with the RdbObject struct used to create it is added to the object. This is helpful to look for patterns, and understand what does what, but also makes it easy to make edits right in the inspector.

GameObjects get renamed:

The RdbObject.this value is added to the beginning of the gameObject's name. This is helpful if you're trying to find the next or previous objects in a linked list. If the object has an action, it will start with the prefix ACT (or ACTF for action flats).

Writing changes back to Blocks.bsa -

First off - BACKUP YOUR BLOCKS.BSA file!

If you make changes to one of the structs and you want to write the changes back to daggerfall and see what it does, you can add the gameobject(s) to the list of RdbObject writer in the inspector and hit the Write Objects button.

http://gfycat.com/FilthyLightheartedDinosaur

https://youtu.be/he0IuJ3t0gU

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: On Action Objects

Post by Nystul »

haha, i need to click more torches in the future...

User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: On Action Objects

Post by LypyL »

Nystul wrote: haha, i need to click more torches in the future...
You never know what you might find in Daggerfall ;)

Image


Update:

I made something of a breakthrough yesterday when I figured out that what's used to determine the axis for rotation/translation actions, also seems to be used as a magnitude for others.

Actions 2-7 are all translate actions, they each move in different directions. The larger the "axis" value, the father the object will move.

This is also how the "hurt" actions work. The amount of damage they do depends on the axis value. As it turns out, 21-25 are all hurt player actions.

28 seems to drain player magicka, and also uses the axis value to determine the amount.

One thing that was frustrating me was trying to figure out why actions worked on some flats but not others. It turns out they have a trigger flag just like models - it's the Gender flag currently. Another field used for actions by flats seems to be the FactionMobileID field.

For example, the Guard at the entrance to castle daggerfall, normally has a Gender value of 2 (triggerflag 2= direct activate), and a FactionMobileID setting of 16448 (this is something like the index to get the text for his message apparently). If you change either one of those, he will stop working. If you setup another flat exactly like it, you can click on it and get the text and have to type the answer you normally give the guard flat.

I need to verify it, but I believe flats that cast spells / create spell effects use the FactionMobileID to select the spell.

edit: Even moar

The action flats use the 2 bytes that make up the FactionMobileID value independently. The first is used like the axis value on models, it controls the magnitude of translation / damage.

The second seems to be what's used to index into spells, text, as well as sounds for actions. That's right - the sound value is doubled up, so there is now way to choose different sounds for these actions in daggerfall. That's probably why there are so many strange sound choices in Daggerfall :lol: . They obviously took some care to make sure the sound ID #s matched the text (and probably spell) numbers. A value of 64 for instance will get you the text from the guard in daggerfall castle, and the sound he makes.

That seems to be the case for action models as well - the soundID value is also used as an index for stuff like text & spells.

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: On Action Objects

Post by Interkarma »

You continue to blow my mind with this progress. :)

ifkopifko
Posts: 195
Joined: Thu Apr 02, 2015 9:03 am

Re: On Action Objects

Post by ifkopifko »

Stop blowing his mind LypyL, the community still needs him to finish the job. :mrgreen:

Good job with your research by the way. Thumbs-up!

User avatar
Jay_H
Posts: 4070
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: On Action Objects

Post by Jay_H »

I hope not to cause excessive havoc in resurrecting such an old topic, but I wanted to report that the ladders within regular houses are non-functional. In vanilla they would teleport the character to the upper floor when "Grab" or "Dialogue" is used on them.

User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: On Action Objects

Post by LypyL »

No problem, I need to update the information here anyways at some point as it's out of date but I keep putting it off :)

The action system doesn't work on anything outside of dungeons (well it can if configure something to the scene manually...its quite easy and fun to make a flying castle that way in Unity). Ladders would seem to have their own teleportation system unique from the teleporters in the dungeon, as they use different markers for ladders.

I would almost rather make it so you can just climb up and down ladders normally like with walls, though there might be some buildings where that would cause problems.

User avatar
Jay_H
Posts: 4070
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: On Action Objects

Post by Jay_H »

Yeah, I just tested it, and there are definitely collision problems with the slanted ceilings in attics if you climb up directly. The ladders seem to be programmed in a way that they send you to different places depending on where you are relative to itself; if you're above halfway, it'll send you to its feet, and if you're under halfway, it'll send you to the attic. That's at least what brief levitation testing tells me. In any case, this is no great priority, and certainly not for me.

Narf the Mouse
Posts: 833
Joined: Mon Nov 30, 2015 6:32 pm

Re: On Action Objects

Post by Narf the Mouse »

Hmm...Make it possible to crouch while climbing ladders?
Previous experience tells me it's very easy to misunderstand the tone, intent, or meaning of what I've posted. If you have questions, ask.

Post Reply