Reinforcements arrived.

Discuss coding questions, pull requests, and implementation details.
User avatar
Galactic Chimp
Posts: 16
Joined: Wed Apr 29, 2020 10:25 pm

Reinforcements arrived.

Post by Galactic Chimp »

Sup?

I would really like to help with project since I'm fascinated with open world cRPGs like Daggerfall (I played the heck out of Morrowind, Oblivion and Skyrim).

My credentials: I have almost 3 years of commercial experience with C#, and ~2 years of amateur experience with Unity. Additionally I had a really rough hands-on training with 3 software architects on 5 different projects (which I am immensely thankful for) which allows to me at least partially feel confident on giving some tips onsoftware projects.

Why do I want to help out in this project? : I feel that every software dev should have an oper-source project in which he participates, and which he upgrades as best as he can. Since I am an avid gamer, I choose a gaming project.

My offer: I really want to help to make this project as best as possible and I would like to offer my skills.

Why have I written this? Since this is mostly Interkarma's love-child (as far as I can tell) I feel obliged to create a new thread and ask for some pointers to start (as I have noticed there are not too many long-term contibutors, which means it is a bit hard to predict how should I proceed.). Should I fork the project and then create pull requests for merging? Or are directs pushes ok?

Kind regards,

Galactic Chimp

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

Re: Reinforcements arrived.

Post by Interkarma »

Hey Galactic Chimp, welcome to forums. :)

At this point in time the core of project is nearing completion. Only a few items remain on the roadmap and some of those are already in active development by others. We have a good group of 6+ core devs contributing to the project on an almost weekly basis. The credits thread lists the people who have contributed so far.

If you're interested in helping tick off any pending items, I might suggest the following:

-Autowalk/autorun toggle, sneak toggle, walk/run toggle keybinds
This is just an extension to existing keybinds to allow state toggle options in addition to press-and-hold. However, this overlaps with jefetienne's current work. He's actively working on keybinds as part of controller support, so this kind of falls into his wheelhouse by default at the moment. We'd definitely need to check with him before anyone else looks at this.

-Regional rumours/notices to display on city bulletin boards near entry gate
This one is unassigned. The background rumour rotation system has been implemented for some time. I'm fairly sure this is what drives the notice boards near the gates of large cities. It might require some research and reverse engineering if that's something you're interested in. Other than picking correct rumour text, it's basically just a GUI popup when player clicks on bulletin board model. I've been leaving this one as a fun feature to tackle later, but I won't complain if someone else picks it up.

Other than that, there's plenty to do in the modding system. This is directed by TheLacus with a lot of contributions by others. Chatting with the other devs is a good way to work out where to fit in.

For the process, you'll need to fork the project and send PRs. We'll review the changes and merge once everyone is happy. What matters most to me is being active in the community and supporting your changes if something breaks. Support and refinement is just as important as cutting code in the first place.

Please don't hesitate to ask a question if you're uncertain of something and one of us will answer. We all live in different time zones (I'm in Australia) and there's usually someone knowledgeable around.

If you haven't started looking into the code already, I should warn this project is a little different to most games. Almost everything is procedurally generated and loaded from DOS binary assets. The first time you open up the game scene, you'll find there's not much in it. The world and game behaviours are all created on the fly. Some of this is hardcoded as it has to interface with that DOS binary data. But we're slowly opening up most parts of the game to modding as time goes by.

Just see where you think you can fit in and we can go from there. All the best! :)

User avatar
Galactic Chimp
Posts: 16
Joined: Wed Apr 29, 2020 10:25 pm

Re: Reinforcements arrived.

Post by Galactic Chimp »

Thanks for the informative intro :)

I think I'll start with: -Regional rumours/notices to display on city bulletin boards near entry gate,
since this sounds like a relatively easy task to do.

After that we will see what next to take.

Can't wait to start contributing :)

Cheers

User avatar
pango
Posts: 3358
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Reinforcements arrived.

Post by pango »

There's also a Discord server with many channels dedicated to mods and quests, and people hanging around knowing the code well enough to either answer your questions or at least give you directions:

https://discord.gg/cS35dV
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Galactic Chimp
Posts: 16
Joined: Wed Apr 29, 2020 10:25 pm

Re: Reinforcements arrived.

Post by Galactic Chimp »

Thanks I'll join and take a look :)

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

Re: Reinforcements arrived.

Post by Interkarma »

Cheers! Please feel free to post any questions here (or on Discord as Pango suggests) and we'll do our best to help. But also have a hunt around the code and you should find other examples to build on.

A few quick hooks to get you started.

The bulletin board model is currently just combined with other static geometry. You'll first need to ensure this modelID (41739) is split into its own object so it can be interacted with. Look at RMBLayout.cs (ln 774) to see how this is done for city gates. Creating an equivalent IsBulletinBoard() method and check here for modelID 41739 should be adequate to split this to a standalone model.

Then check out how DaggerfallCityGate component is attached to gate models in RMBLayout.cs (ln 839). You could attach a similar component around here for bulletin boards if you need to. You can probably do this without an extra component however.

Then you need to capture the click, which should be done in PlayerActivate.cs. See how other in-game objects are activated like loot (from ln 327).

After that, display a messagebox. Lots of example of this in the game. DaggerfallUI.MessageBox() will spit out Daggerfall's style of tokenized text.

A lot of the time, these bulletin board just display the name of the town like below (screenshot from classic). That's a good enough starting point for me. :)

fall_098.png
fall_098.png (15.52 KiB) Viewed 2299 times

Other than that, the trick will be showing the right messages at the right time. I don't even know where the rumors here are drawn from. I assuming it's from the same rumor mill simulation running in PlayerEntity.cs (around ln 1584) but this is an area I haven't researched and have no knowledge of. You'll need to spend some time with classic to either reverse engineer the behaviour or derive it experimentally. Out of everyone still active today, Ferital is one of the best at pulling apart the guts of FALL.EXE. He might be able to offer some information here to counter my lack of knowledge.

Hope that all helps! :)

User avatar
Galactic Chimp
Posts: 16
Joined: Wed Apr 29, 2020 10:25 pm

Re: Reinforcements arrived.

Post by Galactic Chimp »

Hmmm, ok. This looks doable, after some research. Ok, I'll try to do some C# magic with this. Thanks for the pointers, I think I'll need them ;)

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

Re: Reinforcements arrived.

Post by Interkarma »

Found an example of a bulletin board with an ally/enemy change listed. This kind of simulation is already run by the non-quest rumor mill in PlayerEntity I mention above.

fall_099.png
fall_099.png (14.41 KiB) Viewed 2270 times

User avatar
Ferital
Posts: 282
Joined: Thu Apr 05, 2018 8:01 am

Re: Reinforcements arrived.

Post by Ferital »

I had plans to work on bulletin boards at some point, since I am pretty familiar with classic original code regarding the rumor mill, which was reverse engineered by Allofich and translated to C#. But as I don't have much time these days to contribute to DFU in the way I want, instead I may offer some support if you need it, Galactic Chimp. Don't hesitate to send a PM.

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

Re: Reinforcements arrived.

Post by Interkarma »

Perhaps we can organise a bit of a three person collaboration here? I'm more than happy to help Galactic Chimp with getting the basics of bulletin board up and running (if any help is needed). Then Ferital can assist with the rumour side of things so it has just the right classic feel.

And no rush on anything guys. The best work happens in its own time.

Post Reply