Jump to content

Creating The Bronze Age mod


Sebastián Gómez
 Share

Recommended Posts

17 hours ago, Nescio said:

The simulation template file name ought to be `{civ}_civil_centre.xml` for all civs; the `{civ}` part is then replaced with the civ code, e.g. `athen_civil_centre.xml`, not `athenians_civil_centre.xml`.

I'll follow the established name convention then.

Can I ask you one more question?

Since I haven't created my own units yet, I want to set up my new civ to use units from another civ like Spartans. Do I need to copy the Spartan units to my civ folder and rename them or is it possible to use them by just "addressing" their original folder path in one my civ templates?

Link to comment
Share on other sites

3 hours ago, Basshunter said:

I'll follow the established name convention then.

Can I ask you one more question?

Since I haven't created my own units yet, I want to set up my new civ to use units from another civ like Spartans. Do I need to copy the Spartan units to my civ folder and rename them or is it possible to use them by just "addressing" their original folder path in one my civ templates?

Do you want to just reuse the Spartan actors for now? 

Link to comment
Share on other sites

6 hours ago, Basshunter said:

Can I ask you one more question?

Of course! And more, if you like. Never hesitate to ask questions, there are always people with more experience, so there is no point in wasting time by trying to reinvent the wheel yourself.

6 hours ago, Basshunter said:

Since I haven't created my own units yet, I want to set up my new civ to use units from another civ like Spartans. Do I need to copy the Spartan units to my civ folder and rename them or is it possible to use them by just "addressing" their original folder path in one my civ templates?

Don't add duplicate art files. Templates can load any actor, regardless of civilization. E.g. `sele_cavalry_javelinist_b.xml`:

<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_cavalry_ranged_javelinist">
  <Identity>
    <Civ>sele</Civ>
    <Lang>greek</Lang>
    <SelectionGroupName>units/sele_cavalry_javelinist_b</SelectionGroupName>
    <GenericName>Militia Cavalry</GenericName>
    <SpecificName>Hippakontistès Politès</SpecificName>
    <Icon>units/sele_cavalry_javelinist.png</Icon>
  </Identity>
  <Promotion>
    <Entity>units/sele_cavalry_javelinist_a</Entity>
  </Promotion>
  <VisualActor>
    <Actor>units/athenians/cavalry_javelinist_b_m.xml</Actor>
  </VisualActor>
</Entity>

[EDIT] You need to create simulation templates for the units you want to be available for your civ, but you can let them load templates from other civs, if you like. E.g. create `acha_support_female_citizen`:

<?xml version="1.0" encoding="utf-8"?>
<Entity parent="units/spart_support_female_citizen">
  <Identity>
    <Civ>acha</Civ>
    <SelectionGroupName>units/acha_support_female_citizen</SelectionGroupName>
  </Identity>
</Entity>

and `acha_support_female_citizen_house`:

<?xml version="1.0" encoding="utf-8"?>
<Entity parent="units/acha_support_female_citizen">
  <Cost>
    <BuildTime>30</BuildTime>
  </Cost>
  <Identity>
    <RequiredTechnology>unlock_females_house</RequiredTechnology>
  </Identity>
</Entity>
Edited by Nescio
female citizen example
  • Thanks 1
Link to comment
Share on other sites

11 hours ago, wowgetoffyourcellphone said:

Do you want to just reuse the Spartan actors for now? 

Yes, until I create my own

 

9 hours ago, Nescio said:

Of course! And more, if you like. Never hesitate to ask questions, there are always people with more experience, so there is no point in wasting time by trying to reinvent the wheel yourself.

 

Thanks for your comprehensive explanation. I really appreciate it.

Link to comment
Share on other sites

46 minutes ago, Nescio said:

You're welcome! When I started modifying the game three (!) years ago I was greatly helped by people patiently answering my questions ( https://wildfiregames.com/forum/index.php?/topic/21083-how-to-modify-0-ad/ ).

 

I was reading that thread this week. I'm very amazed of how you have learned so much about modding. Nice!

Link to comment
Share on other sites

Hey guys. Here I have a couple of questions:

1) How can I set up some structures so they can only be build OUTSIDE the initial territory limits?

