project-navigation
Personal tools

Author Topic: Proposed storyline.  (Read 19092 times)

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: Proposed storyline.
« Reply #30 on: May 26, 2010, 05:49:50 pm »
Well, it really depends on *what* you want to change - I'd start by reading the "campaign.ufo" script file, but please understand it isn't centralized all into one specific file.  If you want to change research topics and how they work, look at the research-related .ufo files, they let you change, add, or delete research topics and what triggers making them available when.  If you want to change the models, those are in many different files, but yes, you can make the game load alternate MD2 files, and so on.

I'd read through all the .ufo files to get a good understanding of how the game mechanics work, and then you should be able to figure out what to change to make what you want to do work.

Ok, I've read them.

They appear to be of the form
Keyword name
{
name value
name value
name value
}

where "value" can be a number, a constant (like "true"), a string, or a list.

The keywords are probably tracked by something in the code; some name-value pairs correspond to other keyword-name pairs, but the keyword and name values do not need to be the same.

I can see how to replace the current campaign settings with a completely new set.
I cannot see how to add a new set of settings without overriding the old.

Case in point:
Lets say I wanted to actually add a "play the aliens" campaign.
For the alien tech tree, I'd need to make sure you don't research anything on the player side, and visa-versa.

First, there's this:
Code: [Select]
up_chapters main
{
        news            "_Background"
        crafts          "_Aircraft"
        buildings       "_Base Facilities"
        tech            "_Research Reports"
        equipment       "_Equipment"
        artifacts       "_Alien Artifacts"
        aliens          "_Autopsies & Observation"
        threat          "_The Alien Threat"
}
It looks like you get one set of UfoPedia chapters. I can't create a set for "The earthling threat" or "Human Equipment".

I would need to have some way to specify that some research topics are off limit. Ideally, each existing research topic would be marked as belonging to a given campaign group -- for example, playing human in the normal campaign would give you the "technology" of "standard_human"; if I wanted to make a new campaign, I might give the "technology" of "mgk_overlord_alien" and have that as the root of my research tree.

Lets say, just for the sake of sillyness, that I wanted to make a campaign named "tutorial". This would have a total of 3 things to research, and 3 things to build. The encounters would be very scripted, with the first few being one or two aliens and a small UFO (damaged if the game engine supports it), with the player having vastly overwhelming forces. Mails that arrive at the beginning would say something like, "What do I look like, the in-game tutorial? Knowing doctor Bluestone, you've probably got a really powerful weapon for research. Go to <X>, and click <y> to assign scientists". Etc. Walk the player through each step of the game.

Note that the current "tutorial" is little more than screen shots, and not sufficient. The battle tutorial only explains what the things on the display are, and doesn't even cover how to move a unit, or how to fire on an enemy. (Or how to move the map around, etc).

(Will anyone understand that "in-game tutorial" reference without me posting the link?)
http://www.dragon-tails.com/archive.php?date=2006-01-01

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Proposed storyline.
« Reply #31 on: May 26, 2010, 07:01:37 pm »
Several things:

The .ufo script files, AFAIK, are parsed and read only when the game starts up and initializes everything, they aren't "tracked" throughout the game.

The game looks for PK3 files in a specific order, if it finds duplicate files inside those PK3s it overwrites previously loaded ones with the most recently read ones.  So no, you aren't limited to only replacing things, you can add things too.  Just create .ufo files that include all the old stuff but also have additional new stuff, and make sure the game loads your custom files last.

It sounds like you didn't read through all the .ufo files, which is something you should do - If you did you would have gone through the several that control the research tree and research topics, which would answer some of what you were asking about.  You can copy the .ufo files and, again, make a custom duplicate with additional topics and such for additional campaigns.

This isn't rocket science, I've made custom .ufo files before on my own that create additional campaigns before quite easily and within a few quick minutes.  The same goes for adding additional weapons (with new models) into the game, something I've also done, as well as aircraft and other stuff.


Regarding the existing tutorials, you're right, they aren't that good.  They need to be replaced and/or updated.

Offline homunculus

  • Sergeant
  • *****
  • Posts: 387
    • View Profile
Re: Proposed storyline.
« Reply #32 on: May 26, 2010, 07:48:23 pm »
Well, if you managed a whole ARMY then it wouldn't be a SQUAD-based tactical game, now would it?

Granted, you can have several squads, but the realism point still stands. Just make sure to tell the player that he isn't the only one fighting the aliens and that Phalanx is used in tactical missions. Large-scale battles are left to the regular military.

So Phalanx are more like commandos and less like an army fighting the aliens alone.
well, if the mumbai will be excluded, then there is no reason to involve the army, is there?

the story could be something as simple as:

aliens have abducted a few people, no one knows why, and phalanx is to find out.
maybe the aliens have just chosen to be cautious and take some samples for study before they "come in peace".
so, governments want to keep the diplomatic options open, which includes that governments do not want to officially declare a war on the aliens, especially considering their unknown numbers and resources, and advanced tech (of course, everyone remembers the conquest of the americas from our own history).
therefore, phalanx would need to be an unofficial secret organization.
you can guess that the reason for such cowardly behavior is fear of the unknown power of the aliens.


