Jump to content

Hyrule Conquest


Recommended Posts

You've changed it to the correct resource supply type? That's the only thing I see. Everything should be working fine. I've tested everything and it works perfectly. It's something on your part with the templates and types. It could be a misspelling of sorts. IDK. If you can get the github account up I can look at the templates. You don't need to upload petra to it just the file I added.

Link to comment
Share on other sites

11 hours ago, SirPope said:

You've changed it to the correct resource supply type? That's the only thing I see. Everything should be working fine. I've tested everything and it works perfectly. It's something on your part with the templates and types. It could be a misspelling of sorts. IDK. If you can get the github account up I can look at the templates. You don't need to upload petra to it just the file I added.

Yes the Mine has the correct resource supply .

  <ResourceSupply>
    <KillBeforeGather>false</KillBeforeGather>
    <Amount>Infinity</Amount>
    <Type>food.rocksirloin</Type>
    <MaxGatherers>3</MaxGatherers>
    <DiminishingReturns>0.90</DiminishingReturns>
  </ResourceSupply>  

The problem isn't the mine, the problem is the AI lays the foundation for the mine but never ever sends a worker to actually finish building it. The AI places the mine but leaves it un-constructed and when it runs out of resources the workers don't even bother to finish building the mine. This is of course unless I remove the "Field" classlabel from the mine, then they do build it but do not mine from it. 

Here's the Goron Miner template and every other parent:

goron_miner.zip

Link to comment
Share on other sites

template_unit_goron_citizen doesn't have a _field entity in it's Builder list. You've probably got it set up the same as you did in the previous release (Farmstead/Field or Farmstead/Corral) combos.

The farmstead needs to be renamed as a field, have the class Field, and be added to the build list. I posted about this problem ages ago about the hyrule and gerudo. The farmstead should be named as a field if it is to be used that way. The corral, a corral (and have class Corral). so on and so forth. The farmstead is treated entirely different. The reason it was being built first is because farmsteads always are (near berry bushes). It's not finished because the AI was forced to build it in starting strategies (because it has a building named '_farmstead' in it's build list) and the AI literally has no use for it as no resource that it can gather is around it (thus, ignored).

Ban Farmstead from your mind unless you literally just want a building to be considered a dropsite for food. Sorry if I sound frustrated but age's ago. Everything that I can tell is correct, except for the no goron_field part which literally equals = no field. Removing the counts will force the AI to stop waiting for berry supplies to be gathered. It again, will affect everyone.

Template name's mean everything to the AI. @mimo this fact is more annoying than a pack of rabid badgers - plus is this Farmstead/(Field or Corral) combo supported in any capacity. I think the Corral class is counted as a trigger for needCorral... and needFarm... wouldn't matter if it is or isn't they only know to build _field and _corral when dealing with them. The variables seem to be everywhere in A22, I haven't really looked over the newer code.

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

Just a quick question, is there a ranged version of this:

<Bonuses>
          <BonusCavMelee>
            <Classes>Cavalry</Classes>
            <Multiplier>3.0</Multiplier>
          </BonusCavMelee>
 </Bonuses>

 

It doesn't seem to work for ranged attacks. Changing BonusCavMelee to Bonus1 doesn't seem to work either.

Link to comment
Share on other sites

41 minutes ago, The Undying Nephalim said:

Just a quick question, is there a ranged version of this:

<Bonuses>
          <BonusCavMelee>
            <Classes>Cavalry</Classes>
            <Multiplier>3.0</Multiplier>
          </BonusCavMelee>
 </Bonuses>

 

It doesn't seem to work for ranged attacks. Changing BonusCavMelee to Bonus1 doesn't seem to work either.

Should be in there somewhere. For example, slingers have a 1.5x multiplier against archers. If it exists its probably in the templates.

Link to comment
Share on other sites

50 minutes ago, The Undying Nephalim said:

Just a quick question, is there a ranged version of this:

<Bonuses>
          <BonusCavMelee>
            <Classes>Cavalry</Classes>
            <Multiplier>3.0</Multiplier>
          </BonusCavMelee>
 </Bonuses>

 

It doesn't seem to work for ranged attacks. Changing BonusCavMelee to Bonus1 doesn't seem to work either.

nope because the game have only that counter between units. in the actual alpha since A15.

Link to comment
Share on other sites

19 minutes ago, Baskom Welford said:

Should be in there somewhere. For example, slingers have a 1.5x multiplier against archers. If it exists its probably in the templates.

