[Bug] [Lua] [Multiplayer] Change team names

5 replies [Last post]
Tiotimolina
User offline. Last seen 1 year 3 weeks ago. Offline
Joined: 2011-12-25
Posts: 18

Changing team names with a lua script doesn't allow players to rejoin after leaving in multiplayer games.

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 years 14 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

Hi bmo Big Grin

Do you mean changing Team Name using Lua directly "from" .hwt ???
or in detail: do you are changing that team's name from it's Team properties which is stored in its hwt that are placed under %Hedgewars%/Teams ???

Or you're changing that team name generally(in the menu) after quitting a multiplayer games ?

And how long it's effect ? Permanent ?
I curious about this... Gotta check this out soon Wink Smiley
Cuz this quite interesting ^^

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

Tiotimolina
User offline. Last seen 1 year 3 weeks ago. Offline
Joined: 2011-12-25
Posts: 18

Through SetHogTeamName() in a script.

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 4 days ago. Offline
Joined: 2012-06-20
Posts: 1301

I'm not sure if this should be cosidered a real bug.

Why would you want to rename an entire team in a multiplayer script? This would cause way too much confusion anyway.

I'm inclined to say that this will not be fixed and instead we just advice Lua scripters to not rename teams in multiplayer.

Hi, I am a Hedgewars developer. Smile

Tiotimolina
User offline. Last seen 1 year 3 weeks ago. Offline
Joined: 2011-12-25
Posts: 18

Part of the script consists on players choosing among predefined teams at the beginning of the game. Each team has something special. Changing team names is an easy way to know which teams have been chosen and which player did.

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 years 14 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

Oh, I see this too late xD
Not like what I've expected before ;S

Okay...
AFAIK, Renaming Team Name "In Multiplayer" Isn't allowed and cause desync, but it's not a bug...
Since I have test it last year (almost get forgotten xD)
But dunno what devs will say about this...

"Warning: This works only for singleplayers training missions for now and will desync multiplayer games."
A quote from Lua API that I can remember...
This is a warning for using "AddHog" function in Multiplayer Games
And so be it for SetHogTeamName function... Maybe just lacks of warning on SetHogTeamName
The things to be notes is that SetHogTeamName is used for Training mission, like AddHog function usage, which is used only in singleplayer

Therefore...
SetHogTeamName [AFAIK] are ONLY used for singleplayer purpose...

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]