afaik, this is basically the original (x-com:eu) story, otherwise there is nothing very original (creative) about it.
the positive side is that, as far as i understand, there are no contradictions.
and see, regular army involvement in any way is a very bad idea according to this story.

now, if mumbai will be excluded from ufo:ai, i really wonder what the story will look like.
where does it appear first? in wiki?

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: Proposed storyline.
« Reply #33 on: June 22, 2010, 12:21:23 am »
The game looks for PK3 files in a specific order, if it finds duplicate files inside those PK3s it overwrites previously loaded ones with the most recently read ones.  So no, you aren't limited to only replacing things, you can add things too.  Just create .ufo files that include all the old stuff but also have additional new stuff, and make sure the game loads your custom files last.
Any sort of "Just create new files that combine existing files with new stuff" is a disaster. As soon as the original file is modified by a patch, the "new additional" campaign fails, because it has the wrong old standard. Worse, you can't combine two different addons from two different people because they both assume that there is only one addon.

Addons, to add a campaign, have to be *ADDITIONAL*, not *replacements*.

Quote
It sounds like you didn't read through all the .ufo files, which is something you should do - If you did you would have gone through the several that control the research tree and research topics, which would answer some of what you were asking about.  You can copy the .ufo files and, again, make a custom duplicate with additional topics and such for additional campaigns.
I did read them all. Maybe not every line of every one. Again, I don't want to duplicate and modify.

We have things like:

Code: [Select]
tech rs_laser
{
        name "_Continuous Wave Laser Operation"
        type    tech
        up_chapter      tech

        description {
                default "_laser_txt"
        }
        pre_description {
                default "_laser_pre_txt"
        }

        mail_pre
        {
                from    "_mail_from_paul_navarre"
                to              "_mail_to_base_commander"
                // subject      defined by "name"
                icon    icons/tech
        }

        mail
        {
                from    "_mail_from_paul_navarre"
                to              "_mail_to_base_commander"
                // subject      defined by "name"
                icon    icons/tech
        }

        time    6000
        image   techs/continuous_wave_laser_operation
}

There's no requires section in there, so unless I replace or modify that, there is no way to define a new tech tree that doesn't have that.

More to the point, there's no way with the current tech items to say "This item belongs to this campaign". There's no way to say "This is campaign X with modification Y". There's not one human campaign with 5 modifications, there's 5 different human campaigns, and there's only one tech tree.

Quote
This isn't rocket science, I've made custom .ufo files before on my own that create additional campaigns before quite easily and within a few quick minutes.  The same goes for adding additional weapons (with new models) into the game, something I've also done, as well as aircraft and other stuff.

Ok, have you made a new campaign that has its own tech tree, that isn't just a variation of the old campaign, that doesn't have the "starting tech research", without having to remove stuff from the base?

===
The research_logic.ufo file seems to have some events that are triggered by game code. So, some new campaigns will require modifying the executable.

researched_list.ufo seems interesting. There's stock "humans knows this" and "humans can learn that". There could have been tags for things like continuous lasers so that it would be tied to the standard campaign.

Here's my question: Can you make it possible to play the humans OR the aliens? If there was code in there to run the human side, could you make the aliens playable? As far as I can tell, the answer is no. Everything from only a single set of UFO topics (instead of a per-campaign set of topics), to research trees that assume there's only one campaign and you start with X available, etc.

If I wanted (somewhat serious) to make a special tutorial campaign, with a custom subset of the research tree, with a smaller set of UfoPedia chapters, how would I do it without replacing the existing? How would I be able to say "You can play standard campaign in 5 variations, or tutorial campaign in 3 variations"?

Offline Hertzila

  • Sergeant
  • *****
  • Posts: 469
    • View Profile
Re: Proposed storyline.
« Reply #34 on: June 22, 2010, 03:42:00 am »
Either the requirements are hidden somewhere else or that is one of the ugly things the devs have hard-coded into the engine. There are plans to remove the ugly code to allow complete custom campaigns (Or So I've Heard) but the plans haven't been executed yet.

Offline Winter

  • Captain
  • *****
  • Posts: 829
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Proposed storyline.
« Reply #35 on: June 22, 2010, 05:36:31 am »
CWLO is one of the few research topics that have no prereqs and are available at the beginning of the main campaign.

I know where you guys are coming from, though. It would be handy for modders to have a 'campaign' flag for research topics. Maybe post it in the feature requests?

Regards,
Winter

Offline Kildor

  • Project Artist
  • Captain
  • ***
  • Posts: 757
  • Project mapper and some other stuff`er
    • View Profile
    • http://ufoai.nx0.ru
Re: Proposed storyline.
« Reply #36 on: June 22, 2010, 06:36:12 am »
For correct modding we need some more functionality, for example ability to use custom .mo file for each mod.