SupplyDepot map script error


(mortis) #1

Hello,

I admin at Primer’s Linux64 and Broadbandreports.com and I dabble at times at level design. Although I have made many, many levels for Unreal Tournament, my familiarity with scripting and level design for Wolf: ET is pretty limited. Nevertheless, I can do basic scripting needed for servers.

One of our most popular maps is SupplyDepot. There is a bug in the map script that causes a large portion of the Axis team to spawn at the second fallback spawn if the foward spawn flag is capped by the Aliies during warmup. Supposedly this bug was fixed in SupplyDepot2, but it was not.

After seeing some discussion of the map script in the etpro forums, I took a stab at the fixing the script error. If any experts could take a look at my logic and solution found here: http://bani.anime.net/banimod/forums/viewtopic.php?t=5366

I would greatly appreciate any help/insight you might offer.

I don’t think that the script should call on the same entity at the initial auto-spawn, or should it? I changed it, and it seems to have fixed the problem, but I have only had two trial runs when the server was busy enough to check it.

Ideas? Suggestions?

–Mortis


(EB) #2

I’ll take a look at more of the script if I have the map( I don’t think I do )…but let me just say that the wait commands are weird as the spawn points’ names are the same.

I would have to decompile the map unless someone else knows…can I get the map from you ?

**Hey guys, who made the supplydepot maps ?


(mortis) #3

I don’t have the .map file, but the pk3 can be downloaded from here:

http://sh.nu/etpro/index.php

–Mortis


(EB) #4

I got you sorted out…I hope the map maker doesn’t mind…Let me test it a bit more though…ok ?..


(mortis) #5

Well with etpro i don’t need to modify the embedded pk3 script. We can leave the pk3 archive intact and just create another updated script to override the default script. I don’t foresee any need for the author to get snippy about us fixing a bug that doesn’t alter the original distributable archive at all. I think that SupplyDepot2 was a re-make done with the original author’s permission. I’m not suggesting that we do this at all, rather that we modify the map script and leave the original archive intact. Of course if the script ‘accidentally’ found its way into a SupplyDepot3, I wouldn’t cry a river about it.

Does anyone personally know the author? Obviously permission to fix the archive permanently would be nice…

–Mortis


(Oxygen - o2) #6

you say it happens in warmup? if so, why the hell dose it matter? since armup is only like 30 seconds on most server taking 15 seconds to load the map, leaves no time to even get the flag


(Ifurita) #7

Except that in etpro servers, everyone has to ready up, so while you’re waiting for everyone to ready up (which can take ages), it’s easy to run around and grab the flag


(mortis) #8

Many clever Allied players actually deliberately attempt to cap the flag during warmup, giving them a significantly better chance of overrunning the gates during the first 30 sec of the match. It is a borderline exploit in my mind, so when I am Axis on that map, I will intentionally camp the flag during warmup and kill any Allies who near the flag.

At Primer’s, we are mostly pubbers, but some people still get very upset when the script bug is exploited. All it takes is one ally to touch the foward flag during the 45 second warmup.

–Mortis


(SCDS_reyalP) #9

AFAIK, TWL rules currently forbid grabbing that flag in warmup.
Note, if the script functions correctly, capping the flag would be a complete non issue (see oasis).

As I said on the etpro forum, the most likely cause is a timing issue, with some players managing to spawn before the autospawn command takes effect. According to the gamecode comments (which aren’t very trustworthy) the server is supposed to wait 6 frames (300 ms) before spawning players. The original wait in the script is 500ms. Oasis, on the other hand, uses a 150ms wait before setting the autospawn, and works correctly 100% of the time.

The final point to be aware of is that if the server is too full, some people may be forced to spawn back simply because there aren’t enough forward spawnpoints. If I’ve counted correctly this should only happen with 12v12 or more, which is realy too much for that map anyway.

edit:
the correct way to test this would be to get a full server (anywhere from 12 to 24 players) and repeatedly let the warmup expire and reset. If no one spawns back in a few attempts, it is either fixed, or at least a vast improvement on the current version. This should only take a few minutes to verifity.


(mortis) #10

Ah, i didn’t understand that there was a 6 frame wait before spawn (to build the entities and set their state, I presume). I didn’t understand why the timing issue was so critical. In all probability you are correct, although it wouldn’t hurt for me to check out the autospawn entity while we’re at it…

It would be nice to ‘set it and forget it’ with a script fix…

–Mortis


(SCDS_reyalP) #11

Exactly. That is also the reason the wait is required at all, because the game_manager script could get processed before the team_WOLF_objective entities have spawned.


(EB) #12

It was a small problem, he had both teams set to spawn at the same point but another script execution called the different staging. I set it to the correct spawn point for allies…now they can’t get that spawn the “easy” way and the axis will spawn up front at game start.

Just copy this and replace the game_manager scripting at the top of the script file, I have a feeling you understand.

// ==============================
// script for ginc’s ET map \o/
// ==============================