Upon closer inspection I think it is working, it's just not displaying that the unit has the ability to counter when you hover the cursor over their portrait.

Link to comment
Share on other sites

I think you can be unit specific with Aura's (not the trickle, as Loki said). It'd be modifying loot so they'd get it when they die, not when you hit them though. It is in the TechModifications but again I don't know if the Aura's have access to it in A22. I think Grundus made it work for Auras. IDK when.

https://trac.wildfiregames.com/wiki/TechModifications

https://trac.wildfiregames.com/wiki/Aura_Templates

See affectedPlayers to target the enemy. You probably already know.
 

Spoiler

 

Edit:

I think to implement the trickle when hit you'd do it in UnitAI? I don't know if the units know who hit it. If they could then it might be possible. I don't know much there. You'd also have to edit the entity scheme to set what class they'd have to hit to give them a trickle, how much, how long. I can kind of see how it would work but... See the comment below.

 

I'd abuse this trickle/resource on hit to the maximum. Come here little healer... "What's that trapped in the walls?" ... "It's my leprechaun." Wack!

Edited by SirPope
Link to comment
Share on other sites

3 hours ago, SirPope said:

I think you can be unit specific with Aura's (not the trickle, as Loki said). It'd be modifying loot so they'd get it when they die, not when you hit them though. It is in the TechModifications but again I don't know if the Aura's have access to it in A22. I think Grundus made it work for Auras. IDK when.

https://trac.wildfiregames.com/wiki/TechModifications

https://trac.wildfiregames.com/wiki/Aura_Templates

See affectedPlayers to target the enemy. You probably already know.

The idea for the ability is similar to the Orc "Pillage" ability from Warcraft 3, where each hit of damage against enemy buildings added Gold to you resource count. Basically each time a unit deals damage it also adds gold. Getting a Rupee burst on death as loot might be the best workaround in the meantime though.

 

Last question, how exactly does the game detect and use Team Bonuses? I've found them floating around in simulation\data\auras\teambonuses and I've made them, but I have a feeling I need to do something more then just have a civ_ prefix because none of them are working.

Link to comment
Share on other sites

40 minutes ago, The Undying Nephalim said:

Last question, how exactly does the game detect and use Team Bonuses? I've found them floating around in simulation\data\auras\teambonuses and I've made them, but I have a feeling I need to do something more then just have a civ_ prefix because none of them are working.

Give those auras to the player.xml file for that civ. Auras need to be attached to an object in the game, so for team bonuses they are attached to the ephemeral player object.

Link to comment
Share on other sites

37 minutes ago, wowgetoffyourcellphone said:

Give those auras to the player.xml file for that civ. Auras need to be attached to an object in the game, so for team bonuses they are attached to the ephemeral player object.

Awesome that worked.

Last-last question, is there a way to make it so a technology is instantly researched when a building is finished being constructed?

Link to comment
Share on other sites

47 minutes ago, The Undying Nephalim said:

Awesome that worked.

Last-last question, is there a way to make it so a technology is instantly researched when a building is finished being constructed?

Yes, I do this in DE for the Empire Phase. It auto-researches when the player builds a Wonder.

Just make that building be a requirement object for the tech. Then set the tech to auto-research. Lastly, set the research time and costs to zero. Here is my Empire Phase tech for an example:

 

{
	"genericName": "Empire Phase",
	"specificName": {
		"athen": "Autokratoría"
	},
	"description": "Moves your civilization from urbanism to imperialism, unlocking powerful technologies and abilities not available in earlier phases of expansion. This is the Athenian imperial phase, where metal gathering rates are boosted because of the Silver Owls bonus.",
	"cost": {"food": 0, "wood": 0, "stone": 0, "metal": 0},
	"requirements": {"entity": {"class": "Wonder", "number": 1}},
	"autoResearch": true,
	"requirementsTooltip": "Requires 1 Wonder to be built.",
	"supersedes": "phase_city_athen",
	"replaces": ["phase_imperial"],
	"icon": "phase_imperial.png",
	"researchTime": 0,
	"tooltip": "Advance to Empire Phase, which unlocks powerful technologies and abilities. Territory radius for Civic Centers and vision range for units increased by a final +25%. 'Silver Owls' bonus gives +10% metal gathering rates.",
	"modifications": [
		{"value": "TerritoryInfluence/Radius", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "CivCentre"},
		{"value": "Vision/Range", "multiply": 1.25, "affects": "Unit"},
		{"value": "ResourceGatherer/Rates/metal.ore", "multiply": 1.1, "affects": "Gatherer"}
	],
	"soundComplete": "interface/alarm/alarm_phase.xml"
}

 

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

