Accueil Others Tutorial: Adding New Animals to any map

Tutorial: Adding New Animals to any map

1029

Step 1 :

you must copy the « character », « hud », « scripts », « translations » and « xml » folders in the folder of the map you want to modify

Step 2 :

in modDesc.xml file add these lines :

<extraSourceFiles>
    <sourceFile filename="scripts/BaseDirectoryFix.lua" />
    <sourceFile filename="scripts/BasegameFixesForHofBergmann.lua" />
    <sourceFile filename="scripts/AddStoreCategory.lua" />
    <sourceFile filename="scripts/AnimatedCharacter.lua"/>
</extraSourceFiles>

<specializations>
    <specialization name="fillTypeSigns"        className="FillTypeSigns"       filename="scripts/vehicles/specializations/FillTypeSigns.lua"/>
    <specialization name="changeEnterText"      className="ChangeEnterText"     filename="scripts/vehicles/specializations/ChangeEnterText.lua"/>
</specializations>

<placeableSpecializations>
    <specialization name="husbandryGoatMilk"        className="PlaceableHusbandryGoatMilk"      filename="scripts/placeables/specializations/PlaceableHusbandryGoatMilk.lua"/>
</placeableSpecializations>

<l10n filenamePrefix="translations/l10n"/>

Step 3 :

in map.xml file :

1- look for the  » <animals><animals/>  » and replace it with this :

    <animals filename="character/animals.xml">
        <names filename="$dataS/character/animalNames.xml" />
        <food filename="character/animalFood.xml" />
    </animals>

2- then in the  » <hotspots></hotspots>  » :

replace  » $l10n_animals_dealer  » by  » $l10n_station_fr_livestockMarket « 
this an example :

<hotspots>
        <placeableHotspot type="SHOP" text="$l10n_vehicle_shop" worldPosition="-67.01309967 75.85600281" teleportWorldPosition="-67.01309967 135.66900635 75.85600281" />
        <placeableHotspot type="SHOP_ANIMAL" text="$l10n_station_fr_livestockMarket" worldPosition="-338.42739868 -90.09100342" teleportWorldPosition="-338.42739868 136.61479187 -90.09100342" />
</hotspots>

3- then look for  » <fillTypes  » and replace the entire line with :

 <fillTypes filename="xmll/maps_fillTypes.xml" />