Documente online.
Zona de administrare documente. Fisierele tale
Am uitat parola x Creaza cont nou
 HomeExploreaza
upload
Upload




Adding user created content

computers


Adding user created content

Note: This document is meant to help users create their own content but does not infer any technical support on the part of Bold Games or Gabriel Entertainment.

Init Data

In the InitData folder under the JohnDeere folder are a series of .xml files. These files contain all the data for each object that can be placed in the world. The basic structure for this data is as follows:



<initData>

<uniqueID>EditorCategories</uniqueID>

<dataType>EditorCategories</dataType>

<data>

//Add your own data here

</data>

</initData>

initData - Each group of data needs to be wrapped by an initData tag.

uniqueID - The group of data is then identified by the uniqueID tag. As the name suggests, this needs to be a unique name. I suggest that you add some sort of prefix that is unique to you - like your name and a number. That way your additions do not conflict with anyone else's additions. For example, "JohnDoe275_MyData".

DataType - The dataType is used to group sets of data together.

EditorCategories - is used to list the various categories used in build mode and in the editor.

Entity - when the dataType is left out it is assumed to be of type Entity.

Adding your own data - You can add an additional initData structure to an existing .xml file in the \InitData folder or you can put the data in it's own .xml file. All of this data is loaded when the game executable is run so which file the data is in doesn't matter to the game.

Adding Editor/Build Mode groups

In build mode and in the editor there is a category dropdown box that defaults to Housing, Leisure, Utility, and Hobby Structures. The editor also contains a Trees category. You can add your own custom categories by adding your own <initData> structure. You can look at EntityCategories.xml as a reference.

Category - specifies the name of a category that is shown in build mode and in the editor.

EditorOnlyCategory - specifies the name of a category that is only shown in the editor.

Adding Crops

As with other game elements, you will place your own data in the \InitData folder using the InitData xml structure specified above. For crops, you need to give it a <dataType> of "Crop". Crops go through a series of states as they grow. Immature, sick immature, mature, sick mature, harvested and dead. You will need to make a texture for each of these states. The crops grow by "growing degree days" - for each day that passes a number(a growing degree day) is calculated based on the soil conditions and added to the fields current state.

<name> - name you want displayed in the game fro this crop type - but make sure the uniqueID is actually unique!

<lifeTime> - the total number of GDDs for the entire lifetime of the plant. Pick a number in the rage of one the existing crops and play it in game to see if it takes the right amount of the year to mature.

<maturity> - the number of GDDs at which the plant is considered mature and can be harvested(harvesting before this yields no product.)

<baseYieldPerAcre> - a number used to scale how much yield you get from a given crop per acre of land.

<plantHeight> , <plantWidth> - visual size of 1 plant in game

<fullMaturityPercent> - Percent of lifetime that plants will spend at full maturity before yield starts dropping back off

<windMatureLow> - In GDD. Make this value lower than maturity. Below this value, plants do not sway with the wind. The sway fades in between this value and maturity.

<windDeadHigh> - above this value plants begin do not sway. The sway fades out between the lifetime value(after the plant dies) and this value.

<windSwayDist> - how far the plants sway on a calm sunny day

<baseTemperature> - plants don't grow below this temperture.

<lowSeedPrice>, <medSeedPrice>, <highSeedPrice> - price of seed for each seed quality

<minPrice>, <maxPrice> - range of prices used in the market to determine how much this crop is going for currently.

<maxPriceDifference> - the prices of crops(and other goods) varies with the market - this value limits how much that can change over time. In other words, the smaller the limit the more slowly the prices can fluctuate.

<immatureTex>, <matureTex>, <harvestedTex>, <sickImmatureTex>, <sickMatureTex>, <deadTex> - these are the various images required for a crop.

<btn_norm_high> - in the seed select window there are 3 seed quality buttons for low, medium and high. This tag provides an image for these buttons for the unselected state.

<btn_sel_high> This tag provides an image for these buttons for the selected state.

the med and low are for the medium and low buttons.

<signModel> - the model to use for the sign at the edge of the field

<siloEmitterImg> - when a crop is transferred to a silo, sprites are emitted from it to signify the transfer. This specifies that image.

<survivesWinter> - the crops usually die off at the end of the season. Set this tag to 1 if you want your crop to survive the winter.

<nutrientType> - Instead of using real world soil composition data which can get complicated, we chose to have 4 types of soil nutrients: corn, soybean, wheat and sunflower(not case sensitive, can be CoRn if you like). If no nutrientType is specified then corn is used by default.

<harvestBy> - each harvesting attachment has a harvest category attached to it. A crop can only be harvested by an attachment that is in the same category as this one. <harvestBy> must equal <harvestCategory>

Adding Buildings/Utility Structures

In StudioMax - Each building uses a series of bones to mark positions for various systems. Here is a list of the required bones(names should be exactly as listed):

money_bone : when goods are sold, a money particle is emitted from this bone

repair1, repair2, repair3, repair4 : used to mark where on the building a person should go and stand to do a repair.

FrontDoor : Used to mark the entrance point for a person to walk into a building

Inside : Marks the position inside the building where the person walks to. They will first walk to the FrontDoor bone and then walk straight to the inside bone.

To get a new building into the game you need to add a set of initdata for the structure. Look at InitData\Utility.xml as an example. I would suggest doing a copy and paste on the data and changing the key values appropriately.

Key descriptions:

<order> - allows you to specify the general order that the items show up in the selection window in the game.

<classType> - type of class this entity uses

<image> - the preview image that is shown in the game

<name> - name that is displayed in game

<Category> - which drop down category this entity shows up in

<description> - this gets displayed when you mouse over an entity

<cost> - how much, in dollars, that this entity costs

<maintenancecost> - how much the user must spend to do maintenance on this structure

<constructiontime> - scale factor on how long it takes to build the building

<repairTime> - scale factor on how long it takes to repair the building

<decaltexture> - each building has a decal that us placed on the ground underneath the building. This is that image.

<gmfFilename> - the model to use for this building

<fenceFace0> (, 1, 2, 3) - which sides of the building can have fences

<constrTexture0> (, 1, 2) - when a building is built, it goes through a series of contruction stages. The phases are displayed by fading between different textures. The geometry stays the same, just the texture changes.

<animalUnits> - this is a factor for how many animals a building can house. Each animal has a number of units attached to it so you get the number of animals by dividing animalUnits for the building by animalUnits of the animal.

<dirtyRate> - how quickly a barn gets dirty

<dirtyFullRate> - when a barn is full, it gets dirty faster. At this rate

<fullPercent> - above this percentage the barn is considered to be full

<numFencesMax> - how many fences a barn can have, total

<cleanTime> - how long it takes to clean a barn

<cleanTimeTractor> - how long it takes to clean a barn with the utility tractor

<selectsound> - when you select this building, this sound plays

<onlyAnimalCategory> - if a building is meant for only 1 type of animal, then this is it


Document Info


Accesari: 908
Apreciat: hand-up

Comenteaza documentul:

Nu esti inregistrat
Trebuie sa fii utilizator inregistrat pentru a putea comenta


Creaza cont nou

A fost util?

Daca documentul a fost util si crezi ca merita
sa adaugi un link catre el la tine in site


in pagina web a site-ului tau.




eCoduri.com - coduri postale, contabile, CAEN sau bancare

Politica de confidentialitate | Termenii si conditii de utilizare




Copyright © Contact (SCRIGROUP Int. 2024 )