Removing Races

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

Moderators: Forum Moderators, Developers

Removing Races

Postby Gidoza » April 26th, 2017, 12:45 am

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
Gidoza
 
Posts: 15
Joined: April 23rd, 2015, 4:35 pm

Re: Removing Races

Postby Lord-Knightmare » April 26th, 2017, 8:46 am

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.
User avatar
Lord-Knightmare
Forum Regular
 
Posts: 1091
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.

Re: Removing Races

Postby Ravana » April 26th, 2017, 8:54 am

Modification would need to use Lua. Easier way is modifying your era, except=.
User avatar
Ravana
Moderator
 
Posts: 1477
Joined: January 29th, 2012, 12:49 am
Location: Estonia

Re: Removing Races

Postby Gidoza » April 26th, 2017, 6:03 pm

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...?
Gidoza
 
Posts: 15
Joined: April 23rd, 2015, 4:35 pm

Re: Removing Races

Postby Lord-Knightmare » April 26th, 2017, 6:27 pm

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...
User avatar
Lord-Knightmare
Forum Regular
 
Posts: 1091
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.


Return to Coder’s Corner

Who is online

Users browsing this forum: No registered users and 2 guests