Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Server Crash - The Lost Village

  1. #1

    Default Server Crash - The Lost Village

    Hi all,

    Long time no speak!

    I am getting a server crash on this one specific map. It always happens when the map reaches it's 8min timelimit.
    It refuses to cycle to next map in rotation. (and indeed, this map is definitely the culprit)

    I have scoured the script, and cannot see what could be happening.
    It is a botmap. I have converted or used multiple existing botmaps for this server.
    Ive compared this to other working scripts, and cannot see the one thing that could be causing the crash.
    One point - if a player joins the map mid-session..it does NOT crash. Weird.
    q_console log also does not really give me anything. It just dies mid-script.

    Your expert eyes would be appreciated!


    Spoiler: // The Lost Village
    // ARCHITECTURE: Ghost Dog
    // SCRIPTING: Ghost Dog
    // SPECIAL THANKS TO: Balr14, Jv_map, Vonderbakluft, Oddball_Woof, Scorpio and THE MODDING THEATER ([url
    www.modtheater.com[/url])
    // Bot Tweaks by Oh_Gaz - [RAC] Rent-A-Crowd

    main:

    waitexec maps/obj/The_Lost_Village.bot

    setcvar "g_obj_alliedtext1" "Destroy the safe!" // set scoreboard messages
    setcvar "g_obj_alliedtext2" "Steal the Documents!"
    setcvar "g_obj_alliedtext3" ""
    setcvar "g_obj_axistext1" "Stop Allies from"
    setcvar "g_obj_axistext2" "Stealing the Documents!"
    setcvar "g_obj_axistext3" "=tweaked by [RAC]="
    setcvar "timelimit" "8"
    setcvar "fraglimit" "1"
    setcvar "g_scoreboardpic" "The_Lost_Village"
    setcvar "jvbot_showavatar" "0"
    setcvar "jvbot_prefix" "[BOT]"
    setcvar "g_gametypestring" "jv_bot01"
    setcvar jvbot_skill 4


    switch (waitthread global/libmef/util.scr::get_gametype)
    {
    case "ctf":
    case "ftctf":
    case "dem":
    case "ftdem":
    waitthread setup_bases
    break

    case "obj":
    case "ftobj":
    thread objectivethread
    break
    }

    // set the parameters for this round based match
    if (level.mef_gametype != "ftobj")
    {
    level.dmrespawning = 1 // 1 or 0
    }


    setcvar g_gametype 2


    level waitTill prespawn
    setcvar g_gametype 4

    exec global/DMprecache.scr //*** Precache Dm Stuff
    level.script = maps/obj/The_Lost_Village.scr //point this to your ".scr"

    exec global/ambient.scr obj_team1
    exec global/door_locked.scr::lock
    exec global/exploder.scr
    exec global/shutter.scr
    thread global/minefield.scr::minefield_setup
    thread global/exploder.scr::main
    spawn models/sound/The_Lost_Village/The_Lost_Village.tik
    level.dmrespawning = 1 // 1 or 0
    level.dmroundlimit = 8 // round time limit in minutes
    level.clockside = axis // set to axis, allies, kills, or draw
    thread cmessage



    level waittill spawn


    level.bomb_damage = 100
    level.bomb_explosion_radius = 100 //was 640
    level.defusing_team = "axis"
    level.planting_team = "allies"
    level.targets_to_destroy = 1
    thread global/shutter.scr::shuttrig 1
    thread global/shutter.scr::shuttrig 2
    thread hatch1start
    thread documents_init
    $hatch2 thread processhatch2
    $luik thread openluik
    thread boat1switch1
    thread boat2switch1
    $floor thread openfloor
    thread waterambient


    //level waittill roundstart //make comment to test objectives
    level.bRoundStarted = 1

    thread documentvoice

    //objectives init
    level.alliesbots = 7
    level.axisbots = 7

    $safe_bomb thread global/jv_obj_dm.scr::bomb_thinker

    waitthread global/jv_bots/jv_mp_ai.scr::addroute triggernode
    waitthread global/jv_bots/jv_mp_ai.scr::enable 0 0 0 0
    waitthread level.jvbot_main_script::addtask trigger 1

    thread allies_win_bomb // Start the win check thread for allies
    $safe_bomb thread axis_win_timer // Start the win check thread for axis


    end //main-end

    ////////////////////////////////////////******DOCUMENT SPEECH******//////////////////////////////////////

    documentvoice:
    wait 240
    //iprintln "playing documentvoice"
    $safe_bomb playsound dfr_M1L2_113m_1 //"The documents and explosives I had were confiscated."
    wait 2.8
    $safe_bomb playsound dfr_M1L2_114m_1 //"We've got to recover them, or this mission is lost."
    wait 2.2
    $safe_bomb playsound dfr_M1L2_115m_1 //"They're probably in the Commandant's office."
    wait 2.5
    end


    ////////////////////////////////////////******SOUND FOR WATER******//////////////////////////////////////

    waterambient:
    wait 1
    $watersound1 loopsound river
    $watersound2 loopsound river
    $watersound3 loopsound river
    $watersound4 loopsound river
    /*
    $basementwater1 loopsound basement_water
    $basementwater1 volume 1
    $basementwater2 loopsound basement_water
    $basementwater2 volume 1
    $basementwater3 loopsound basement_water
    $basementwater3 volume 1
    $basementwater4 loopsound basement_water
    $basementwater4 volume 1
    $basementwater5 loopsound basement_water
    $basementwater5 volume 1
    $basementwater6 loopsound basement_water
    $basementwater6 volume 1
    */
    end


    ////////////////////////////////////////******PROCESSHATCH2******////////////////////////////////////////

    processhatch2:
    self.hatchpos = 0
    self time 3.3
    thread monitorhatch2
    end


    monitorhatch2:

    while (1)
    {
    $(self+"_trigger") waittill trigger

    if(self.hatchpos == 0)
    {
    self rotateYup 90 // or Y or Z if your hatch opens that way.
    self.hatchpos = 1
    }
    else
    {
    self rotateYdown 90 // or Y or Z if your hatch opens that way.
    self.hatchpos = 0
    }

    self playsound m4l1_altar_slide
    self waitmove
    }

    end


    ////////////////////////////////////////******luik******////////////////////////////////////////

    openluik:
    self.hatchpos = 0
    self time 1.3
    thread moveluik
    end


    moveluik:

    while (1)
    {
    $(self+"_trigger") waittill trigger

    if(self.hatchpos == 0)
    {
    self time 1.3
    self rotateXup 90 // or Y or Z if your hatch opens that way.
    self.hatchpos = 1
    self playsound m4l3_gateopen
    }
    else
    {
    self time 1.1
    self rotateXdown 90 // or Y or Z if your hatch opens that way.
    self.hatchpos = 0
    self playsound m4l3_gateclose
    }

    self waitmove
    }

    end


    ////////////////////////////////////////******floor******////////////////////////////////////////

    openfloor:
    self time 3
    $pit volumedamage 100
    thread movefloor
    end


    movefloor:

    while (1)
    {
    $(self+"_trigger") waittill trigger
    $(self+"_trigger") nottriggerable
    $crushdoor1_trigger nottriggerable
    $crushdoor2_trigger nottriggerable
    $alarmswitch2 anim turnon
    $alarmswitch2 playsound alarm_switch
    self rotateXup 90 // or Y or Z if your hatch opens that way.
    self playsound door_vault_roll_open
    self waitmove
    wait 3
    $alarmswitch2 anim turnoff
    $alarmswitch2 playsound alarm_switch
    self rotateXdown 90 // or Y or Z if your hatch opens that way.
    self playsound door_vault_roll_close
    self waitmove
    $(self+"_trigger") triggerable
    $crushdoor1_trigger triggerable
    $crushdoor2_trigger triggerable
    }

    end

    ////////////////////////////////////////******alarmswitch1******////////////////////////////////////////

    move_alarmswitch1:

    $floor_trigger nottriggerable
    $crushdoor1_trigger nottriggerable
    $crushdoor2_trigger nottriggerable
    $alarmswitch1 anim turnon
    $alarmswitch1 playsound alarm_switch
    wait 50
    //iprintln "switching off"
    $alarmswitch1 anim turnoff
    $crushdoor1_trigger triggerable
    $crushdoor2_trigger triggerable
    $floor_trigger triggerable

    end


    //////////////////////////////////////******SECRET PASSAGE******////////////////////////////////////////
    //////////////////////////////////////////////hatch1start///////////////////////////////////////////////

    hatch1start:
    $hatch1 time 2
    $hatch1switch1.pos = 1
    $hatch1switch2.pos = 1
    $hatch1.up = 0
    thread hatch11
    thread hatch12
    end

    ////////////////////////////////////////////////hatch11//////////////////////////////////////////////////

    hatch11:
    $hatch1switch1_trigger triggerable
    $hatch1switch2_trigger triggerable
    $hatch1switch1_trigger waittill trigger
    $hatch1switch1_trigger nottriggerable
    $hatch1switch2_trigger nottriggerable
    if ($hatch1switch1.pos == 1)
    {
    $hatch1switch1 anim turn
    $hatch1switch1.pos = 0
    }
    else
    {
    $hatch1switch1 anim off
    $hatch1switch1.pos = 1
    }
    $hatch1switch1 playsound alarm_switch
    wait .5
    thread hatch1move1
    end

    ////////////////////////////////////////////////hatch12//////////////////////////////////////////////////

    hatch12:
    $hatch1switch2_trigger triggerable
    $hatch1switch1_trigger triggerable
    $hatch1switch2_trigger waittill trigger
    $hatch1switch2_trigger nottriggerable
    $hatch1switch1_trigger nottriggerable
    if ($hatch1switch2.pos == 1)
    {
    $hatch1switch2 anim turn
    $hatch1switch2.pos = 0
    }
    else
    {
    $hatch1switch2 anim off
    $hatch1switch2.pos = 1
    }
    $hatch1switch2 playsound alarm_switch
    wait .5
    thread hatch1move2
    end

    ////////////////////////////////////////////hatch1move1//////////////////////////////////////////////////

    hatch1move1:
    if ($hatch1.up == 0)
    {
    $hatch1 rotateZup 90
    $hatch1.up = 1
    }
    else
    {
    $hatch1 rotateZdown 90
    $hatch1.up = 0
    }
    $hatch1 playsound door_railcar_open
    $hatch1 waitmove
    wait .5
    thread hatch11
    end

    ////////////////////////////////////////////hatch1move2//////////////////////////////////////////////////

    hatch1move2:
    if ($hatch1.up == 0)
    {
    $hatch1 rotateZup 90
    $hatch1.up = 1
    }
    else
    {
    $hatch1 rotateZdown 90
    $hatch1.up = 0
    }
    $hatch1 playsound door_railcar_open
    $hatch1 waitmove
    wait .5
    thread hatch12
    end


    ///////////////////////////////////////////////BOAT1//////////////////////////////////////////////////////

    boat1switch1:

    $boat1_trigger1 waittill trigger
    wait 0.5
    thread boat1forward

    end


    boat1forward:

    $boat1 speed 150
    $boat1 moveto boat1start
    $boat1 loopsound wave_crash1
    $boat1 waitmove
    $boat1 stoploopsound

    thread boat1switch2

    end


    boat1switch2:

    $boat1_trigger2 waittill trigger
    wait 0.5
    thread boat1backward

    end


    boat1backward:

    $boat1 speed 150
    $boat1 moveto boat1end
    $boat1 loopsound wave_crash1
    $boat1 waitmove
    $boat1 stoploopsound

    thread boat1switch1

    end


    ///////////////////////////////////////////////BOAT2//////////////////////////////////////////////////////

    boat2switch1:

    $boat2_trigger1 waittill trigger
    wait 0.5
    thread boat2forward

    end


    boat2forward:

    $boat2 speed 150
    $boat2 moveto boat2start
    $boat2 loopsound wave_crash1
    $boat2 waitmove
    $boat2 stoploopsound

    thread boat2switch2

    end


    boat2switch2:

    $boat2_trigger2 waittill trigger
    wait 0.5
    thread boat2backward

    end


    boat2backward:

    $boat2 speed 150
    $boat2 moveto boat2end
    $boat2 loopsound wave_crash1
    $boat2 waitmove
    $boat2 stoploopsound

    thread boat2switch1

    end


    /////////////////////////////////////******LIGHTSWITCH******/////////////////////////////////////////////

    /*
    lightswitch1:
    $light light 1 1 1 120
    $lightswitch_trigger triggerable
    $lightswitch_trigger waittill trigger
    $lightswitch_trigger nottriggerable
    $lightswitch anim turn
    $lightswitch playsound alarm_switch
    wait .5
    thread lightoff
    end

    lightoff:
    $light light 0 0 0 64
    $corona hide
    wait .5
    thread lightswitch2
    end

    lightswitch2:
    $lightswitch_trigger triggerable
    $lightswitch_trigger waittill trigger
    $lightswitch_trigger nottriggerable
    $lightswitch anim off
    $lightswitch playsound alarm_switch
    wait .5
    thread lighton
    end

    lighton:
    $light light 1 1 1 120
    $corona show
    wait .5
    thread lightswitch1
    end
    */

    /////////////////////////////////////******DEATH_UNDER_MAP******/////////////////////////////////////////////

    /*
    death_under_map:
    iprintln "Hahahaha, try again"
    $electrofield nottriggerable
    $electrofield volumedamage 20
    wait 1
    $electrofield volumedamage 20
    wait 1
    $electrofield volumedamage 20
    wait 1
    $electrofield volumedamage 20
    wait 1
    $electrofield volumedamage 20
    wait 2
    $electrofield triggerable
    end
    */

    ///////////////////////////////////////******DOCUMENTS PART 1******/////////////////////////////////////

    documents_init:

    $documents_trigger nottriggerable

    end

    ///////////////////////////////////////******DOCUMENTS PART 2******/////////////////////////////////////

    documents_end:

    while(1)
    {
    self triggerable
    self waittill trigger
    println (self + " triggered")

    if(self.triggertime == level.time)
    local.other = self.other
    else
    local.other = parm.other

    if (local.other.dmteam == allies)
    {
    $documents hide
    $documents playsound dfr_M1L2_132m_2 // "Okay, we've found the documents."
    wait 0.5
    iprintlnbold "The documents were stolen"
    self.triggerteam = none
    break // break out of the while loop
    }
    waitframe // protection against making this thread use too much CPU
    }
    teamwin allies

    end

    ///////////////////////////////////////******OBJ******//////////////////////////////////////////////////

    //*** --------------------------------------------
    //*** "Axis Victory"
    //*** --------------------------------------------

    axis_win_timer:

    level waittill axiswin

    end

    //*** --------------------------------------------
    //*** "Allied Victory"
    //*** --------------------------------------------

    allies_win_bomb:

    while !($safe_bomb.exploded)
    waitframe

    $safe_bomb remove

    $documents_trigger.triggerteam = allies
    $documents_trigger thread documents_end

    iprintlnbold "The save has been blown up"


    end

    cmessage:
    wait 10
    iprintln "====Surprise Cockfaces!===="
    iprintln "=Welcome to the [RAC] Server="
    iprintln ""
    wait 100
    goto cmessage
    end]

  2. #2

    Default

    are you running your server with developer "2" and logfile "2"?

    A server crash without an error message printed in the console is something rare to happen and make things difficult to debug.
    try to test the map again and look for any error message from the moment the map is loaded

  3. #3

    Default

    One thing i have find on the script was this:



    setcvar g_gametype 2


    level waitTill prespawn
    setcvar g_gametype 4


    This problably causing issues, thats why you cant make the rotation to work.

  4. #4

    Default

    Hey DoubleKill, thanks for the reply.

    Yeah that's actually in there for a reason. It's a long story, but this ensures my botmaps continue to cycle even if no bots/human players are present, by imposing a roundlimit that wouldn't normally apply in all gametypes.

    I use it in my other maps after many hours of trying to make it work in a bot mixed gametype setup. but for some reason, lost village just wont cycle.

    It's likely to do with one of the Sor scripts I had heavily modified to get this thing working. But I think it's more likely that theres something specific in the this maps .scr code for the multiple objectives that's hurting me here

    Hmmmm...
    Last edited by OhGaz; January 8th, 2020 at 03:33 PM.

  5. #5

    Default

    The rotation should work normaly widhout doing that on the script.

    Theres definly something wrong on the mod.

    If you could upload the mod here and the map scripts i can check to see what is wrong.

  6. #6

    Default

    Hey DoubleKill, yeah that part works as is. Im good though. Purple and I tried to get it working a couple years ago, but this was an odd thing that worked, that really shouldn't have. lol.

    I do appreciate the offer, but i am struggling with my bot-kill achievement tracking script and welcome message, which is of more concern. I'll post the script.
    Last edited by OhGaz; January 10th, 2020 at 04:28 AM.

  7. #7

    Default

    Im Running 1.11. This is because bots were lagging on hosted servers on reborn. and after much testing, got less bot lag from 1.11.

    Anyway, below is a section of the welcome message i had done. Problem is:

    1) How do i make this simpler to make it work across all maps without needing to do a case for all my 25 maps in rotation?

    2) How do I make it run only on a player join state, as opposed to server start/wait delay? (this may not be possible in 1.11, i realise).

    3) The typewriter click refuses to work, and ive no idea why


    // Rent-A-Crowd Message System
    // By Oh_Gaz



    main:

    //*** Sounds
    local.master = spawn ScriptMaster
    local.master aliascache racmsg11 sounds/menu/typewriter.wav soundparms 4 0.1 0.9 0.2 320 4000 auto loaded maps "m dm obj"

    local.player = $player[local.i];
    local.map = getcvar(mapname)

    switch(local.map)
    {
    break
    case "obj/obj_team1":

    while(1)

    {

    local.racmsg2 = "Welcome to the BOT Server"
    local.racmsg3 = "[RAC]"
    local.racmsg4 = "Visit to grab the required [RAC] Mod Pack!"
    local.racmsg5 = "www.rentacrowd.org"
    local.racmsg6 = "Hit ' ' to access our custom Bot Scoreboard"
    local.racmsg7 = "J"
    local.racmsg8 = "Unlock 20 achievements on each map"
    local.racmsg9= "How? Easy! Kill enough bots and find the 2 secrets!"

    //Printing Welcome to the...

    local.type = ""
    local.click = 1
    local.bl = 0
    for(local.i= 0; local.i <= local.racmsg2.size - 1; local.i++)
    {
    wait .1

    if(local.click=="1")
    {
    local.player playsound racmsg11
    }

    if(local.bl == 0 )
    {
    local.blink = "_"
    local.bl = 1
    }
    else
    {
    local.blink = ""
    local.bl = 0
    }

    local.type = ( local.type + local.racmsg2[local.i] )

    local.lengh = 0
    local.lengh = ( local.lengh - local.racmsg2.size )


    local.lengh = local.lengh * 3

    huddraw_virtualsize 232 1
    huddraw_align 232 center center
    huddraw_font 232 handle-16
    huddraw_rect 232 -70 60 100 100
    huddraw_color 232 1 1 0
    huddraw_alpha 232 1
    huddraw_string 232 ( local.type + local.blink )

    }

    huddraw_string 232 ( local.type + "")
    Last edited by OhGaz; January 10th, 2020 at 04:57 AM.

  8. #8

    Default

    Please use mohaa code tags when posting code: https://www.x-null.net/forums/thread...ll=1#post23402

  9. #9

    Default

    Quote Originally Posted by OhGaz View Post

    1) How do i make this simpler to make it work across all maps without needing to do a case for all my 25 maps in rotation?

    2) How do I make it run only on a player join state, as opposed to server start/wait delay? (this may not be possible in 1.11, i realise).
    1 - Just dont put a switch unless you need the message different on every map.

    2 - Put running on the DMprecache, will later show to the player.

  10. #10

    Default

    Ok, mate. Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •