Zum Inhalt wechseln


Foto

Replacing a vehicle in one of the fire stations


  • Please log in to reply
255 replies to this topic

#1 Hoppah

Hoppah

    Boss cat

  • Administrators
  • 3.879 Beiträge:
  • Gender:Male
  • Location:Special Needs Department

Geschrieben 23 Juni 2009 - 05:30

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.

#2 jab16

jab16

    Battalion Chief

  • Members
  • 942 Beiträge:
  • Gender:Male
  • Location:Austin,TX
  • Interests:Emergency 3 and 4
    History
    Military Strategy
    Project Reality (BF2)

Geschrieben 23 Juni 2009 - 05:47

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


:12:
I was there when Pyrothijs deleted Hoppah's weed cat photo!!!!!
Posted Image
Posted Image
If you love playling as police, fire, or ems come join http://ertrpg.forumotion.ca/forum.htm the online text roleplaying game.

#3 Hoppah

Hoppah

    Boss cat

  • Administrators
  • 3.879 Beiträge:
  • Gender:Male
  • Location:Special Needs Department

Geschrieben 23 Juni 2009 - 05:57

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:

#4 Agentchung

Agentchung

    Lieutenant

  • Members
  • 85 Beiträge:
  • Gender:Male

Geschrieben 23 Juni 2009 - 11:17

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!

#5 saxguitar

saxguitar

    Captain

  • Members
  • 137 Beiträge:

Geschrieben 22 Juli 2009 - 11:32

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

#6 Pearl71

Pearl71

    Captain

  • Members
  • 161 Beiträge:
  • Gender:Male
  • Location:Lock Haven, PA
  • Interests:firefighting, ems, rapelling, airsoft, computers, tv, college football, fishing, hunting.

Geschrieben 23 Juli 2009 - 12:16

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.
Posted Image
Posted Image

#7 saxguitar

saxguitar

    Captain

  • Members
  • 137 Beiträge:

Geschrieben 02 August 2009 - 07:38

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

#8 EldoradoMan

EldoradoMan

    Captain

  • Members
  • 139 Beiträge:
  • Gender:Male
  • Location:Rochester, Minnesota, USA
  • Interests:emergency vehicles, cars and trucks, trains, construction and farm equipment, auto trader magazines, Pokemon, GTA, Playstation's

Geschrieben 07 August 2009 - 12:29

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?
Posted Image\

#9 Agentchung

Agentchung

    Lieutenant

  • Members
  • 85 Beiträge:
  • Gender:Male

Geschrieben 07 August 2009 - 01:29

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.

#10 EldoradoMan

EldoradoMan

    Captain

  • Members
  • 139 Beiträge:
  • Gender:Male
  • Location:Rochester, Minnesota, USA
  • Interests:emergency vehicles, cars and trucks, trains, construction and farm equipment, auto trader magazines, Pokemon, GTA, Playstation's

Geschrieben 07 August 2009 - 02:46

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.
Posted Image\

#11 Agentchung

Agentchung

    Lieutenant

  • Members
  • 85 Beiträge:
  • Gender:Male

Geschrieben 07 August 2009 - 05:34

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?

#12 EldoradoMan

EldoradoMan

    Captain

  • Members
  • 139 Beiträge:
  • Gender:Male
  • Location:Rochester, Minnesota, USA
  • Interests:emergency vehicles, cars and trucks, trains, construction and farm equipment, auto trader magazines, Pokemon, GTA, Playstation's

Geschrieben 08 August 2009 - 02:03

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.
Posted Image\

#13 Guest_Zack_*

Guest_Zack_*
  • Guests

Geschrieben 11 August 2009 - 04:12

Are there any numbers for scuba geared firefighter?

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

#14 Agentchung

Agentchung

    Lieutenant

  • Members
  • 85 Beiträge:
  • Gender:Male

Geschrieben 11 August 2009 - 04:19

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.

#15 Guest_Zack_*

Guest_Zack_*
  • Guests

Geschrieben 12 August 2009 - 04:23

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

#16 Guest_Zack_*

Guest_Zack_*
  • Guests

Geschrieben 12 August 2009 - 05:43

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

#17 EldoradoMan

EldoradoMan

    Captain

  • Members
  • 139 Beiträge:
  • Gender:Male
  • Location:Rochester, Minnesota, USA
  • Interests:emergency vehicles, cars and trucks, trains, construction and farm equipment, auto trader magazines, Pokemon, GTA, Playstation's

Geschrieben 21 August 2009 - 05:15

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?
Posted Image\

#18 SleepyLizard

SleepyLizard

    Captain

  • Members
  • 205 Beiträge:
  • Gender:Male
  • Location:The eye of the storm

Geschrieben 14 September 2009 - 10:37

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!*
"The internet makes it possible to obtain any information known to man within seconds but we'd rather just update our facebooks."

#19 JediHutch61

JediHutch61

    Captain

  • Members
  • 166 Beiträge:
  • Gender:Male
  • Location:Columbus, OH

Geschrieben 01 Oktober 2009 - 01:34

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.
url=http://forum.emergency-planet.com/index.php?showtopic=5322]Posted Image[/url]
Posted Image
Posted Image

#20 Guest_PFC-RomesburgArmy_*

Guest_PFC-RomesburgArmy_*
  • Guests

Geschrieben 01 Oktober 2009 - 03:15

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.