Changing faction color in map

Topics related to the server software (not campaign)

Moderators: Torren, Moderators

Post Reply
omothes
Posts: 4
Joined: Thu Jul 25, 2013 8:44 pm

Changing faction color in map

Post by omothes » Wed Feb 13, 2019 8:24 am

Hi all,

I hope this is the right subforum.
I'm about to set up a small MekWars server for playing with my friends. After working through the available tutorials and files nearly everything is working fine. I also added a looooot of planets from the sarna excel file.

One thing I haven't found yet is the possibility to change the faction color in the inner sphere map (Liao = white?!). Where can I change this?
It would be great if the map uses the same colors set up in the factions.xml.

Cheers,
Olli

Ironboot
Mekwars Server Operator
Posts: 204
Joined: Tue Apr 27, 2010 5:00 am
Location: Boston, MA

Re: Changing faction color in map

Post by Ironboot » Wed Feb 13, 2019 11:53 am

viewtopic.php?f=7&t=7873&p=55994&hilit= ... lor#p55994


Liao green is guess and test. As some point the server goes from green to white.

omothes
Posts: 4
Joined: Thu Jul 25, 2013 8:44 pm

Re: Changing faction color in map

Post by omothes » Wed Feb 13, 2019 1:10 pm

Thanks, but...
You are not authorised to read this forum.

User avatar
TigerShark
Mekwars Server Operator
Posts: 701
Joined: Wed Feb 24, 2010 8:28 am

Re: Changing faction color in map

Post by TigerShark » Wed Feb 13, 2019 6:24 pm

