Jump to content


Tutorial info

  • Added on: Dec 20 2010 07:20 PM
  • Date Updated: Dec 20 2010 07:24 PM
  • Views: 3803
 


* * * * *
4 Ratings

XML Changing(EN)

How you change/modify almost all of the games XML files.
codes/examples on how to do it, where to find the files.

For emergency 4

Posted by Tian318 on Dec 20 2010 07:20 PM
Welcome to the tutorial to change all the XML files from Emergency 4.

First: Why this tutorial?(from now on called "tut").
I noticed that a lot of people had major issues with one of the most easiest programming languages from the Emergency 4 games.
Time and time copy and pasting of links of where people can find the info they need can become sometimes a big annoying thing to do for the people here.
That is why i place with pleasure the link to the tut from Hoppah on how to add vehicles to the game.
The tut from Hoppah is English:
option=com_content&view=article&id=110%3Aadding-vehicles&catid=46%3Aemergency-4-modding&Itemid=35?=nl"]- Tut from Hoppah[/url]

If you have read that, and you still not been able to figure it out, or you need the other files to be modded.
Then i would invite you kindly to read the following toppic.
Read it at ease, don't rush trough it, and learn it with a bit more effort from your site.

The start:
XML is a programming language.
This means that you can modify the game with relative easy coding, to please you more.
(in my experience i found XML to be one of the most easiest languages to program into the game.
This because you can add things with almost normal human language.
The language of XML is also known for a very good database structure.(but i will not bore you with this)
i will keep this tut strict for Emergency 4.(for other apps, programs the language can differ.)

XML Files are recognizable by the "extension" they carry, For example:
.XML or .xml
If you can't see your file "extensions" then you would need to change the windows folder options;
XP Operating System:
  • in a folder
  • Extra
  • folder options
  • "Tab"; Display
  • Search for this line: "hide Extensions for known files"
  • Check the box before: "hide Extensions for known files" off.
  • Apply and close the tab.
Vista en Seven Operating System:
  • press on the keyboard on the "ALT" key in a folder.
  • Extra
  • Folder options
  • "Tab"; Display
  • Search for this line: "hide Extensions for known files"
  • Check the box before: "hide Extensions for known files" off.
  • Apply and close the tab.
If done correctly the "extensions" of the files will be visable to you now.

What do we need?
The beauty of XML is that you can edit it with no heavy editor but just a plain simple text editor would do.
Keep in mind that not all text editors would be fit to change XML files, since some editors add a lot invisible codes to it, that will make the XML file to go bust, and no longer work for the game.
Witch programs are usable then?:
  • Notepad
  • Notepad ++
  • Notepad 2
A simple editor is the best, since it is fast and clean of "hidden" codes
since every pc has the default version of notepad we will start right away by adapting simple files from the game.

BUT before we do this we will make sure that we won't damage the game beond repair.
  • Start the Emergency 4 editor
  • Can be found under: Start -> Sixteen tons Entertainment -> Emergency 4 -> Emergency 4 editor"**
  • Go to "Modifications".
  • Create a new mod
  • Give the mod a name
  • close the editor
**you could not locate your editor? hold your peace, and leave the pc on the desktop please.
To fix this we will make a shortcut on the desktop called: "Emergency 4 Editor" (without quotes)
And we will set the target to: "C:\Program Files\sixteen tons entertainment\Emergency 4\EM4.exe" -editor or: "*your installed location*\Emergency 4\EM4.exe" -editor if you have installed the game customly.
safe your work, and run the editor with this newly made shortcut.


Now we will go to this folder:
C:\Program Files\sixteen tons entertainment\Emergency 4\Data\Specs*
*default installation path.
Did you installed Emergency 4 customly:
..\Emergency 4\Data\Specs*
*the ..\ is for the driver letter and folders you have installed the game to.
(For example: D:\ or E:\ or D:\games\ or E:\games and so on and so on).


In the folder Specs we need to COPY the following files:
  • fp_params_endless.xml
  • freeplaybase.xml
  • portraits.xml
To this folder:
C:\Program Files\sixteen tons entertainment\Emergency 4\Mods\*your mod name here*\Specs*
*Default installation path.
Did you installed Emergency 4 in a custom way? then look here:
..\Emergency 4\Mods\*your mod name here*\Specs*
*the ..\ is for the driver letter and folders you have installed the game to.
(For example: D:\ or E:\ or D:\games\ or E:\games and so on and so on).



In the folder: "Specs" we will look for: "fp_params_endless.xml"(oTo edit the challenge mode get this file: "fp_params_challenge.xml")
Open this file with notepad(or another clean simple editor that has been mentioned). (Right click on the file -> Open with..).
And these lines will be the first thing you will see:
(And as luck would have it, we need these exact lines to)
<freeplayparameters>
	<MinDurationBetweenEvents value = "30.0" />
	<MaxIdleDuration value = "5.0" />
	<Seed value="0"/>
	<BuyFactor value="10.0"/>
	<SellFactor value="0.5"/>
	<GlobalEventFrequencyFactor value="1.0"/>
	<TimeSpeedFactor value="1.0"/>
	<StartBudget value="75000"/>
	<MaxBudget value="160000"/>
	<Earnings value="30000"/>
	<SquadPriceGrowth value="30.0"/>
	<MaxParkingSpace value="35" />
	<InitialEventFrequencyBoost value="100000.0"/>
	<InitialEventWaitDuration value="5.0"/>
	<starttime value="7:30"/>
Short explaination on the codes and values.
- <freeplayparameters> This line would let the game know that this is the file for the freeplay game.
- <MinDurationBetweenEvents value = "30.0" /> This is a timer variable, it shows you(and the game), the minimal time between events(on a freeplay game) the value represents minutes.
- <MaxIdleDuration value = "5.0" /> Is another time that will show you the maximum time that may pass between events. Time is in minutes
- <Seed value="0"/> The seed value is a value on what the map should "seed"(fill) the map with items(a higher value would suggest more adding on the map)
- <BuyFactor value="10.0"/> Is a Multiplyer, It takes the price out of a "Unit.xml" file And multiply's it with the value(10)(see unit.xml for more info on this line)
- <SellFactor value="0.5"/> Is a Diversion, It dictates how much money you will get back after you sell a vehicle back to the system(the 0.5 means 50%) meaning you get 50% of the buying value back when you sell the vehicle back to the game
- <GlobalEventFrequencyFactor value="1.0"/> How many times a "bigger" event should happen in the game
- <TimeSpeedFactor value="1.0"/> How fast the game timer goes(higer for faster. use 0. to lower speed)
- <StartBudget value="75000"/> Your starting game funds.
- <MaxBudget value="160000"/> The MAXIMUM{/u] amount of cash you can have to buy vehicles, send them out and hire the crews.
- <Earnings value="30000"/> How many cash you will be getting every day at 12:00
- <SquadPriceGrowth value="30.0"/> A Multiplier, Who will dictate the growing of the price when you call out multiple units(crew) to the game at the same time.
- <MaxParkingSpace value="35" /> Maximum parking spaces at your base.
- <InitialEventFrequencyBoost value="100000.0"/> A timer, Who dictates when your first event should accure
- <InitialEventWaitDuration value="5.0"/> A timer that will set the Maximum time before the first event, and between the events is allowed for the game.
- <starttime value="7:30"/> The time of the game start.


With these codes you can already make many changes to your game play.
Increase the bonus cash you get every day at 12:00. ("<Earnings value="30000"/>")
Lower the price for the squads you need to call to the map. ("<SquadPriceGrowth value="30.0"/>")
Increase your start budget. ("<StartBudget value="75000"/>") SIDE NOTE! This value can't overwrite this one: "<MaxBudget value="160000"/>" (But no fear, just increase this budget also).
Never enough space at the base to park all trucks you want?
Increase this number: ("<MaxParkingSpace value="35" />") And you can increase you vehicle fleet
With this short explanation, you can change the game already more to your liking.

So lets go quickly to the rest of the file:
<Rating>
		<!-- Schwierigkeitsgrad (je höher desto schwerer)-->
		<UpperLimitEasy value = "35.0" />
		<UpperLimitMedium value = "50.0" />
		<UpperLimitHard value = "75.0" />
		<!-- abbrechen wenn gesamtzustand im challengemode zu groß wird -->
		<ChallengeAbortRatingDifference value = "100.0" />
		<!-- Einstellungen der Punkte 
		Wenn auf 0, dann gibt es 0 Punkte wenn der gesamtzustand gleich dem UpperLimit ist.
		Bei negativen Werten gibt es mehr Punkte, bei positiven weniger Punkte -->
		<ScoreUpperLimitBonus value = "0.0" />
		<!-- UpperLimit wird bei jedem Tick um diesen Wert erhöht -->
		<TimeFactor value = "0.0" />
		<Factor name="Burning Houses" value="15.0" />
		<Factor name="Burning Objects" value="8.0" />
		<Factor name="Gangsters" value="10.0" />
		<Factor name="Injured Persons" value="8.0" />
		<Factor name="Dead Persons" value="5.0" />
		<Factor name="Contaminated Persons" value="10.0" />
	</Rating>
	<!-- score -->
	<InitialScorePerMinute value="500.0"/>
	<InnocentPersonWoundedPermanentPenalty value="75.0"/>
	<InnocentPersonKilledPermanentPenalty value="90.0"/>
	<InnocentVehicleShotPermanentPenalty value="75.0"/>
	<RegeneratePermanentPenaltyPerMinute value="0.001"/>
	<MaxScoreStepPerMinute value="1.0"/>
	
	<!-- cheat penalties -->
	<!-- penalty as soon as x spawns where blocked within the last minute -->
	<!-- <CheatPenaltyMinSpawnsBlockedPerMinute value = "1"/> -->
	<!-- more spawns blocked than max are ignored -->
	<!-- <CheatPenaltyMaxSpawnsBlockedPerMinute value = "50"/> -->
	<!-- ratio of stopped vs. moving vehicles. All move it's 0 - all traffic blocked it's 1 -->
	<CheatPenaltyMinTrafficJamRatio value = "0.5"/>
	<!-- highest value cheat penalties can reach (between 0=none and 1) -->
	<CheatPenalityScaling value = ""/>

	
	<!-- no longer used, will now be calculated using the worth values of the events
	<BurningHousePenalty Basic="75.0" PerObject="0.0"/>
	<BurningObjectPenalty Basic="50.0" PerObject="0.0"/>
	<InjuredPersonPenalty Basic="75.0" PerObject="0.0"/>
	<ContaminatedPersonPenalty Basic="50.0" PerObject="0.0"/>
	<DeadPersonPenalty Basic="90.0" PerObject="0.0"/>
	<DestroyedVehiclesPenalty Basic="30.0" PerObject="0.0"/>
	<UnarmedGangsterPenalty Basic="75.0" PerObject="0.0"/>
	<ArmedGangsterPenalty Basic="90.0" PerObject="0.0"/>
	<HostagePenalty Basic="50.0" PerObject="0.0"/>
Short explaination,
Lines like these <!-- Schwierigkeitsgrad (je höher desto schwerer)--> Are commend rules made by the creator of the script. These rules are not relevant to the game(the game will just read them, and disregard them)
In short the other lines are all Multipliers, Who will calculate based on time/health/survivors/damage the points you will earn
Increase the values to earn more points

On to the next part of the file.
<!-- misc -->
	<ContaminationRange value="10.0"/> <!-- in meter -->
	<TrainCycle value="240.0"/> <!-- in seconds -->
- <ContaminationRange value="10.0"/> <!-- in meter --> How big a Contamination range can be(In meters 1meter = 3.28feet).
- <TrainCycle value="240.0"/> <!-- in seconds --> in minutes the time that a train will run on the tracks(default 4minuten(240(sec):60(sec) =4(min))

On to the next part of the file.
(this one is shortend in, cause one event, explains all the other events).
<!-- JH -->
		<EFPEventFall>
			<Enabled value = "1" />
			<!-- AverageFrequency: average number of events per 10 minutes -->
			<AverageFrequency value = "0.6" />
			<Worth value = "4.0" />
			<SupervisorStart value = "ID_SUPERV_EVENT17" />
			<SupervisorFinish value = "" />
		</EFPEventFall>
- <EFPEventFall> Is a name to indicate that this would be the event but also what kind of event: "EFPEvent" the command to indicate to the game that this is an event, and the player should be allerted. "Fall" the type of event.(Differs per event)
- <Enabled value = "1" /> with out going in to this to deep 0 = off, 1 = on, said in human tongue: Is this event allowed to happen in the freeplay game.
- <AverageFrequency value = "0.6" /> how big is the change that this event (fall) will happen in the game every 10minutes, IF there is no other event in progress.
- <Worth value = "4.0" /> How many points the event is worth(multiplyer)
- <SupervisorStart value = "ID_SUPERV_EVENT17" /> A script to the game, to show the supervisor in the bottom right corner to play a movie with sound, telling you what is going on.
- <SupervisorFinish value = "" /> What the supervisor should say when the event is finished(the default is "" Witch would mean in this case: Take no action(No movie/sound played).
- </EFPEventFall> Closing tag of the event, without this line the game would not know when to quit the event and it will end up in a infinite loop and crash the game.
Or the event FALL what cannot happen(since the code is incorrect)
**NNOTE There are reports that is you disable a event(change 1 to 0) the game only will give you the start event, and then no events at all anymore.
If this happens you only need to change back the "<Enabled value = "1" />" back to how it was(Did you change it to 0, then change it back to 1, was the value 0 and you made it 1, then change it back to 0).
I'm currently looking for ways around this "error" in the script

Next part of the file:
<cleanup>
		<wait min="300.0" max="600.0"/>
		<choppedtree safetyradius_nopeople="8.0" safetyradius_nofire="50.0"/>
		<killedperson safetyradius="20.0"/>
		<deleteobject safetyradius="20.0"/>
		<deletewreck safetyradius="20.0"/>
		<unburnobject safetyradius="100.0"/>
		<restoreposition safetyradius_source="10.0" safetyradius_destination="10.0"/>
		<sliceablecar waitmultiplier="5"/>
	</cleanup>
Is pretty much self explaining.
With what times/factors should the map refresh/seed/clean up itself.

And the last part regards the weather of the game:
<climate initial="fair">
		<weather name="fair" changeduration="15.0" minduration="60" maxduration="180">
			<fog intensity="0.0" color="ffffff"/>
			<rain intensity="0.0"/>
			<storm intensity="0.0" speed="0.0"/>
			<flash frequencyfactor="0.0"/>
			<sound name=""/>
			<sound2 name=""/>
			
			<transition state="cloudy" weight="1.5"/>
			<transition state="misty" weight="0.7"/>
		</weather>
		<weather name="cloudy" changeduration="15.0" minduration="60" maxduration="180">
			<fog intensity="0.3" color="7F7F7F"/>
			<rain intensity="0.0"/>
			<storm intensity="0.0" speed="0.0"/>
			<flash frequencyfactor="0.0"/>
			<sound name=""/>
			<sound2 name=""/>
			
			<transition state="fair" weight="1.0"/>
			<transition state="misty" weight="0.7"/>
			<transition state="light rain" weight="1.5"/>
		</weather>
		<weather name="misty" changeduration="7.0" minduration="30" maxduration="90">
			<fog intensity="0.7" color="a0a0a0"/>
			<rain intensity="0.0"/>
			<storm intensity="0.0" speed="0.0"/>
			<flash frequencyfactor="0.0"/>
			<sound name=""/>
			<sound2 name=""/>
			
			<transition state="fair" weight="0.5"/>
			<transition state="cloudy" weight="1.0"/>
			<transition state="light rain" weight="1.0"/>
		</weather>
		<weather name="light rain" changeduration="15.0" minduration="60" maxduration="180">
			<fog intensity="0.1" color="7F7F7F"/>
			<rain intensity="0.2"/>
			<storm intensity="0.1" speed="0.1"/>
			<flash frequencyfactor="0.0"/>
			<sound name=""/>
			<sound2 name=""/>
			
			<transition state="cloudy" weight="1.0"/>
			<transition state="misty" weight="0.7"/>
			<transition state="heavy rain" weight="1.0"/>
			<transition state="thunderstorm" weight="1.5"/>
		</weather>
		<weather name="heavy rain" changeduration="15.0" minduration="60" maxduration="180">
			<fog intensity="0.3" color="7F7F7F"/>
			<rain intensity="0.5"/>
			<storm intensity="0.1" speed="0.2"/>
			<flash frequencyfactor="0.0"/>
			<sound name="mod:Audio/Ambient/rain01.wav"/>
			<sound2 name=""/>
			
			<transition state="misty" weight="0.7"/>
			<transition state="light rain" weight="1.0"/>
			<transition state="thunderstorm" weight="2.0"/>
		</weather>
		<weather name="thunderstorm" changeduration="15.0" minduration="60" maxduration="180">
			<fog intensity="0.4" color="606060"/>
			<rain intensity="1.0"/>
			<storm intensity="0.5" speed="0.4"/>
			<flash frequencyfactor="1.0"/>
			<sound name="mod:Audio/Ambient/rain02.wav"/>
			<sound2 name="mod:Audio/Ambient/thunder02.wav"/>
			
			<transition state="heavy rain" weight="1.0"/>
			<transition state="light rain" weight="1.0"/>
		</weather>
	</climate>

And it closes the code again:
</freeplayparameters>
This last line is most important, if you forget this line, and run the game, the game will give you the error:
That the game is damaged, posibly by a faulty modification to the game.
So don't forget to add that line for sure.
Only way to fix the error the game gives you, is by re-installing the game.

Right, so you could by now already change some funny/interesting parts of the game.

Freeplaybase.xml:
Let's continue by: "Changing/Modifying the car park of the game".
More info: - Tut from Hoppah
<freeplaybase>
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/nef.e4p" count="3" />		
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/rtw.e4p" count="3" />
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/rhf.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/rhc.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/itw.e4p" count="0" />

	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/rw.e4p" count="3" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/tlf.e4p" count="2" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/gtf.e4p" count="2" />			
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/dlk.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/lpf.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/dekonp.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/tfmb.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/lf.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/flb.e4p" count="0" />

	<vehicle prototype="mod:Prototypes/Vehicles/Police/stw.e4p" count="3" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/mtw.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/sw.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/phc.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/gtw.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/waw.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/getawaycar.e4p" count="0" />
	
	<vehicle prototype="mod:Prototypes/Vehicles/TEC/fgri.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/TEC/fgr.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/TEC/fgr_t.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/TEC/asf.e4p" count="3" />	
</freeplaybase>

What you see is what you get(The garage of the game with the vehicles)
This file includes the lines for the game, to let it know where the files for the cars are on the mod. as well as how many cars you have at the start of the game(Count value).
(Example)
<vehicle prototype="mod:Prototypes/Vehicles/Police/stw.e4p" count="3" />
Let me explain this one line in parts:
<vehicle Tells that it is a vehicle.
prototype= To find a prototype of a vehicle
"mod: That it needs to be in the root folder of the game mods, where this file also is.*
Prototypes/Vehicles/Police/ The location from the root where the prototype can be found
stw.e4p" Witch type of model the game should link with the line
count="3" Gives you 3 cars of this type at the start of the game
/> Is the closing tag of the line, and lets the file/game know to continue to the next model.

To add a new car you would need to have a new prototype file as well as the according .v3o(3d models) files for it, also the skin file and a folder in the unit folder.
Read more: Tut from Hoppah This tutorial tells more on it. It how ever start with the expactation that you already have got the:v3o(3d model) .e4p(prototype) .dds(skin) .xml(unit file) files And placed them on the right locations.
So we will add the new car...we need to rewrite the code, or add new code to it.
Example (Lets add a new ambulance)
<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/*new prototype*.e4p" count="3" />
We will add this line to: "freeplaybase.xml file.
And we need to add this to the right place(For your own overview, but also for game performance)
<freeplaybase>
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/nef.e4p" count="3" />		
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/rtw.e4p" count="3" />
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/rhf.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/rhc.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/itw.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/*new prototype*.e4p" count="3" />

	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/rw.e4p" count="3" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/tlf.e4p" count="2" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/gtf.e4p" count="2" />			
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/dlk.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/lpf.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/dekonp.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/tfmb.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/lf.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/flb.e4p" count="0" />

	<vehicle prototype="mod:Prototypes/Vehicles/Police/stw.e4p" count="3" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/mtw.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/sw.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/phc.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/gtw.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/waw.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/getawaycar.e4p" count="0" />
	
	<vehicle prototype="mod:Prototypes/Vehicles/TEC/fgri.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/TEC/fgr.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/TEC/fgr_t.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/TEC/asf.e4p" count="3" />	
</freeplaybase>

If you are replacing vehicles then do it like this:
<freeplaybase>
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/*new prototype*.e4p" count="3" />		
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/rtw.e4p" count="3" />
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/rhf.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/rhc.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Ambulance/itw.e4p" count="0" />

	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/rw.e4p" count="3" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/tlf.e4p" count="2" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/gtf.e4p" count="2" />			
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/dlk.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/lpf.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/dekonp.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/tfmb.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/lf.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/flb.e4p" count="0" />

	<vehicle prototype="mod:Prototypes/Vehicles/Police/stw.e4p" count="3" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/mtw.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/sw.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/phc.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/gtw.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/waw.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/Police/getawaycar.e4p" count="0" />
	
	<vehicle prototype="mod:Prototypes/Vehicles/TEC/fgri.e4p" count="1" />
	<vehicle prototype="mod:Prototypes/Vehicles/TEC/fgr.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/TEC/fgr_t.e4p" count="0" />
	<vehicle prototype="mod:Prototypes/Vehicles/TEC/asf.e4p" count="3" />	
</freeplaybase>
To add/replace police units use this line:
<vehicle prototype="mod:Prototypes/Vehicles/Police/*new prototype*.e4p" count="3" />
To add/replace the Fire Department units, use this line:
<vehicle prototype="mod:Prototypes/Vehicles/Fire Department/*new prototype*.e4p" count="3" />
To add/replace the "TEC" units, use this line::
<vehicle prototype="mod:Prototypes/Vehicles/TEC/*new prototype*.e4p" count="3" />
Safe the file, and there we go we have changed our car park in the game.
I'm assuming that you have read Tut from Hoppah And did as told there, regarding making .e4p files and placing the other correctly.
In this easy way you can modify/replace the entire car park for the game.
Follow the K.I.S.S. rule: Keep It Simple Stupid to keep things easy for your self.

portraits.xml :
<portraits>
	<!-- vehicles -->

	<portrait prototype="mod:Prototypes/Vehicles/Ambulance/nef.e4p" text="NEF" unit="NEF"/>
	<portrait prototype="mod:Prototypes/Vehicles/Ambulance/rtw.e4p" text="RTW" unit="RTW"/>
	<portrait prototype="mod:Prototypes/Vehicles/Ambulance/rhf.e4p" text="RHF" unit="RHF"/>
	<portrait prototype="mod:Prototypes/Vehicles/Ambulance/itw.e4p" text="ITW" unit="ITW"/>
	<portrait prototype="mod:Prototypes/Vehicles/Ambulance/rhc.e4p" text="RHC" unit="RHC"/>

	<portrait prototype="mod:Prototypes/Vehicles/Fire Department/rw.e4p" text="RW" unit="RW"/>
	<portrait prototype="mod:Prototypes/Vehicles/Fire Department/gtf.e4p" text="GTF" unit="GTF"/>
	<portrait prototype="mod:Prototypes/Vehicles/Fire Department/tlf.e4p" text="TLF" unit="TLF"/>
	<portrait prototype="mod:Prototypes/Vehicles/Fire Department/dlk.e4p" text="DLK" unit="DLK"/>
	<portrait prototype="mod:Prototypes/Vehicles/Fire Department/lpf.e4p" text="LPF" unit="LPF"/>
	<portrait prototype="mod:Prototypes/Vehicles/Fire Department/dekonp.e4p" text="DEKON" unit="DEKON"/>
	<portrait prototype="mod:Prototypes/Vehicles/Fire Department/fmb.e4p" text="FMB" unit="FMB"/>
	<portrait prototype="mod:Prototypes/Vehicles/Fire Department/tfmb.e4p" text="TFMB" unit="TFMB"/>
	<portrait prototype="mod:Prototypes/Vehicles/Fire Department/flb.e4p" text="FLB" unit="FLB"/>
	<portrait prototype="mod:Prototypes/Vehicles/Fire Department/lf.e4p" text="LF" unit="LF"/>

	<portrait prototype="mod:Prototypes/Vehicles/Police/stw.e4p" text="STW" unit="STW"/>
	<portrait prototype="mod:Prototypes/Vehicles/Police/mtw.e4p" text="MTW" unit="MTW"/>
	<portrait prototype="mod:Prototypes/Vehicles/Police/sw.e4p" text="SW" unit="SW"/>
	<portrait prototype="mod:Prototypes/Vehicles/Police/waw.e4p" text="WAW" unit="WAW"/>
	<portrait prototype="mod:Prototypes/Vehicles/Police/gtw.e4p" text="GTW" unit="GTW"/>
	<portrait prototype="mod:Prototypes/Vehicles/Police/phc.e4p" text="PHC" unit="PHC"/>
	<portrait prototype="mod:Prototypes/Vehicles/Police/getawaycar.e4p" text="FLIGHT" unit="FLIGHT"/>

	<portrait prototype="mod:Prototypes/Vehicles/TEC/fgri.e4p" text="EKW" unit="FGRI"/>
	<portrait prototype="mod:Prototypes/Vehicles/TEC/asf.e4p" text="ASF" unit="ASF"/>
	<portrait prototype="mod:Prototypes/Vehicles/TEC/fgr.e4p" text="FGRR" unit="FGRR"/>
	<portrait prototype="mod:Prototypes/Vehicles/TEC/fgrb.e4p" text="FGRB" unit="FGRB"/>
	<portrait prototype="mod:Prototypes/Vehicles/TEC/fgr_t.e4p" text="FGRT" unit="FGRT"/>
	<portrait prototype="mod:Prototypes/Vehicles/TEC/fgr_rb_dozer.e4p" text="RL" unit="RL"/>
	<portrait prototype="mod:Prototypes/Vehicles/TEC/fgr_rb.e4p" text="TRL" unit="TRL"/>


	<!-- persons -->
	
	<portrait prototype="mod:Prototypes/Persons/Ambulance/doctor_f.e4p" big="fem" unit="doctor" text="DOCTORF"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/doctor_m.e4p" big="male" unit="doctor" text="DOCTORM"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/doctor_upgraded_f.e4p" big="fem_up" unit="doctor" text="DOCTORF"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/doctor_upgraded_m.e4p" big="male_up" unit="doctor" text="DOCTORM"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/doctor_upgraded2_f.e4p" big="fem_up" unit="doctor" text="DOCTORF"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/doctor_upgraded2_m.e4p" big="male_up" unit="doctor" text="DOCTORM"/>

	<portrait prototype="mod:Prototypes/Persons/Ambulance/paramedic.e4p" big="norm" unit="paramedics" text="PARAMEDIC"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/paramedic_upgraded.e4p" big="up" unit="paramedics" text="PARAMEDIC"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/paramedic_upgraded2.e4p" big="up" unit="paramedics" text="PARAMEDIC"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/paramedicinjured.e4p" big="norm" unit="paramedics" text="PARAMEDIC"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/paramedic_upgradedinjured.e4p" big="up" unit="paramedics" text="PARAMEDIC"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/paramedic_upgraded2injured.e4p" big="up" unit="paramedics" text="PARAMEDIC"/>

	<portrait prototype="mod:Prototypes/Persons/Ambulance/leaderrescuedog.e4p" big="norm" unit="dog leader" text="DOGLEADER"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/leaderrescuedog_upgraded.e4p" big="up" unit="dog leader" text="DOGLEADER"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/leaderrescuedog_upgraded2.e4p" big="up" unit="dog leader" text="DOGLEADER"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/rescuedog.e4p" big="dog" unit="dog leader" text="DOG"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/leaderrescuedog.e4p_dog" big="norm_dog" unit="dog leader" text="DOGLEADER"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/leaderrescuedog_upgraded.e4p_dog" big="up_dog" unit="dog leader" text="DOGLEADER"/>
	<portrait prototype="mod:Prototypes/Persons/Ambulance/leaderrescuedog_upgraded2.e4p_dog" big="up_dog" unit="dog leader" text="DOGLEADER"/>

	<portrait prototype="mod:Prototypes/Persons/Fire Department/firefighternorm.e4p" big="norm" unit="firefighter" text="FWM"/>
	<portrait prototype="mod:Prototypes/Persons/Fire Department/firefighternorm_upgrade.e4p" big="up" unit="firefighter" text="FWM"/>
	<portrait prototype="mod:Prototypes/Persons/Fire Department/firefighternorm_upgrade2.e4p" big="up" unit="firefighter" text="FWM"/>

	<portrait prototype="mod:Prototypes/Persons/Fire Department/firefightermask.e4p" big="norm" unit="firefightermask" text="FWMA"/>
	<portrait prototype="mod:Prototypes/Persons/Fire Department/firefightermask_upgraded.e4p" big="up" unit="firefightermask" text="FWMA"/>
	<portrait prototype="mod:Prototypes/Persons/Fire Department/firefightermask_upgraded2.e4p" big="up" unit="firefightermask" text="FWMA"/>
	
	<portrait prototype="mod:Prototypes/Persons/Fire Department/firefighterabc.e4p" big="norm" unit="firefighterabc" text="FWMABC"/>
	<portrait prototype="mod:Prototypes/Persons/Fire Department/firefighterabc_upgraded.e4p" big="up" unit="firefighterabc" text="FWMABC"/>
	<portrait prototype="mod:Prototypes/Persons/Fire Department/firefighterabc_upgraded2.e4p" big="up" unit="firefighterabc" text="FWMABC"/>

	<portrait prototype="mod:Prototypes/Persons/Fire Department/diver.e4p" big="norm" unit="diver" text="DIVER"/>
	<portrait prototype="mod:Prototypes/Persons/Fire Department/diver_upgraded.e4p" big="up" unit="diver" text="DIVER"/>
	<portrait prototype="mod:Prototypes/Persons/Fire Department/diver_upgraded2.e4p" big="up" unit="diver" text="DIVER"/>

	<portrait prototype="mod:Prototypes/Persons/Police/policeman_m.e4p" big="male" unit="policeman" text="POLICEM"/>
	<portrait prototype="mod:Prototypes/Persons/Police/policeman_upgraded_m.e4p" big="male_up" unit="policeman" text="POLICEM"/>
	<portrait prototype="mod:Prototypes/Persons/Police/policeman_upgraded2_m.e4p" big="male_up" unit="policeman" text="POLICEM"/>
	<portrait prototype="mod:Prototypes/Persons/Police/policeman_f.e4p" big="fem" unit="policeman" text="POLICEF"/>
	<portrait prototype="mod:Prototypes/Persons/Police/policeman_upgraded_f.e4p" big="fem_up" unit="policeman" text="POLICEF"/>
	<portrait prototype="mod:Prototypes/Persons/Police/policeman_upgraded2_f.e4p" big="fem_up" unit="policeman" text="POLICEF"/>

	<portrait prototype="mod:Prototypes/Persons/Police/shooter.e4p" big="norm" unit="shooter" text="SHOOTER"/>
	<portrait prototype="mod:Prototypes/Persons/Police/shooter_upgraded.e4p" big="up" unit="shooter" text="SHOOTER"/>
	<portrait prototype="mod:Prototypes/Persons/Police/shooter_upgraded2.e4p" big="up" unit="shooter" text="SHOOTER"/>

	<portrait prototype="mod:Prototypes/Persons/Police/sharpshooter.e4p" big="norm" unit="sharp shooter" text="SHARPSHOOTER"/>
	<portrait prototype="mod:Prototypes/Persons/Police/sharpshooter_upgraded.e4p" big="up" unit="sharp shooter" text="SHARPSHOOTER"/>
	<portrait prototype="mod:Prototypes/Persons/Police/sharpshooter_upgraded2.e4p" big="up" unit="sharp shooter" text="SHARPSHOOTER"/>

	<portrait prototype="mod:Prototypes/Persons/Police/scout.e4p" big="norm" unit="scout" text="SCOUT"/>
	<portrait prototype="mod:Prototypes/Persons/Police/scout_upgraded.e4p" big="up" unit="scout" text="SCOUT"/>
	<portrait prototype="mod:Prototypes/Persons/Police/scout_upgraded2.e4p" big="up" unit="scout" text="SCOUT"/>

	<portrait prototype="mod:Prototypes/Persons/Police/profiler.e4p" big="norm" unit="profiler" text="PROFILER"/>
	<portrait prototype="mod:Prototypes/Persons/Police/profiler_upgrade.e4p" big="up" unit="profiler" text="PROFILER"/>
	<portrait prototype="mod:Prototypes/Persons/Police/profiler_upgrade2.e4p" big="up" unit="profiler" text="PROFILER"/>

	<portrait prototype="mod:Prototypes/Persons/TEC/engineer.e4p" big="norm" unit="engineer" text="ENGINEER"/>
	<portrait prototype="mod:Prototypes/Persons/TEC/engineer_upgraded.e4p" big="up" unit="engineer" text="ENGINEER"/>
	<portrait prototype="mod:Prototypes/Persons/TEC/engineer_upgraded2.e4p" big="up" unit="engineer" text="ENGINEER"/>



	<!-- equipment -->
	<portrait prototype="FIREEXTINGUISHER" big="mod:UI/Game/equipmentimg/toolscar_fireex_big.dds" text="FIRE EXTINGUISHER"/>
	<portrait prototype="SHEARS" big="mod:UI/Game/equipmentimg/toolscar_metalcutter_big.dds" text="JAWS OF LIFE"/>
	<portrait prototype="CHAINSAW" big="mod:UI/Game/equipmentimg/toolscar_powersaw_big.dds" text="CHAIN SAW"/>
	<portrait prototype="FIREAXE" big="mod:UI/Game/equipmentimg/toolscar_axe_big.dds" text="FIREAXE"/>
	<portrait prototype="FIREHOSE" big="mod:UI/Game/equipmentimg/toolscar_firehose_big.dds" text="FIRE HOSE"/>
	<portrait prototype="FLASHGRENADE" big="mod:UI/Game/equipmentimg/toolscar_flashgrenade_big.dds" text="FLASH GRENADE"/>
	<portrait prototype="ROADBLOCK" big="mod:UI/Game/equipmentimg/toolscar_roadblock_big.dds" text="ROAD BLOCK"/>
	<portrait prototype="JUMPPAD" big="mod:UI/Game/equipmentimg/toolscar_jumppad_big.dds" text="JUMP PAD"/>
	<portrait prototype="PISTOL" big="mod:UI/Game/equipmentimg/toolscar_gun_big01.dds" text="PISTOL"/>
	<portrait prototype="REDIRECTSIGN" big="mod:UI/Game/equipmentimg/toolscar_scoop_big01.dds" text="REDIRECTSIGN"/>
	<portrait prototype="RIFLE" big="mod:UI/Game/equipmentimg/toolscar_rifle_big01.dds" text="RIFLE"/>
</portraits>
Thanks to the comment line we can easly see what we need to change and where.
<!-- vehicles --> This comment shows that we are in the vehicles area.
<!-- persons --> This comment shows that we are in the person(crew) area.
<!-- equipment --> This comment shows that we are in the Equipment area.

Depeninding on what you want to change you need to be in one of the 3 areas to change it.
Be carefull
, This file is linked to your: unit.xml file. From this file you should remember some of the details (or keep the unit.xml file open so you can just read the details).
To add a new vehicle:
<portrait prototype="mod:Prototypes/Vehicles/Ambulance/*new prototype*.e4p" text="*Unit.XML ID TAG*" unit="*Unit.xml ID TAG*"/>
Adding new personel:
<portrait prototype="mod:Prototypes/Persons/Ambulance/*personeels prototype.e4p" big="*plaatje*" unit="Unit.XML ID TAG" text="Unit.xml ID TAG"/>
Add new equipment:
<portrait prototype="*New name*" big="mod:UI/Game/equipmentimg/*New equipment.DDS" text="*New name*"/>
Again the changes and info given here are closely with the: Tut from Hoppah.

Unit.xml
The "Unit.XML" is not like the other files just in one folder.
This is because every unit(car/personal/equipment) in the game uses it's own unique unit.xml file.
you can find the files in:
C:\Program Files\sixteen tons entertainment\Emergency 4\Mods\*Your mod name*\Units*
*Default instaltion path.
Did you installed Emergency 4 customly:
..\Emergency 4\Mods\*your mod name*\Units*
*the ..\ is for the driver letter and folders you have installed the game to.
(For example: D:\ or E:\ or D:\games\ or E:\games and so on and so on).

<!--NOTE, if you do not use another mod or the default units from the game, you will need to make and place the files in the right place yourself!--!>
Depending on what you need, you would need to be in differnt locations.
If you are looking at:
C:\Program Files\sixteen tons entertainment\Emergency 4\Mods\*your mod name*\Units
of
..\Emergency 4\Mods\*your mod name*\Units*
voor then you can find the: Unit.XML files;
\Equipment
\Personnel
\Vehicles

And each of the above folders need sub-folders.
\Personnel has 4 sub-folders: "\Ambulance, \Fire Department, \Police, \TEC", And each of those sub folders has to have unit folders.
\Vehicles heeft 4 sub-folders: "\Ambulance, \Fire Department, \Police, \TEC", And each of those sub folders has to have unit folders.
The folder: \Equipment Does not need sub-folders, But starts straight away with the unit folders.

Asuming you did all other steps right..
We will create our own unit folder now.
C:\Program Files\sixteen tons entertainment\Emergency 4\Mods\*your mod name*\Units\Vehicles\Ambulance\*
*Default installtion path.
Did you installed Emergency 4 customly:
..\Emergency 4\Mods\*your mod name*\Units\Vehicles\Ambulance\*
*the ..\ is for the driver letter and folders you have installed the game to.
(For example: D:\ or E:\ or D:\games\ or E:\games and so on and so on).


In the folder from \Ambulance\ i create a new folder.
The folder name starts with a number and the name.
For tut uses i will call it: 001Test
In the folder 001Test we need the following files; "big.dds, browser_cl.dds, browser_dis.dds, browser_on.dds, browser_ov.dds, icon_cl.dds, icon_on.dds, icon_ov.dds, unit.xml" .
you can download the .dds files(empty) from the download center of the forum. or by using the once from the game it self.
The unit.xml file we can also copy from another pre existing model.
A unit.xml file needs to have 2 "structures" to it.
As is displayed by the next lines:
<unit id="MTW">
	<campaign>
		<missions value="3 4 13 15 9 8 5 17 12 14 7 19 10 6 18 16 11 20">
			<prototype name="mod:Prototypes/Vehicles/Police/mtw.e4p" />
			<price value="500" />
			<speed value="100" />
			<space value="6" />
			<loadspace value="4" />
			<personnel>
				<unit id="POLICEMAN">
					<defaultcount value="1" />
				</unit>
				<unit id="PROFILER" />
				<unit id="SHOOTER" />
				<unit id="SCOUT" />
			</personnel>
			
			<equipment>
				<unit id="ROAD BLOCK" />
			</equipment>
		</missions>
	</campaign>
	
	<freeplay>
		<missions value="3 4 13 15 9 8 5 17 12 14 7 19 10 6 18 16 11 20 22">
			<prototype name="mod:Prototypes/Vehicles/Police/mtw.e4p" />
			<price value="500" />
			<speed value="100" />
			<space value="6" />
			<loadspace value="4" />
			<personnel>
				<unit id="POLICEMAN">
					<defaultcount value="1" />
				</unit>
				<unit id="PROFILER" />
				<unit id="SHOOTER" />
				<unit id="SCOUT" />
			</personnel>
			
			<equipment>
				<unit id="ROAD BLOCK" />
			</equipment>
		</missions>
	</freeplay>		
</unit>

The first "Structure" is the campaign mode tags <campaign> </campaign>.
The second "Structure" is offcourse: <freeplay></freeplay>.
These two "Structures" can differ from one another. So you can make modded units for the freeplay but keep them original in the campaign or vise versa. or it has less equipment in the campaign, cost less and so on.
The most important thing to know is that both "Structures" use the same "Legenda" to identify and make the unit playable in the game:
Short explainantion of the legenda in the unit.xml file:
<unit id="MTW"> This is the line that links the unit.xml file to the portraits.xml file(Very important line!!!)
Each Unit.xml file <unit id= ""> must be unique, so you can't have 2 cars called "Ambulance", or 2 personel called "doctor".


- <missions value="3 4 13 15 9 8 5 17 12 14 7 19 10 6 18 16 11 20"> This line will tell the game for what missions the car/person is availble ("22" is the freeplay map). This line is also a main command line so the other commands can be added).
- <prototype name="mod:Prototypes/Vehicles/Police/mtw.e4p" /> This line will let the file know where to find the prototype file of the game.
- <price value="500" /> Basic price of the unit(This is the price witch will be multiplied by the mlltiplier in the "freeplaybase.xml" file. (Default setting is 10)So this unit should cost 5.000 credits to call it in the game.
- <speed value="100" /> The speed in KM/H(1KM/h = MP/H you can change the value to a max off: 9.999.999KM/H(without ".") make the speed greater and the car will not come into the game.
- <space value="6" /> How many personel the car can carry?(Max is 12)
- <loadspace value="4" /> how many casulties the car can take(Max is 12)
- <personnel> Is the opening "tag" for the personel that is allowed in the car.
- <unit id="POLICEMAN"> The type of personal that is in the car when you call it into the game.
- <defaultcount value="1" />how many of the above line personel is in the car when you call it.
- </unit> the closing tag for the default load of the car when calling it
- <unit id="PROFILER" /> Additional personal unit that can be in the car
- <unit id="SHOOTER" /> Additional personal unit that can be in the car
- <unit id="SCOUT" /> Additional personal unit that can be in the car
- </personnel> Closing tag for the Personel that is allowed and by default in the car
- <equipment> Start of the equipment carried by it.
- <unit id="ROAD BLOCK" /> Equipment in the car(NOTE, this also needs to be checked on in the editor under "TRAITS").
- </equipment> The closing tag of the equipment allowed to carried.
- </missions> The main closing tag for the MAIN command(mission numbers, and all other info over the unit)

If you are working in the: <campaign> </campaign> Then don't add 22 to the missions line!

Soundtrack.xml
Alright you can change the game to an extent, and add/change new units.
And modify them to how you would like them to be.
Lets move on to the sounds.

You need a: .mp3 .mp4 .wav .wmv To .ogg converter
Like this one: Gratis .ogg converter

You can modify the game a bit more to your liking by changing the music and sounds you here.
You need this file: "Soundtrack.xml" And you can find that file here:
C:\Program Files\sixteen tons entertainment\Emergency 4\Data\Audio\Soundtracks*
*Default instalation path.
Did you installed Emergency 4 customly:
..\Emergency 4\Data\Audio\Soundtracks*
*the ..\ is for the driver letter and folders you have installed the game to.
(For example: D:\ or E:\ or D:\games\ or E:\games and so on and so on).


For yours and the games safty we will copy the entire folder(AUDIO): in the mod folder you made earlier.
C:\Program Files\sixteen tons entertainment\Emergency 4\Mods\*your mod name*\*
*Default instalation path.
Did you installed Emergency 4 customly:
..\Emergency 4\Mods\*your mod name*\*
*the ..\ is for the driver letter and folders you have installed the game to.
(For example: D:\ or E:\ or D:\games\ or E:\games and so on and so on).


Making the folder link look like this:
C:\Program Files\sixteen tons entertainment\Emergency 4\Mods\*your mod name*\Audio*
*Default instalation path.]
Did you installed Emergency 4 customly:
..\Emergency 4\Mods\*your mod name*\Audio*
*the ..\ is for the driver letter and folders you have installed the game to.
(For example: D:\ or E:\ or D:\games\ or E:\games and so on and so on).


If we open the soundtrack.xml now(Audio\Soundtracks\).
We can see a lot of line and structures like this one:
<soundtracks>
	<soundtrack name="1">
		    <music id = "0" file="mod:Audio/Soundtracks/background_05.ogg" level="0.0" next="0">
			<transition target="0.1" mode="start" />
			<transition target="0.2" mode="start" />
			<transition target="0.3" mode="start" />
			<transition target="0.4" mode="start" />
			<transition target="0.6" mode="start" />
			<transition target="0.7" mode="start" />
		</music>

		<music id = "1" file="mod:Audio/Soundtracks/action_short_08.ogg" level="0.1" next="2">
			<transition target="0.2" mode="start" />
			<transition target="0.3" mode="start" />
			<transition target="0.4" mode="start" />
			<transition target="0.6" mode="start" />
			<transition target="0.7" mode="start" />
		</music>

		<music id = "2" file="mod:Audio/Soundtracks/action_04.ogg" level="0.2" next="2">
			<transition target="0.3" mode="start" />
			<transition target="0.4" mode="start" />
			<transition target="0.5" mode="fade_sync" />
			<transition target="0.6" mode="start" />
			<transition target="0.7" mode="start" />
		</music>

		<music id = "3" file="mod:Audio/Soundtracks/action_short_07.ogg" level="0.3" next="prev">
			<transition target="0.2" mode="start" />
			<transition target="0.4" mode="start" />
			<transition target="0.6" mode="start" />
			<transition target="0.7" mode="start" />
		</music>

		<music id = "4" file="mod:Audio/Soundtracks/action_short_07.ogg" level="0.4" next="prev">
			<transition target="0.2" mode="start" />
			<transition target="0.3" mode="start" />
			<transition target="0.6" mode="start" />
			<transition target="0.7" mode="start" />
		</music>

		<music id = "5" file="mod:Audio/Soundtracks/action_04_low.ogg" level="0.5" next="5">
			<transition target="0.2" mode="start" />
			<transition target="0.3" mode="start" />
			<transition target="0.4" mode="start" />
			<transition target="0.6" mode="start" />
			<transition target="0.7" mode="start" />
		</music>

		<music id = "6" file="mod:Audio/Soundtracks/mission_lost.ogg" level="0.6" next="stop">
		</music>

		<music id = "7" file="mod:Audio/Soundtracks/mission_won.ogg" level="0.7" next="stop">
		</music>
	</soundtrack>

**NOTE: I'm only placing one structure here, even the file shows you more then one.
This is because, if you can modify one structure the other need to be done in the same way as the first way.

To start i will just explain the structure of the soundtrack.xml file:
<soundtracks> - Main command that also opens the soundtrack xml file.
<soundtrack name="1"> - A unique soundtrack number, but this number is linked to a mission number.
<music id = "0" file="mod:Audio/Soundtracks/background_05.ogg" level="0.0" next="0"> -<Music Is the openings command for what should be played at the start of the mission. id = "0" Is the ID number of the track that is playing", file="mod:Audio/Soundtracks/background_05.ogg" Location of the sound file, level="0.0"An indication of at what level it needs to be played(game progres) next="0"> - Tells what the next song is that should be played(bassed on ID number) in this case the song will just repeat it self untill the "level" value changes to mach another line in the file.
<transition target="0.1" mode="start" /> - Sets a target, on when a level is progressing to change the sound to or when the event is starting(The higher value the further the mission is progressing, or the situation is growing out of hand)
<transition target="0.2" mode="start" /> - Sets a target, on when a level is progressing to change the sound to or when the event is starting(The higher value the further the mission is progressing, or the situation is growing out of hand)
<transition target="0.3" mode="start" /> - Sets a target, on when a level is progressing to change the sound to or when the event is starting(The higher value the further the mission is progressing, or the situation is growing out of hand)
<transition target="0.4" mode="start" /> - Sets a target, on when a level is progressing to change the sound to or when the event is starting(The higher value the further the mission is progressing, or the situation is growing out of hand)
<transition target="0.6" mode="start" /> - Sets a target, on when a level is progressing to change the sound to or when the event is starting(The higher value the further the mission is progressing, or the situation is growing out of hand)
<transition target="0.7" mode="start" /> - Sets a target, on when a level is progressing to change the sound to or when the event is starting(The higher value the further the mission is progressing, or the situation is growing out of hand)
</music> - Closing command for this spesific mission
</soundtrack> Main close command for the "string" of mission music

**NOTE For all targets: 0.1 means, if target 0.1 is reached/activated play music with: ID1 for 0.2 it just means: play music ID 2 and so on.
As you can see the script can only increase it value of target and music ID 0(0.1,0.2,0.3,0.4,0.5,0.6,0.7)(these are there for the other songs/sound that can be played during the mission, depending on progress/situation control).
As you go allong you can go 2 ways up or down(doing good, or badly). Doing good(i would think but not tested so far) the level would decrease for example from 0.3 to 0.2, If you are doing badly the level will increase and make it increase for example like 0 to 0.5


If we want to change the music that is playing on the background of a mission we would need to modify this line:
<music id = "0" file="mod:Audio/Soundtracks/background_05.ogg" level="0.0" next="0">
We start the .ogg converter(read the program manual or help file, since i'm keeping this tut to XML and not the .ogg converter).
And we convert a song to a .ogg file.(I will call it: *new.ogg*)
We will save the we made(*new.ogg*) in the soundtrack folder:
C:\Program Files\sixteen tons entertainment\Emergency 4\Mods\*your mod name*\Audio\Soundtrack*
*Default installation path.
Did you installed Emergency 4 customly:
..\Emergency 4\Mods\*your mod name*\Audio\Soundtrack*
*the ..\ is for the driver letter and folders you have installed the game to.
(For example: D:\ or E:\ or D:\games\ or E:\games and so on and so on).

After that we need to change the line in the sountrack.xml file
<music id = "0" file="mod:Audio/Soundtracks/*new.ogg*" level="0.0" next="0">
If you would start mission 1 now, you will hear your song in the background.

Since there are 20 missions the xml contains 20 structures(for each mission one).
But for somebody who was bored and counted them, knows that there are 22 structures in the soundtrack.xml file
So i will explain the last two now:
The 21st structure is about the Tutorial level in Emergency 4
<soundtrack name="tutorial">
		<music id="0" file="mod:Audio/Soundtracks/background_03_low.ogg" level="0.0" next="0">
			<transition target="0.1" mode="start" />
			<transition target="0.2" mode="start" />			
			<transition target="0.4" mode="start" />
			<transition target="0.5" mode="start" />
			<transition target="0.6" mode="start" />
		</music>	
	</soundtrack>
As you can see this is simulair to the mission soundtrack structure, and so further explaining should not be needed.
Since you can change the mission sound, you can also change the tutorial sound.

Then on to the 22nd and last structure: Freeplay
<soundtrack name="freeplay">
		<music id="0" file="mod:Audio/Soundtracks/background_06.ogg" level="0.0" next="0" />
		<music id="1" file="mod:Audio/Soundtracks/action_short_01.ogg" level="0.1" next="0" />
		<music id="2" file="mod:Audio/Soundtracks/action_short_02.ogg" level="0.2" next="0" />
		<music id="3" file="mod:Audio/Soundtracks/action_short_03.ogg" level="0.3" next="0" />
		<music id="4" file="mod:Audio/Soundtracks/action_short_04.ogg" level="0.4" next="0" />
		<music id="5" file="mod:Audio/Soundtracks/action_short_05.ogg" level="0.5" next="0" />
		<music id="6" file="mod:Audio/Soundtracks/action_short_06.ogg" level="0.6" next="0" />
		<music id="7" file="mod:Audio/Soundtracks/action_short_07.ogg" level="0.7" next="0" />
		<music id="8" file="mod:Audio/Soundtracks/action_short_08.ogg" level="0.8" next="0" />
	</soundtrack>

Also this structure is almost simlair to the tutorial and mission sound structure.
One big differance is that the freeplay does not works with targets...this would be imposible since you are playing a free game, and not a scripted mission.
But this script uses events to base what music needs to be played.
A event example would be:
<music id="4" file="mod:Audio/Soundtracks/action_short_04.ogg" level="0.4" next="0" />
This line should be the seriousness of the event that is happening.
And the right line is read and played acording to the event that is happening.
When something serious is happening, a high level is added, when a small thing happens a low level will happen.
When you start a game it will always play(since your level = 0.0 at start):
<music id="0" file="mod:Audio/Soundtracks/background_06.ogg" level="0.0" next="0" />
As you can see, this background music is also in a loop, and it will keep playing itself untill interuped by a event.
It will then play the level acordingly sound, and stop for a few seconds, when the event sound has been played the next="0" value behind each event will happen,and the soundtrack(level0.0) will be played again.

</soundtracks>
</soundtracks> - Main closing command for all the structures in the soundtrack.xml file

You can make the game more your style by changing all the 9 lines of the music(just as i explained with the missions)
I'm still looking for the right way to add more then one background music line to the file.
so you don't always have to listen to the same old song time after time after time.
So far no luck,...

(For smartasses)
        <soundtrack name="freeplay">
                <music id="0" file="mod:Audio/Soundtracks/*new1.ogg*" level="0.0" next="9" />
                <music id="1" file="mod:Audio/Soundtracks/action_short_01.ogg" level="0.1" next="0" />
                <music id="2" file="mod:Audio/Soundtracks/action_short_02.ogg" level="0.2" next="0" />
                <music id="3" file="mod:Audio/Soundtracks/action_short_03.ogg" level="0.3" next="0" />
                <music id="4" file="mod:Audio/Soundtracks/action_short_04.ogg" level="0.4" next="0" />
                <music id="5" file="mod:Audio/Soundtracks/action_short_05.ogg" level="0.5" next="0" />
                <music id="6" file="mod:Audio/Soundtracks/action_short_06.ogg" level="0.6" next="0" />
                <music id="7" file="mod:Audio/Soundtracks/action_short_07.ogg" level="0.7" next="0" />
                <music id="8" file="mod:Audio/Soundtracks/action_short_08.ogg" level="0.8" next="0" />
                <music id="9" file="mod:Audio/Soundtracks/*new2.ogg*" level="0.0" next="10" />
                <music id="10" file="mod:Audio/Soundtracks/*new3.ogg*" level="0.0" next="11" />
                <music id="11" file="mod:Audio/Soundtracks/*new4.ogg*" level="0.0" next="0" />
        </soundtrack>
Does not work.
*Note *new.ogg* is just an example name.

Pay attention!; dThe songs you convert with the .ogg converter will keep copyright protected, when you add these songs to your mod, and you make the mod public you should remove the music files or you are commiting a crime.!
Unless you are the artist who created the song(s)


[u]Modifying Notifications:
When a event is happening, the supervisor will allert you to that, by playing a small movie, spoken text and atext banner in the center top screen.
To edit the movie you will need to use special software to make your own movies, or voice over programs.
But this is not what this is tutorial is about, so you i won't go on with that.
But you can with eas modify the text banner in the center-top screen when a event is happening, so it will display your custom event line.
For this you need to be in:
..\Emergency 4\Data\Lang\en\*
Or
..\Emergency 4\Data\Lang\de\*
..\ Your installation folder

And copy the file: "supervevents.xml"
To the mod folder you made:
..\Emergency 4\Mod\**your mod name**\Lang\en\*
..\ your installation
If this folder does not exist, create it(2 to 3 folders).
1. Make a folder: "Lang" in the root folder of your mod (..\Emergency 4\Mod\**your mod name**)
2. In the folder: "Lang" you create 1 or 2 new folder named: "en" or/and "de"
(..\Emergency 4\Mod\**your mod name**\Lang\)
3 So you will have these locations:(Depending on the language you plan to use)
..\Emergency 4\Data\Lang\en\**
or/and
..\Emergency 4\Data\Lang\de\**
..\ installation path
In het mapje van jou keuze plaats je dan het bestand: "supervevents.xml"
(vFor the purpose of this tut i will be using the folder: "en")
making my folder path look like this:
..\Emergency 4\Data\Lang\en\supervevents.xml
If we open the supervevents.xml from our mod foler we will see the following XML structures:
<strings>
<string name="ID_SUPERV_EVENT01">Attention - traffic accident! Attend to all casualties and take them away!</string>
<string name="ID_SUPERV_EVENT02">Car theft! The suspect is fleeing! Arrest and take him away!</string>
<string name="ID_SUPERV_EVENT03">Building on fire, caused by electrical appliance short-circuiting! Extinguish all fires and if necessary, treat all casualties and take them away!</string>
<string name="ID_SUPERV_EVENT04">Person injured by faulty electrical appliance! Treat and remove!</string>
<string name="ID_SUPERV_EVENT05">Short-circuit has caused building to catch fire; there are injured! Extinguish all fires, treat the casualties and take them away!</string>
<string name="ID_SUPERV_EVENT06">An imploding TV set fire to a building! Extinguish all fires and if necessary, treat all casualties and transport them away!</string>
<string name="ID_SUPERV_EVENT07">TV set imploded, injured present! Treat the casualties and take them away!</string>
<string name="ID_SUPERV_EVENT08">Attention - house fire, due to an imploded TV set, there are injured! Extinguish all fires, attend to the casualties and take them away!</string>
<string name="ID_SUPERV_EVENT09">Vehicle fire, caused by a technical defect! Extinguish the fire and if necessary, treat all casualties and take them away!</string>
<string name="ID_SUPERV_EVENT10">Attention - rioting civilian! Arrest and remove! If necessary, treat any casualties and take them away!</string>
<string name="ID_SUPERV_EVENT11">Unauthorised demonstration taking place! Arrest the demonstrators and take them away!</string>
<string name="ID_SUPERV_EVENT12">Attention - arson in the operational area! Arrest the arsonist and take him away! Extinguish all fires!</string>
<string name="ID_SUPERV_EVENT13">There are reports of a people being taken hostage in the operational area! Rescue them, and either neutralise the kidnappers or arrest and take them away!</string>
<string name="ID_SUPERV_EVENT14">Bomb alert! The bomber is fleeing! Arrest and take him away!  You also need to extinguish all fires and if necessary, treat any casualties!</string>
<string name="ID_SUPERV_EVENT15">Rabies alert! Neutralise the infected animal, prevent the rabies from spreading! You will need to treat any victims and take them away!</string>
<string name="ID_SUPERV_EVENT16">Earthquake alert! There are casualties and structural damage! Take care of the fires, attend to all casualties and take them away!</string>
<string name="ID_SUPERV_EVENT17">Medical emergency, someone has fallen and is slightly injured. Treat and remove!</string>
<string name="ID_SUPERV_EVENT18">Medical emergency, someone is suffering from shock! Treat and remove!</string>
<string name="ID_SUPERV_EVENT19">Medical emergency, report of a circulatory collapse! Treat and take the victim away!</string>
<string name="ID_SUPERV_EVENT20">There are reports of food poisoning! Treat the victim and take him away!</string>
<string name="ID_SUPERV_EVENT21">Medical emergency, someone has suffered a severe heart attack! Treat and take the victim away!</string>
<string name="ID_SUPERV_EVENT22">Someone has suffered a stroke! Treat immediately and take the victim away!</string>
<string name="ID_SUPERV_EVENT23">Attention - an incident of shoplifting has been reported! The thief is escaping, arrest and take him away!</string>
<string name="ID_SUPERV_EVENT24">Attention - we have a report of pick pocketing! The thief is escaping, arrest and take him away!</string>
<string name="ID_SUPERV_EVENT25">Armed bank robbery! Arrest the suspects and take them away! If necessary, treat all casualties and take them away!</string>
<string name="ID_SUPERV_EVENT26">Attention - we have received reports of a suicide attempt! Save the victim, treat and remove!</string>
<string name="ID_SUPERV_EVENT27">Someone suicidal is threatening to jump off a building! Save them!</string>
<string name="ID_SUPERV_EVENT28">Attention - there are reports of a fire. Probably caused by a discarded cigarette. Extinguish all fires!</string>
<string name="ID_SUPERV_EVENT29">Fire, caused by negligent handling of flammable materials! Extinguish all fires!</string>
<string name="ID_SUPERV_EVENT30">Fire, caused by a firework! Extinguish all fires!</string>
<string name="ID_SUPERV_EVENT31">Fire, caused by a faulty electrical appliance! Take care of those fires!</string>
<string name="ID_SUPERV_EVENT32">Exploded gas pipe! Extinguish all fires and if necessary, treat all casualties and take them away!</string>
<string name="ID_SUPERV_EVENT33">A fire has been reported, cause unknown. Extinguish all fires!</string>
<string name="ID_SUPERV_EVENT34">Fire, cause not known. Prevent the fire from spreading and extinguish it!</string>
<string name="ID_SUPERV_EVENT35">Attention - fire! Caused by open flame! Extinguish all fires!</string>
<string name="ID_SUPERV_EVENT36">Lightning strike! Check whether people have been injured or if fires have broken out!</string>
<string name="ID_SUPERV_EVENT37">Traffic light failure due to technical defect! Repair the lights quickly, before there are any accidents!</string>
<string name="ID_SUPERV_EVENT38">Technical defect in a level-crossing barrier! Quickly repair the barrier before there are any accidents!</string>
<string name="ID_SUPERV_EVENT39">Attention - there are reports of a violent crime! Arrest the suspect and take him away! Treat all casualties and take them away!</string>
<string name="ID_SUPERV_EVENT40">Attention - there is a person running amok in the operational area! Arrest or neutralise this person and take him away! And don't forget to treat those victims!</string>
<string name="ID_SUPERV_EVENT41">Attention - bomb explosion! Fires have broken out!</string>
<string name="ID_SUPERV_EVENT42">Explosion in the sewer system! Extinguish the fires!</string>
<string name="ID_SUPERV_EVENT43">Attention - violent rioters are gathering! Arrest and remove!</string>
<string name="ID_SUPERV_EVENT44">A forest fire has broken out! Stop it spreading and put out all the fires!</string>
<string name="ID_SUPERV_EVENT45">There are reports of a traffic accident involving several vehicles! Treat all casualties and take them away!</string>
<string name="ID_SUPERV_EVENT46">Attention - violent hooligans are gathering! Arrest and remove!</string>
</strings>

Again, i will only explain one line, since they are all the same.
So once you can change one, you can change them all.
<string name="ID_SUPERV_EVENT01">Attention - traffic accident! Attend to all casualties and take them away!</string>
- <string A series of text/command/codes that make up a command for the game
- name=" What is this called.
- ID_SUPERV_EVENT01"> System name of the event.
- Attention - traffic accident! Attend to all casualties and take them away! The message that will be played in the banner when the event happens.
</string> End of this command line

To change the banner, all we need to do is:
<string name="ID_SUPERV_EVENT01">Look daddy a car drove into the supermarket, what do they think this is? The blues brothers?</string>
If we replace the: SUPERV_EVENT01 with our new message, and the event would happen, the banner would show this:
"Look daddy a car drove into the supermarket, what do they think this is? The blues brothers?"
(4 Example lines to see how the file will look once you change it.)
<strings>
<string name="ID_SUPERV_EVENT01">Look daddy a car drove into the supermarket, what do they think this is? The blues brothers?</string>
<string name="ID_SUPERV_EVENT02">Car theft,....well don't just stand there laughing...do something!</string>
<string name="ID_SUPERV_EVENT03">Building on fire,...i hope they are insured......</string>
<string name="ID_SUPERV_EVENT04">Look that plane will land on the bunny farm,..is it X-mas already??</string>
</strings>
(This example has 4 b*llsh*t rules, just because i can do that ^_^)
But it shows you that there is no limitation to the way you can change the text in the banner(just use normal plain letters and numbers).
If you replace only some events, then DON'T remove the events you have not changed.
If you do this you will most likly get the ID_... lines or it can make the game crash(unexpected error) or buggy/lagging.

Powered by Tutorials 1.5.2 © 2024, by Michael McCune