One starting point may be XComGame.upk XGDeployAI
Edited by johnnylump, 17 December 2012 - 02:11 AM.
Edited by johnnylump, 17 December 2012 - 02:11 AM.
Edited by Drakous79, 17 December 2012 - 01:03 PM.
Edited by johnnylump, 17 December 2012 - 09:22 PM.
Hey Johny
Check out XGStrategyAI within XComStrategyGame.upk.
For number of pods and number of aliens in it:For alien types:
- DetermineAbductionSquad()
- DetermineAlienBaseSquad()
- DetermineSpecialMissionSquad()
- DetermineTerrorSquad()
- DetermineUFOSquad()
- GetPossibleAliens()
- GetSupportingAlien()
Edited by BlackAlpha, 18 December 2012 - 02:03 PM.
Hey Johny
Check out XGStrategyAI within XComStrategyGame.upk.
For number of pods and number of aliens in it:For alien types:
- DetermineAbductionSquad()
- DetermineAlienBaseSquad()
- DetermineSpecialMissionSquad()
- DetermineTerrorSquad()
- DetermineUFOSquad()
- GetPossibleAliens()
- GetSupportingAlien()
I looked through there before to try to modify the group sizes (make the groups larger), but I had no luck with it. I hope somebody else can figure out how to do it. Changing the group size/composition will probably fix the low difficulty in the mid/end game.
Edited by johnnylump, 18 December 2012 - 03:15 PM.
- In GetPossibleAliens, I'm delaying the June aliens (cyberdiscs, heavy plasma mutons) by one month, because with all the ways I've nerfed the good guys (longer research times, longer injury recovery times), I keep getting my butt kicked during that month. To make the late game harder, you might make certain really tough aliens more likely by playing with the weighted possibilities for each alien to show up.
--
- Set SPECIES_POINT_LIMIT in dgc.ini to -1. I think this turns off nerfing alien forces (in CostAlienSquad) before a battle when the x-com squad is really weak.
- In GetPossibleAliens, I'm delaying the June aliens (cyberdiscs, heavy plasma mutons) by one month, because with all the ways I've nerfed the good guys (longer research times, longer injury recovery times), I keep getting my butt kicked during that month. To make the late game harder, you might make certain really tough aliens more likely by playing with the weighted possibilities for each alien to show up.
--
- Set SPECIES_POINT_LIMIT in dgc.ini to -1. I think this turns off nerfing alien forces (in CostAlienSquad) before a battle when the x-com squad is really weak.
I'd love to test these two edits for you if you can get me the code changes, I'll edit my .upk and start a new game. I also tend to have difficulty in June due to the slower tech research & marathon mode!
Edited by johnnylump, 19 December 2012 - 12:30 AM.
Could you please also post where exactly inside the files you are edited those things? Having just the HEX values is not enough information to go by.
Cool, didn't catch this at first, seems that i just glanced it tiredly. Thanks for pointing it back
Could you please also post where exactly inside the files you are edited those things? Having just the HEX values is not enough information to go by.
Hrm, I thought it was enough -- those are hex strings unique within the file, so a search within the hex of XComStrategyGame should turn them up. Do you need anything more than function names (which are noted in previous posts)? Because I'm not sure what else to provide.
To change alien progression:
XComStrategyGame.upk/XGStrategyAI.GetPossibleAliens
There are a series of IF MONTH >= X THEN statements; what follows is a series of weighted chance for different kinds of aliens to show up. The weights and kinds of aliens can be edited, but the following code only designates the months:
3c 44 00 00 2c 02: May Aliens (adds Mutons)
3c 44 00 00 2c 03: June Aliens (Cyberdisc, tougher Mutons)
3c 44 00 00 2c 04: July Aliens (Muton Berserkers)
3c 44 00 00 2c 05: August Aliens (Muton Elite?)
3c 44 00 00 2c 06: September aliens (Sectopod?)
Changing the last byte (02 through 06) will change the month for that set of weights. If you skip a month, that's OK, because the formulation is >=, so it just means that the prior months alien layout will take precedence. They should stay in the same order, though, because of the way the function is built.
So far this seems to work.
To edit the range of soldier ranks you'll get as an abduction reward:
XComStrategyGame/XGStrategyAI.DetermineAbductionReward
XComStrategyGame/XGStrategyAI.DetermineRandomAbductionReward (for the Second Wave option that randomizes abduction rewards)
The code includes a call to another function that builds the award soldier. But you can edit the range of possible ranks by editing the following hex string:
26 16 2c 03 2c 05
It will show up twice, once in each of the two functions. The 03 is the minimum rank of the soldier (default: sergeant) and the 05 is the maximum rank (default: captain). I changed it to 26 16 2c 02 2c 03 so the range is corporal to sergeant, because I don't like getting a top soldier for so cheap when I've done so much work to build up the rest of the team. (It looks like there's also a governor on the function that prevents you from rolling up someone higher than one rank below the highest-rank a soldier has achieved so far, but I left that alone.)
So far this seems to work.
To change the number of aliens during abductions:
XComStrategyGame.upk/XGStrategyAI.DetermineAbductionSquad.
There is a case (switch) statement that determines the size of the alien squad based on the difficulty of the abduction. (The determined in another function; it's based on the panic in the country, with a randomizer).
The code for difficulty 1 (lowest) is
2c 02 0f 00 e7 43 00 00 2c 04
The code for difficulty 2 is
2c 03 0f 00 e7 43 00 00 2c 06
The code for difficulty 3 is
2c 04 0f 00 e7 43 00 00 2c 08
The code for difficulty 4 is
2c 04 0f 00 e7 43 00 00 2c 0a
In each of those, the numbers to change are the ones after the two "2c" bytes.
The first number is the number of alien pods (groups of 1 to 3 aliens).
The second number is the number of aliens. So difficulty 4 is 04 pods and 0a aliens, or 4 and 10.
I'm pretty sure the number of aliens must be >= number of pods AND <= (number of pods * 3) - 2. Playing on impossible will add two more aliens to the squad (which is why the -2 is there). The number of aliens probably doesn't have to be an even number, but I set it that way anyway, because all the default entries were.
For example, I changed the 4-difficulty alien squad to
2c 06 0f 00 e7 43 00 00 2c 10
That's six pods, 16 aliens, or 18 on impossible.
Seems to work so far.
Let me know if and how I can be more specific. Cheers!