Jump to content
Hoppah

Replacing a vehicle in one of the fire stations

Recommended Posts

Because it's one of the most asked questions on the forum I made a list of what files have to be changed when you want to replace a vehicle in one of the fire stations. This includes changing the command to call it from the fire station.

It's impossible to explain every detail in the script, so some scripting knowledge might be handy.

It's NOT adviced to make any changes to the (bays of the) engine's and ambulances, because they have a far more advanced script logic. Patience is required to do this.

Lets say you want to replace the USAR squad with the Watertender, because they have about the same size and only one of them can be parked in the bay.

-------------------------------------------------------------------------------------

Files which are necessary to change:

LAFireStationStart.script (to spawn the vehicle at start)

LAFireStation.script (for crew and gate information at fire station)

LAToFireStation.script (park command)

LABattalionChief.script (call command)

Other:

Adding the "Go to fire station" command to the new vehicle

Removing the "Go to fire station" command to the replaced vehicle

-------------------------------------------------------------------------------------

LAFireStationStart.script

First thing you can try is to let it spawn at the right spot with crew when you start a new game. LAFireStationStart.script does nothing more than that. Some analizing of LAFireStationStart.script reveals that the prototype of the USAR squad is mentioned in line 23. Changing that prototype to any other prototype is enough to spawn another object. in this case "water_tender.e4p".

You don't need to change the constants or anything else. Same thing counts for other things explained later.

When you further look for USAR, you should eventually find line 230 which should say

ActorList l12 = Game::GetActors(VO_USAR);

The lines below are important. They set number of passengers (and sometimes transports), speed and the crew that enters the vehicle at start. Notice the numer that is used in the crew line. The code of that line refers to another script and calls a single unit for that vehicle. The numbers refer to the certain unit (USAR firefighter in this case).

List of possible units:

1 = FF/PM with case

2 = FF/PM's with stretcher

3 = FF/EMT

4 = Battalion Chief

5 = FF HAZMAT

6 = USAR FF

7 = FF/EMT's with stretcher

-------------------------------------------------------------------------------------

Important tips: You can do millions of things with C++, it's impossible to explain everything, just compare your code with other codes in the scripts. For example: When you want to add 4 firefighters instead of 2 just look at other parts in the script. Besides that, testing is very important. If you fail first time, please try it again before going to the forum. And remember kids, it's like sex, you don't immediatly run to mommy and daddy when you can't get it up at your first date.

That's it for now. I hope most people understand this. When I have more time I will see if I can explain the other scripts.

  • Upvote 1
Link to comment
Share on other sites

Thank you hoppah i know lots of people will use this ;)

:12:

We'll see. I am worried that people change more than is necessary and f*ck up their scripts.

If that's going to happen too much, this topic will be closed again before you would even notice it. :)

It all starts with simple edits. :12:

Link to comment
Share on other sites

We'll see. I am worried that people change more than is necessary and f*ck up their scripts.

If that's going to happen too much, this topic will be closed again before you would even notice it. :)

It all starts with simple edits. :12:

Thanks Hoppah for this little tutorial. It has really helped. However, i'm having a minor problem with the Battalion Chief dispatching units. I was wondering if you, or another forum member may be able to help me.

The current changes that I have made are:

- Switching the HAZMAT unit in LAFD Station 2 out for a HES

- Switching the USAR unit out for a Water Tender in LAFD Station 1

In addition, I have also switched the manning of the units so that the:

- HES has 2 USAR FFs and 2 Paramedics/FFs

- Water Tender has 2 paramedic/FFs and 2 FFs/EMTs

- Battalion Chief has a chief and a paramedic/FF

- Aerial has 2 paramedic/FFs and 2 FFs/EMTs

Everything has been working smoothly except for one thing with the battalion chief. When I use the battalion chief to dispatch a Water tender (using the call USAR button), it doesn't work. It always says USAR bought for $3500. Even though my water tender is available. The unit that comes from HQ (which i bought for $3500) is also a water tender, but it is staffed with 2 USAR FFs

When I use my BC to dispatch my HES (using the call HAZMAT button), everything works fine. It's just the call water tender (usar) is the only thing i'm having problems with.

Hopefully I explained this properly... If you have any questions or if you don't get something, please reply back and I will try and explain it again.

Thanks in advance for the help!

Link to comment
Share on other sites

What do I need to do to change the hazmat to the 1.4 LEV???

at the top of thepost, folow those instructions, change those files(unless u want to still be able to call the Hazmat unit from the BC, Then leaeve that script alone) just search for the Hazmat and change those files, be sure to keep the virtuial objects the same or you'll get an error, i also did this and it works fine, i donno if iam alloud to upload my scripts, if iam i could do that tonight for u , i have the additional vehicles submod and Xplorer's EMS SUV submod, also the Lifeguard, i donno if that would effect your gameplay or not.

Link to comment
Share on other sites

