Green Rollover Red Rollover Arrow Rollover Focused Userbar Register Button Rollover Red Button Rollover
Welcome Guest ( Log In / Register )

Basics of Coding Begginers Guide

No Avatar

lycan

Category: Coding
Level: Beginner
Created: Wednesday April 9, 2008 - 7:50
Updated: Wednesday April 9, 2008 - 8:07
Views: 5318
Summary: A brief summary of how to code

Rating

Staff says

-

Members say

-

Average

-

0 votes

Page 1 2
Hey guys in this tutorial i will guide you on what .xml files you would want to put in you mod.

Firstly

In your mod folder you should have a XML folder that contains these two folders

Units
Structures

You will code your new units and put them in your Units folder. For your structures you will put them in the structures.

To be able to produce them you will need               
Code
productiondependencies.xml


here is an example how how an alien brute is built

              
Quote
<!-- UNIT: Alien Brute --> This line won't be read
    <Dependency>
        <Built_Object> Alien_Brute </Built_Object>

        <!-- Strategic requirements -->
        <Strategic_Required_Objects> Alien_Creation_Core_Advanced_Production_Infantry_Upgrade </Strategic_Required_Objects>
        <Strategic_Builder> Alien_Creation_Core </Strategic_Builder>

        <!-- Tactical requirements --> This line will also not be read
        <Tactical_Required_Objects> Alien_Walker_Habitat_HP_Brute_Mutator </Tactical_Required_Objects>
        <Tactical_Builder> Alien_Walker_Habitat </Tactical_Builder>
    </Dependency>


<Built_Object> Alien_Brute </Built_Object> is what the actual unit is called not the filename!

Were going to code in this new unit so we need tactical requirements. If you are not going to put him in global conquest then you just put null.

For the tactical_required_objects its what makes this unit wait to be purchased it needs to be upgraded with something for the Alien Brute he needs to be upgraded with the brute pod. Tactical builder is where he is built from and he is built from the habitat walker.

Next we need to put our new unit into the gameobjectfiles.xml

              
Code
<File> Units/ALIEN_INF_Brute.xml </File>


Units is the folder he is in and ALIEN_INF_Brute is what the file is called and .xml is the file type.

Now lets look in the brute file (SEE NEXT PAGE FOR FULL BRUTE XML)


Lets look at his buildableobjectbehaviour type which makes him useable with the code

              
Code

<BehaviorType Name="BuildableObjectBehaviorType">
            <Tactical_Production_Queue>Tactical_Units</Tactical_Production_Queue>
            <Tactical_Build_Cost_Campaign> 850 </Tactical_Build_Cost_Campaign>
            <Tactical_Build_Cost_Multiplayer> 850 </Tactical_Build_Cost_Multiplayer>
            <Tactical_Build_Time_Seconds> 28 </Tactical_Build_Time_Seconds>
            <Tactical_UI_Build_Queue_Order> 3 </Tactical_UI_Build_Queue_Order>
        </BehaviorType>

He is a unit so he is Tactical_Units,
Cost is obvious how much he costs
Time_Seconds is how many seconds it takes for him to be built
And Tactical_UI_Build_Queue_Order is the unit order of where he stands on the list to be selected in the habitat walker there is grunt, lost one, brute so 3 is last and 1 is grunt.

If your going to make a new unit base it off the brute and change his build queue order to a 4 tung.


I hope this tutorial was kind of easy to understand good luck with your mod!

Credits

lycanTutorial Writer

Add comment

Please enter your message below. Max 10000 characters.