Edit: I tried adding a "BuildRestrictions" parameter to the simulation templates of these structures and set it no "neutral". Apparently it works. Should this be enough?

 

2) How can I prevent territory limits from being expanded every time a new structure is build?

Edit: At least for houses, I tried modifying "template_structure_civic_house_big.xml" in "simulation\templates" as follow:

image.png.ec53cfbe41fd5065f01033bac2573661.png

Apparently it works too. Should changing this parameter be enough?

Edited by Basshunter
  • Like 1
Link to comment
Share on other sites

As a programmer, most of the time if it works then it works, lol. Only fix when I find bug.

I'm at work right now, so I cannot confirm, but have you tried for 2) using this?

<TerritoryInfluence disable="">

I see some code use that so it's probably simpler than setting the Radius to 0. 

Edited by azayrahmad
Fix code based on @Nescio comment
Link to comment
Share on other sites

1. Yes, <BuildRestrictions/Territory> is what you need; options include own, neutral, enemy, ally.

2. Entities (e.g. structures) don't really need a <TerritoryInfluence> node; setting <Radius> to 0 is ugly; if you don't want something that is inherited, disable it (without the d); in your case, you could also simply consider removing it from the parent (`template_structure_civic_house.xml`).

See `simulation/templates/structures/rome_army_camp.xml` as an example for both questions.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

8 hours ago, Nescio said:

if you don't want something that is inherited, disable it (without the d)

I'm not sure I got this exact part. Could you elaborate on this please?

 

 

8 hours ago, Nescio said:

in your case, you could also simply consider removing it from the parent (`template_structure_civic_house.xml`).

By deleting the node or by changing it to <TerritoryInfluence disable=""/> ?

 

 

8 hours ago, Nescio said:

See `simulation/templates/structures/rome_army_camp.xml` as an example for both questions.

You said "Entities (e.g. structures) don't really need a <TerritoryInfluence> node". However, looking at rome_army_camp.xml I can see that's exactly what they did. They just added a  <TerritoryInfluence disable=""/>  line. 

Edited by Basshunter
  • Like 1
Link to comment
Share on other sites

13 hours ago, Basshunter said:

You said "Entities (e.g. structures) don't really need a <TerritoryInfluence> node". However, looking at rome_army_camp.xml I can see that's exactly what they did. They just added a  <TerritoryInfluence disable=""/>  line. 

The only reason the Army Camp had to disable TerritoryInfluence is because it had inherited TerritoryInfluence from its parent template (template_structure_special). But if your templates don't include TerritoryInfluence at all (if template_structure_special never had it enabled), then TerritoryInfluence won't ever be enabled and won't need to be disabled.

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Let's take the house for example. It has the following inheritance (see the second line (<Entity parent="">) of any template):

template_structure.xml
template_structure_civic.xml
template_structure_civic_house.xml
template_structure_civic_house_big.xml
structures/athen_house.xml

The structure and civic templates don't have a <TerritoryInfluence> node; it is introduced in the house template and modified in the big template. Now what to do depends on what you want:

  1. remove <TerritoryInfluence> from one or more specific templates (e.g. athen_house.xml), but not all:
    insert a <TerritoryInfluence disable=""/> line in the specific template file
  2. remove <TerritoryInfluence> from all big houses, but not from small houses:
    replace the entire <TerritoryInfluence> node (four lines) in template_structure_civic_house_big.xml with a <TerritoryInfluence disable=""/> line
  3. remove <TerritoryInfluence> from all small houses, but not from big houses:
    remove the entire <TerritoryInfluence> node (five lines) in template_structure_civic_house.xml and insert a <Root>false</Root> line inside the <TerritoryInfluence> node in template_structure_civic_house_big.xml
  4. remove <TerritoryInfluence> from all houses:
    delete the <TerritoryInfluence> nodes in both the template_structure_civic_house.xml (five lines) and template_structure_civic_house_big.xml (four lines) files
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

8 hours ago, Basshunter said:

Hey guys, here I have another question:

How can I remove all gathering capabilities from military units? I would like to delete the citizen-soldier concept from my mod so soldiers can only fight and build some structures.

