OpenXcom Forum

Modding => Work In Progress => Topic started by: Axebeard on August 01, 2016, 05:14:54 am

Title: Help with new missions (formerly Quick idea: Half Life mod)
Post by: Axebeard on August 01, 2016, 05:14:54 am
Surprised this hasn't been mentioned before (at least Search didn't turn up much), but I think the Half Life universe would make for a great Xcom mod.

Mainly, I would just like to see the aliens from HL replace the stuff from Xcom.
Maybe do something with an alternate version of the HL timeline, with the NATO forces or Xcom or whomever trying to figure out what's going on. Start off with the standard real world weapon, and then with intense research, have the ability to research the gauss and plasma guns.

I remember reading a thing somewhere on how to add aliens into OpenXcom, but I can't seem to find it any more. If anyone wants to run with this idea, I'd be willing to do sprites :)

Or if someone can point me towards some tutorials on creating content for OpenXcom, that would be appreciated too.
Title: Re: Quick idea: Half Life mod
Post by: Solarius Scorch on August 01, 2016, 05:22:37 pm
I'm actually doping something like this right now, as part of the X-Com Files mod. ;) It's not literally Half-Life, but much of the storyline is similar: there's a group of rogue scientists which experiments with portals and is in contact with aliens from Robin's From The Apocalypse mod.

I'm writing this here to ask what you find most interesting in a hypothetical Half-Life mod, so I could get some new perspective.

Or if someone can point me towards some tutorials on creating content for OpenXcom, that would be appreciated too.

AFAIK there's no tutorial as such, but this is the most essential stuff:
www.https://ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)

I suggest you start with someone else's finished mod (preferably something simple, like a new weapon) and tweak it to get the feel of it. And ask questions on the forum and IRC.
Title: Re: Quick idea: Half Life mod
Post by: kkmic on August 02, 2016, 05:04:30 pm
Correct link: www.https://ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom) (https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom))
Title: Re: Quick idea: Half Life mod
Post by: Solarius Scorch on August 02, 2016, 07:11:12 pm
Correct link: www.https://ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom) (https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom))

Thanks.
The Ufopaedia is having issues and I had to copy the address from another source. My bad!
Title: Re: Quick idea: Half Life mod
Post by: kkmic on August 03, 2016, 10:36:07 am
Yeah, I've noticed before that if you post a URL that ends with a round bracket (like many wiki links do), the automatic parser does not take it into account, so you need to manually surround the URL with the [URL] tags, to make sure that the ending bracket is properly used.
Title: Re: Quick idea: Half Life mod
Post by: Axebeard on August 03, 2016, 11:22:37 am
I appreciate the link!

My interest is mainly in having new enemies to fight. It's probably worth noting that my favorite way to play Xcom is with Piratez, because of all of the tactical options.

If I get bored and have the time, I might poke around and merge a few different mods together towards something similar to Half Life. Really just an excuse to do lots of terror missions with a large variety of creatures. I do find it fun to try to figure out how to translate special attacks between games (I mod DOOM a bit), for example the Hound Eye's sonic blast attack.
Title: Re: Quick idea: Half Life mod
Post by: Axebeard on August 04, 2016, 03:23:53 am
So I've refined my idea a little after looking at what's possible within the Xcom rulesets.

My first order of business, is to increase the frequency of Terror Missions, and to almost eliminate the rest of the mission types for the first phase of the invasion (probably a year or so). I see that this will involve messing with MissionScripits and AlienMissions.

How could I increase the frequency of Terror Missions to about one every month or so, and eliminate the rest? Also, how could I remove the ships buzzing around leading up to a Terror Mission? I'm going on the portal storm idea here, so alien wildlife is warped into cities.
Title: Re: Quick idea: Half Life mod
Post by: Solarius Scorch on August 04, 2016, 08:41:23 am
How could I increase the frequency of Terror Missions to about one every month or so

A number of ways to play with this, but isn't the Terror Mission already happening roughly once a month? Roughly.

and eliminate the rest?

Add
Code: [Select]
    firstMonth: 12

to the mission script, it'll delay them by a year.

Also, how could I remove the ships buzzing around leading up to a Terror Mission? I'm going on the portal storm idea here, so alien wildlife is warped into cities.

This requires giving it the right trajectory. It's in the ufoTrajectories section, but frankly I no longer remember the details - check Ufopaedia.com.
Title: Re: Quick idea: Half Life mod
Post by: Axebeard on August 04, 2016, 09:00:45 am
I realized that Terror missions do pop up once a month already, I'd like to have them be even more frequent, but after talking to some people in the IRC I was wondering if this would work instead:

Create a custom mission type that acts like a Terror mission, but instead of having to hunt down every alien on the map, you have to neutralize 75% of them, and after turn 20 or 30 or so, a militia regroups and secures the area, so you can leave without killing everything. I think that would remove some of the tediousness inherent in the normal Terror missions.

