Jump to content

Creating a unit? PLZ HELP


Timbabwiani
 Share

Recommended Posts

I was trying to make an rome_legionair with a bow and without the shield. I tried the tutorial for creating a new unit but i get stuck. I keep doing it wrong so i need to see how somebody else does it.

What would help me here is an videotutorial with step by step guide. I really want this to know!!! Cause i love your idea and philosophy. I hope that in time i can help you guys out.

Link to comment
Share on other sites

Try to stick closely to the tutorial http://trac.wildfiregames.com/wiki/CreatingNewUnits

It will teach you the basics, and you'll get more ideas as you advance further.

The instructions there are very clear, just follow each step. and try to create a Gallic axeman. Then, see if it will appear in-game after you finish working on it. Goodluck :)

  • Like 2
Link to comment
Share on other sites

I would just edit existing actor and copy-paste code from a archer actor.

While for us, seasoned modders, that might be trivial, I can perfectly understand that that's hard to do for a starter.

I suggest, like wackyserious does, to follow the tutorial exactly from beginning to end (and create a Gallic Axeman). That way you'll get some feeling with how those templates work. After that I think it's fairly easy to modify a Roman Legionnaire into an archer.

Edited by niektb
  • Like 2
Link to comment
Share on other sites

Thanks guys I appreciate it! i´ll try it again. But every time i make an shortcut, target it to pyrogenesis.exe and expand it with -mod=testmod it says that my path is invalid.
I don't use SVN i just downloaded the game. It may give you an image on how bad iam at this at this moment. Give me a year;). Again keep doing what you guys do!

Still, i believe if you expand your existing tutorial with an youtube with all of your steps. than wel... you get less silly question like mine:P

Link to comment
Share on other sites

You can try a more direct approach, as what wowgetoffyourcellphone have suggested.

You can download the necessary files here https://github.com/0ad/0ad/tree/master/binaries/data/mods/public if you don't want to use SVN (SVN file size is quite large, 5-6gb, I think? But is really worth it, you'll have access to the latest things.)

Step 1 - Create a simulation file for your archer unit (Niek's tutorial will teach you how to make one)

Step 2 - Copy the Persian infantry_archer_b, infantry_archer_a, infantry_archer_e actor files at https://github.com/0ad/0ad/tree/master/binaries/data/mods/public/art/actors/units/persians

Step 3 - Replace the textures, props or anything else that you want to change (You just need the animations and some props from the files that you copied)G

Goodluck! :)

Link to comment
Share on other sites

I manage to make it into a mod. i can see the mod in the mod selection. i even see imperial archer in the list of the atlas editor. but then i get.

Oke it say's

CCasheloader failed to find source file for art/actors/units/roman

and CObjectmanager: Findobjectbase cannot find object: units/romans/roman_imperial_archer.


thanks for the tips to all:)


thanks for the tips to all:)

Link to comment
Share on other sites

Uhmm, did you addressed the actor files properly in the simulation files?

Example: Simulation file for cart_infantry_archer_b.xml should have the following actor file as its visual actor: units/cart/infantry_archer_b.xml

b= basic , a= advanced, e= elite

<VisualActor>
<Actor>units/cart/infantry_archer_b.xml</Actor>

</VisualActor>

Make sure file path/locations are addressed properly

I forgot to mention, if you want the unit to be a citizen_soldier type, you should use citizen_soldier simulation templates, (i.e. infantry_archer_b to e) vice versa, use champion simulation templates for champions units

Simulation templates (or defaults) can be found here, https://github.com/0ad/0ad/tree/master/binaries/data/mods/public/simulation/templates

Also, if you want to use citizen_soldier "actor files" for champion units, you can remove the harvest animations and other props and things associated with gathering, champion units won't be needing it.

Edited by wackyserious
Link to comment
Share on other sites

How can I upload my zipped folder to this forum?


My workstructure is

Testmod_1

Imperial_archer_b

<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_infantry_ranged_archer">
<Builder>
<Entities datatype="tokens">
structures/rome_barracks
</Entities>
</Builder>
<Cost>
<Resources>
<food>25</food>
<metal>25</metal>
</Resources>
</Cost>
<Identity>
<Civ>rome</Civ>
<Lang>latin</Lang>
<SelectionGroupName>units/rome_imperial_archer_b</SelectionGroupName>
<GenericName>Roman Legionnaire Archer</GenericName>
<SpecificName>Imperial Archer</SpecificName>
<History></History>
<Icon>units/rome_champion_legion_imperial.png</Icon>
<RequiredTechnology>phase_town</RequiredTechnology>
</Identity>
<Promotion>
<Entity>units/rome_imperial_archer_a</Entity>
</Promotion>
<VisualActor>
<Actor>units/rome/imperial_archer_b.xml</Actor>
</VisualActor>
</Entity>

aahh @#&#036;% my bad. entered it to soon:)

Link to comment
Share on other sites

First!!! haha how do you upload an zipped folder on this platform?

I copied it all except the json. file

Structure of the mod


Foldermap: Testmod_1