2 hours ago, Stan` said:

You need to add either

<ResourceGatherer disable="" /> 

to your unit or remove in template_unit.xml :)

Actually keep template_unit.xml unchanged (it allows you to obtain treasures) and remove the entire <ResourceGatherer> node from both template_unit_cavalry.xml and template_unit_infantry.xml. For buidling structures, see the <Builder> node in template_unit_infantry.xml.

 

  • Thanks 1
Link to comment
Share on other sites

11 hours ago, Stan` said:

You need to add either

<ResourceGatherer disable="" /> 

to your unit or remove in template_unit.xml :)

 

9 hours ago, Nescio said:

remove the entire <ResourceGatherer> node from both template_unit_cavalry.xml and template_unit_infantry.xml.

That's exactly what I've been trying to do since yesterday without success. I've tried with template_unit.xml and template_unit_infantry.xml. I just get a bunch of errors 

Spoiler

image.thumb.png.2abb20b1ae78b1b8a2ce51661e69312a.png

 

Edited by Basshunter
Link to comment
Share on other sites

Please copy errors and warnings from the `interestinglog.html` (see https://trac.wildfiregames.com/wiki/GameDataPaths ); screenshots tend to be hard to read. Yours does suggest something other than <ResourceGatherer> is the problem, though.

Also, A23 (stable) or A24 (development version)? If the latter, check yours is up to date (svn up). And if you copy templates, make sure its from the proper source.

By the way, do you happen to have a public repository of your mod? It's not mandatory, but browsing your files could make it easier to help you.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

@Nescio I'll start creating a public repository as you suggested.

Regarding the version of the game, I was using A23 for testing but the files I was using for building my mod were from A24. I suppose that could bring some incompatibility issues at some point. So I decided to start from scratch using just A24. I'll be back as soon as I have everything set up again.

Edited by Basshunter
  • Thanks 1
Link to comment
Share on other sites

hi @Stan`. I was wondering if you could take a look at this problem I'm having when trying to import a simple box into the game from 3ds max. The game crashes and shows an error dialog box every time I try to load the actor using the scenario editor. My 3ds max version is 2020.

My workflow for creating this mesh was:

1) Create a box (10x20x5 approx)

2) Convert the box to editable poly

3) UV Unwrap

4) Convert to editable poly again

5) Enter Face mode (4), select all faces and re-scale to 2% of the size

6) Reset X-Form and collapse all

7) Select and export selected to Autodesk Collada (dae) using default settings.

 

I know you were a 3ds Max user so maybe you could help me figure it out. Error log file is attached. I also started a GitHub repository where you could check the files. It on the "new-civ_achaeans" branch.

 

Error Log.txt

Edited by Basshunter
Link to comment
Share on other sites

I'm gonna start with the obvious things first given that the error log is unfortunately empty...

  • Did you make sure to use a lowercase extension ? (eg. 'dae' not 'DAE' or 'Dae')
  • Did you in the actor XML file use an AO dependant material ? (eg. 'player_trans_ao.xml) In this case you need a second UVSet 
  • Does your mesh have multiple materials ?

 

  • Thanks 1
Link to comment
Share on other sites

10 hours ago, Stan` said:
  • Did you in the actor XML file use an AO dependant material ? (eg. 'player_trans_ao.xml) In this case you need a second UVSet 

 

Changing this line to  <material>player_trans.xml</material> seems to fix the problem. Is this line correct I just want to use the color texture for now?

By the way, I re-upload the error log file. Thank you so much Stan.

Link to comment
Share on other sites

Are you still using A23b or SVN if the later then @vladislavbelov needs to be notified because his crash fix didn't work

22 minutes ago, Basshunter said:

Changing this line to  <material>player_trans.xml</material> seems to fix the problem. Is this line correct I just want to use the color texture for now?

Yes. If you want transparency instead of player color you should use basic_trans.xml there is also basic_no_trans.xml iirc in case you don't want transparency. If you want to add a specifi color to the transparent areas you can use objectcolor.xml :)

The rest of the materials are made to use special maps :)

You're welcome keep on modding !

  • Thanks 1
Link to comment
Share on other sites

I haven't managed to understand how SkirmishReplacements node in civ files works. Could someone give me a hand?

I'm trying to set my starting units as follows for both random and skirmish maps:

- 1 cavalryman

- 4 spearman

- 4 workers

Error log file attached

Error log.txt

Edited by Basshunter
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...