Jump to content

Hyrule Conquest


Recommended Posts

On 05/01/2018 at 10:30 PM, The Undying Nephalim said:

[...] However if a player selects Random as their Civ they occasionally spawn as the unplayable Civ. Is there something I'm missing or is this a bug?

Yeah, that's a bug. Someone care to fill out an issue on trac? Please?

On 05/01/2018 at 10:30 PM, The Undying Nephalim said:

[...] I don't think the engine supports pre-rendered cinematics at the moment. [...]

It does not, no.

2 hours ago, SirPope said:

[...] I'm going to try and fix it on my end. If I get it done and it works, I'll upload a zip file. [...]

Y'know, hypothetically, if the repository was on GitLab/GitHub/whatever (locked down so only a select few could see it if that's your thing) it would make things easier for those selected few to suggest fixes and improvements through pull requests. There's clearly a couple of people present who want to help with the scripting side of things. (Unless it already is, but you haven't told us...)

1 hour ago, Nescio said:

Also, when loading the tech trees, there are quite a few warnings.

Side-effect of the hero-choosing thing at game start. Usually, a technology that can't be researched at a building or unit, but is still a requirement for something else, is a cause for concern.

1 hour ago, Nescio said:

No and no (I'm assuming this mod doesn't overhaul armour mechanics). AoE uses linear armour. AoM uses percentage armour. 0 A.D. uses exponential armour (if I recall correctly; there was an explanatory page on the subject somewhere).

This?: https://wildfiregames.com/forum/index.php?/topic/22904-how-does-the-armour-work

Link to comment
Share on other sites

I found the corral issue. gerudo_field is never set to disabled. Even though it doesn't have a template for it (after changing it to _corral and updating the build list of the citizen).

I'm not sure how to set it to disabled. I just deleted this line from baseManager -> checkResourceLevels

gameState.isTemplateDisabled(gameState.applyCiv("structures/{civ}_field")) &&

and it worked. :/ I'm not sure who to ping here and trac scares me so: @wowgetoffyourcellphone ?

canBuild already checks if it's disabled. It seems a bit unnecessary to have that check.

			else if (!queues.corral.hasQueuedUnits() &&
				 !gameState.getOwnEntitiesByClass("Corral", true).hasEntities() &&
				 gameState.ai.HQ.canBuild(gameState, "structures/{civ}_corral"))
			{
Link to comment
Share on other sites

19 hours ago, Ozerol Notna said:

Can this can be fixed? Having the miners garrison the structures for income is an interesting mechanic.

Yeah Garrisonable mines work, just not for the AI. I don't have the scripting knowledge to mess with the AI to try and get them to order workers to go inside the mines instead of harvesting resources the normal way.

19 hours ago, Ozerol Notna said:

I know I've asked this before but how are mercenaries going to work in the game?

I believe I answered this in this post here: https://wildfiregames.com/forum/index.php?/topic/22638-hyrule-conquest/&do=findComment&comment=345250

1 hour ago, s0600204 said:

Yeah, that's a bug. Someone care to fill out an issue on trac? Please?

Awesome. Another small quirk I've noticed is that if I set an AI player to the unselectable Civ in Atlas, it only shows up as that Cv the first time you select the map in the menu. Anytime after that it switches it to Random.

1 hour ago, s0600204 said:

Y'know, hypothetically, if the repository was on GitLab/GitHub/whatever (locked down so only a select few could see it if that's your thing) it would make things easier for those selected few to suggest fixes and improvements through pull requests. There's clearly a couple of people present who want to help with the scripting side of things. (Unless it already is, but you haven't told us...)

I need to put this all on github. Soon. 

1 hour ago, SirPope said:

I'm not sure how to set it to disabled. I just deleted this line from baseManager -> checkResourceLevels

gameState.isTemplateDisabled(gameState.applyCiv("structures/{civ}_field")) &&

I think this might ruin the AI for the other Civs that build farms though. Ideally something that checks for what civ an AI is playing as and then loads civ specific AI would be neat. This would also help for some of the Map Civs like Lon Lon Ranch, which I just want to build a handful of units to guard their base and not expand.

Link to comment
Share on other sites

Do to the if statement above that line, the AI won't build the corral if it can build a farm. That line I posted is also checked in the canBuild function so nothing would break. I think it was put there as a 'quick skip', but the entire if statement is checked, even canBuild. Basically, it checks if it's disabled twice. However, In canBuild, it checks if it can actually load the template (a lot more important). If the template doesn't exist then it exits. It's pretty much a pointless corral-blocker. I don't think corral only civ's have been properly tested with petra. I think it was added to allow map-specific settings (no farms, no corral) such and such. Thing is it checks it in canBuild.