game_manager {
spawn {
// Game rules
wm_axis_respawntime 30
wm_allied_respawntime 20
wm_number_of_objectives 8
wm_set_round_timelimit 15

  // Objectives
  // 1: Primary1 : Forward gate
  // 2: Primary2 : Depot gate
  // 3: Primary3 : Get the truck in position
  // 4: Primary4 : Crane
  // 5: Primary5 : Get the truck to the exit 
  // 6: Secondary1 : Western Depot wall
  // 7: Secondary2 : Eastern Depot wall
  // 8: Secondary3 : Command Post

  // Current main objectives for each team (0=Axis, 1=Allies)
  wm_set_main_objective	1 0
  wm_set_main_objective	1 1

  // Objective overview status indicators
  // wm_objective_status <objective> <team (0=Axis, 1=Allies)> <status (0=neutral 1=complete 2=failed)>
  wm_objective_status 1 1 0
  wm_objective_status 1 0 0
  wm_objective_status 2 1 0
  wm_objective_status 2 0 0
  wm_objective_status 3 1 0
  wm_objective_status 3 0 0
  wm_objective_status 4 1 0
  wm_objective_status 4 0 0
  wm_objective_status 5 1 0
  wm_objective_status 5 0 0
  wm_objective_status 6 1 0
  wm_objective_status 6 0 0
  wm_objective_status 7 1 0
  wm_objective_status 7 0 0
  wm_objective_status 8 1 0
  wm_objective_status 8 0 0


  // Stopwatch mode defending team (0=Axis, 1=Allies)
  wm_set_defending_team	0

  // Winner on expiration of round timer (0=Axis, 1=Allies)
  wm_setwinner	0

  // Set starting spawns
  // The wait command after is VERY IMPORTANT for correct spawns!
  wait 500
  setautospawn	"Forward Bunker Spawn"	0
  setautospawn	"Allied Start"	1

  wait 1000

  trigger radiomusic radiostart		//Start radio music

  // *----------------------------------- vo ------------------------------------------*
  wm_addteamvoiceannounce 0 "axis_entrances_defend"
  wm_addteamvoiceannounce 0 "axis_bunker_stop"
  wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

  wm_addteamvoiceannounce 1 "allies_entrances_destroy"
  wm_addteamvoiceannounce 1 "allies_bunker_capture"

  wm_teamvoiceannounce 0 "axis_entrances_defend"
  wm_teamvoiceannounce 0 "axis_bunker_stop"
  wm_teamvoiceannounce 0 "axis_hq_compost_construct"

  wm_teamvoiceannounce 1 "allies_entrances_destroy"
  wm_teamvoiceannounce 1 "allies_bunker_capture"
  // *---------------------------------------------------------------------------------*

}
}

-cheers
:chef:


(Laope) #13

that scripts works if i name it supplydepot2.script and put it in the etpro/etpromapscripts folder???

:drink:


(mortis) #14

No, supplydepot2 is a different script. I will make one for supplydepot2. Also, the entity wait times need to be less than 300ms according to reyal.

Get my working Supplydepot etpro map script here:

http://www.bsdterritory.com/img/Mortis/supplydepot.script

–Mortis


(EB) #15

A thank - you would have sufficed.

The scripting timing was fine anyways…I know about the timing of the spawns.


(mortis) #16

Thanks EB for checking it out. Your conclusion turned out to be exactly what I suspected also, although I couldn’t explain my thinking very well.

get your working Supplydepot scripts here:

SupplyDepot http://www.bsdterritory.com/img/Mortis/supplydepot.script

SupplyDepot2 http://www.bsdterritory.com/img/Mortis/supplydepot2.script

You need to place them in /Wolfy/etpro/etpromapscripts and do a soft restart for them to take effect.

Your server needs to have set b_mapscriptdirectory “etpromapscripts”

No, it doesn’t work for Shrub.

Yes, I am sure it doesn’t work for Shrub. :wink:

(Unless the experts know some method other than making a new pk3 [bad idea unless you know what you’re doing])

I am corresponding with the author of SupplyDepot to get permission to make a Supplydepot_final with the bugs removed, we’ll see how that goes…

–Mortis


(SCDS_reyalP) #17

:rolleyes:
Did you test that on a full server, or are you just guessing that your ‘fix’ is right ?


(mortis) #18

:chef: I can say that for my part in six full or mostly-full matches, I have not been able to produce the spawn bug with the new script. Another in the etpro forum has tried it on their server during two matches and obtained similiar results. I would characterize these scripts as beta-tested. At the very least, they are guaranteed not to crash out. Report bugs to me, if any.

–Mortis


(EB) #19

When the ‘wobj’ was triggered during warmup it turned the game manager scripting backwards(not really but just to explain) because both teams were autospawn set to spawn in the same location(the flag).
As the ‘game manager script’ resets after the warmup, it sets the spawns back to the default locations[considering there isn’t a ‘global accum’ deciding this situation]. As when the game_manager resets, the axis control the forward spawn. The allies (forward)spawns are NOT active…only the main allie spawn location is active.
With the terms changed, the script really has no way to flip the spawn locations.
I did not test it on a full server…ALTHOUGH…with the regular rules of spawn scripting in play…
I used a rather large start time on a dedicated LAN and tested almost all instances of gameplay I could imagine.(10 minutes)

—I hope I explained that well. I wouldn’t say I am guessing…I just used my knowledge.

[Edit]

in six full or mostly-full matches, I have not been able to produce the spawn bug with the new script

Good to hear Mortis !! :nod:
If we can contact Ginc…I will ask him if he minds me remaking the old pk3’s with the corrected script. [/Edit]


(CooperHawkes) #20

why do you want to remake the whole pk3 just for the script? put the script in a new pk3 and name it supplydepot2spawnbugfix.pk3 or similar (just has to appear after the original pk3 in the alphabetical order)… that way it should work on non etpro-servers, too.