I believe the command is /factioncolor or /housecolor (I'm not at home to check).

Ironboot
Mekwars Server Operator
Posts: 204
Joined: Tue Apr 27, 2010 5:00 am
Location: Boston, MA

Re: Changing faction color in map

Post by Ironboot » Wed Feb 13, 2019 7:45 pm

Doh!

I'm sorry..

From that post...

"MekWars is just very picky with colors.

Couple things that I have used to rectify it.

1 - Check the darken map box in the client config. Sometimes that helps
2 - Trial and error to find the colors that work. For some reason hex triples with 3 different sets work the best. FF3300 for example.

I use this website to pick the colors at first, then work around until I find ones that work. http://html-color-codes.com/"


"From Spork in that post...

If something is too dark (and I'm not sure what the cutoff is, off the top of my head), the server will use white instead, so the planets are visible.

I know, I know. I didn't write that code. I figure if you want an almost black planet, you should have it, rather than the server deciding something different for you. It's never been terribly important to me to fix, though."


I hope that will get you started. :)

User avatar
Tuco
MegamekNET Campaign Operator
Posts: 2805
Joined: Wed Feb 13, 2008 10:23 pm

Re: Changing faction color in map

Post by Tuco » Wed Feb 13, 2019 8:22 pm

/c changehousecolor#faction#htmlhexcolor
When the injustice is great enough, Justice will lend me the strength needed to correct it.
None may stand against it.
It will shatter every barrier, sunder any shield, tear through any enchantment and lend its servant the power to pass sentence.
Know this: there is nothing on all the Planes that can stay the hand of justice when it is brought against them.
It may unmake armies. It may sunder the thrones of gods.
Know that for ALL who betray Justice, I am their fate... and fate carries an Executioner's Axe.

User avatar
TigerShark
Mekwars Server Operator
Posts: 701
Joined: Wed Feb 24, 2010 8:28 am

Re: Changing faction color in map

Post by TigerShark » Wed Feb 13, 2019 9:21 pm

Yeah... That lol

omothes
Posts: 4
Joined: Thu Jul 25, 2013 8:44 pm

Re: Changing faction color in map

Post by omothes » Thu Feb 14, 2019 7:57 am

Tuco wrote:
Wed Feb 13, 2019 8:22 pm
/c changehousecolor#faction#htmlhexcolor
Tried that already. But I will follow hint that MW is picky regarding the colorcodes.
Do I have to change the color with the /c changehousecolor command or is it enough to change it in the factions.xml (why is there a color tag if we can't use it ;) )?

Edit:
Allright, got it. I changed <color> and <houseplayercolor> in the factions.xml, reset the campaign and everything ist fine. seems like factions.xml will only be read once at start of a campaign, like planets.xml.

Padraig Tseng
Mekwars Server Operator
Posts: 310
Joined: Sat Feb 16, 2008 5:29 pm
Location: Arizona
Contact:

Re: Changing faction color in map

Post by Padraig Tseng » Thu Feb 14, 2019 2:40 pm

omothes wrote:
Thu Feb 14, 2019 7:57 am
Tuco wrote:
Wed Feb 13, 2019 8:22 pm
/c changehousecolor#faction#htmlhexcolor
Tried that already. But I will follow hint that MW is picky regarding the colorcodes.
Do I have to change the color with the /c changehousecolor command or is it enough to change it in the factions.xml (why is there a color tag if we can't use it ;) )?

Edit:
Allright, got it. I changed <color> and <houseplayercolor> in the factions.xml, reset the campaign and everything ist fine. seems like factions.xml will only be read once at start of a campaign, like planets.xml.
you should be using the GUI and command line....editing stuff by hand is a recipe for breaking things.....

Also, after using the change color command, you will not see it update unless you log out and back in again....or restart the server....
life is the crummiest book I ever read,
there isn't a hook, just a lot of cheap shots,
pictures to shock and characters an amateur would never dream up

omothes
Posts: 4
Joined: Thu Jul 25, 2013 8:44 pm

Re: Changing faction color in map

Post by omothes » Thu Feb 14, 2019 3:33 pm

Padraig Tseng wrote:
Thu Feb 14, 2019 2:40 pm

you should be using the GUI and command line....editing stuff by hand is a recipe for breaking things.....
And set up everything from scratch when I reset the server/campaign? That shouldn't be the goal.

There are a few more things that work a bit unlogically.
e.g. Factories set up in planets.xml appear in the "Map", but not in "Faction Status". Only if you "purchase factory" from the menu on the same planet, the others appear (but not the purchased one).
So I edit the source file (planets.xml) to reuse it again after I have completly set up the server, to create a clean universe with all my settings...but then I have to do manually work to apply the settings I made (in the xml).

edit:
restartet the machine where the server is running on, deleted the old "campaigns" folder, used a complete new user -> everything fine from the start. planet ownership (was another problem before), factories, faction status -> everything the way it should be

Padraig Tseng
Mekwars Server Operator
Posts: 310
Joined: Sat Feb 16, 2008 5:29 pm
Location: Arizona
Contact:

Re: Changing faction color in map

Post by Padraig Tseng » Thu Feb 14, 2019 11:53 pm

omothes wrote:
Thu Feb 14, 2019 3:33 pm
Padraig Tseng wrote:
Thu Feb 14, 2019 2:40 pm

you should be using the GUI and command line....editing stuff by hand is a recipe for breaking things.....
And set up everything from scratch when I reset the server/campaign? That shouldn't be the goal.

There are a few more things that work a bit unlogically.
e.g. Factories set up in planets.xml appear in the "Map", but not in "Faction Status". Only if you "purchase factory" from the menu on the same planet, the others appear (but not the purchased one).
So I edit the source file (planets.xml) to reuse it again after I have completly set up the server, to create a clean universe with all my settings...but then I have to do manually work to apply the settings I made (in the xml).

edit:
restartet the machine where the server is running on, deleted the old "campaigns" folder, used a complete new user -> everything fine from the start. planet ownership (was another problem before), factories, faction status -> everything the way it should be
Keep a backup copy of the planets and factions folders and just drop them in when you reset the server.
life is the crummiest book I ever read,
there isn't a hook, just a lot of cheap shots,
pictures to shock and characters an amateur would never dream up

Spork
Mekwars Developer
Posts: 3879
Joined: Wed Feb 13, 2008 10:23 pm

Re: Changing faction color in map

Post by Spork » Mon Feb 18, 2019 3:52 am

I disagree. I think you should get your XMLs the way you want the campaign to begin.

That being said, we almost never revert to them, but it's better if you are able.
Never had much, grew up with nothing
But the music, well it was something
Been down and out, I've been on top of the world,
World that keeps on spinning on a turntable.

User avatar
Ajax
Posts: 226
Joined: Sat Feb 16, 2008 5:37 am

Re: Changing faction color in map

Post by Ajax » Thu Mar 21, 2019 7:03 pm

Go to bed, m8. No tech talk after 0200.

Post Reply