Jump to content

Recommended Posts

type is just used to locate a decent place for it. It's got nothing to do with the gathering, just the positioning of it. By default it's placed by trees.

Have you fixed the spam building? The classes and such?

     <Civ>zora</Civ>
    <Classes datatype="tokens">Archive DropsiteWood DropsiteMetal DropsiteStone -ConquestCritical</Classes>
    <VisibleClasses datatype="tokens">-Economic -Storehouse Civilian Dropoff-Site</VisibleClasses>

You've removed Storehouse from the template. That code never runs. This was only done to the Zora's storehouse. It's metadata is never created in baseManager or hq because it doesn't have that class.

Link to post
Share on other sites
  • Replies 1,5k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Hey everyone, Several years ago I was considering creating a sci-fi RTS here in 0AD. Due to my other project taking up too much time, I sort of set it off to the side. After getting fed up with th

Sorry I took so long, the Moblin units had an insane amount of animations that needed to be done, but they are all done now!      

I have finished Lanayru's buildings:

Posted Images

1 hour ago, SirPope said:

Have you fixed the spam building? The classes and such?

Yes I've fixed all of them, including putting the Storehouse class back. I've noticed that the same problem happens with the other 3 factions as well, just not nearly as early on or as frequently as with the zora. I wonder why the AI would freak out about placing a storehouse, they place the first pair of Storehouses just fine.

  • Like 1
Link to post
Share on other sites

I just visited Hyrule Conquest and checked for any changes that you may not have posted here yet. I noticed Tokay Fodder are back in, with tokay slaves being turned into a civilian unit.

I understand why the Regime wouldn't want to dirty their hands with construction and harvesting, as well as why they don't want to get shot or stabbed. But cant the Tokay fodder be given some means to defend themselves along with their shields? Like the spears the slaves carry? The slaves are a purely civilian unit now right? So that means that they don't need the spears anymore, and the Fodder can hold the line and keep their masters safe a lot longer if they can strike back.

Link to post
Share on other sites

@The Undying Nephalim

I managed to replicate it with the hylians (I had to patch them again). I think I found it. The parent template: template_{civ}_economic.xml

It has the Storehouse class. Just remove that and add it to the civ's actual storehouse. I tested this with Hylians. But my files are different. I kept getting that error when they built an additional farm or a market (who's parent of those files and probably others is that template).

Let me know if that fixed it.

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

If you are adding some own stuff and don't follow what petra expects, you can also replace that line

if (template.hasClass("Storehouse") && this.metadata.base)

by

 if (template.hasClass("Storehouse") && this.metadata && this.metadata.base)

So that petra works even if you don't fill the metadata it expects (in fact i should add that protection in the svn version).

  • Like 2
  • Thanks 2
Link to post
Share on other sites

That seems to have done it. Only thing to fix now is the corral (and to get the AI to select their tech). It could be done in the Config file, I'm just not entirely sure how.