If that's what you want LonLonRanch to do, you've got a problem. They can't build houses. If you don't allow any of the buildings to have a territory they won't/can't expand. You should probably just increase the populationbonus of their civ centre to 100.

Link to comment
Share on other sites

Okay I found something. I was having a bit of trouble with my fixes but I think I got it figured out. Farmstead's don't have the ResourceDropsite tag. After all my changes to the hylians and gerudos an error kept showing up and... I reinstalled... ... ...

It's got the class DropsiteFood and Farmstead so the AI runs to it and tries to deposit into it and error. I can't test if this is a fix do to the reinstall and I'm tired. I doubt I'll get this done. You know how you want things to be looked at/used as. Even if I did fix it, you'd still have to adjust it anyway. I figured I'd post this anyways. I got the error after the changes and from what I can tell this is a fix for it. It's deleting the metadata(cause it's not actually a resourcedropsite) but still looks at the building as a dropsite for food / farmstead.

Edited by SirPope
Link to comment
Share on other sites

Tried playing the lastest version of the mod a few times over the weekend. About 2/3 through the run time of each round the game would slow down to a frame-skipping crawl while a a backlog of error messages appeared (shown in photo below). Additionally the zora and goron AI seem to have an obsession with building large amounts of the same building. As shown in the photo (apologies for the poor quality, didn't have access to a screenshot tool at the time) the Zoras build a very large amount of coralmold refineries. Gorons, build large amounts of rock serloin mines just don't have people working at most of them. It looks like the AI is trying to fill every last available space in their territory.  

20180106_173811_HDR.jpg

20180106_173819_HDR.jpg

If someone can tell me where to find them I can post the log data.

Edited by Baskom Welford
Link to comment
Share on other sites

Spam building is the class problem I was talking about. My theory on the error there that I've gotten before, it can't find a good position to spam build anymore. It's not just zora and goron. It's hyrule and gerudo as well. Whoever tried to clean up the game files minus-ed out some classes.

If you want to fix it, you'd basically just copy the visible classes to the class tag. You'd do this for every file in the civ's temp folder.

the template_gerudo_economic_farmstead.xml for example has this:

    <Classes datatype="tokens">-ConquestCritical DropsiteFood</Classes>
    <VisibleClasses datatype="tokens">Village Farmstead</VisibleClasses>

Turn it into this:

    <Classes datatype="tokens">-ConquestCritical DropsiteFood Village Farmstead</Classes>
    <VisibleClasses datatype="tokens">Village Farmstead</VisibleClasses>

I'd actually remove Farmstead from the above as the AI might try to use it as a Dropsite for food. It can't, it doesn't have the <ResourceDropsite> tag. It will cause a new error to show about not having metadata. The AI tried to fix itself by deleting it but not removing it from the list of possible food drop-sites.

The error could also be a problem with the big buildings but if it's showing with the zora's and goron's I don't think this is the case. Pretty much all their buildings are tiny.

Edited by SirPope
Link to comment
Share on other sites

21 hours ago, Nescio said:

You need the `interestinglog.html` file; its location depends on your operating system; have a look at https://trac.wildfiregames.com/wiki/GameDataPaths

This is what I see repeating when opening the log:

ERROR: JavaScript error: simulation/ai/petra/queueplanBuilding.js line 112 TypeError: this.metadata is undefined m.ConstructionPlan.prototype.findGoodPosition@simulation/ai/petra/queueplanBuilding.js:112:6 m.ConstructionPlan.prototype.start@simulation/ai/petra/queueplanBuilding.js:46:12 m.Queue.prototype.startNext@simulation/ai/petra/queue.js:58:3 m.QueueManager.prototype.startNextItems@simulation/ai/petra/queueManager.js:374:6 m.QueueManager.prototype.update@simulation/ai/petra/queueManager.js:407:2 m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:121:3 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:2

Another I get is. This second warning occurred while attacking a Gerudo town:

WARNING: PlayerID 2 | unknown type in garrisonManager undefined for Medium Archer Unit id 6186 inside Defense id 4860

WARNING: PlayerID 2 | unknown type in garrisonManager undefined for Medium Archer Unit id 6188 inside Defense id 4860

Edited by Baskom Welford
Link to comment
Share on other sites

I think it's the position of this line in queueplanbuilding start

    if (this.metadata === undefined)
        this.metadata = { "base": pos.base };
    else if (this.metadata.base === undefined)
        this.metadata.base = pos.base;

Findgoodposition also tries to access the variable base of this.metadata. It might also be:

if (this.metadata && this.metadata.expectedGain)

Though, expectedGain isn't in the error and neither is base. Either way the first code, should ensure that this.metadata exists in some context. It just seems odd to look at expectedGain or base(in findgoodposition) before we know if this.metadata even exists.

I don't what caused it to be set to undefined. Perhaps a building with no AI classes and is set to one of the building names that it focuses on, like {civ}_house or something.

Edited by SirPope
Link to comment
Share on other sites

1 hour ago, The Undying Nephalim said:

Yay the Gerudo guide is ready:

  Reveal hidden contents

LnTZ49A.jpg

Download the PDF here: https://orig00.deviantart.net/7539/f/2018/010/3/f/hyrule_conquest_guide___gerudo_by_undyingnephalim-dbzlvdb.pdf

 

 

Wait, so is stealth, criticals, and dodging finally in?

Edited by Ozerol Notna
Link to comment
Share on other sites

3 hours ago, wowgetoffyourcellphone said:

The AI does this in Delenda Est too, but instead they will build dozens and dozens of Siege Workshops, so it's not just a Hyrule Conquest problem.

 

You have the class SeigeWorkshop in the template. https://github.com/JustusAvramenko/delenda_est/blob/master/simulation/templates/template_structure_military_workshop.xml.The AI in the SVN now looks for Workshop: headquarters.js

	if (this.canBuild(gameState, "structures/{civ}_workshop") && !gameState.getOwnEntitiesByClass("Workshop", true).hasEntities())
	{
		queues.militaryBuilding.addPlan(new m.ConstructionPlan(gameState, "structures/{civ}_workshop", { "militaryBase": true }));
		return;
	}

It's not finding any workshops, so it's building more. Classes mean everything and it's frustratingly annoying. It can also make it ignore certain buildings. Example: If you add Workshop to a house, the actual workshop won't be built as it thinks that it has already built one.

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

5 hours ago, SirPope said:

It's not finding any workshops, so it's building more. Classes mean everything and it's frustratingly annoying. It can also make it ignore certain buildings. Example: If you add Workshop to a house, the actual workshop won't be built as it thinks that it has already built one.

I think using a class-based system works better than before, which was template-based IIRC. Thanks for troubleshooting.

  • Like 2
Link to comment
Share on other sites

8 hours ago, Lion.Kanzen said:

@The Undying Nephalim where you get those amazing sounds? I'm wonder, are very like to use in vanilla if they are compatible. the alarms are great.

Pretty much all of the sound effects are from various Zelda games. This website has most of them up: http://noproblo.dayjo.org/ZeldaSounds/

  • Like 1
Link to comment
Share on other sites

So I seem to be running into an issue, as well as a few players. After the Zora AI builds a bit of a base it begins to spam a repeating error:

<p class="error">ERROR: JavaScript error: simulation/ai/petra/queueplanBuilding.js line 112
TypeError: this.metadata is undefined
  m.ConstructionPlan.prototype.findGoodPosition@simulation/ai/petra/queueplanBuilding.js:112:6
  m.ConstructionPlan.prototype.start@simulation/ai/petra/queueplanBuilding.js:46:12
  m.Queue.prototype.startNext@simulation/ai/petra/queue.js:58:3
  m.QueueManager.prototype.startNextItems@simulation/ai/petra/queueManager.js:374:6
  m.QueueManager.prototype.update@simulation/ai/petra/queueManager.js:407:2
  m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:121:3
  m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:2</p>

    
I looked into queueplanBuilding.js on line 112 and it's something like this:

    if (template.hasClass("Storehouse") && this.metadata.base)
    {
        // recompute the best dropsite location in case some conditions have changed
        let base = gameState.ai.HQ.getBaseByID(this.metadata.base);
        let type = this.metadata.type ? this.metadata.type : "wood";
        

     It looks like the AI is trying to build a dropsite for wood, the only problem is my Zora civ does not require wood and cant harvest wood at all and I suspect this is why the AI is freaking out at this point. Is there any way to stop the AI from freaking out or am I going to have to force the aquatic Zora to harvest wood like the other factions?
 

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