Also, after looking at the X-com Files mod, I noticed he used a dummy UFO to avoid having UFO sightings on the early missions. Still not certain how he did it, but I'm new to poking around in OpenXcom, so...
Title: Re: Quick idea: Half Life mod
Post by: Solarius Scorch on August 04, 2016, 10:13:14 am
I realized that Terror missions do pop up once a month already, I'd like to have them be even more frequent, but after talking to some people in the IRC I was wondering if this would work instead:

Create a custom mission type that acts like a Terror mission, but instead of having to hunt down every alien on the map, you have to neutralize 75% of them, and after turn 20 or 30 or so, a militia regroups and secures the area, so you can leave without killing everything. I think that would remove some of the tediousness inherent in the normal Terror missions.

There is nothing similar in the game, so you would have to code it yourself, or find someone to do it for you. Such tools could be useful.

Also, after looking at the X-com Files mod, I noticed he used a dummy UFO to avoid having UFO sightings on the early missions. Still not certain how he did it, but I'm new to poking around in OpenXcom, so...

To be honest, I never knew how it works code-wise. I just copied what worked, and it worked for me too. ;)
Title: Re: Quick idea: Half Life mod
Post by: Axebeard on August 04, 2016, 11:53:34 pm
Coding anything at this point is beyond me, and I've been digging through your X-files mod and still can't figure much of this out. Are there any mods that add like one single new mission type to them?
Title: Re: Quick idea: Half Life mod
Post by: Solarius Scorch on August 05, 2016, 01:19:56 am
Coding anything at this point is beyond me, and I've been digging through your X-files mod and still can't figure much of this out. Are there any mods that add like one single new mission type to them?

Hobbes released a few, but I think they're no longer available.

Howe about Robin's MiB? It adds several missions.
Title: Re: Quick idea: Half Life mod
Post by: Axebeard on August 05, 2016, 02:46:21 am
I'm looking at it now, thanks for the suggestion!

It looks like all that was changed mission-wise was the AlienMissions ruleset. I'm wondering why MissionScripts didn't have to be changed at all?
Code: [Select]
alienMissions:
  - type: STR_ALIEN_RESEARCH
    raceWeights:
      0:
        STR_MIB: 50
      1:
        STR_MIB: 40
      3:
        STR_MIB: 30
      5:
        STR_MIB: 10
      7:
        STR_MIB: 10

If I'm reading this right, on Research Missions, after 5 months in game there's only a 10% chance of encountering the MiB, right? If this is the case, then I'm guessing since the original Xcom1 ruleset has the race weights equal out to 100, then the game must look at the modded ruleset first, roll to see if this MiB race is encountered, and THEN if it's not, rolls on the original ruleset's table, right?

Or maybe I'm reading this wrong, I'm trying to figure out the significance of the 1/3/4/7 numbers before the RaceWeights.
Title: Re: Quick idea: Half Life mod
Post by: Hobbes on August 05, 2016, 02:58:54 am
I'm looking at it now, thanks for the suggestion!

It looks like all that was changed mission-wise was the AlienMissions ruleset. I'm wondering why MissionScripts didn't have to be changed at all?
Code: [Select]
alienMissions:
  - type: STR_ALIEN_RESEARCH
    raceWeights:
      0:
        STR_MIB: 50
      1:
        STR_MIB: 40
      3:
        STR_MIB: 30
      5:
        STR_MIB: 10
      7:
        STR_MIB: 10

If I'm reading this right, on Research Missions, after 5 months in game there's only a 10% chance of encountering the MiB, right?
If this is the case, then I'm guessing since the original Xcom1 ruleset has the race weights equal out to 100, then the game must look at the modded ruleset first, roll to see if this MiB race is encountered, and THEN if it's not, rolls on the original ruleset's table, right?


You're reading it wrong. Since there are no other race entries for each listed month it will only generate MIBs. You're also misunderstanding how rulesets work. The ruleset files are loaded by order (so xcom1 goes before any mod) and the last ruleset loaded is the one that counts, the game never 'switches' between rulesets as you seem to be implying

Quote
Or maybe I'm reading this wrong, I'm trying to figure out the significance of the 1/3/4/7 numbers before the RaceWeights.

0 = January 1999, 1 = February, etc.
Title: Re: Help with new missions (formerly Quick idea: Half Life mod)
Post by: Axebeard on August 05, 2016, 03:11:47 am
I tried editing all of the
0:
        STR_MIB: 50

to

0:
        STR_MIB: 99

thinking that would give me a 99% chance of MiBs, but I still keep getting Sectoids...

