Removing Races

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
Gidoza
Posts: 20
Joined: April 23rd, 2015, 4:35 pm

Removing Races

Post by Gidoza »

Hello there! I wasn't sure where would be best to post this, so I chose this place...please forgive if it is misplaced...


My question is pretty simple (but I'm aware the solution may not be): Is there a way in Multiplayer to remove a particular race from the Random picks? (e.g. Drakes) That's it - I just want certain races at certain times to never be picked with the Random function.

Thanks!
-Gidoza
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2340
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Removing Races

Post by Lord-Knightmare »

My question is pretty simple (but I'm aware the solution may not be): Is there a way in Multiplayer to remove a particular race from the Random picks? (e.g. Drakes) That's it - I just want certain races at certain times to never be picked with the Random function.
Yeah, there might be. You could make an MP modification that excludes the faction from random pick.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
Ravana
Forum Moderator
Posts: 2950
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Removing Races

Post by Ravana »

Modification would need to use Lua. Easier way is modifying your era, except=.
Gidoza
Posts: 20
Joined: April 23rd, 2015, 4:35 pm

Re: Removing Races

Post by Gidoza »

Ravana wrote:Modification would need to use Lua. Easier way is modifying your era, except=.
Ok this is a start. But where do I put this...?
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2340
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Removing Races

Post by Lord-Knightmare »

Ok this is a start. But where do I put this...?
Inside the [multiplayer_side][/multiplayer_side] tag

example:

Code: Select all

#define RANDOM_SIDE_GIDOZA
[multiplayer_side]

# Copied from data/multiplayer/eras.cfg

        id=Random_gizoda
        name= _"Random"
        image="units/random-dice.png"
        random_faction=yes

# Now, your edit
# Whatever the hell the faction ID is...

        except=Drakes

[/multiplayer_side]
#enddef

[era]
    id=era_default_edited
    name= _ "Default"
    description=_ "Modified Default Era..."
    type=hybrid

    {RANDOM_SIDE_GIZODA}
    {multiplayer/factions/loyalists-default.cfg}
    {multiplayer/factions/rebels-default.cfg}
    {multiplayer/factions/northerners-default.cfg}
    {multiplayer/factions/undead-default.cfg}
    {multiplayer/factions/knalgans-default.cfg}
    {multiplayer/factions/drakes-default.cfg}

    {QUICK_4MP_LEADERS}
    {TURNS_OVER_ADVANTAGE}
[/era]

I haven't coded in multiplayer for a while, but this should work...
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Post Reply