used: macedonian archer simulation and actor. Edit animation and probs from legionnaire(champion) 4

Simulation/ templates/ units/ rome/ rome_imperial_archer_a

rome_imperial_archer_b

rome_imperial_archer_e

Simulation/ templates/ structures/ rome/ rome_fotress

Art/ actors/ units/ rome/ imperial_archer_a

imperial_archer_b

imperial_archer_e

rome_imperial_archer_a

<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Base">
<animations>
<animation file="biped/inf_sword_ready_a.dae" name="Idle" speed="102"/>
<animation file="biped/inf_sword_ready_a.dae" name="Idle" speed="95"/>
<animation event="0.81" file="biped/inf_arch_atk_a.psa" load="0.16" name="attack_ranged" speed="90"/>
<animation event="0.5" file="infantry/sword/attack/isw_s_off_05.psa" name="attack_slaughter" speed="100"/>
<animation file="infantry/general/dude/dudewalk.psa" name="Walk" speed="100"/>
<animation file="infantry/sword/move/run/isw_s_off_01.psa" name="Run" speed="30"/>
<animation file="infantry/general/death/inf_01.psa" name="Death" speed="400"/>
<animation file="infantry/general/death/inf_02.psa" name="Death" speed="700"/>
<animation file="infantry/general/death/inf_03.psa" name="Death" speed="500"/>
<animation file="infantry/general/death/inf_04.psa" name="Death" speed="400"/>
<animation file="infantry/general/death/inf_06.psa" name="Death" speed="500"/>
<animation file="infantry/general/death/inf_07.psa" name="Death" speed="400"/>
<animation file="biped/inf_salute_c.psa" name="Promotion" speed="450"/>
</animations>
<mesh>skeletal/m_tunic_short.dae</mesh>
<props>
<prop actor="props/units/heads/rome_head_veteran.xml" attachpoint="head"/>
<prop actor="props/units/weapons/bow_short.xml" attachpoint="l_hand"/>
<prop actor="props/units/quiver_back.xml" attachpoint="back"/>
<prop actor="props/units/heads/rome_imp_gallic_g.xml" attachpoint="helmet"/>
</props>
</variant>
</group>
<textures><texture file="skeletal/rome_su4_imperial_legion.dds" name="baseTex"/></textures>
<group>
<variant frequency="100" name="Idle"/>
<variant name="attack_ranged">
<props>
<prop actor="props/units/weapons/bow_short.xml" attachpoint="l_hand"/>
<prop actor="props/units/weapons/arrow_back.xml" attachpoint="loaded-r_hand"/>
<prop actor="props/units/weapons/arrow_front.xml" attachpoint="projectile"/>
</props>
</variant>
<variant name="attack_slaughter">
<props>
<prop actor="props/units/weapons/knife.xml" attachpoint="r_hand"/>
</props>
</variant>
</group>
<material>player_trans.xml</material>
</actor>
rome_imperial_archer_b
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Base">
<animations>
<animation file="biped/inf_sword_ready_a.dae" name="Idle" speed="100"/>
<animation file="biped/inf_sword_ready_a.dae" name="Idle" speed="97"/>
<animation event="0.84" file="biped/inf_arch_atk_a.psa" load="0.16" name="attack_ranged" speed="90"/>
<animation event="0.5" file="infantry/sword/attack/isw_s_off_05.psa" name="attack_slaughter" speed="100"/>
<animation file="infantry/general/dude/dudewalk.psa" name="Walk" speed="100"/>
<animation file="infantry/sword/move/run/isw_s_off_01.psa" name="Run" speed="30"/>
<animation file="infantry/general/death/inf_02.psa" name="Death" speed="700"/>
<animation file="infantry/general/death/inf_03.psa" name="Death" speed="500"/>
<animation file="infantry/general/death/inf_04.psa" name="Death" speed="400"/>
<animation file="infantry/general/death/inf_06.psa" name="Death" speed="500"/>
<animation file="infantry/general/death/inf_07.psa" name="Death" speed="400"/>
<animation file="biped/inf_salute_c.psa" name="Promotion" speed="450"/>
</animations>
<mesh>skeletal/m_tunic_long.dae</mesh>
<props>
<prop actor="props/units/heads/rome_head_veteran.xml" attachpoint="head"/>
<prop actor="props/units/weapons/bow_short.xml" attachpoint="l_hand"/>
<prop actor="props/units/quiver_back.xml" attachpoint="back"/>
<prop actor="props/units/heads/rome_imp_gallic_g.xml" attachpoint="helmet"/>
</props>
<textures><texture file="skeletal/rome_su4_imperial_legion.dds" name="baseTex"/></textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="attack_ranged">
<props>
<prop actor="props/units/weapons/bow_short.xml" attachpoint="l_hand"/>
<prop actor="props/units/weapons/arrow_back.xml" attachpoint="loaded-r_hand"/>
<prop actor="props/units/weapons/arrow_front.xml" attachpoint="projectile"/>
</props>
</variant>
<variant name="attack_slaughter">
<props>
<prop actor="props/units/weapons/knife.xml" attachpoint="r_hand"/>
</props>
</variant>
</group>
<material>player_trans.xml</material>
</actor>