@mimo I might have found a bug. I don't know. First off: The field for the gerudo doesn't exist (I changed it to _corral, updated their build list, replaced it's Field class with Corral) and the construction plan for the corral will only run if the field is disabled.

I've tried putting the below in the SetConfig function but that didn't seem to do anything. However, when I tried it with storehouse, it did prevent them from building storehouses (bug?). Is there some sort of field re-enabler somewhere? Or just a better way of doing this? It did prevent them from building storehouses. It just keeps enabling fields.

gameState.playerData.disabledTemplates["structures/gerudo_field"] = true;

To see if it was working, I put the below at the start of checkResourceLevels of basemanager. It kept returning false.

API3.warn("Field Disabled? "+ gameState.isTemplateDisabled("structures/gerudo_field") );

Using gameState.sharedScript.playersData[gameState.player].disabledTemplates["structures/gerudo_field"] = true; Just result in the same thing (even the storehouse test). Do you have any idea why it works for one thing and not the other? I've tried _house as well but they still build them. It seems to be impossible to disable fields. Something keeps resetting it.

@The Undying Nephalim

A quick fix until a permanent one is added paste in the basemanagers -> checkResourceLevels -> before the canbuild if statement of field.

			if (gameState.getPlayerCiv() === "gerudo")
				gameState.playerData.disabledTemplates["structures/gerudo_field"] = true;

After the other fixes and the removal of the corral's resource supply. They'll build the corral after they finish off the berries... and if they don't have anything more important to do. It will take a while. Raising the priority of it to say 300 or 400 in the config file will make them build it faster. Normally it'd adjust the priority for you and build it ASAP but it seems something is re-enabling it.

 

Edited by SirPope
more specific.
Link to post
Share on other sites

all playerData are reloaded from simulation every turn (as they could changed), so modifying inside petra won't have the desired effect and should not be done. If you want to disable something, you must:
- either set the disabled templates directly in the simulation
- or create your own list of disabled inside the ai, and change the gameState.isTemplateDisabled function to do an OR of your own list and gameState.playerData.disabledTemplates instead of only using gameState.playerData.disabledTemplates

Concerning the corral itself, you may force its construction by setting the HQ.needCorral = true during HQ initialisation.

Nonetheless, in the case you described, i think the simplest fix is to test on the field existence, that is replace in baseManager.js
gameState.isTemplateDisabled(gameState.applyCiv("structures/{civ}_field"))
by
gameState.isTemplateDisabled(gameState.applyCiv("structures/{civ}_field")) &&
gameState.getTemplate(gameState.applyCiv("structures/{civ}_field"))

But once again, that problem is already fixed in a23 and i'm afraid the work you are doing will have a very short life-time: hopefully a23 will be released before two months from now, and the mod will certainly switch to it soon after that, and everything will have to be redone.
I already said that, but better say it again: it would be much more useful (in the interest of that mod, but also for 0ad and petra) to switch to a23 now so that it is ready to be released with a23 when this happens and that all ai adaptation that may be needed are commited directly in svn.

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

Thank you. I can actually play against the gerudo now. :D I personally don't want to wait 2 months for this mod to be decently playable. The template patch fixed all the problems but the corral. That corral fix is the only thing that it needed in its A22 state. However, even in A23, those starter techs are going to need to be researched somehow and that's the only thing left. Besides, the next update of this mod might happen before A23's release. Best to make it playable for those who want to play it.

I was going to query cmpPlayer and call it's disabled function but that'd just be another file he'd have to add (and later remove). I figured I'd just use what was provided - that was my thought process anyways. It had me puzzle for the longest time why that corral code even existed if it was impossible to build it. You had to edit the simulation to even get it to-be built or used. I'm glad you got rid of that annoyance.

I think the needCorral option you suggested is best, they actually build it in starting strategies this way. So at the end of the init function in hq just put this...

    if(gameState.getPlayerCiv() === "gerudo")
        this.needCorral = true;

I'm not sure what all the changes necessary for an svn upgrade would be. I know walk animations have been renamed, and some template name changes. I might try to work on an svn upgrade of this mod in my free time. That way I can help out when A23 does get here.

Link to post
Share on other sites
15 hours ago, The Undying Nephalim said:

And here's a patch: http://www.moddb.com/mods/hyrule-conquest/downloads/hyrule-conquest-02-patch

Hopefully this solves all the AI issues.

Do you have a version for those of us who are not on Windows? (Or just a changeset perhaps.)

 

2 hours ago, SirPope said:

I'm not sure what all the changes necessary for an svn upgrade would be. I know walk animations have been renamed, and some template name changes. I might try to work on an svn upgrade of this mod in my free time. That way I can help out when A23 does get here.

Nowhere near complete, but as a start: hyrule_A23-squashed.patch (Could also provide it as a branch if there were some (semi-)public accessible repo...)

  • Like 1
Link to post
Share on other sites

Someone should count how often it was mentioned that having access to the source (you are using a repository, right?), and developing against SVN was done in this thread so far. That would at least reduce the amount of time spent trying to work around bugs in the last release that were already fixed in SVN.

Regarding the patch above, that does look quite nice in places! But why are Gravity and Delay in a different order in simulation/templates/structures/goron_temps/template_goron_civil_centre.xml compared to most other files? Not related to the patch, but why is template_unit present in the patch at all? Also ranged attack bonuses seem to have messed up indentation, same for a few of the Spread tags.

Link to post
Share on other sites
4 minutes ago, SirPope said:

Wouldn't a public repository ruin the idea of a patreon...? The latest release could be uploaded, but only when released to the public. Basically, no active updates just suggestions? Here's the files from the install. I added the corral fix for the gerudo and tested it.

HyruleZip.zip

Doesn't have to be public. Github offers private repositories.

  • Like 1
Link to post
Share on other sites
6 hours ago, SirPope said:

Besides, the next update of this mod might happen before A23's release. Best to make it playable for those who want to play it.

If A23 is coming out in 2-3 months then the next version won't be ready beforehand so I'll mostly likely switch to the new version if there's no other things I need to fix for the current release.

3 hours ago, s0600204 said:

Nowhere near complete, but as a start: hyrule_A23-squashed.patch

 How might this file work?

3 hours ago, s0600204 said:

(Could also provide it as a branch if there were some (semi-)public accessible repo...)

I know, I know, I need to make a github :crazy:

  • Haha 1
Link to post
Share on other sites
12 minutes ago, The Undying Nephalim said:

If A23 is coming out in 2-3 months then the next version won't be ready beforehand so I'll mostly likely switch to the new version if there's no other things I need to fix for the current release.

If.

13 minutes ago, The Undying Nephalim said:

I know, I know, I need to make a github :crazy:

People here are willing to help, however, assisting is a bit difficult if we don't know what you're doing exactly. Creating an account and setting up a (public or private) repository on github or gitlab can be done in a few minutes. You don't have to do it, but it'll certainly make things easier, for us and for you.

Link to post
Share on other sites
3 hours ago, leper said:

Regarding the patch above, that does look quite nice in places! But why are [...]? Not related to the patch, but why is [...].

Thank you. :)

I did say it was nowhere near complete, and clearly one of the things needed to do is check which files are actually needed and which aren't. (Did it for the gui. Mostly. Not so much for the simulation templates.)

 

