SpawnGroups

What do you think of the SpawnGroup mechanic?


  • Total voters
    76

Valkrionn

The Hamster King
Joined
May 23, 2008
Messages
14,450
Location
Crestview FL
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. :lol:

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>
Now, what each specific tag does.

  • 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>
 
Generally I love the idea.
Also, is there any requirements for ideas for unique stacks like the one you mentioned? My imagination just jumped into overdrive.
 
Is the team open to suggestions for unique groups?

Without giving it much thought it would be cool to see a group of warriors(or axmen) running around with a Disciple of X. Before that religion spawns. Call it a group of heretics outcast for their new ideas. Runes and FOL should have the dwarven and elven promos respectively.
 
Generally I love the idea.
Also, is there any requirements for ideas for unique stacks like the one you mentioned? My imagination just jumped into overdrive.

There aren't any real limitations on the ideas, no, and we've got quite a few unique ones.

At the moment though, what we really need are basic ones; Ones that would not be unique, that could spawn as regular groups. Get some variety in.
 
Is the team open to suggestions for unique groups?

Without giving it much thought it would be cool to see a group of warriors(or axmen) running around with a Disciple of X. Before that religion spawns. Call it a group of heretics outcast for their new ideas. Runes and FOL should have the dwarven and elven promos respectively.

We're open to ideas, but the one you describe will not go in (we've talked about it already). Mainly because the AI would then use that disciple to go found the religion in the nearest barb city.
 
Is there any way to use this for civilizations?
 
We're open to ideas, but the one you describe will not go in (we've talked about it already). Mainly because the AI would then use that disciple to go found the religion in the nearest barb city.

Lol. I didn't give it much thought.
 
We're open to ideas, but the one you describe will not go in (we've talked about it already). Mainly because the AI would then use that disciple to go found the religion in the nearest barb city.
That is easily done away with.
Give the AI a UU that can't spread religion but is otherwise identical to the disciple. Furthermore, they could have level 1 spell knowledge of the appropriate class. Like say the ROK UU can start with Earth 1.



And yes, I can come up with a whole range of regular spawn groups.

For a start, I suggest the fallowing:

Band of Thieves:
Description:A band of thieves lead by a charismatic leader who is quick with a bow.
Commander: An archer promoted with command promotions and woodsman 1.
Units: 3 Archers, 2 Warriors

All promoted with that promotion that lets them steal money when they kill a unit.

Band of Thieves 2:
Mid-Late game replacement for Band of Thieves. Spawns axeman instead of warriors and longbows instead of archers.