rome_imperial_archer_e

<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Base">
<animations>
<animation file="biped/inf_sword_ready_a.dae" name="Idle" speed="100"/>
<animation event="0.81" file="biped/inf_arch_atk_a.psa" load="0.16" name="attack_ranged" speed="90"/>
<animation event="0.5" file="infantry/sword/attack/isw_s_off_05.psa" name="attack_slaughter" speed="100"/>
<animation file="biped/walk_spearshield.psa" name="Walk" speed="120"/>
<animation file="infantry/sword/move/run/isw_s_off_01.psa" name="Run" speed="30"/>
<animation file="infantry/general/death/inf_01.psa" name="Death" speed="400"/>
<animation file="infantry/general/death/inf_02.psa" name="Death" speed="700"/>
<animation file="infantry/general/death/inf_03.psa" name="Death" speed="500"/>
<animation file="infantry/general/death/inf_04.psa" name="Death" speed="400"/>
<animation file="infantry/general/death/inf_06.psa" name="Death" speed="500"/>
<animation file="infantry/general/death/inf_07.psa" name="Death" speed="400"/>
<animation file="biped/inf_salute_c.psa" name="Promotion" speed="450"/>
</animations>
<mesh>skeletal/m_tunic_long.dae</mesh>
<props>
<prop actor="props/units/heads/rome_imp_gallic_g.xml" attachpoint="helmet"/>
<prop actor="props/units/heads/rome_head_veteran.xml" attachpoint="head"/>
<prop actor="props/units/weapons/bow_recurve.xml" attachpoint="l_hand"/>
<prop actor="props/units/quiver_back.xml" attachpoint="back"/>
<prop actor="props/units/shields/rome_scutum_legionnaire.xml" attachpoint="shield"/>
</props>
<textures><texture file="skeletal/rome_su4_imperial_legion.dds" name="baseTex"/></textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="attack_ranged">
<props>
<prop actor="props/units/weapons/bow_recurve.xml" attachpoint="l_hand"/>
<prop actor="props/units/weapons/arrow_back.xml" attachpoint="loaded-r_hand"/>
<prop actor="props/units/weapons/arrow_front.xml" attachpoint="projectile"/>
</props>
</variant>
<variant name="attack_slaughter">
<props>
<prop actor="props/units/weapons/knife.xml" attachpoint="r_hand"/>
</props>
</variant>
</group>
<material>player_trans.xml</material>
</actor>
rome_fotress
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_structure_military_fortress">
<Identity>
<Civ>rome</Civ>
<SpecificName>Castellum</SpecificName>
<History>Fortified auxillary camp.</History>
</Identity>
<ProductionQueue>
<Entities datatype="tokens">
units/{civ}_hero_marcellus
units/{civ}_hero_maximus
units/{civ}_hero_scipio
units/{civ}_champion_infantry
units/{civ}_champion_cavalry
units/{civ}_imperial_archer_b
</Entities>
<Technologies datatype="tokens">
siege_attack
siege_armor
siege_cost_metal
siege_cost_wood
</Technologies>
</ProductionQueue>
<VisualActor>
<Actor>structures/romans/fortress.xml</Actor>
</VisualActor>
</Entity>
imperial_archer_a
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="units/rome_imperial_archer_b">
<Identity>
<Rank>Advanced</Rank>
</Identity>
<Promotion>
<Entity>units/rome_imperial_archer_e</Entity>
</Promotion>
<VisualActor>
<Actor>units/rome/imperial_archer_a.xml</Actor>
</VisualActor>
</Entity>
imperial_archer_b
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_infantry_ranged_archer">
<Builder>
<Entities datatype="tokens">
structures/rome_barracks
</Entities>
</Builder>
<Cost>
<Resources>
<food>25</food>
<metal>25</metal>
</Resources>
</Cost>
<Identity>
<Civ>rome</Civ>
<Lang>latin</Lang>
<SelectionGroupName>units/rome_imperial_archer_b</SelectionGroupName>
<GenericName>Roman Legionnaire Archer</GenericName>
<SpecificName>Roman Legionnaire Archer</SpecificName>
<History></History>
<Icon>units/rome_champion_legion_imperial.png</Icon>
<RequiredTechnology>phase_town</RequiredTechnology>
</Identity>
<Promotion>
<Entity>units/rome_imperial_archer_a</Entity>
</Promotion>
<VisualActor>
<Actor>units/rome/imperial_archer_b.xml</Actor>
</VisualActor>
</Entity>
imperial_archer_e
<?xml version="1.0" encoding="utf-8"?>
<Entity parent="units/rome_imperial_archer_a">
<Identity>
<Rank>Elite</Rank>
</Identity>
<Promotion disable=""/>
<VisualActor>
<Actor>units/rome/imperial_archer_e.xml</Actor>
</VisualActor>
</Entity>
I hope this will give you a better image of what im doing wrong:)
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...