Hiding unit nationality in a multiplayer game
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Hiding unit nationality in a multiplayer game
So, I am not sure how to do this, and I do not know enough about the game to tell if setting [unit-type]ellipse[/unit_type] to a blank/transparent image would remove all methods by which unit nationality can be detected.
I can't think of any other ways of seeing a unit's owner, but then, I am a novice.
Thank you in advance.
I can't think of any other ways of seeing a unit's owner, but then, I am a novice.
Thank you in advance.
Re: Hiding unit nationality in a multiplayer game
Nationality? Do you mean side?
Why do you want to, if you don't mind the question?
Why do you want to, if you don't mind the question?
Re: Hiding unit nationality in a multiplayer game
Yes, I mean side. Sorry, civ terminology.
Basically I want to make a unit or unit ability that allows players in largish free-for-alls to attack opponents without tipping those opponents off to the identity of the attacker. Sort of like hiring privateers.
Basically I want to make a unit or unit ability that allows players in largish free-for-alls to attack opponents without tipping those opponents off to the identity of the attacker. Sort of like hiring privateers.
Re: Hiding unit nationality in a multiplayer game
You could add a new side, call it "unaligned" or "neutral" or something, and assign all the "hidden side" units to that side.
Proud creator of the :whistle: smiley | I prefer the CC-0 license.
Re: Hiding unit nationality in a multiplayer game
The trouble is, if you want this to be one-way I don't think it'll work very easily.Zarel wrote:You could add a new side, call it "unaligned" or "neutral" or something, and assign all the "hidden side" units to that side.
That is to say, the defender cannot identify the individual attackers (they all look the same) but the attackers, controlled by several different players, should be able to know which attacking unit belongs to which player.
One option would be to take an existing unit and color it a neutral color, but don't make it TC-enabled (team-colored). I'm not sure if you'd be able to mask the team-colored rings, or for that matter even mask who's turn it is attacking (when someone attacks you can see whose turn it is by the flag at the top of the screen).
Another idea is units could be "gifted" to the hidden team which is either controlled by one player or the computer AI.
If the game is an us-versus-them style game, which would still require a lot of work, you couild store a variable for each unit as it is recruited, keeping a number indicating the side owner. Then, giving the team to each player but only allowing them to make moves on units where the units' variable is equal to their side number. Ooof.
The last possibility would be, if it's possible to change all the team colors to the same color that would solve the issue. It might be hard to determine then which units are yours, however, but maybe that would accomplish what the original poster was looking to do.
Wesnoth Bestiary ( PREVIEW IT HERE )
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Re: Hiding unit nationality in a multiplayer game
Indeed. The whole point is to mimic false-flag sorts of things.ancestral wrote:The trouble is, if you want this to be one-way I don't think it'll work very easily.
That is to say, the defender cannot identify the individual attackers (they all look the same) but the attackers, controlled by several different players, should be able to know which attacking unit belongs to which player.
You can totally remove team-color in a specific unit's image (by editing it) and ellipse (unit_filter has a value called "ellipse" that is currently used to give level 0s a dashed ring - I would replace it with a blank/transparent .png). The flag's image is kept somewhere, and you could presumably just make it transparent as well.One option would be to take an existing unit and color it a neutral color, but don't make it TC-enabled (team-colored). I'm not sure if you'd be able to mask the team-colored rings, or for that matter even mask who's turn it is attacking (when someone attacks you can see whose turn it is by the flag at the top of the screen).
I think that this would work.
Re: Hiding unit nationality in a multiplayer game
Won't work as the unit will still show side on minimap.
The only way is to have this kind of units on neutral sides.
But anyway, everyone will see in which turn these units move, and this cannot be sorted out. It's a limitation of the paradigm.
So, this is the less bad solution that I can think:
The only way is to have this kind of units on neutral sides.
But anyway, everyone will see in which turn these units move, and this cannot be sorted out. It's a limitation of the paradigm.
So, this is the less bad solution that I can think:
- There is a neutral side, who plays last.
Player recruit these kind of units, let's call them infiltrators. Infiltrators initially belongs to player's side.
A player can release an infiltrator instead of moving it on its own turn. These infiltrators go to the neutral side, but store information about its owner.
A player can take over an infiltrator that he previously owned. He can move and attack in the same turn.
On neutral side turn, AI moves infiltrators and attack every one except its owner (you have to tweak the AI!).
It is ok to correct me if my English is too bad.
Working on Cunnicula Civil War
Working on Cunnicula Civil War
Re: Hiding unit nationality in a multiplayer game
enemy infiltrators wont attack each other.
Re: Hiding unit nationality in a multiplayer game
True. I hadn't thought it. "Released" infiltrators won't attack other "released" infiltrators. But I can't think a better solution.
It is ok to correct me if my English is too bad.
Working on Cunnicula Civil War
Working on Cunnicula Civil War
Re: Hiding unit nationality in a multiplayer game
(I added list points to your list ...)
With a lot of AI tweaking (may need some more AI configuration features) one could even give the own infiltrators some commands, which side (or even "which unit") to attack.Lord Ork wrote:So, this is the less bad solution that I can think:
- There is a neutral side, who plays last.
- Player recruit these kind of units, let's call them infiltrators. Infiltrators initially belongs to player's side.
- A player can release an infiltrator instead of moving it on its own turn. These infiltrators go to the neutral side, but store information about its owner.
- A player can take over an infiltrator that he previously owned. He can move and attack in the same turn.
- On neutral side turn, AI moves infiltrators and attack every one except its owner (you have to tweak the AI!).
- solsword
- Code Contributor
- Posts: 291
- Joined: January 12th, 2009, 10:21 pm
- Location: Santa Cruz, CA
- Contact:
Re: Hiding unit nationality in a multiplayer game
Another possibility:
Create two sides for each player, both controlled by that player. Have one of the sides be obviously that player's side, and the other not (I'm not sure exactly how you tell who is controlling which side...). That way, even though everyone knows which side is attacking them (based on the turn number), no-one knows who is controlling that side. To accomplish this, you'd probably have to statically assign the first N sides, and then randomly assign the second N sides, where N in the number of players. An example:
Side 1 -> Player 1
Side 2 -> Player 2
Side 3 -> Player 3
Side 4 -> Player 4
Side 5 -> Random Player
Side 6 -> Random Player
Side 7 -> Random Player
Side 8 -> Random Player
Where the random players are each different, of course, so that each of players 1-4 gets exactly one side from sides 7-8. Say that Player 2 hires a privateer, and has randomly been assigned to control side 7 (in addition to side 2). The privateer spawns on side 7, and player 2 controls that side as normal, using the privateer to attack units on side 4. Player 4 sees eir units getting attacked, and knows that side 7 is the aggressor. But Player 4 has no way of knowing which of players 1, 2, or 3 is controlling side 7, and is thus unable to know that ey should retaliate against side 2.
Of course, I'm not sure about the WML side of things... is it possible to have a randomly-assigned controller?
Create two sides for each player, both controlled by that player. Have one of the sides be obviously that player's side, and the other not (I'm not sure exactly how you tell who is controlling which side...). That way, even though everyone knows which side is attacking them (based on the turn number), no-one knows who is controlling that side. To accomplish this, you'd probably have to statically assign the first N sides, and then randomly assign the second N sides, where N in the number of players. An example:
Side 1 -> Player 1
Side 2 -> Player 2
Side 3 -> Player 3
Side 4 -> Player 4
Side 5 -> Random Player
Side 6 -> Random Player
Side 7 -> Random Player
Side 8 -> Random Player
Where the random players are each different, of course, so that each of players 1-4 gets exactly one side from sides 7-8. Say that Player 2 hires a privateer, and has randomly been assigned to control side 7 (in addition to side 2). The privateer spawns on side 7, and player 2 controls that side as normal, using the privateer to attack units on side 4. Player 4 sees eir units getting attacked, and knows that side 7 is the aggressor. But Player 4 has no way of knowing which of players 1, 2, or 3 is controlling side 7, and is thus unable to know that ey should retaliate against side 2.
Of course, I'm not sure about the WML side of things... is it possible to have a randomly-assigned controller?
The Knights of the Silver Spire campaign.
http://www.cs.hmc.edu/~pmawhorter - my website.
Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can do it yourself. If you just happen to like magenta, no hard feelings?
http://www.cs.hmc.edu/~pmawhorter - my website.
Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can do it yourself. If you just happen to like magenta, no hard feelings?