Valkrionn
The Hamster King
Okay, going to briefly discuss a new feature for Rise from Erebus 1.31. Expect a more detailed blog post eventually; For now, I won't go into the implementation, just the capabilities.
First, what are SpawnGroups? Essentially, they are custom-defined stacks of units. As of now, the Orcish Barbarians have been modified to spawn these stacks, rather than randomly selecting a unit and spawning up to 5 of that unit. They may also be created using python, and eventually Demons will be converted to this system as well (Not for 1.31; Some underlying changes would need to be made first, barbs are more important).
Why waste time on this? SpawnGroups allow us an unprecedented degree of control over what spawns for the barbarians. We can define any number of tech prereqs, we can have specific commanders, any unit, random units from any unitclass, we can grant promotions to the units, we can control what turn or AC they spawn at... In short, pretty much everything about the stack.
Now, why am I making this thread, before implementation is done? Because we want to hear your ideas. Shoggi is developing many of the spawngroups, and there will be a few unique ones (The Lost Regiment, a group of undead Bannor soldiers who don't know they're undead, Wild Vahua, etc), but we need more basic groups! We have already added multiple non-orcish groups, such as several Svartalfar-styled groups (Their worldspell may actually be useful in MP, now), but need many more basic groups. Preferably with little or no tech reqs. Why low tech prereqs? Well, while testing they were not spawning... After spending many hours debugging, I realized I'd overlooked something important: All the spawngroups I'd added had tech prereqs, and the barbs didn't have those techs yet.
Finally, will you be able to see exactly what can spawn? Yes. There is a new 'Pedia page, which will display all (non-bGraphicalOnly) spawngroups! You'll be able to open it up, and check the promotions for that unique group coming at you, for instance.
Now, for some specific capabilities. Many of these are self-explanatory, but I'll define each one anyway. First, a dummy entry.
Now, what each specific tag does.
Finally, an example spawngroup.
First, what are SpawnGroups? Essentially, they are custom-defined stacks of units. As of now, the Orcish Barbarians have been modified to spawn these stacks, rather than randomly selecting a unit and spawning up to 5 of that unit. They may also be created using python, and eventually Demons will be converted to this system as well (Not for 1.31; Some underlying changes would need to be made first, barbs are more important).
Why waste time on this? SpawnGroups allow us an unprecedented degree of control over what spawns for the barbarians. We can define any number of tech prereqs, we can have specific commanders, any unit, random units from any unitclass, we can grant promotions to the units, we can control what turn or AC they spawn at... In short, pretty much everything about the stack.
Now, why am I making this thread, before implementation is done? Because we want to hear your ideas. Shoggi is developing many of the spawngroups, and there will be a few unique ones (The Lost Regiment, a group of undead Bannor soldiers who don't know they're undead, Wild Vahua, etc), but we need more basic groups! We have already added multiple non-orcish groups, such as several Svartalfar-styled groups (Their worldspell may actually be useful in MP, now), but need many more basic groups. Preferably with little or no tech reqs. Why low tech prereqs? Well, while testing they were not spawning... After spending many hours debugging, I realized I'd overlooked something important: All the spawngroups I'd added had tech prereqs, and the barbs didn't have those techs yet.
Finally, will you be able to see exactly what can spawn? Yes. There is a new 'Pedia page, which will display all (non-bGraphicalOnly) spawngroups! You'll be able to open it up, and check the promotions for that unique group coming at you, for instance.
Now, for some specific capabilities. Many of these are self-explanatory, but I'll define each one anyway. First, a dummy entry.
Code:
<SpawnGroupInfo> <!-- Dummy -->
<Type>SPAWN_GROUP_TEST</Type>
<Description>TXT_KEY_SPAWN_GROUP_TEST</Description>
<Civilopedia>TXT_KEY_SPAWN_GROUP_TEST_PEDIA</Civilopedia>
<Strategy>TXT_KEY_SPAWN_GROUP_TEST_STRATEGY</Strategy>
<bGraphicalOnly>1</bGraphicalOnly>
<bUnique>0</bUnique>
<bAlwaysSpawn>0</bAlwaysSpawn>
<bNeverSpawn>0</bNeverSpawn>
<bNaval>0</bNaval>
<iPrereqMinTurn>0</iPrereqMinTurn>
<iPrereqMaxTurn>0</iPrereqMaxTurn>
<iPrereqMinAC>0</iPrereqMinAC>
<iPrereqMaxAC>0</iPrereqMaxAC>
<PrereqRitual/>
<iWeight>0</iWeight>
<CommanderUnits/>
<GroupUnits/>
<GroupUnitClasses/>
<GroupPromotions/>
<CommanderPromotions/>
<SpawnTerrains/>
<SpawnFeatures/>
<PrereqTechANDs/>
<PrereqTechORs/>
<BlockTechANDs/>
<BlockTechORs/>
<PyOnSpawn/>
<PyRequirement/>
<Banner/>
</SpawnGroupInfo>
- bAlwaysSpawn - Only used in the barbarian function atm; If true, the group will spawn when it is valid, without the game checking for better groups.
- This should always be either a very hard-to-spawn group, or be unique! Be careful with this one.
- bUnique - Only one of this spawngroup may spawn in a game. Used for Orthus, Zarcaz, etc.
- bNaval - Water groups.
- iPrereqMinTurn - Minimum turn for the group to spawn.
- iPrereqMaxTurn - Maximum turn for the group to spawn.
- iPrereqMinAC - Minimum AC for the group to spawn.
- iPrereqMaxAC - Maximum AC for the group to spawn.
- PrereqRitual - Tag allowing you to specify a ritual prereq for the group to spawn (Samhain for Frostlings)
- Is NOT a list, can only specify one ritual.
- iWeight - This tag is used to determine which group to spawn. Default is 1000.
- CommanderUnits - A list (though only one is recommended) of units which spawn as a Commander for the stack. Other units are placed under their command, assuming the commander has enough command slots.
- GroupUnits - An array (has to be, to allow multiple units of the same type) of units which spawn for the group.
- GroupUnitClasses - An array of unitclasses. For each unitclass, a random unit belonging to the class will be pulled, and spawned. Only ONE type of unit will spawn for each unitclass, even if you want to spawn multiple units of that class.
- Example: Instead of a Warrior, you may get a Blood Pet. Or a Centenni. Or any other Warrior UU.
- This is weighted towards the UU belonging to the player it is spawned for (in most cases, the Barbarians)
- This will be the default for the standard groups. Expect to see some varied barbarians.
- GroupPromotions - A list of promotions which are granted to all units. Effect promotions (those that are hidden on units) are not displayed! Feel free to make extensive use of them; We already are, to avoid things such as the Orcish racial being applied.
- CommanderPromotions - A list of promotions which are granted to the commander. Make use of these to grant command limits/names! No need for a UU for every commander.
- SpawnTerrains - A list of valid terrains for the group to spawn on. If defined, it cannot spawn unless the terrain of the plot is in the list. If the terrain is valid, however, it receives a boost of +400 to it's weighting.
- SpawnFeatures - Same thing, features instead of terrains.
- PrereqTechANDs - A list of prereq technologies. The team the spawngroup is spawning for must have ALL technologies listed.
- PrereqTechORs - A list of prereq technologies. The team the spawngroup is spawning for must have AT LEAST ONE of the technologies listed.
- BlockTechANDs - A list of techs which block the group from spawning. Team must have all of them for it to be blocked.
- BlockTechORs - A list of techs which block the group. Must have at least one to be blocked.
- PyOnSpawn - Python ran when the group spawns. Defined in CvSpellInterface.py.
- PyRequirement - Python for those odd requirements that otherwise don't work; For example, the gameoption req for Orthus and Zarcaz. Again, defined in CvSpellInterface.py.
- Banner - Only used for Unique spawngroups. Defines an image which is displayed in the pedia.
Finally, an example spawngroup.
Code:
<SpawnGroupInfo> <!-- Mon's Goblin Raiders -->
<Type>SPAWN_GROUP_MONS_GOBLIN_RAIDERS</Type
<Description>TXT_KEY_SPAWN_GROUP_MONS_GOBLIN_RAIDERS</Description>
<Civilopedia>TXT_KEY_SPAWN_GROUP_MONS_GOBLIN_RAIDERS_PEDIA</Civilopedia>
<Strategy>TXT_KEY_SPAWN_GROUP_MONS_GOBLIN_RAIDERS_STRATEGY</Strategy>
<bUnique>1</bUnique>
<iWeight>100</iWeight>
<CommanderUnits>
<Unit>UNIT_WOLF_RIDER_SCORPION_CLAN</Unit>
</CommanderUnits>
<GroupUnits>
<GroupUnit>
<Unit>UNIT_GOBLIN</Unit>
<iNumUnits>2</iNumUnits>
</GroupUnit>
<GroupUnit>
<Unit>UNIT_WOLF_RIDER</Unit>
<iNumUnits>2</iNumUnits>
</GroupUnit>
</GroupUnits>
<GroupPromotions>
<Promotion>PROMOTION_MONS_GOBLIN_RAIDER</Promotion
</GroupPromotions>
<CommanderPromotions>
<Promotion>PROMOTION_MONS</Promotion>
</CommanderPromotions>
<PrereqTechANDs>
<Tech>TECH_BRONZE_WORKING</Tech>
</PrereqTechANDs>
<Banner>Art/Civs/Pedia/Civilizations/Embers.dds</Banner>
</SpawnGroupInfo>