Army Men RTS Forum For Map Makers

Be a map Editor...
Register in our Forums !!!

This forum is for The ones who really need to know about map editing & related stuff.....all are welcome!!!


    Resources on the map & new units.

    Share
    avatar
    Sharks | Alex
    Private First Class

    Posts : 117
    Join date : 2011-01-16

    Resources on the map & new units.

    Post  Sharks | Alex on Fri Jan 28, 2011 4:43 pm

    Well as far as I searched for resources for my map, all I found is this ''type'' file which includes all resources. Am I suppose to remove the // so they resources will be able on my map? Will it have the same start point as normal doubles? If so, how can I move and\or add new resources and place them where ever I want?

    The ''type'' file:



    ///////////////////////////////////////////////////////////////////////////////
    //
    // Pandemic Studios

    // World specific
    //#include "types_world.cfg"
    #include "obj_prop_tree4b.cfg"
    #include "obj_prop_tree5.cfg"
    #include "obj_prop_tree5b.cfg"


    // army
    #include "obj_army.cfg"

    // resources
    //#include "obj_resource.cfg"
    #include "obj_resource_chewtoy.cfg"
    #include "obj_resource_sandbucket_down.cfg"
    #include "obj_resource_sandbucket.cfg"
    #include "obj_resource_megarobo.cfg"
    #include "obj_resource_captaindan-sit.cfg"
    #include "obj_resource_torch.cfg"
    #include "obj_resource_9volt.cfg"
    #include "obj_resource_blob.cfg"



    // General
    #include "types_effects_bare.cfg"
    #include "types_physics.cfg"
    #include "types_traction.cfg"
    #include "types_common.cfg"
    #include "types_quakes.cfg"
    #include "types_messages.cfg"
    #include "types_radio.cfg"

    Smith
    Consctipt

    Posts : 45
    Join date : 2011-01-20

    Re: Resources on the map & new units.

    Post  Smith on Fri Jan 28, 2011 7:33 pm

    types.cfg is only for loading the resource in game memory, so you will be able to place in the map.
    To place a object in the map you must type in objects.cfg

    CreateObject("resource.resourcename", idnumber)
    {
    MapObj()
    {
    HitPoints(0.000000);

    Position()
    {
    Pos(X coords, Z coords, Y coords);
    Right(1.000000, 0.000000, 0.000000);
    Up(0.000000, 1.000000, 0.000000);
    Front(0.000000, 0.000000, 1.000000);
    }

    Zip();
    }
    }

    the above part its what do you need to type to place the resource in the map,
    The Right, up, front part its for the orientation of the object.

    Looking up
    Right(1.000000, 0.000000, 0.000000);
    Up(0.000000, 1.000000, 0.000000);
    Front(0.000000, 0.000000, 1.000000);

    Looking down
    Right(0.000000, 0.000000, -1.000000);
    Up(0.000000, 1.000000, 0.000000);
    Front(-1.000000, 0.000000, 0.000000);

    looking left

    Right(0.000000, 0.000000, 1.000000);
    Up(0.000000, 1.000000, 0.000000);
    Front(-1.000000, 0.000000, 0.000000);

    looking right

    Right(0.000000, 0.000000, -1.000000);
    Up(0.000000, 1.000000, 0.000000);
    Front(1.000000, 0.000000, 0.000000);

    EXAMPLE:I want to place a gardenlamp.
    STEP 1(optional): extract base.x
    STEP 2: check that in types.cfg is #include "obj_resource_gardenlamp.cfg"
    STEP 3(optional): go to where you extracted the base.x\objects\resource\electric\obj_resource_gardenlamp.cfg
    STEP 4(optional): check the line where it says CreateObjectType("resource.lamp", "Source") it means that when you type the resourcename in objects.cfg you must type lamp and not gardenlamp.
    STEP 5: add the resource into objects.cfg, for example:

    CreateObject("resource.lamp", 395)
    {
    MapObj()
    {
    HitPoints(0.000000);

    Position()
    {
    Pos(100.000000, 4.000000, 200.000000);
    Right(1.000000, 0.000000, 0.000000);
    Up(0.000000, 1.000000, 0.000000);
    Front(0.000000, 0.000000, 1.000000);
    }

    Zip();
    }
    }

    That is all. hope that I helped you
    avatar
    Sharks | Alex
    Private First Class

    Posts : 117
    Join date : 2011-01-16

    Re: Resources on the map & new units.

    Post  Sharks | Alex on Fri Jan 28, 2011 8:05 pm

    Ok, so now I know how to add. But where do I exactly placed them? (I mean, in the object file, where do i put the code?

    Here is what I found in the base extracted.

    #includeonce "fx_resource.cfg"


    CreateObjectType("resource.lamp", "Source")
    {
    GameObj()
    {
    Properties()
    {
    Add("Filter::Resource");
    }
    }

    ------------------------
    So, where do I exactly place it? Also can I place it without making those front, right etc... ? Oh and one more thing, is it possible to make the garden lamp as a resource of plastic and elec? With the fact that it's possible for a dump truck to have full elec and plastic inside of it.


    Smith
    Consctipt

    Posts : 45
    Join date : 2011-01-20

    Re: Resources on the map & new units.

    Post  Smith on Fri Jan 28, 2011 9:04 pm

    You must type the Createobject(resour...... in objects.cfg don t worry of in which archive part you can type it at the end, at the begining, in the middle or wherever you want, make sure that the IDnumber isn t repeated in another object, otherwise the resource will not spawn. You can not place them without marking those right, left, etc. It is just for the orientation of the resource.
    And I don t know if its possible making the gardenlamp with both resources because I haven t tried it yet, but you can try this: copy the obj_resource_gardenlamp.cfg into the extracted custom map folder and add a line below the resource("electricity"); The new line must say resource("plastic");
    avatar
    Sharks | Alex
    Private First Class

    Posts : 117
    Join date : 2011-01-16

    Re: Resources on the map & new units.

    Post  Sharks | Alex on Fri Jan 28, 2011 9:42 pm

    Smith wrote:You must type the Createobject(resour...... in objects.cfg don t worry of in which archive part you can type it at the end, at the begining, in the middle or wherever you want, make sure that the IDnumber isn t repeated in another object, otherwise the resource will not spawn. You can not place them without marking those right, left, etc. It is just for the orientation of the resource.
    And I don t know if its possible making the gardenlamp with both resources because I haven t tried it yet, but you can try this: copy the obj_resource_gardenlamp.cfg into the extracted custom map folder and add a line below the resource("electricity"); The new line must say resource("plastic");
    ok, thanks! I'll try to do it now.

    P.S
    Do you have any idea how do I add ants into the hq? (not mp mission, just a normal gb mission)

    Smith
    Consctipt

    Posts : 45
    Join date : 2011-01-20

    Re: Resources on the map & new units.

    Post  Smith on Fri Jan 28, 2011 10:36 pm

    Yes, its easy, you must extract the GB that you want and base.x, copy obj_insect_soldier.cfg and obj_insect_worker.cfg from the extracted base folder\objects\insect\configs to the map folder and modify this lines to soldier and worker:

    Constructor("insect.building.nursery");
    ConstructionTime(15);
    CommandCost(1);
    ResourceCost()
    {
    Add("Plastic", 0);
    Add("Electricity", 0);
    }

    Prereqs()
    {
    Add("insect.building.nursery");
    }

    It must say

    Constructor("army.building.HQ1");
    ConstructionTime(15);
    CommandCost(1);
    ResourceCost()
    {
    Add("Plastic", 0);
    Add("Electricity", 0);
    }

    Prereqs();

    -----------------------------------------

    After that, go to types.cfg and add this #include obj_insect_worker.cfg and #include obj_insect_soldier.cfg

    I haven t tried to add them into an HQ but i think that it would work.



    David95654
    Consctipt

    Posts : 11
    Join date : 2011-12-18
    Age : 17
    Location : uk

    Re: Resources on the map & new units.

    Post  David95654 on Thu Aug 15, 2013 1:10 pm

    Smith wrote:types.cfg is only for loading the resource in game memory, so you will be able to place in the map.
    To place a object in the map you must type in objects.cfg

    CreateObject("resource.resourcename", idnumber)
    {
     MapObj()
     {
       HitPoints(0.000000);

       Position()
       {
         Pos(X coords, Z coords, Y coords);
         Right(1.000000, 0.000000, 0.000000);
         Up(0.000000, 1.000000, 0.000000);  
         Front(0.000000, 0.000000, 1.000000);
       }

       Zip();
     }
    }

    the above part its what do you need to type to place the resource in the map,  
    The Right, up, front part its for the orientation of the object.

    Looking up
         Right(1.000000, 0.000000, 0.000000);
         Up(0.000000, 1.000000, 0.000000);  
         Front(0.000000, 0.000000, 1.000000);

    Looking down
         Right(0.000000, 0.000000, -1.000000);
         Up(0.000000, 1.000000, 0.000000);  
         Front(-1.000000, 0.000000, 0.000000);

    looking left

         Right(0.000000, 0.000000, 1.000000);
         Up(0.000000, 1.000000, 0.000000);  
         Front(-1.000000, 0.000000, 0.000000);

    looking right

         Right(0.000000, 0.000000, -1.000000);
         Up(0.000000, 1.000000, 0.000000);  
         Front(1.000000, 0.000000, 0.000000);

    EXAMPLE:I want to place a gardenlamp.
    STEP 1(optional): extract base.x
    STEP 2: check that in types.cfg is #include "obj_resource_gardenlamp.cfg"
    STEP 3(optional): go to where you extracted the base.x\objects\resource\electric\obj_resource_gardenlamp.cfg
    STEP 4(optional): check the line where it says CreateObjectType("resource.lamp", "Source") it means that when you type the resourcename in objects.cfg you must type lamp and not gardenlamp.
    STEP 5: add the resource into objects.cfg, for example:

    CreateObject("resource.lamp", 395)
    {
     MapObj()
     {
       HitPoints(0.000000);

       Position()
       {
         Pos(100.000000, 4.000000, 200.000000);
         Right(1.000000, 0.000000, 0.000000);
         Up(0.000000, 1.000000, 0.000000);  
         Front(0.000000, 0.000000, 1.000000);
       }

       Zip();
     }
    }

    That is all. hope that I helped you


    or you can use darkreign studio mode and place objects then go in the objects file and where is says armor remove that and add this
       }

       Zip();
     }
    }
    at the end instead of this    

    }
     
     }
    }

    and change the id of the object

    Sponsored content

    Re: Resources on the map & new units.

    Post  Sponsored content


      Current date/time is Fri Nov 24, 2017 11:49 pm