File Details

Download this file | Go to files list

Title: Gameplay Enhanced v1.22
Created: 10/01/06 by Mikail
Last Updated: 04/05/08
INTRODUCTION

This mod is a compilation of several, smaller mods I had made earlier; namely the Bentusi Roulette, Deathmatch Plus, Special Fleets and Defined Roles mods. It is a game-type mod that expands upon the existing Deathmatch game-type.
INSTALLATION

Extract this archive into your "Homeworld2\Bin\Gamerules\" folder. You must have also installed the Homeworld 2 1.1 patch in order for this mod to function.
INSTRUCTIONS
WIN CONDITION:

1. HW2 Normal: Same as HW2 default. A player is killed if he/she has no more production ships left.
2. Kill Team Production: A player is killed if there are no team members with production ships.
3. Kill All Enemy Ships: A player is killed if there are no team members with any ships.
4. Quit Manually: The game doesn't end until one team quits and leaves the game.

DEFINED ROLES:

In this game-mode, one player controls production and capital ships; another player controls fighters, corvettes and probes; and another player controls resourcing, frigates and platforms. If no players on a team choose the "Production/Capital" role, then all players on this team retain their mothership, carrier and production/research capability. If someone *does* select the "Production/Capital" role, then other players on the team do not suffer from a unit cap.

BENTUSI ROULETTE:

In this game-mode a selectable number of research options are randomly granted and restricted for each player at the beginning of gameplay.
SPECIAL FLEETS:

This mode gives the player extended starting fleet options. You can choose from several different fleet makeups, each being composed of a different assortment of ships and research.

The following fleets are available:
Normal HW2 option:

* HW2 default starting fleet

Worker:

* 12 Resource Collectors
* 2 Resource Controllers
* 0 Carriers

Scientist:
(Hiigaran)

* MS Research Module
* MS Advanced Research Module
* 0 Resource Collectors
* 0 Carriers

(Vaygr)

* MS Research Module
* MS Fire Control Module
* 0 Resource Collectors
* 1 Carriers
* Command Corvette already researched

Soldier:

* 0 Resource Collectors
* 2 Carriers

Spy:

* Carrier Cloak Module
* Carrier Advanced Sensors Array
* 3 Probes
* 3 Scouts
* 0 Resource Collectors
* 1 Carriers
* ECM Probe already researched
* Scout Ping Ability already researched (Hiigaran only)

Builder:

* 0 Research Collectors
* 0 Carriers
* MS, Carrier, and Shipyard Build Speed Upgrade already researched.

Anti-Fighter

* Carrier Platform Module
* 0 Research Collectors
* 1 Carrier
* 6 Gun Platforms
* Gun Platform Health Upgrades 1 & 2 already researched

GAME SPEED:

This setting allows one to slow the game down to a fraction of its default speed.
ADVANCED STAT-LOGGING:

Turning this setting on causes additional end-of-game stats to be generated in your profile's "Stats" folder.
BACKGROUND MUSIC:

Here you can select which background track gets played while playing. There's also a "Shuffle" option to randomly switch between different songs.
MODDING INSTRUCTIONS:

I've externalized as much ship/subsystem/research-specific data as possible into a file, called "GameplayEnhanced_Config.lua" and located in your "Homeworld2\Bin\Gamerules\" directory. By editing this file you can make this mod compatible with your own. In this way, the mod can be used simply as a sort of a "plug-in".

Update: As of version 1.20, the AI scripts will also need to be modified in order to make this mod compatible with your own.
LICENSE

You're free to use this code in any way as long as proper credit is given for the work that I have done.
DISCUSSION

The discussion thread for this mod can be found here.
CREDITS

* The Complex Team for their idea of using libraries to store the code for each game-mode.
* Tamerlane for his "HW2Path" function.
* evillejedi for the beginnings of the random music track script.
* Luke "B1FF" Moloney for some of the code used for the WIN CONDITIONS setting.

RELEASE NOTES
CHANGES IN 1.22

* DEFINED ROLES: Some speed optimizations.
* DEFINED ROLES: RUs are now transferred to the poorest teammate instead of a random teammate. (Generally only an issue when SPECIAL FLEETS is also enabled.)
* Restructured the way the different game modes communicate with each other regarding restricted and granted research items. DEFINED ROLES, SPECIAL FLEETS and BENTUSI ROULETTE are all fully compatible with each other now as a result. SPECIAL FLEETS in particular throws fewer errors since the changes were made.
* Renamed several functions to be more descriptive.
* DEFINED ROLES: AI *really* no longer considers building subsystems for ships no-one on the team can use. (Wasn't fixed properly for all instances in the previous release.)

CHANGES IN 1.21

* DEFINED ROLES: Player can no longer research or build tech that no-one on the team can use. (Ooops!)
* DEFINED ROLES: AI no longer considers building subsystems for ships no-one on the team can use. (This was causing the CPU to sit around mostly idle without spending all its RUs.)
* DEFINED ROLES: Fixed error in clearing messages from the screen.
* DEFINED ROLES: Ships belonging to other races (e.g., captured ships) are now properly transferred between players.
* DEFINED ROLES: Now checks whether players are of the same race before trying to transfer research.
* DEFINED ROLES: Added the "RoleFrigate", "RoleFighter" and "RoleCorvette" flags to "GameplayEnhanced_Config.lua". They're used in the AI scripts to tell the CPU which techs to ignore.
* SPECIAL FLEETS: The gamerule now set up before DEFINED ROLES, just in case there's some incompatibility I didn't forsee.
* SPECIAL FLEETS: Fixed the bug where it was trying to grant "ECMProbe" research to Vaygr players.
* Changed the way "for" loops iterate through tables, as they were sometimes also returning the "n" property.

See the documentation included with the mod for earlier changes.
ISSUES

* BENTUSI ROULETTE: The "textParse" function in "bentusiroulette.lua" doesn't parse required research logic properly. Not too big of an issue, hopefully.
* DEFINED ROLES: CPU players won't build refineries.
* DEFINED ROLES: CPU players can't detect when teammates have been attacked.
* DEFINED ROLES: I had to use the "PlayersUnitTypeCount" function instead of "NumSquadrons" in order for the CPU AI to work. Unfortunately, there's a limit on the number of ship classes you can add to "classdef.lua", so I had to consolidate a few ships into similar groups. I hope it works!
* DEFINED ROLES: It would be nice to have unit caps of some sort for the non-production players.
* If SPECIAL FLEETS, DEFINED ROLES and BENTUSI ROULETTE are all enabled, some of the messages printed to the screen at the start of a game may cycle too quickly for the player to read them all.
* SPECIAL FLEETS: I suppose that research and build items could also be *restricted* based upon the fleet that was chosen--but, I'd rather not.
* DEFINED ROLES: AI likes to send collectors to weird places.
* DEFINED ROLES: the "TradeShips" function is a bit hefty. I'm not sure whether it causes too much lag.
* DEFINED ROLES: Should probably rename the "RoleCapital" variable to "RoleProduction", as it better reflects what it is used for.
* SPECIAL FLEETS: Still throws too many errors for me to feel comfortable. They're inconsequential, but should be eliminated somehow anyway.
* You can search through the source-code for the string, "issues", in order to find additional comments.

Download this file | Go to files list