Jump to content

The Loot

Members
  • Posts

    762
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by The Loot

  1. The lights and patterns itself will not affect the pc's performance,it's only when you start adding a whole bunch of poly and radiation that you will start to notice your system lag in older computers.

    You just have to be smart and plan what units you need in play if you have an older pc.

    Most of the issues I noticed were in YSB's version of Xplorer's submod. The culprits were the LED versions of the ambulance and the ALS/BLS engines. I copied over the non-LED lights and that cut out pretty much all of the lag, plus I removed a lot of radiation effects from most of the vehicles that I thought were unnecessary. The Manhattan Mod also caused lag with its lights, but I stopped playing it mostly for the differences in gameplay between it and LA.

    I've got a i7 6-core on my main machine, but the GFX card in it is pretty sub-standard by today's cards. Since getting a new one also involves getting a new PSU, I haven't made the effort to replace it yet.

    I've often wondered about this problem with users who have slower systems. Fortunately, I have had always had good systems but not everyone is so fortunate. While flash patterns are in many cases the crux of the desired realism, I hope they strike a good balance for cross-system playability.

    As long as all the lights on the vehicle flash, and there's at least a minimum amount of radiation effects for the biggest lights, I'm content with that. Tons of radiation effects and light cones, and extremely active patterns like the LED vehicles I mentioned don't really fill a need for me.

  2. Currently using YSB's version of Xplorer's LA submod, and I'm trying to change a few things like the title says.

    First, I'm looking to call the Foam Tender at FS2, plus the Brush Truck, I'd also like to add commands for the Swift Water Rescue, Heavy Rescue Crane, and the Heavy Equipment Squad. I'm hoping it's somewhat along the lines of copy-pasting other call lines and changing the vehicle type, but I'm not holding my breath. Any help would be appreciated.

    Update 1: For the SWR, I've copied the LRA script, changed every instance of the LRA to SWR, added "const char" values for SWR to the lists at the top of the script.

    const char HINT_NOSWR[] = "No Swift Water Rescue squad available!";

    const char VO_SWR[] = "fs_swr";

    const char OBJ_SWR[] = "mod:Prototypes/Vehicles/02 LA Fire Department/swr_truck.e4p";

    object PcmdCallSWR : CommandScript
    {
    PcmdCallSWR()
    {
    SetIcon("callusar");
    SetCursor("callassistance");
    SetValidTargets(ACTOR_FLOOR | ACTOR_VIRTUAL);
    SetDeselectCaller(false);
    SetSelfClickActivation(true);
    SetHighlightingEnabled(false);
    SetGroupID(CGROUP_GETEQUIPMENT);
    SetGroupLeader(true);
    }

    bool CheckPossible(GameObject *Caller)
    {
    GameObjectList SelectPer = Game::GetSelectedGameObjects();
    if (SelectPer.GetNumObjects() != 1)
    return false;

    Person p(Caller);
    if(p.IsValid() && (p.IsLinkedWithPerson() || p.IsCarryingPerson() || p.IsEquipped() || p.IsPulling() || p.GetFirehoseID()!=0 || p.GetEnteredCarID() != -1))
    return false;

    if (p.IsCurrentAction("EActionTreatPerson"))
    return false;

    if (!Caller->IsValid() || Caller->GetType() != ACTOR_PERSON)
    return false;

    return true;
    }

    bool CheckTarget(GameObject *Caller, Actor *Target, int childID)
    {
    if(!Caller->IsValid() || Caller->GetID() == Target->GetID())
    return false;

    if (Caller->GetType() != ACTOR_PERSON)
    return false;

    Person p(Caller);
    if(p.IsValid() && (p.IsLinkedWithPerson() || p.IsCarryingPerson() || p.IsEquipped() || p.IsPulling() || p.GetFirehoseID()!=0 || p.GetEnteredCarID() != -1))
    return false;

    if (p.IsCurrentAction("EActionTreatPerson"))
    return false;

    return true;
    }

    void PushActions(GameObject *Caller, Actor *Target, int ChildID)
    {
    Vector CmdPos = Game::GetCommandPos();
    Caller->PushActionTurnTo(ACTION_NEWLIST, CmdPos);
    Caller->PushActionSwitchAnim(ACTION_APPEND, "talkmike");
    Caller->PushActionWait(ACTION_APPEND, 3.5f);
    Caller->PushActionSwitchAnim(ACTION_APPEND, "idle");
    if(StrCompare(Caller->GetPrototypeFileName(), OBJ_BATTALION_CHIEF) == 0)
    Audio::PlaySample3D(SND_BATUSAR, Caller->GetPosition());
    else if(StrCompare(Caller->GetPrototypeFileName(), OBJ_EMS_CAPTAIN) == 0)
    Audio::PlaySample3D(SND_EMSUSAR, Caller->GetPosition());
    //Caller->PushActionExecuteCommand(ACTION_APPEND, "ShowMessage1", Caller, 0, false); // ///////////

    Vehicle *theCar = NULL;
    float bestCar = 0.;
    VehicleList patrolCars(VT_FIREFIGHTERS_TLF, VT_FIREFIGHTERS_TLF);
    //Caller->PushActionExecuteCommand(ACTION_APPEND, "ShowMessage2", Caller, 0, false); // //////
    //Mission::PlayHint("Num Vehicles " + patrolCars.GetNumVehicles()); // /////////////
    for (int i = 0; i < patrolCars.GetNumVehicles(); i++)
    {
    Vehicle *aCar = patrolCars.GetVehicle(i);
    //Mission::PlayHint(aCar->GetPrototypeFileName()); // /////////////
    if (StrCompare(aCar->GetPrototypeFileName(), OBJ_SWR) == 0 && aCar->GetPlayerMP() == Caller->GetPlayerMP() && !aCar->HasCommand(DUMMY_VCALLED) && (aCar->HasCommand(CMD_STANDBY_OFF) || aCar->IsCollidingWithVirtualObject(VO_SWR)))
    {
    //Caller->PushActionExecuteCommand(ACTION_APPEND, "ShowMessage4", Caller, 0, false); // //////
    float distCurrCar = Math::dist(CmdPos.x, CmdPos.y, aCar->GetPosition().x, aCar->GetPosition().y);
    if (distCurrCar < bestCar || bestCar == 0.)
    {
    theCar = aCar;
    bestCar = distCurrCar;
    }
    }
    }

    if (theCar)
    {
    //Caller->PushActionExecuteCommand(ACTION_APPEND, "ShowMessage5", Caller, 0, false); // //////
    bool VehicleCalled = false;
    if (theCar->HasCommand(CMD_STANDBY_OFF))
    {
    theCar->PushActionWait(ACTION_NEWLIST, 0.3f);
    theCar->PushActionmove(ACTION_APPEND, CmdPos);
    if (!theCar->HasCommand(DUMMY_HASSIREN) && theCar->HasCommand(CMD_AUTOSIREN_OFF) && !Input::LShiftPressed() && !Input::RShiftPressed())
    Game::ExecuteCommand(CMD_SIREN, theCar, theCar);
    if (theCar->HasCommand(CMD_STANDBY_OFF))
    {
    theCar->RemoveCommand(CMD_STANDBY_OFF);
    theCar->AssignCommand(CMD_STANDBY_ON);
    }
    if (theCar->HasCommand(CMD_WARNINGLIGHTS_OFF))
    {
    theCar->EnableBlinker(BLT_NONE);
    theCar->RemoveCommand(CMD_WARNINGLIGHTS_OFF);
    theCar->AssignCommand(CMD_WARNINGLIGHTS_ON);
    }
    if (theCar->HasCommand(CMD_FLOODLIGHTS_OFF))
    {
    theCar->EnableSpecialLights(false);
    theCar->RemoveCommand(CMD_FLOODLIGHTS_OFF);
    theCar->AssignCommand(CMD_FLOODLIGHTS_ON);
    }
    Mission::PlayHint(HINT_DISPATCHED);
    return;
    }
    else if (theCar->IsCollidingWithVirtualObject(VO_SWR))
    {
    //Caller->PushActionExecuteCommand(ACTION_APPEND, "ShowMessage6", Caller, 0, false); // //////
    GameObjectList ppc;
    Game::CollectObstaclesOnVirtualObject(VO_SWR, ppc, ACTOR_VEHICLE);
    for (int i = 0; i < ppc.GetNumObjects(); i++)
    {
    Vehicle v = ppc.GetObject(i);
    if (!v.HasCommand(DUMMY_VCALLED))
    {
    v.AssignCommand(DUMMY_VCALLED);
    VehicleCalled = true;
    }
    }
    }
    if (VehicleCalled)
    {
    if (v.IsBlueLightEnabled() && (Input::LShiftPressed() || Input::RShiftPressed()))
    v.EnableBlueLights(false);
    else if (!v.IsBlueLightEnabled() && !Input::LShiftPressed() && !Input::RShiftPressed())
    v.EnableBlueLights(true);
    PersonList passengers = v.GetPassengers();
    if (passengers.GetNumPersons() == 0)
    {
    v.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 6, false);
    v.PushActionExecuteCommand(ACTION_APPEND, DUMMY_CALLCREW, Caller, 6, false);
    v.PushActionWait(ACTION_APPEND, 13.0f);
    }
    //{
    //v.PushActionExecuteCommand(ACTION_APPEND, DUMMY_GATES, Caller, 5, false);
    //Vector Move = v.GetPosition();
    // float r[9];
    // float childr[9];
    //v.GetRotation(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8]);
    //float dx = 750.f, dy = 0.f, dz = 0.f;
    //Math::RotateVector(dx, dy, dz, r);
    //Math::EulerToMatrix(0.0f, 0.f, 0.f, childr);
    //Math::MultiplyMatrices(childr, r);
    //Move = Move + Vector(dx, dy, 0);
    //v.PushActionWait(ACTION_APPEND, 1.2f);
    //if (!v.HasCommand(DUMMY_HASSIREN) && v.HasCommand(CMD_AUTOSIREN_OFF) && !Input::LShiftPressed() && !Input::RShiftPressed())
    // v.PushActionExecuteCommand(ACTION_APPEND, CMD_SIREN, Caller, 0, false);
    //v.PushActionmove(ACTION_APPEND, Move);
    //v.PushActionExecuteCommand(ACTION_APPEND, DUMMY_GATES, Caller, 5, false);
    //v.PushActionExecuteCommand(ACTION_APPEND, DUMMY_VCALLED, Caller, 0, false);
    //.PushActionmove(ACTION_APPEND, CmdPos);
    //} else

    if (!v.HasCommand(DUMMY_HASSIREN) && v.HasCommand(CMD_AUTOSIREN_OFF) && !Input::LShiftPressed() && !Input::RShiftPressed())
    v.PushActionExecuteCommand(ACTION_APPEND, CMD_SIREN, Caller, 0, false);
    v.PushActionExecuteCommand(ACTION_APPEND, DUMMY_VCALLED, Caller, 0, false);
    v.PushActionmove(ACTION_APPEND, CmdPos);

    if (v.HasCommand(CMD_STANDBY_OFF))
    {
    v.RemoveCommand(CMD_STANDBY_OFF);
    v.AssignCommand(CMD_STANDBY_ON);
    }
    if (v.HasCommand(CMD_WARNINGLIGHTS_OFF))
    {
    v.EnableBlinker(BLT_NONE);
    v.RemoveCommand(CMD_WARNINGLIGHTS_OFF);
    v.AssignCommand(CMD_WARNINGLIGHTS_ON);
    }
    if (v.HasCommand(CMD_FLOODLIGHTS_OFF))
    {
    v.EnableSpecialLights(false);
    v.RemoveCommand(CMD_FLOODLIGHTS_OFF);
    v.AssignCommand(CMD_FLOODLIGHTS_ON);
    }
    Mission::PlayHint(HINT_DISPATCHED);
    return;
    }
    }
    Vector Spawn;
    Vector Rotate;
    ActorList l1 = Game::GetActors(VO_SPAWN_ALL);
    ActorList l2 = Game::GetActors(VO_SPAWN_FD);
    ActorList l3 = Game::GetActors(VO_SPAWN_ALLR);
    ActorList l4 = Game::GetActors(VO_SPAWN_FDR);
    if(l1.GetNumActors() > 0)
    {
    Spawn = l1.GetActor(0)->GetPosition();
    Rotate = l3.GetActor(0)->GetPosition();
    }
    else if(l2.GetNumActors() > 0)
    {
    Spawn = l2.GetActor(0)->GetPosition();
    Rotate = l4.GetActor(0)->GetPosition();
    }
    else
    {
    Mission::PlayHint(HINT_NOSWR);
    return;
    }
    System::Log("Buy Rescue 7");
    int Money = Mission::GetMoneyLeft();
    if 1 //(Money <= 600)
    {
    Mission::PlayHint(HINT_NOSWR);
    return;
    }
    int NewMoney = Money - 600;
    Mission::SetMoney(NewMoney);
    Vehicle n;
    Person p1;
    Person p2;
    n = Game::CreateVehicle(OBJ_RESCUE7, UNNAMED);
    n.SetSpeed(9.0f);
    p1 = Game::CreatePerson(OBJ_PM, UNNAMED);
    p2 = Game::CreatePerson(OBJ_PM, UNNAMED);
    n.SetPlayerMP(Caller->GetPlayerMP());
    p1.SetPlayerMP(Caller->GetPlayerMP());
    p2.SetPlayerMP(Caller->GetPlayerMP());
    p1.SetUpgradeLevel(3);
    p2.SetUpgradeLevel(3);
    n.SetMaxPassengers(5);
    n.SetMaxTransports(2);
    n.AddPassenger(&p1);
    n.AddPassenger(&p2);
    n.SetPosition(Spawn);
    n.UpdatePlacement();
    n.Hide();
    n.PushActionTurnTo(ACTION_NEWLIST, Rotate);
    n.PushActionWait(ACTION_APPEND, 2.5f);
    n.PushActionShowHide(ACTION_APPEND, false);
    n.PushActionmove(ACTION_APPEND, CmdPos);
    if (Game::IsMission())
    n.RemoveCommand("VcmdToFireStation");

    if (!n.HasCommand(DUMMY_HASSIREN) && n.HasCommand(CMD_AUTOSIREN_OFF) && !Input::LShiftPressed() && !Input::RShiftPressed())
    Game::ExecuteCommand(CMD_SIREN, &n, &n);

    Mission::PlayHint(HINT_USARBOUGHT);
    }
    };

    Update 2: The command shows up to be added in the editor, but in-game it has the command name is CMDCALLSWR, and though it shows the not availible message at the top of the screen, it's not working in game. Also, it messes up the Paramedic Captain's commands and ends up overlapping his "Get Equipment" icon. That may just be when I added the command in his list, but I had moved it to with the other call commands.

    If I can get this one to work correctly, setting up the others shouldn't be hard at all. I'm not sure where things are going wrong, so I'm stuck.

  3. Not sure if anyone else mentioned this, but on 2.0.2, I'm getting a script error trying to send Battalion 8 to quarters.

    ?(_LAToFireStationac283): Error: Symbol FirstPoint is not defined in current scope
    ?(_LAToFireStationac283): FILE:mod:/scripts/game/command/LAToFireStation.scriptac283 LINE:607
    ?(_LAToFireStationac283): !!!Dictionary position rewound...
    ?(_LAToFireStationac283): !!!Error recovered!!!

  4. Not sure if the future of the Emergency series should be "game" or "simulation".

    The way E4 is works quite well, but some more depth would be appreciated.

    That's a double edged sword, personally I would like to see it because it would make the game more interesting. Perhaps a happy medium needs to be reached, with a toggle switch in the options for that feature

    Maybe have two options: the need to connect an engine to a hydrant for an endless supply of water, or using a dedicated water truck for when hydrants aren't nearby. If they can make it work right it'd be a nice additional layer.

  5. Currently using YSB's version of Xplorer's LA submod, and I'm trying to change a few things like the title says.

    First, I'm looking to make it so that the Foam Tender at FS2 responds to a request for a BLS engine. I'd also like to add commands for the Swift Water Rescue, Heavy Rescue Crane, and the Heavy Equipment Squad (all using the USAR icon and audio), plus the Brush Truck (using BLS engine icon and audio).

    I'm hoping it's somewhat along the lines of copy-pasting other call lines and changing the vehicle type, but I'm not holding my breath. Any help would be appreciated.

    Anyone?

  6. This is an amazing mod, absolutly love it, I have only had 2 little problems with it, one, is about the fire engine at the smaller station, I can not get it to return to the station, it says there is no room for it(I tried replacing it with other fire vehicles, but they didn't work either) The other problem is about the traffic lights, they seem to change too quickly sometimes so there can be huge lines of traffic, and I am not sure where the file that controls the traffic lights is, but both problems aren't really major, there not too hard to ignore. Other than, loving the mod so far!

    Those are the two issues I noticed right away. So far so good otherwise.

  7. That would be cool. I don't have that Submod. Do you know where I can find it? I don't even know how to make new ones. We need someone like a scripter who knows how to make those.

    Here is 4x4's base submod, and here is YSB's version. I prefer the way it has things set up (6 men per engine, station 2 not missing a building, vehicle differences). I changed the Large Rescue Ambulance back to not having transport slots like 4x4 had it, plus changed stretcher teams to paramedics.

    I figured out one of my ideas: ignoring patrolling cruisers for backup calls.

    Find this line:

    if (aCar->GetPlayerMP() == Caller->GetPlayerMP() && !aCar->IsCurrentAnimation("Getoff") && (aCar->HasCommand(CMD_STANDBY_OFF) || aCar->HasCommand(DUMMY_PATROL) || aCar->IsCollidingWithVirtualObject(VO_PARK01) || aCar->IsCollidingWithVirtualObject(VO_PARK02) || aCar->IsCollidingWithVirtualObject(VO_PARK03) || aCar->IsCollidingWithVirtualObject(VO_PARKLAPP01) || aCar->IsCollidingWithVirtualObject(VO_PARKLAPP02) || aCar->IsCollidingWithVirtualObject(VO_PARKLAPP03) || aCar->IsCollidingWithVirtualObject(VO_PARKLASD01) || aCar->IsCollidingWithVirtualObject(VO_PARKLASD02) || aCar->IsCollidingWithVirtualObject(VO_PARKLASD03)))

    And replace it with:

    if (aCar->GetPlayerMP() == Caller->GetPlayerMP() && !aCar->IsCurrentAnimation("Getoff") && (aCar->HasCommand(CMD_STANDBY_OFF) || aCar->IsCollidingWithVirtualObject(VO_PARK01) || aCar->IsCollidingWithVirtualObject(VO_PARK02) || aCar->IsCollidingWithVirtualObject(VO_PARK03) || aCar->IsCollidingWithVirtualObject(VO_PARKLAPP01) || aCar->IsCollidingWithVirtualObject(VO_PARKLAPP02) || aCar->IsCollidingWithVirtualObject(VO_PARKLAPP03) || aCar->IsCollidingWithVirtualObject(VO_PARKLASD01) || aCar->IsCollidingWithVirtualObject(VO_PARKLASD02) || aCar->IsCollidingWithVirtualObject(VO_PARKLASD03)))

  8. I'd definitely be interested in adding new call commands for vehicles. Using YSB's version of 4x4's submod, and I'd like to call the Swift Water Rescue, Heavy Rescue Crane, Brush Truck, Equipment Squad, and the engine out back of Station 2 (Foam Tender, I think).

    I'm also looking to make it so that calling a police car doesn't affect vehicles on patrol, if possible.

    Any help on either of these would be appreciated.

  9. Hey guys! Heres a very quick little video of something I threw together in the last hour I have been home...finally.

    I made a newer version of the stop sign. I also added one with L.E.D.s on it. Expect to see little cool things like this around the modification.

    Does it work as a 1 car stoplight?

    Uncontrolled intersections cause some headaches in the LA mod. Though I'm not sure if only having one at an intersection will be as good as just all stoplights, but it's something.

    Very nice work this is shaping up to be.

  10. I almost had it figured out, but there were a few issues.

    Now when I send an engine that used to have 4 crew back to the station with 6 crew, only 4 get out. This causes the engine to be dispatched with only a partial crew the next time it's called.

    Plus it seems that changing the type of crew in the BattalionChief script was causing a crash; it worked when I only copied lines that were already there. Moot point because of the station issue.

  11. EmergencyFan97, thanks for the tip.

    The initial crews are now what I want them. However, every time I call one using another unit, or sound the station alarm, they go back to the default setups. I've changed the "unit.xml" for each to match the FireStationstart and Firestation scripts, but that didn't help either.

    Edit: Ok, using the alarm works, but they still don't respond to unit calls with my changed crews.

    Edit: There's crew settings in the LABattalionChief script that deal with calling vehicles, that might be it. Causing a crash now...

    Bah, now when I send an engine that used to have 4 crew back to the station with 6 crew, only 4 get out. Plus it seems that changing the type of crew in the BattalionChief script was causing a crash, but at least was dispatching correctly with a new number of ones in there by default.

×
×
  • Create New...