Jump to content

unlock construction through technologies


Recommended Posts

Guys, I'm creating a technology whose objective is to unlock a field, but it gives an error. I need help. Here are the scripts.

tec:

{
  "genericName": "Agricultura Rudimentar",
  "specificName": {
    "english": "Agricultura Básica",
    "portuguese": "Agricultura Rudimentar"
  },
  "description": "Permite o cultivo de grãos básicos, desbloqueando a construção de campos agrícolas.",
  "icon": "grain.png",
  "researchTime": 100,
  "cost": {
    "wood": 100
  },
  "requisitos": {
    "todos": [
      { "class": "Vila", "número": 1 }
    ]
  },
  "efeitos": [
    {
      "tipo": "entidade de desbloqueio",
      "entidade": "estruturas/jomon/field_grain"
    }
  ],
  "soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}

field:

<?xml version="1.0" encoding="utf-8"?>
<Entidade pai="campo_de_recurso_de_estrutura_de_modelo">
  <Identidade>
    <Civ>jomon</Civ>
    <NomeEspecífico>Tián</NomeEspecífico>
  </Identidade>

  <Requisitos>
    <Tecnologias datatype="tokens">agricultura_rudimentar</Tecnologias>
  </Requisitos>

  <VisualActor>
    <Actor>estruturas/plot_field_chin.xml</Actor>
  </VisualActor>
</Entidade>

 

Link to comment
Share on other sites

1 hour ago, Adriano0ad said:

Guys, I'm creating a technology whose objective is to unlock a field, but it gives an error. I need help. Here are the scripts.

tec:

{
  "genericName": "Agricultura Rudimentar",
  "specificName": {
    "english": "Agricultura Básica",
    "portuguese": "Agricultura Rudimentar"
  },
  "description": "Permite o cultivo de grãos básicos, desbloqueando a construção de campos agrícolas.",
  "icon": "grain.png",
  "researchTime": 100,
  "cost": {
    "wood": 100
  },
  "requisitos": {
    "todos": [
      { "class": "Vila", "número": 1 }
    ]
  },
  "efeitos": [
    {
      "tipo": "entidade de desbloqueio",
      "entidade": "estruturas/jomon/field_grain"
    }
  ],
  "soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}

field:

<?xml version="1.0" encoding="utf-8"?>
<Entidade pai="campo_de_recurso_de_estrutura_de_modelo">
  <Identidade>
    <Civ>jomon</Civ>
    <NomeEspecífico>Tián</NomeEspecífico>
  </Identidade>

  <Requisitos>
    <Tecnologias datatype="tokens">agricultura_rudimentar</Tecnologias>
  </Requisitos>

  <VisualActor>
    <Actor>estruturas/plot_field_chin.xml</Actor>
  </VisualActor>
</Entidade>

 

Acredito que o tradutor mudou o nome dos parâmetros, se não for o caso é importante lembrar que os parâmetros devem ser em inglês, exatamente iguais ao padrão do jogo.

Link to comment
Share on other sites

I managed to solve the problem, it seems that the problem was occurring because civilization begins without a civic center and in technology it had to have the first phase and this was generating conflict, after I removed this it worked

  • Thanks 1
Link to comment
Share on other sites

  • 3 months later...

Interesting post! I can see you’re trying to connect the technology with unlocking building features, but the script seems to have some naming or syntax mismatches in the requirements and effects. Sometimes even a small change in the attribute names (like using requirements instead of requisitos) can throw an error.

On a related note, in real-world projects, proper planning tools work the same way unlocking possibilities by setting the right conditions. Accurate online construction estimating can be just as important for managing costs and ensuring that everything gets built on time.

Maybe try validating the script against other working tech files to spot the exact error.

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