12 hours ago, The Undying Nephalim said:

Just a quick question, is there a ranged version of this:

<Bonuses>
          <BonusCavMelee>
            <Classes>Cavalry</Classes>
            <Multiplier>3.0</Multiplier>
          </BonusCavMelee>
 </Bonuses>

 

It doesn't seem to work for ranged attacks. Changing BonusCavMelee to Bonus1 doesn't seem to work either.

The name of the bonus doesn't really matter (if it's the same the child's overrides the parent's, if it's different both apply). The <bonuses> element has to be put inside an attack, which can be capture, melee, ranged, or slaughter, e.g.:

  <Attack>
    <Melee>
      <Bonuses>
        <Cavalry>
          <Classes>Cavalry Ranged</Classes>
          <Multiplier>1.5</Multiplier>
        </Cavalry>
        <Elephantry>
          <Classes>Elephant</Classes>
          <Multiplier>0.5</Multiplier>
        </Elephantry>
      </Bonuses>
      <MaxRange>6</MaxRange>
      <Pierce>8</Pierce>
      <PrepareTime>750</PrepareTime>
      <PreferredClasses datatype="tokens">Human</PreferredClasses>
      <RepeatTime>1000</RepeatTime>
    </Melee>
  </Attack>

 

11 hours ago, The Undying Nephalim said:

Upon closer inspection I think it is working, it's just not displaying that the unit has the ability to counter when you hover the cursor over their portrait.

To do that you have to manually add it to the tooltip, e.g.:

  <Identity>
    <GenericName>Melee Camel</GenericName>
    <Tooltip>Counters: 1.5× vs Ranged Cavalry.
Penalties: 0.5× vs Elephants.</Tooltip>
    <VisibleClasses datatype="tokens">Camel Melee</VisibleClasses>
  </Identity>

 

10 hours ago, The Undying Nephalim said:

Another small question I might have asked before but don't remember,  is there a way to make it so that attacking a specific class of unit generates a trickle of a specific resource?

Not exactly; currently there are three different options available:

  • <Loot>: if a unit is killed it grants these resource amounts to its enemy
  • <Looter>: if a unit kills it gains these resource amounts as additional loot
  • <ResourceTrickle>: this unit passively generates a constant flow of resources for its owner
10 hours ago, The Undying Nephalim said:

I'm adding in a few last minute things and I want Gerudo units to gain a slow trickle of Rupees when they are attacking enemy workers and storehouses.

