aliens

Author Topic: Ufopaedia development  (Read 37317 times)

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Ufopaedia development
« Reply #45 on: September 26, 2011, 11:45:46 pm »
How's this progressing? Now that Research is actually implemented, it would be nice to get the Ufopaedia going as well. A bunch of stuff still seems to be incomplete or TODO, like Ufopaedia::open you mentioned before...

Btw now that there's a Discovered Research list in the SavedGame, I would suggest making Ufopaedia items unlock from those, as there is no point in keeping separate lists of everything unlocked when it all depends on Research.

Offline panther

  • Sergeant
  • **
  • Posts: 42
    • View Profile
Re: Ufopaedia development
« Reply #46 on: September 29, 2011, 08:52:23 pm »
Well, I didn't have much time lately, but the current progress surely motivates me!  8)

The hardest part now is to build Ufopaedia related content on top of YAML. I have made a concept of how to do this and will update my repository today.

I don't know if it is the best solution to unlock UP articles directly from Research, because these are not always 1-to-1 as far as I remember. And maybe it's more flexible this way if modders want to add new articles in the future. We'll see...

Offline panther

  • Sergeant
  • **
  • Posts: 42
    • View Profile
Re: Ufopaedia development
« Reply #47 on: September 30, 2011, 12:03:41 am »
Small progress, the Personal Armor article has been added (see pull request).
I will look into the research connection next.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Ufopaedia development
« Reply #48 on: October 05, 2011, 04:00:51 am »
I don't know if it is the best solution to unlock UP articles directly from Research, because these are not always 1-to-1 as far as I remember. And maybe it's more flexible this way if modders want to add new articles in the future. We'll see...

Well you always need to research something to open up an article, even if it's not 1-to-1. My reasoning is that keeping all the "unlocking" in one place helps keep everything consistent and less error-prone.

For example, say we go your way with unlock lists for everything: ufopaedia, items, crafts, weapons, research, manufacture, etc. So when we finish researching an item, we have to explicitly unlock the next research, item, ufopaedia, manufacture, etc. This increases the chances someone will slip up and cause a bug, and you might end up with an unlocked manufacture without the unlocked item, or unlocked research without the unlocked ufopaedia, etc. And even if you fix this bug, any affected savegames will still have the broken unlocks because it's not retroactive (this is similar to the UFO research bugs) since they only check if they themselves have been unlocked.

But if we just tie everything to researches instead, then you'll be sure that if research X is complete, everything associated with it will unlock. There are no inconsistencies. Even if you later fix a research bug, or decide to change what a research unlocks or something, it automatically takes effect because everything just checks if research X is unlocked. This also makes it much easier for modders to keep updating and trying changes without breaking everything.

Offline panther

  • Sergeant
  • **
  • Posts: 42
    • View Profile
Re: Ufopaedia development
« Reply #49 on: October 09, 2011, 12:26:38 am »
Point taken. The fact, that ids have to be matched in Research, Ufopaedia, etc. would be an invitation to errors.:)
So I will tie the unlocking part to the research.

Offline panther

  • Sergeant
  • **
  • Posts: 42
    • View Profile
Re: Ufopaedia development
« Reply #50 on: May 02, 2012, 01:26:48 am »
Phew, I've been away for a while...  :o
Just installed XCode 4 and managed to build the current OX version  :), so now I can resume my development efforts.

These are my next milestones:
1.) load current data from YAML rulesets instead of hardcoded definitions.
2.) add further main menu buttons to be able to define whole Ufopaedia
3.) attach Ufopaedia unlocking to the research infrastructure
4.) make articles more configurable for modding

I hope to file my next pull request real soon...

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: Ufopaedia development
« Reply #51 on: May 07, 2012, 08:33:21 am »
Great :)

Offline Zharik1999

  • Colonel
  • ****
  • Posts: 133
    • View Profile
Re: Ufopaedia development
« Reply #52 on: May 09, 2012, 09:52:11 am »
Really great, waiting for your improves in UFOpaedia :D