Disciples of Essus:
Units: 3 Nightwatch units (UU replacements that can't spread the religion).

Rogue Necromancer:
Description: A rogue adept of necromancy possessed with achieving greatness.
Leader: 1 Adept with Death 1
Units: 3 Permanent Skeletons
 
Is there any way to use this for civilizations?

Yes, and that's even planned. :lol:

Basically: When the SpawnGroups are added for Demons as well, we'll have to add a list to CivilizationInfos which defines the spawngroups that are valid for the civ. Once that is in, they will be listed in the Effects section of the Civilization's page.

For now, that is not possible... But the python allowing you to create spawngroups is. There are two CyGame functions for you to call; isSpawnGroupValid and createSpawnGroup.

.def("isSpawnGroupValid", &CyGame::isSpawnGroupValid, "bool (int eSpawnGroup, CyPlot* pPlot, int eTeam)")
.def("createSpawnGroup", &CyGame::createSpawnGroup, "void (int eSpawnGroup, CyPlot* pPlot, int ePlayer, int eUnitAI)")
 
What do you think of my proposals? The UU's would be separate units and not replacements. But they would have the same graphics and stats and share the pedia page with the originals.
 
Would it be compatible with xUPT mechanic? If stack is defined to be larger than x, what would happen?

As of now, nothing until they attempted to move. Stacks do not typically exceed 5 units, however.

Lol. I didn't give it much thought.

Eh, not a problem. Just pointed out why that one would be a good idea. :p

That is easily done away with.
Give the AI a UU that can't spread religion but is otherwise identical to the disciple. Furthermore, they could have level 1 spell knowledge of the appropriate class. Like say the ROK UU can start with Earth 1.

Meh. I don't want to make UU's like that. Would be open to using the religious units, such as Soldiers of Kilmorph, however.

And yes, I can come up with a whole range of regular spawn groups.

For a start, I suggest the fallowing:


  • Band of Thieves (1+2) - Good one. Shoggi, I say that one gets added. :p
  • Disciples of Esus - This is the one religion I'd bend on the whole UU thing. I'd be okay with this one.
  • Rogue Necromancer - Think we have one like that, not sure. If not, it's a good one.

carpetbombing hawks, please.
:mischief:

:lol:
 
Ok, here is the next batch.

Scouting party:
Description:
A small band of hunters of unknown origin. Perhaps they are simply lost, or perhaps just the first signs of something else.

Leader: Ranger with command promotions
Units: 3 Hunters

Mid game spawn

Anoying Goblins:
Description:
Remember the guys that droped their waste in that forest of yours? Well here they are. Go get them.

Commander: Goblin with command promotions, Drill 3 and Healing 1
Units: 3 x Scorpion Clan Archer, 2 x Goblin

Early or Early-Mid game spawn

Escaped Madman
Description:
A lunatic that esaped from an asilum somwhere.

Commander: none
Units: 1 x Lunatic

Mid game spawn

Lost Crew
Description:
The crew of an unknown ship lost to the waves. They return to stalk the living.

Commander: Stygian guard with command promotions
Units: 3 x Drown
If possible, remove water walking from them.

Early-Mid Game spawn, on the coast

Ogre Warband
Description:
A war band of ogres looking for a fight.

Commander: Ogre Warchief
Units: 1 x Stoneskin Ogre, 3 x Ogre

Early-Mid game spawn

Rampaging Wild-men
Description:
A group of insane wild-men, bearing more resemblance to beasts than men. They emerge from the forest to roam the wilds. Their goals, if any known only to them.

Commander: Beastman with commander promotions
Units: 3 x Beastman

Early game spawn

Dwarven Conqueror
Description:
A talented but slightly of hinged dwarven golem crafter bent on conquering the world.

Commander: Boar Rider with command promotions and Earth 1, Enchantment 1
Units: 3 x Wood Golem

Early-Mid game spawn

Template for more (mine at least)
Name
Description:
XXXX

Commander: XXX
Units: XXX

spawn
more coming as I edit them in...
 
Alright so I thought I'd throw a few together.

Raiding Party
Commander: A Horseman with Commando
3 additional Horseman

The Charismatic Brigand.
Commander is an Axman with combat 2 and Corporal.
Also has an Elven Archer, and 3 warriors with random racial promotions.

And a late game one:
Bounty Hunters: spawns a four assassins with following promotions. All have bounty hunter.
1. Combat 1&2
2. Drill 1&2
3. Commando and Shock 1
4. Cover 1 and Amphibious

I'm not sure if the last one is possible with all the different promos. I'll try to think up some more later.
 
Generic Group - Slavers

3 Axemen, 2 Workers. Thus, if the Axeman are defeated, you gain free (or capture) the Workers as a reward.

Generic Group - Pirates!

1-3 Privateers with the Bounty Hunter promotion (Only after Optics is researched) Cos sometimes the pirates don't belong to anyone.

Generic Group - Fanatics

1 Priest of Order with Inquisitor, 2 Warriors with Combat II (Only after Order is founded) - Sadly these nutcases don't think the Bannor are fundmentalist enough. They'll even attack Civs following Order, citing a lack of genuine devotion as a reason.

Generic Group - The Cult of Barbatos

1 Mage with Death 2, 2 Adepts w/Death 1 - Should spawn near the Broken Sepulchre or any unconverted Mana Node. Still searching for Barbatos... (Only after Necormancy has been researched)

Unique Group - Revenge

1 Assassin with Mobility 2, Combat 4 and Commando. You obviously p*ssed someone off at some point.

Unique Group - Temeluchus' Grandchildren

3 Professors w/ Inqusitor, Command 1, and Crazed... Ideally they should start wounded having tried to seek Temeluchus devotion, after reading about the dead cult in a dusty tome somewhere. They should spawn near Remnants of Patria.

Unique Group - The Green Man

Outlaws - 3 Human Longbowman with Morale, commanded by a Marksman with Hero called the Green Man. Ideally they should only spawn near evil Civs that have just researched Taxation. Yep, that's a thinly disguised Robin Hood (His allies get the Morale promotion because it's a smiley face - so that makes his followers the Merry Men.)
 
Generic Group - Slavers

3 Axemen, 2 Workers. Thus, if the Axeman are defeated, you gain capture Workers as a reward.
May I suggest that you make that 3 warriors, 2 slaves? Makes more sense. And capturing 2 workers would be quite OP.

Maybe have the commander be a warrior with some sort of promotion that lets it capture defeated units as slaves.
 
Generic Group - Dorothy's Triple Threat
1 Bear
1 Lion
1 Tiger

Generic Group - Moreau's Rejects
2 Beastmen with Boar Blood
1 Beastman with Wolf Blood, Cannibalize, and Lycanthropy

Generic Group - The Unburnt
Three Orc Warriors with Resist Fire
One Orc Warrior with Resist Fire and Fireball
 
Top Bottom