National Objective problem

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

National Objective problem

vaderence
Hi everyone. I have been making my own map and I wanted to add some objectives for each nation. I have put something exactly like this in the attachment section:

                <attatchment name="objectiveAttachment1" attatchTo="Erathia" javaClass="games.strategy.triplea.attatchments.RulesAttachment" type="player">
                <option name="objectiveValue" value="5"/>
                <option name="alliedOwnershipTerritories" value="Battlestead:Minewell" count="2"/>
                </attatchment>

I have checked it a million times and I am sure that there is no mistake. I have turned on the National Objective option and no error box pops out as I start Triplea. Yet the objectives are not functioning at all. I wonder why is it so?
Reply | Threaded
Open this post in threaded view
|

Re: National Objective problem

Wisconsin
Have you made sure that the national objective map property is enabled?

This must be enabled for the no's to work in the map.

Let me know if it works,
    Wisconsin
Reply | Threaded
Open this post in threaded view
|

Re: National Objective problem

ComradeKev
Administrator
In reply to this post by vaderence
It looks like you're trying to make a NO for a player named Erathia.  The objective is that they/their allies must own both Battlestead and Minewell territories.  Is that correct?
If emailing me at ComradeKev at yahoo.com , please add TripleA to the subject line
Reply | Threaded
Open this post in threaded view
|

Re: National Objective problem

vaderence
Wisconsin: I have turned on the national objectives option, like this:

<property name="National Objectives" value="true" editable="false">
                <boolean/>
</property>

So I don't think there should not be any problem...


ComradeKev: That's exactly what I wanted. Those 2 territories are initially owned by the nation Erathia and I want them to keep both territories to get 5 PUs.

Actually I am making the xml file based on the Napoleonic Empire scenario, which runs alright with the NOs working on my computer. I just changed the names of the countries and territories and stuffs like that for my own map. BTW, is there a bug about amphibious assault in the current version of Triplea? Sometimes units in my map stayed on a contested territory at the end of turn after the amphibious assault.
Reply | Threaded
Open this post in threaded view
|

Re: National Objective problem

Wisconsin
Sorry, but that's all I can think of... :(

Maybe someone else knows more about this???
Reply | Threaded
Open this post in threaded view
|

Re: National Objective problem

Veqryn
Administrator
In reply to this post by vaderence
post your whole xml here, otherwise we don't have enough info to help
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: National Objective problem

vaderence
Perhaps I would post everything I am working on here. Dowload the "Antagarich.zip" here:

https://sourceforge.net/projects/antagarich/files/

Unit images are not completely finished and finalized. Other than that, everything else are completed. (Of course the games still cannot run the national objectives and there is the amphibious assault bug) There are 3 xml files and the NOs in every one of them are identical and designed for "Battle_for_Antagarich.xml".

Please also give comments or report bugs.
Reply | Threaded
Open this post in threaded view
|

Re: National Objective problem

ComradeKev
Administrator
OK, I think I know what the trouble is.... each individual objective needs to be incremented (eg. objectiveAttachment1, objectiveAttachment2, etc...).
If emailing me at ComradeKev at yahoo.com , please add TripleA to the subject line
Reply | Threaded
Open this post in threaded view
|

Re: National Objective problem

vaderence
You mean that the objective should be numbered for each country starting from 1, right? I would try it out for sure.
Reply | Threaded
Open this post in threaded view
|

Re: National Objective problem

ComradeKev
Administrator
Yeah, I think that's the way to do it.  When I was coding it, I was having troubles with the duplicate attachments and so I just incremented them.  I meant to go back and resolve the problem, but forgot until after we had released it to the wild.  At some point, I might go back and fix it, but not any time soon.
If emailing me at ComradeKev at yahoo.com , please add TripleA to the subject line
Reply | Threaded
Open this post in threaded view
|

Re: National Objective problem

Pulicat
In reply to this post by ComradeKev
The objective names don't need to be exactly incremented, just uniquely identifying. You could have objectiveAttachment1, objectiveAttachment2, and then jump to objectiveAttachment100, objectiveAttachment999, etc.

The problem arises when you have two objectives with the same name but different descriptions, the game engine just choses one to implement and ignores the other.

Puli
how now brown cow?