at the top of thepost, folow those instructions, change those files(unless u want to still be able to call the Hazmat unit from the BC, Then leaeve that script alone) just search for the Hazmat and change those files, be sure to keep the virtuial objects the same or you'll get an error, i also did this and it works fine, i donno if iam alloud to upload my scripts, if iam i could do that tonight for u , i have the additional vehicles submod and Xplorer's EMS SUV submod, also the Lifeguard, i donno if that would effect your gameplay or not.

Could you possibly send me the script through a private message if allowed please??

B/C I tried it again and it still is not working for me

Link to comment
Share on other sites

Because it's one of the most asked questions on the forum I made a list of what files have to be changed when you want to replace a vehicle in one of the fire stations. This includes changing the command to call it from the fire station.

It's impossible to explain every detail in the script, so some scripting knowledge might be handy.

It's NOT adviced to make any changes to the (bays of the) engine's and ambulances, because they have a far more advanced script logic. Patience is required to do this.

Lets say you want to replace the USAR squad with the Watertender, because they have about the same size and only one of them can be parked in the bay.

-------------------------------------------------------------------------------------

Files which are necessary to change:

LAFireStationStart.script (to spawn the vehicle at start)

LAFireStation.script (for crew and gate information at fire station)

LAToFireStation.script (park command)

LABattalionChief.script (call command)

Other:

Adding the "Go to fire station" command to the new vehicle

Removing the "Go to fire station" command to the replaced vehicle

-------------------------------------------------------------------------------------

LAFireStationStart.script

First thing you can try is to let it spawn at the right spot with crew when you start a new game. LAFireStationStart.script does nothing more than that. Some analizing of LAFireStationStart.script reveals that the prototype of the USAR squad is mentioned in line 23. Changing that prototype to any other prototype is enough to spawn another object. in this case "water_tender.e4p".

You don't need to change the constants or anything else. Same thing counts for other things explained later.

When you further look for USAR, you should eventually find line 230 which should say

ActorList l12 = Game::GetActors(VO_USAR);

The lines below are important. They set number of passengers (and sometimes transports), speed and the crew that enters the vehicle at start. Notice the numer that is used in the crew line. The code of that line refers to another script and calls a single unit for that vehicle. The numbers refer to the certain unit (USAR firefighter in this case).

List of possible units:

1 = FF/PM with case

2 = FF/PM's with stretcher

3 = FF/EMT

4 = Battalion Chief

5 = FF HAZMAT

6 = USAR FF

7 = FF/EMT's with stretcher

-------------------------------------------------------------------------------------

Important tips: You can do millions of things with C++, it's impossible to explain everything, just compare your code with other codes in the scripts. For example: When you want to add 4 firefighters instead of 2 just look at other parts in the script. Besides that, testing is very important. If you fail first time, please try it again before going to the forum. And remember kids, it's like sex, you don't immediatly run to mommy and daddy when you can't get it up at your first date.

That's it for now. I hope most people understand this. When I have more time I will see if I can explain the other scripts.

Whats the folder called that I do this editing?

Link to comment
Share on other sites

Whats the folder called that I do this editing?

Wizardworks or Sixteentons --> 911:First Responders or Emergency 4 --> Mods --> Los Angeles Mod 1.8 --> Scripts --> Game --> Command

The files should be under the the Command folder. You'll probably need to edit the LAFireStationStart, LAFireStation and LAtoFireStation scripts.

Link to comment
Share on other sites

Wizardworks or Sixteentons --> 911:First Responders or Emergency 4 --> Mods --> Los Angeles Mod 1.8 --> Scripts --> Game --> Command

The files should be under the the Command folder. You'll probably need to edit the LAFireStationStart, LAFireStation and LAtoFireStation scripts.

I opened 911: FR folder, but I don't see a mods folder to open.

Link to comment
Share on other sites

I opened 911: FR folder, but I don't see a mods folder to open.

There isn't anything under the DATA folder and above the atari file? Hmm... that's odd. are you sure you followed the exact path I stated? going into your C drive, then program files?

Try downloading the Mod again? I know that isn't the solution for everything, but maybe it was somehow deleted?

Link to comment
Share on other sites

There isn't anything under the DATA folder and above the atari file? Hmm... that's odd. are you sure you followed the exact path I stated? going into your C drive, then program files?

Try downloading the Mod again? I know that isn't the solution for everything, but maybe it was somehow deleted?

I tried downloading it again, and after I open the LA Mod folder it shows the manual, the actually mod to install into the game and the readme booklet.

Link to comment
Share on other sites

Are there any numbers for scuba geared firefighter?

or is scuba gear even allowed before the firefighters run to the truck?

Not sure... I don't think so though. Try experimenting with different numbers like 8 and 9? You can always just call them with the control panel and put them in the trucks.

Link to comment
Share on other sites

Not sure... I don't think so though. Try experimenting with different numbers like 8 and 9? You can always just call them with the control panel and put them in the trucks.

tnxs for the reply

I was calling firefighters with scuba gear from the fire house, and also equip the scuba gear at the fire.