You could consider creating an aura for that (don't forget to include it under <Auras datatype="tokens"> in your unit files).

6 hours ago, The Undying Nephalim said:

Last question, how exactly does the game detect and use Team Bonuses? I've found them floating around in simulation\data\auras\teambonuses and I've made them, but I have a feeling I need to do something more then just have a civ_ prefix because none of them are working.

Have a look at e.g. https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/templates/special/player_athen.xml

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

Well I'm getting a very strange error when I try to look at the Zora Techtree in game:

Spoiler

<!DOCTYPE html>
<meta charset="utf-8">
<title>Pyrogenesis Log</title>
<style>body { background: #eee; color: black; font-family: sans-serif; } p { background: white; margin: 3px 0 3px 0; } .error { color: red; } .warning { color: blue; }</style>
<h2>0 A.D. (0.0.22) Main log (warnings and errors only)</h2>
<p class="warning">WARNING: JavaScript warning: gui/structree/helper.js line 177
reference to undefined property g_ParsedData.phaseList[0]</p>
<p class="warning">WARNING: The "Town Phase" technology is not researchable in any structure buildable by the zora civilisation, but is required by something that this civ can research, train or build!</p>
<p class="warning">WARNING: The "City Phase" technology is not researchable in any structure buildable by the zora civilisation, but is required by something that this civ can research, train or build!</p>
<p class="error">ERROR: JavaScript error: gui/structree/helper.js line 170
ReferenceError: techName is not defined
  GetActualPhase@gui/structree/helper.js:170:2
  GetPhaseOfTemplate@gui/structree/helper.js:180:1
  selectCiv@gui/structree/structree.js:181:22
  __eventhandler182 (selectionchange)@civSelection selectionchange:0:1
  init@gui/structree/structree.js:36:27
  openStrucTree@gui/session/menu.js:1034:1
  __eventhandler158 (press)@civIconOverlay press:0:1</p>
<p class="error">ERROR: GUI page 'page_structree.xml': Failed to call init() function</p>
<p>Engine exited successfully on 2017-12-20 at 23:24:56 with 1016 message(s), 2 error(s) and 7 warning(s).</p>

 

Every unit, building, and tech for their faction works perfectly, there's nothing that's not showing up and both the town and city phase can be researched at their civil center.

  • Haha 1
Link to comment
Share on other sites

2 hours ago, The Undying Nephalim said:

Well I'm getting a very strange error when I try to look at the Zora Techtree in game:

  Reveal hidden contents


<!DOCTYPE html>
<meta charset="utf-8">
<title>Pyrogenesis Log</title>
<style>body { background: #eee; color: black; font-family: sans-serif; } p { background: white; margin: 3px 0 3px 0; } .error { color: red; } .warning { color: blue; }</style>
<h2>0 A.D. (0.0.22) Main log (warnings and errors only)</h2>
<p class="warning">WARNING: JavaScript warning: gui/structree/helper.js line 177
reference to undefined property g_ParsedData.phaseList[0]</p>
<p class="warning">WARNING: The "Town Phase" technology is not researchable in any structure buildable by the zora civilisation, but is required by something that this civ can research, train or build!</p>
<p class="warning">WARNING: The "City Phase" technology is not researchable in any structure buildable by the zora civilisation, but is required by something that this civ can research, train or build!</p>
<p class="error">ERROR: JavaScript error: gui/structree/helper.js line 170
ReferenceError: techName is not defined
  GetActualPhase@gui/structree/helper.js:170:2
  GetPhaseOfTemplate@gui/structree/helper.js:180:1
  selectCiv@gui/structree/structree.js:181:22
  __eventhandler182 (selectionchange)@civSelection selectionchange:0:1
  init@gui/structree/structree.js:36:27
  openStrucTree@gui/session/menu.js:1034:1
  __eventhandler158 (press)@civIconOverlay press:0:1</p>
<p class="error">ERROR: GUI page 'page_structree.xml': Failed to call init() function</p>
<p>Engine exited successfully on 2017-12-20 at 23:24:56 with 1016 message(s), 2 error(s) and 7 warning(s).</p>

 

Every unit, building, and tech for their faction works perfectly, there's nothing that's not showing up and both the town and city phase can be researched at their civil center.

Usually this means there is a typo in the <RequiredTechnology> element, e.g. Phase_Town instead of phase_town. If this is the case, the entity will correctly show up in the tech tree, however, it won't be buildable in game, because its requirement can't be normally researched, hence the warning.

Link to comment
Share on other sites

Diagnosis from afar is going to be tricky - we don't have access to your current changes to see what's what. However...

WARNING: JavaScript warning: gui/structree/helper.js line 177 reference to undefined property g_ParsedData.phaseList[0]

For some reason, the structree is struggling to build the list of phases for the zora civ. Without seeing your templates, it's hard to work out why, but it's possible there's a problem with how the structree is parsing tech superseding. (Also this may have already been resolved for Alpha-23, as there has been an update to that part of the code since the release of A22.)

WARNING: The "Town Phase" technology is not researchable in any structure buildable by the zora civilisation, but is required by something that this civ can research, train or build!</p>
WARNING: The "City Phase" technology is not researchable in any structure buildable by the zora civilisation, but is required by something that this civ can research, train or build!</p>

Custom phase technologies for the zora? Might be something either isn't using them, or pointing to the phase techs of another civ. Could also be caused by a unit, structure, or technology shared between two civs, one with custom phase techs and one without. Or it may be some other reason I can't diagnose/think of currently.

ERROR: JavaScript error: gui/structree/helper.js line 170 ReferenceError: techName is not defined

This error is caused by a typo in the structree itself in Alpha-22, since fixed for Alpha-23. (The line in question should refer to `phaseName`, not `techName`). Even corrected, it is likely that a Warning or Error would still be issued here, as an additional consequence of the cause of the first Warning above.

  • Like 1
Link to comment
Share on other sites

14 hours ago, s0600204 said:

Custom phase technologies for the zora? Might be something either isn't using them, or pointing to the phase techs of another civ. Could also be caused by a unit, structure, or technology shared between two civs, one with custom phase techs and one without. Or it may be some other reason I can't diagnose/think of currently.

All my factions currently just use the generic phase_town and phase_city techs. It's strange, every building, unit, and tech for the Zora is showing up and can be built, trained, or researched with no problem. I've tried removing all of my techs from the game and the problem still shows up on the techtree screen so it's probably a unit or building.

Link to comment
Share on other sites

  • Stan` pinned this topic

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...