1 hour ago, stanislas69 said:
2 hours ago, SirPope said:

Wouldn't a public repository ruin the idea of a patreon...?

Doesn't have to be public. Github offers private repositories.

(As previously mentioned in this thread.)

GitLab does as well (and apparently offers them for free, unlike GitHub which requires a monthly subscription). Also, I'm not sure how GitHub handles repositories that are set to private but have "collaborators" (to use their nomenclature) who don't pay a monthly subscription.

 

38 minutes ago, The Undying Nephalim said:

How might this file work?

git apply {patchfile}

(If you're using the command line. There should be an option in most gui abstractions of git that does the trick.)

Of course, if you're going to put the project on github/lab it would be easier for me to fork and create a branch. That way you can see the changes split into discrete commits instead of all squashed into one as it is in that file.

  • Like 1
Link to post
Share on other sites

Nothing else seems to need fixing in this release except for the AI researching their civ tech, but that can wait and should probably wait. If you upgrade to the SVN, you'll have to keep an eye on the timeline page and be sure to keep sessions.js and config.js up to date. As well as anything necessary/wanted like music.js and other important files. Petra isn't needed as all the bugs were fixed, you will have to add the buildings back to the svn's updated config file though. All of these should be done last IMHO.

You're pretty much ready to move to A23 and fight the stream of minuet changes. There isn't really a set release for A23 declared though. It does seem like a lot is getting done pretty darn quick though. Honestly the easiest way to start is the templates. Then work your way back into an updated mod (see the spoiler below).

As for the patch. A translation error showed up when you do, it might be .js problem or me not transfering the svn js files to the hyrule folder before the patch.

Well, I used tortoiseSVN to open the patch, I clicked file, apply, found my copied folder of hyrule, clicked okay, then yes on the next one. I've got a windows xp though and an outdated version of tortoise. *cough*

I will tell you one thing. The SVN likes the tag Undeletable and Indentity. Death mountain technically loaded... I mean the loading screen did finish.

Spoiler

ERROR: RelaxNGValidator: Validation error: gaia/geology_metal_alpine_slabs:1: Expecting an element Undeletable, got nothing

ERROR: RelaxNGValidator: Validation error: gaia/geology_metal_alpine_slabs:1: Invalid sequence in interleave

ERROR: RelaxNGValidator: Validation error: gaia/geology_metal_alpine_slabs:1: Element Identity failed to validate content

ERROR: RelaxNGValidator: Validation failed for '(null)'

ERROR: Failed to validate entity template 'gaia/geology_metal_alpine_slabs'

ERROR: Failed to load entity template 'gaia/geology_metal_alpine_slabs'

ERROR: RelaxNGValidator: Validation error: gaia/geology_stonemine_alpine_quarry:1: Expecting an element Undeletable, got nothing

ERROR: RelaxNGValidator: Validation error: gaia/geology_stonemine_alpine_quarry:1: Invalid sequence in interleave

ERROR: RelaxNGValidator: Validation error: gaia/geology_stonemine_alpine_quarry:1: Element Identity failed to validate content

Then nothing but dead trees...

 

Edited by SirPope
Link to post
Share on other sites

As s0600204 mentioned above GitLab offers unlimited private repos with unlimited number of collaborators. GitHub IIRC offers private repos for students (probably by using some edu domain when registering), and one can access such repos without having such an account if one gets added to that.

As for updating to a new version check out the current changelog which isn't complete or updated, but should get that at some point hopefully.

  • Like 2
Link to post
Share on other sites

Not wanting to rush since the transfer from Total War is just getting its legs but asking entirely out of curiosity, does 0AD have anything you might be able to use to create something like the Hyrule Historia missions? You have such a unique take on the Zelda franchise and an interesting story to tell and I would hate to see that die before it reaches its conclusion or, at the very least, the conclusion of the original HTW (you're a madman for announcing so many expansions before you're even done with the base. an absolute madman)

Link to post
Share on other sites
20 hours ago, Primal's Phase said:

Not wanting to rush since the transfer from Total War is just getting its legs but asking entirely out of curiosity, does 0AD have anything you might be able to use to create something like the Hyrule Historia missions? You have such a unique take on the Zelda franchise and an interesting story to tell and I would hate to see that die before it reaches its conclusion or, at the very least, the conclusion of the original HTW (you're a madman for announcing so many expansions before you're even done with the base. an absolute madman)

Earlier in the thread he mentioned he was interested in porting it over, but needed to wait on the 0AD engine to add support for stuff such as in-game cutscenes. 

  • Like 2
Link to post
Share on other sites
On 1/23/2018 at 1:13 PM, Primal's Phase said:

Hyrule Historia missions?

Yes indeed they will one day be ported over. The timing was pretty great as I posted this today: 

 

 

There's still a lot I have to get into the engine before I can port the missions over though, notably quite a few factions such as the Gohma, Lanayru, Wizzrobe, and Oocca. To my knowledge 0AD doesn't play pre-rendered cinematics at the moment, so that'd have to make it in first as well.

  • Like 2
Link to post
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.


×
×
  • Create New...