just wondering if there is a quickers way, ill try editing more numbers in the script:)

agian tnxs for the feedback

Link to comment
Share on other sites

tnxs for the reply

I was calling firefighters with scuba gear from the fire house, and also equip the scuba gear at the fire.

just wondering if there is a quickers way, ill try editing more numbers in the script:)

agian tnxs for the feedback

Well I edited LAFireStation script and scuba gear works

3/4 the way down you will see

PersonList passengers = v.GetPassengers();
if (ChildID == 1)
{
Person p = Game::CreatePerson(OBJ_PM, UNNAMED);
p.SetEquipment(EQUIP_EMERGENCY_CASE);
}
else if (ChildID == 2)
Person p = Game::CreatePerson(OBJ_PM_STRETCHER, UNNAMED);
else if (ChildID == 3)
Person p = Game::CreatePerson(OBJ_EMT, UNNAMED);
else if (ChildID == 4)
Person p = Game::CreatePerson(OBJ_CHIEF, UNNAMED);
else if (ChildID == 5)
Person p = Game::CreatePerson(OBJ_HAZMAT, UNNAMED);
else if (ChildID == 6)
Person p = Game::CreatePerson(OBJ_USARFF, UNNAMED);
else if (ChildID == 7)
Person p = Game::CreatePerson(OBJ_EMT_STRETCHER, UNNAMED);

else

I added

                 else if (ChildID == 8)
Person p = Game::CreatePerson(OBJ_EMT_SCBA, UNNAMED);
else if (ChildID == 9)
{
Person p = Game::CreatePerson(OBJ_PM_SCBA, UNNAMED);
p.SetEquipment(EQUIP_EMERGENCY_CASE);
}

it should look like this

PersonList passengers = v.GetPassengers();
if (ChildID == 1)
{
Person p = Game::CreatePerson(OBJ_PM, UNNAMED);
p.SetEquipment(EQUIP_EMERGENCY_CASE);
}
else if (ChildID == 2)
Person p = Game::CreatePerson(OBJ_PM_STRETCHER, UNNAMED);
else if (ChildID == 3)
Person p = Game::CreatePerson(OBJ_EMT, UNNAMED);
else if (ChildID == 4)
Person p = Game::CreatePerson(OBJ_CHIEF, UNNAMED);
else if (ChildID == 5)
Person p = Game::CreatePerson(OBJ_HAZMAT, UNNAMED);
else if (ChildID == 6)
Person p = Game::CreatePerson(OBJ_USARFF, UNNAMED);
else if (ChildID == 7)
Person p = Game::CreatePerson(OBJ_EMT_STRETCHER, UNNAMED);
else if (ChildID == 8)
Person p = Game::CreatePerson(OBJ_EMT_SCBA, UNNAMED);
else if (ChildID == 9)
{
Person p = Game::CreatePerson(OBJ_PM_SCBA, UNNAMED);
p.SetEquipment(EQUIP_EMERGENCY_CASE);
}
else

now

number 8 EMT Scuba gear

number 9 EMT/PM Scuba gear

Link to comment
Share on other sites

I finally figured out how to do this. But I need help editing the scripts. It say's that Windows needs to know where I got the script in the first place. Am I doing something wrong, or is it Windows fault?

Link to comment
Share on other sites

Guest PFC-RomesburgArmy
Question is there a certain program that I need to change and save the changes. I just tried to change the FireStationStart script in Notepad and it would not save. Problem Sloved.

Ive been having the same problem so id just Save As to my documents and delete the current copy and then Cut & Paste the one i just saved but im also very new so id love to see how to do it correctly lol.

I would also like help with replacing vehicals, i managed to get the LEV in the spot of the USAR on V1.9 but i cant figure out how to get the Return To Station button to work on the LEV and removed from the USAR.

Link to comment
Share on other sites

is the bls ambulance hard coded to fs2? i tried to add it to fs1 and it keeps going to fs2. i have edited the fsstart, fs and tofs scripts and it is still not working. any advice?

- Jon

It's not hard coded, but it is scripted. I think the BLS ambulance is scripted to look for a certain virtual object or path (I'm not at my own PC right now, can't check it). That VO or path is probably in fire station 2. If you move that to FS1, there should be no problem.

Link to comment
Share on other sites

Question is there a certain program that I need to change and save the changes. I just tried to change the FireStationStart script in Notepad and it would not save. Problem Sloved.

No theres not a certain program you need, but I do suggest Notepad2 as it is designed with editing php and c++ in mind. It will help identify missing brackets( the { and } symbols) by marking them in red which will show you where it counter part bracket is as every { will need a }.

The root of your problem is actually the UAC(User Account Control) in Vista and Windows 7. It protects anything located in the program file folder. Im on windows 7 but the process should be very similar on Vista. Go to Start menu. In the search box type msconfig. Do not touch anything in here if you have no clue what your doing. Now go to the Tools tab. Look through the list for something mentioning UAC. Click the launch button and disable UAC. Now you can edit the script directly.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...