So the months are what I thought they were at least, it seems strange that there aren't any changes made in vanilla Xcom after the 7th month though.
Title: Re: Help with new missions (formerly Quick idea: Half Life mod)
Post by: Arthanor on August 05, 2016, 08:06:38 am
I think there is an alien research mission which is "hardruled" to spawn in the first month, using the first alien race defined, and spawning in the region where the xcom base is, to ensure that a player has something to play against in the first month.

In vanilla, this gives you a sectoid research in your first base 100% of the time. Since it is defined somehow with rulesets and not hardcoded, it can be changed, but not quite in the way you are implying.

As for your terror mission idea, I think it is possible to make a mission which ends as a victory after a set number of turns (provided you survive). This could sort of work: The team is deployed in the hot zone and has to make a difference before the national guard comes in. If you make the bonus for winning very small, the end result can be 100% based on how the player does:

- Kill a lot of aliens/save a lot of civilians = lots of points.
- Don't kill much/lose lots of soldiers or civilians = lose points.

You could just hide and do nothing (so not meeting your 75% alien kills), but then you won't be getting points for aliens killed and presumably they will kill the civilians, so you would lose points overall for not doing well. It changes the focus, but it could be interesting.

Maybe you can use that as a "common mission", so it doesn't become the potentially annoying after a while "hunt the last alien", and keep typical terror where you have to finish things off yourself as well, on a monthly basis (maybe then the national guard can't show up within a day, or it's in a large city and it has to be dealt with in less time than a coordinated assault takes to organize, so it's you or nothing.)
Title: Re: Help with new missions (formerly Quick idea: Half Life mod)
Post by: Axebeard on August 05, 2016, 09:01:46 am
Arthanor, I really like that idea!

I just wish I had any idea how to actually implement it!
Title: Re: Help with new missions (formerly Quick idea: Half Life mod)
Post by: Arthanor on August 05, 2016, 09:40:03 am
Neither do I, but Hobbes knows ;)

Check the Area 51 conversion he made. There's special missions there, one of which is a survival mission sort of like what I describe.
Title: Re: Help with new missions (formerly Quick idea: Half Life mod)
Post by: Hobbes on August 05, 2016, 11:31:48 pm
I just wish I had any idea how to actually implement it!

Make a detailed list of everything you want changed from the vanilla missions, regarding mission types, frequency, conditionals, etc. Then I'll go over it and say what is possible and what is not, and if it helps, I'll create a starting ruleset for you
Title: Re: Help with new missions (formerly Quick idea: Half Life mod)
Post by: Axebeard on August 06, 2016, 01:32:56 am
Wow, I'd really appreciate that! A starting ruleset would be extremely helpful.
I'm flexible on the numbers, I assume that's the easy part to alter later.

1 - No alien ships visible.
2 - All missions for the first year or two are custom Terror missions
(mission ends in success if 75% of aliens are killed by turn 25)
3 - These custom terror missions should spawn twice a month or so

I think this next part is related to maptiles, but I'm not positive:
4 - some missions have a vehicle item that can't be carried, but is recovered if you complete the mission (kill everything I assume)
(maptiles so the item can't be picked up?)

5 - After a year or two, then alien ships start showing up, then the game goes into vanilla Xcom mode basically (I haven't thought that far ahead yet)

The only other thing I was thinking about was recruiting Engineers and Scientists from mission sites. I know you could knock em out like in Piratez, but I can't think of any way that makes sense in-game to gain items from living NPC civilians (not KO'ed civvies). Is there a way to generate a random item based on the end of mission score or how many Civilians are alive at the end?
Title: Re: Help with new missions (formerly Quick idea: Half Life mod)
Post by: Hobbes on August 06, 2016, 04:15:25 am
(mission ends in success if 75% of aliens are killed by turn 25)

Not possible. However you can set the mission conditions so that you win if at least 1 XCom survives until turn X

Quote
I think this next part is related to maptiles, but I'm not positive:
4 - some missions have a vehicle item that can't be carried, but is recovered if you complete the mission (kill everything I assume)
(maptiles so the item can't be picked up?)

It should be possible but I haven't tried it myself yet. I will involve editing terrains, mapscripts, alienDeployments, plus a couple more rulesets, and editing the .MCD files (map tiles) and the .MAP files

Quote
The only other thing I was thinking about was recruiting Engineers and Scientists from mission sites. I know you could knock em out like in Piratez, but I can't think of any way that makes sense in-game to gain items from living NPC civilians (not KO'ed civvies). Is there a way to generate a random item based on the end of mission score or how many Civilians are alive at the end?

No to both random item based on score and number of civilians alive

Everything else you mentioned is included on the attached .zip file. You can start using it as a mod right away

List of changes:
* Switched all the start dates of the vanilla missions for 1 year later
* Added a New Mission to run twice each month, with the same tactical conditions of terror sites but without UFOs. These twin monthly missions  last until the end of 1999.
* I actually didn't change the start dates of the Retaliation missions since they are already scheduled to start mostly around 2000, depending on the difficulty level