Relationship Problems
-
I am trying to add some political relationships from a mod. I just copied code from ww2global.
So I have code.
<relationshipTypes> <relationshipType name="War"/> </relationshipTypes>
and
<attachment name="relationshipTypeAttachment" attachTo="War" javaClass="games.strategy.triplea.attachments.RelationshipTypeAttachment" type="relationship"> <option name="archeType" value="war"/> </attachment>
I receive the error "GameParseException: Could not find relationship type:War"
Is there something else I need to set the make this work?
-
Idk if it matters but the archetype "war" is in lower case
-
Looks good, are the attachment within the <attachmentList> section of the xml. "relationshipTypeAttachment" are the same as "unitAttachment" and "territoryAttachment" and that they are contained within the <attachmentList></attachmentList> part or the xml.
You do not need the <relationshipInitialize> within the <initialize> section for the xml to run.
@beelee
The "archType" can be mixed case as long as it is set to one of the three types, "war", "neutral" or "allied".Cheers...
-
@wc_sumpton Yes, relationshiptypeattachment is in the attachment list. There is no relationshipinitialize yet.
-
@rogercooper
Are you still having problems? I have tested the above and it worked fine.Cheers...
-
@wc_sumpton I am still having the issue. I will try using a simple mod to test my code and see what happens.
-
If you can upload a zip of the map somewhere; I can run it through with a debugger.
-
@lafayette said in Relationship Problems:
If you can upload a zip of the map somewhere; I can run it through with a debugger.
I will keep that in mind. For now, I removed the code and will see if I can work without it.