| 01-23-2004, 02:15 PM | #1 |
OK I found out the intro cinema in my map was causing some problems and one of them was a server split. It happened RIGHT at the end of my cinema too which got me thinking. I couldve sworn I checked all my actions in the trigger. Then I came across an action I had meant to remove but apparently missed. I could see how removing this would fix the other problem (problem of unit spawning twice) but I dont see if it could be responsible for the split. Here's basically what I had: If ((Player 1 (Red) slot status) Equal to Is playing) then do (Unit - Create 1 Farmer for Player 1 (Red) at (Random point in Start[(Random integer number between 1 and 10)]) facing Default building facing degrees) else do (Do nothing) If ((Player 1 (Red) slot status) Equal to Is playing) then do (Camera - Pan camera for Player 1 (Red) to (Position of (Last created unit)) over 0.00 seconds) else do (Do nothing) If ((Player 2 (Blue) slot status) Equal to Is playing) then do (Unit - Create 1 Farmer for Player 2 (Blue) at (Random point in Start[(Random integer number between 1 and 10)]) facing Default building facing degrees) else do (Do nothing) If ((Player 2 (Blue) slot status) Equal to Is playing) then do (Camera - Pan camera for Player 2 (Blue) to (Position of (Last created unit)) over 0.00 seconds) else do (Do nothing) -- so on and so forth for all players on team 1 (1-5)... but then right below it I found an action I had meant to delete, my older spawn action... Player Group - Pick every player in Team1 and do (Unit - Create 1 Farmer for (Picked player) at (Random point in Start[(Random integer number between 1 and 10)]) facing 270.00 degrees) team1 is a unit group variable obviously. ---sooo, would having a double action like that cause a server split? Or just cause the double spawning like I was also seeing. I hope thats what was causing the split but I cant really test online with other players because Im on dialup that crashes every time I attempt to upload through b.net. Normally I send to a friend via AIM and then he hosts. Anyhow, post your opinion. Im also curious what other types of triggers would cause splits. Ive searched the forums but mainly all i found was references to call local player or something. Not really sure what it means. BTW i use the TFT editor with UMS 4.0 addon. -Huh |
| 01-23-2004, 02:36 PM | #2 |
That wont cause a split. but you should use a Player Group multiple action instead of if player1 is playing then, if player 1 is playing then, if player2 is playing then, if player2 is playing then.... and so on. Do it like this: Player Group Pick every player in player group and do multiple actions- If (Picked Player slot == is playing) all your actions endif |
| 01-23-2004, 02:48 PM | #3 |
I had it set that way to begin with, but problem was I couldnt find a way to pan the camera for each player to his own spawn location (its random) without specifying each action. I'm still learning my way through the editor. See what I mean, I could easily make it like you said, but id have an action that basically says Pick every player in team 1 and create 1 farmer at random point. The problem is I couldnt follow it up with an action saying Pick every player in team 1 and pan camera to last created unit ..(or last created unit group) because it would pan all of team 1's cameras to the same farmer. In my way, it tells it to pan each individual player on team 1's camera to the random location they spawn at, since they most likely wont be spawning next to another player. |
| 01-23-2004, 05:27 PM | #4 |
Huh, you need the Pick all player and do MULTIPLE actions for the loop... Code:
Pick all players and do
Do loop
If
Conditions
pick player slot status is equal to "Is Playing"
Then
Unit - Create 1 Farmer for Picked Player at (Random point in Start[(Random integer number between 1 and 10)]) facing Default building facing degrees
Camera - Pan camera for Picked Player to (Position of (Last created unit)) over 0.00 seconds
Else
Do NothingYou will notice the Pan Camera is in the loop as well. :D |
| 01-23-2004, 08:47 PM | #5 |
Yea if you look at the triggers, i gave the exact name of the function to use, the one with multiple actions, you can have 1 to 10000 actions inside that 1 loop |
| 01-24-2004, 12:28 AM | #6 |
AHhhh ok, Ya im guilty of not using the if than else for multiple functions trigger enough. Thanks for the input. I still havnt found the source of the server split though. Its starting to piss me off because the map is really damn fun to play unlike alot of custom games ive seen lately. Ahh ok i see now, you combined the Pick all players in group and do multiple actions, with the if/than/else multiple action. I didn't think that would work for some reason. Ok awesome, that should shorten at least a few triggers in the map. -Huh edited again hehe. Ok ,... wow. I've been going through all my triggers piece by piece and found at least half a dozen places that needed optimizing. You know, taking triggers that had a dozen actions for each player and condensing them to group actions. I just hope they work right. -Huh |
| 01-24-2004, 01:06 AM | #7 |
Repeated actions wont cause server splits, but for the sake of procressing time and power, its best to limit the # of function calls. I'm guessing your server split is being caused by something done after this or right before this. |
| 01-24-2004, 01:13 AM | #8 |
Server splits are a tricky thing. If you ever play Enfo's Team Survival -- there's this notorious split that's been through all versions of the map (as far as I know). There's a spell that allows you to summon friendly monsters from 3 rounds ahead. If you use it 3 rounds before the zombie round (and hence summon zombies with it), then about half the game splits. But when you get to the zombie round and they come spawning out of the portals, the game is perfectly fine. I think test, restesting, and testing a ton of more times is the only real way to get to the root of a server split. Mainly because, if it doesn't happen one time, it may still exist. You just got lucky, ya know? But I'd suggest puttin up some testin trigs to forward yourself to the part of the cinema that you think causes the split and try to change what you can to fix it. For instance, if you think its the units that you're making appear for each person -- then take them out and run it a few times... or use some standard unit from WC3. Thinking of the term "server split" I always figure it's because one person is told to do one thing and the other person another -- essentially dividing them in two. So with that in mind, my first suspect would be the camera pans. Try disabling the trigger and see if the game crashes. But I'm not the most knowledgeable person in this area because, well, I've yet to publicly release a map :ggani: Good luck |
| 01-24-2004, 01:15 AM | #9 |
just panning the camera to a unit doesnt cause a split, If so, moving left and right with the mouse would split the game, its the same thing basicly. Panning Camera As nessary used to cause a split, but I belive that fixed that bug a while ago. |
| 01-24-2004, 01:26 AM | #10 |
Yes, but this pan is over 0.00 seconds, so it's more like moving the camera. And if I'm reading correctly, it's during cinematic mode. I haven't played with that much, but I think people generally all view the same scene during a cinematic.. and blizzard's patches tend to have some odd bugs associated with 'em lately -shrugs- You got a better guess? |
| 01-24-2004, 01:44 AM | #11 |
not at all, cameras are 100% local, moving them during a cinematic for 1 player will not effect anything, Think of panning left and right as moving a camera, Its the same principle. Now if you turn cinematic mode on for player1, but not for player2, then you will have player1 drop from the game Cinematic mode changes the randomSeed of the game, so that has to be on for all players at the same time or else. |
| 01-24-2004, 03:48 AM | #12 |
Hmm, I only use "turn cinematic mode on/off" a couple times and each time its for all players. Oh ya, this is a rather simple cinematic (its my first one.. on my first map) and there arent any many actual camera "moves". Just pans using the 0.0 timer to instantly pan the camera from one spot to another. For changing screens and adding/removing units I use colored fades. It's actually quite entertaining. The server split only started happening within the last two days so I've isolated the code that could be causing it. The thing is though... it makes no sense to me why the split would happen. I do have a few actions that will pan the camera to different places for different players but thats all done after Cinematic mode is turned off. (IMMEDIATELY AFTER) actually, which is when the split happened (its only happened once so far, ive only been able to test once however since I require my friends fast connection to do any real testing.. my dialup wont allow me to UL maps in B.net). Here's the code that follows the "turn off cinematic mode" action. maybe you will see something wrong with it. Cinematic - Turn cinematic mode Off for (All players) ---ok theres the turn off cinema action.. rest of this is the code that follows--- Player Group - Pick every player in Team2 and do (Unit - Create 1 team2hero for (Picked player) at ((Picked player) start location) facing 270.00 degrees) Player Group - Pick every player in Team1 and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Picked player) slot status) Equal to Is playing Then - Actions Unit - Create 1 Farmer for (Picked player) at (Random point in Start[(Random integer number between 1 and 10)]) facing 270.00 degrees Camera - Pan camera for (Picked player) to (Position of (Last created unit)) over 1.50 seconds Else - Actions Do nothing Unit Group - Pick every unit in (Units of type Farmer) and do (Actions) Loop - Actions Hero - Give (Picked unit) a Tips and Hints 1 in slot 0 Hero - Give (Picked unit) a Tips and Hints 2 in slot 1 Hero - Give (Picked unit) a Tips and Hints 3 in slot 2 Hero - Give (Picked unit) a Tips and Hints 4 in slot 3 Hero - Give (Picked unit) a Tips and Hints 5 in slot 4 Hero - Give (Picked unit) a Tips and Hints 6 in slot 5 Sound - Attach ReviveHuman <gen> to (Picked unit) Special Effect - Create the illusion of Hex with that spell's Special model attached to (Picked unit) on it's overhead Trigger - Run Starting Camera <gen> (checking conditions) Trigger - Turn off (This trigger) Ok some info, the Tips and Hints 1,2,3,4,5,6 are all items. I'm using the UMSWE action to add the item to the picked unit's inventory slot. This is a big piece of the code that was added in the other night after I added in the Tips and Hints items. The part after that is just it plays a 3d sound attached to the unit, and then displays spell animation for Hex at the picked units overhead (i altered hex's special animation to Toonboom but i dont think that should hurt anything). Basically the Run Starting Camera trigger begins another trigger that gives a quick briefing on how to change camera angles (via another trigger). During that trigger I fire up 3 more triggers, the "gold over time" trigger, the "timer setup" trigger, and the "leaderboard setup" trigger. I reeeeeeeeally need to test more to pinpoint the EXACT moment when the split occurs and make sure its not even a bit random. Hopefully ill get a chance tonight when my buddy logs on. Until then, unless any of you want to help, I'll hafta keep looking for possible problems. -Huh PS- Just what does "call local variable/player, etc" mean? ive seen people who use jass describe that as causing splits. I use the UMS WE 4.0 over the TFT WE so I dont really do anything in JASS. I can read some of it but not much. PSS- Would locking the map cause a split? i used the power protect feature that came with W3M map utilities. Although for now on I think I'll be using heavylock because I like the extra features. |
| 01-24-2004, 04:08 AM | #13 |
How much online testing did you actually do with the map? If you only ran it a couple times, the split may have been there but gone undetected. If I remember correctly, and this certainly makes sense, the way a split works is by seperating people of varying connections. Ie, all the 56.6k modem users stay together and all the dsl/cable people stay together. This would be due to the cable people being able to advance to one area and the others being left behind and the game not re-syncing correctly. Anyhoo, all the code seems fine that you displayed, though I'm not a big fan of UMSWE or protecting maps. UMSWE because WC3 has enough bugs with it already without worrying about some 3rd party editor adding to the problem. And protecting maps because, well.. that'd be entirely too long of a discussion to retype tonight, but you can read what I wrote here: http://www.wc3campaigns.com/forums/s...threadid=44886 Anyway, basically all that protecting a map does is remove the file that the editor uses to display that GUI-enhanced version of the Jass script .. where you click links and select from boxes and stuff.. yeah. Then when you save the map, that all gets transformed into the Jass file, which is what the game actually reads. So when loading the map, it crashes ifit can't find that file for the GUI, but the map can be played still 'cause it doesn't use it.. yeah. Anyhoo... If I had to make a guess.. the problem would be where you're saying that "this function calls another which calls 3 more which double-back to the second one from the left and shoots a midget out of a cannon" Try disabling them and see if you still get teh split. If that is the problem and you get lucky, you could just offest the firing of each one by half a second or so. I could be totally off, granted I have no solid logic for this theory, but it just seems like calling functions that call functions that call functions may be a bit more than Blizzard ever intended for the WE. Plus since you're using the UMSWE, that could add a new series of issues with it. -shrug- |
| 01-24-2004, 04:38 AM | #14 |
Yea, Im starting to think that the triggers i added in using UMSWE are bugged. I heard alot of good things about UMSWE so I went ahead and gave it a try. I'm going to backup what i have now and change some of the UMS enhanced triggers back to the old way I had them and run. BTW, the multiple call functions are just a way of ordering events. First off the map init trigger fires, (which just contains data like setting some variables, setting quests, setting enviromental effects, setting hero exp rate, setting players starting resources, and one where I tell two "guard" units made before the map starts to hold position so if they are agrod they wont chase). At the end, it fires a trigger that starts the cinema. After an intro to the cinema, theres an option for intro skipping. If the players skip it, (just one person has to activate it), it fires an "intro skip cleanup" trigger that cleans up all the units that need removed from the cinema (i have them on the map not using triggers), and then spawns players, pans cameras, etc to start the map. Basically the intro skip trigger is just the last part of the cinema trigger: it cleans up the same units, creates the same units, and fires the same triggers. At the end of the introskip clean trigger, it fires the "Run starting camera" trigger that just like i said above tells how to manipulate the camera angles, then THAT trigger fires off a couple more triggers. It fire the gold trigger (i placed it there because I dont want players to start getting gold until they actually have control of their units and this is a spot that takes place just 1-2 seconds after players gain control of their units), it fires the Timer Setup (sets up the main timer and displays the timer table), and fires the Leaderboard Setup (sets up the leaderboard, variables, etc, and displays the table for it). That's about it really. There are other triggers in the map that fire based on player commands, but its overall a rather simple map. If you actually watch the intro rather than skip it, it will run through a series of events involving creating units, removing them, panning cameras , blah blah blah but at the end it cleans itself up and moves on to starting the game. There's really nothing in the cinema itself that should cause a split i wouldnt think. I've checked, double checked, triple checked, and RECHECKED the conditions/actions in the cinema and theyre all pretty clean, albeit simple. SOrry for making such long posts. I just thought it would be easier for you to understand just how my map works when it starts. I'm thinking about trying to simplify the orderering of the triggers so they fire in a simplier fashion, but I just really need the timing to be perfect. Thats why its set the way it is now. Thanks for reading all this, and let me know if you see any big problems in what ive got atm. -Huh PS- i really hope this post wasnt unnecessarily long. Like i said I havnt done much testing since i switched to UMSWE / added in new triggers while in UMSWE (except for single player testing) so its hard to say if i have overlooked previous splits. If my dumbass friend would ever log on id have him host for me so i could test more with him but until then im screwed unless anybody on these forums would help. |
| 01-24-2004, 12:47 PM | #15 |
Does it still split if you skip the cinema? |
