Jump to content
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
  • Announcements

    • randomperson139

      Signatures   03/04/2016

      Hi everyone. It appears that the update to the new forum has affected the format of the majority of signatures (adding extra spaces, changing sizes etc.). Due to this, could everyone please check their own signature, ensuring that it complies with the site rules. See the http://www.emergency-planet.com/tos.html/ or http://www.emergency-planet.com/topic/16848-acceptable-signature-sizes/ for more information.  We'll give it a few weeks to give enough time to edit signatures, after that the unnecessarily large signatures will simply be removed. Thanks for your cooperation. Regards, EMP Staff.
Sign in to follow this  
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.

Share this post


Link to post
Share on other sites

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

:12:

Share this post


Link to post
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:

Share this post


Link to post
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!

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Guest Zack

Are there any numbers for scuba geared firefighter?

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Guest Zack
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

Share this post


Link to post
Share on other sites
Guest Zack
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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

ive somehow by accident done something that has made the Firefighters cost about 1.000 to spawn 1 at the fire station, where would i change this?!?! It hasnt happened ot the firefirghters with the breathing gear tho, its very odd, i cant think wot i did wrong!! *EDIT, FiXED PROBLEM!*

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×