XML schema files wanted

Moderators: Pandora Moderators, Slitherine Core

blackarchon
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Sat Oct 12, 2013 2:25 pm
Location: Germany

XML schema files wanted

Post by blackarchon »

Hi there,

I'm in need for Pandora's XML schema files. For creating a mod I really have to know which attributes are allowed and possible. Currently I can only look at the delivered XML files and with a hex editor in Pandora.exe (1.1.2) starting at offset 0x757898. All possible values seems to be listed there.

So if someone from Proxy Studios is able to provide the schema files I would be really grateful! :)
mugged
Lance Corporal - Panzer IA
Lance Corporal - Panzer IA
Posts: 10
Joined: Sun Jan 05, 2014 8:03 pm

Re: XML schema files wanted

Post by mugged »

+1, please? A complete set of console possibilities + a syntax explanation would be wonderful.
For instance, /add Unit [name]-<unit>+<weapon>+<device>+<armor> is complete gibberish to me. I've tried numerous combinations, with no success. I wanted to see how modded factions would play during mid- and late- game but I can't give them units (because I don't understand the syntax. Also, I can't give them resources so see how mid- and late-game will play out.
yuurei
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 5
Joined: Thu Dec 12, 2013 6:07 pm

Re: XML schema files wanted

Post by yuurei »

+1, This will help a lot in modding!
SephiRok
Proxy Studios
Proxy Studios
Posts: 1024
Joined: Thu Jul 19, 2012 10:19 am
Contact:

Re: XML schema files wanted

Post by SephiRok »

If we had them, we would gladly share them with you!
Rok Breulj
Designer and Programmer
Proxy Studios
blackarchon
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Sat Oct 12, 2013 2:25 pm
Location: Germany

Re: XML schema files wanted

Post by blackarchon »

Well as far I can see, Pandora's XML parser is verifying the XML document at the start of Pandora. So it has to verify the XML structure in the game's files against something. If I understand your reply correctly, you aren't verifying against an XML schema file, but rather against some hardcoded rules. Is that so?
SephiRok
Proxy Studios
Proxy Studios
Posts: 1024
Joined: Thu Jul 19, 2012 10:19 am
Contact:

Re: XML schema files wanted

Post by SephiRok »

The only verification being done is by name.

An xml / modding reference would be great though, I agree. It sucks that we don't have a way to generate it.

If someone with modding/programming/documentation experience would like to prune through some files and document the info I'd be happy to help. I reckon a wiki page could be appropriate.
Rok Breulj
Designer and Programmer
Proxy Studios
Belanos
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 91
Joined: Sat Jan 25, 2014 7:34 am

Re: XML schema files wanted

Post by Belanos »

Well this seems to be a good place to ask this question. Is it possible to give a faction an Accomplishment at the start of a game? I'm trying to give the Terra Salvum both the Xenology tech and the Accomplishment already completed, rather than them having an alien aggression bonus. I've figured out the tech part, but I can't get the Accomplishment to work.
greatUnknown
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 53
Joined: Mon Nov 18, 2013 11:15 pm

Re: XML schema files wanted

Post by greatUnknown »

Your point seems to be that you can set <technologies name="alienagression"/> for your faction
but you can't get the advancement to work because you have to "build" the advancement to
activate it.

Been away from my computer for a while, so I haven't tried solving this directly,
but a quick and dirty workaround is to give yourself some extra cash, e.g.
<credits add="32"/>, and just buy the advancement on your first move after colonizing.
SephiRok
Proxy Studios
Proxy Studios
Posts: 1024
Joined: Thu Jul 19, 2012 10:19 am
Contact:

Re: XML schema files wanted

Post by SephiRok »

I think the only way is if you set <advancement producable="0" ...> in advancement AlienAggression.xml.
Rok Breulj
Designer and Programmer
Proxy Studios
greatUnknown
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 53
Joined: Mon Nov 18, 2013 11:15 pm

Re: XML schema files wanted

Post by greatUnknown »

Thank you for that trick. Very useful.
Belanos
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 91
Joined: Sat Jan 25, 2014 7:34 am

Re: XML schema files wanted

Post by Belanos »

greatUnknown wrote: but a quick and dirty workaround is to give yourself some extra cash, e.g.
<credits add="32"/>, and just buy the advancement on your first move after colonizing.
That's not what I'm trying to accomplish. I don't just want a freebie for myself, I want the AI to get it as well. I feel the -50% alien aggression is overpowered and I would like to replace it with something that works along the same lines, but keeps the Terran Salvan faction on an even footing with the others. If they get both the tech and the Accomplishment, that would give them a good early game advantage without making them unbalanced, as I feel they are now.
SephiRok wrote:I think the only way is if you set <advancement producable="0" ...> in advancement AlienAggression.xml.
But how would I translate that to the Faction.xml so that the Terran Salvan get the Accomplishment built at start up? I did manage to get the free tech to work after looking at the Togra's file, but I don't know what command I can use for the Accomplishment. No one else has anything similar I can compare their entries with. I've come up with something of a compromise right now by giving them an additional Drone to start with, but I would prefer that they get the Accomplishment. And where in the AlienAggression.xml file would I put that line? I really don't find your xml files to be all that user friendly, frankly. It's difficult to figure out what goes where.

PS: I reorganized the format so that I can understand it better and came up with this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>


<advancement cost="32" icon="Icons/Advancements/Default" tier="0">
	

	<modifiers>
		
		<modifier>
			
			<effects>
						
				<alienAggression sub="0.25"/>
			
				<score strategy="Build" add="0.5"/>
				
				<score strategy="Fight" add="0.5"/>
				
			</effects>
		
		</modifier>

	</modifiers>
	

	<requirements>
		
		<group>
			
			<player>
								
				<technology name="AlienAggression"/>
			
			</player>
		
		</group>
	
	</requirements>	

</advancement>
Now where would I place that line you mention? I tried different locations but kept coming up with an error message. And what exactly do those "score strategy" effects do?
blackarchon
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Sat Oct 12, 2013 2:25 pm
Location: Germany

Re: XML schema files wanted

Post by blackarchon »

SephiRok wrote:The only verification being done is by name.

An xml / modding reference would be great though, I agree. It sucks that we don't have a way to generate it.

If someone with modding/programming/documentation experience would like to prune through some files and document the info I'd be happy to help. I reckon a wiki page could be appropriate.
I would be willing to participate in such an upcoming wiki. Yesterday I wrote also wrote to Lorenz (on civforum.de) about this. So what do you have in mind, should the wiki be hosted at your site http://pandora.proxy-studios.com/ or at a wiki hoster like wikia.com?
greatUnknown
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 53
Joined: Mon Nov 18, 2013 11:15 pm

Re: XML schema files wanted

Post by greatUnknown »

re: Belanos

This is how I did it in the transport advancement:
modify the second line in .../world/advancements/transport.xml to

<advancement cost="32" icon="Icons/Advancements/Default" tier="0" producable="0">

[BTW, it should be producible, but it works, so let's not quibble about the spelling; these are programmers, not English majors.
I did find that variation in a German-English xlation program. Which does not make it right. But who wants to correct code?]

When you set up your colony you will notice that there is no advancement production for sea transport.
At that stage, it doesn't work yet.

But at turn two, sea transport works as normal with no further construction. Have not tested it for xenology, but the idea is the same.

Thus: modify the advancement file as above, and give TS the line

<technologies name="AlienAggression"/>

By the second turn, it should have full effect. If you're not wiped out in the first turn, of course.
SephiRok
Proxy Studios
Proxy Studios
Posts: 1024
Joined: Thu Jul 19, 2012 10:19 am
Contact:

Re: XML schema files wanted

Post by SephiRok »

blackarchon wrote:
SephiRok wrote:The only verification being done is by name.

An xml / modding reference would be great though, I agree. It sucks that we don't have a way to generate it.

If someone with modding/programming/documentation experience would like to prune through some files and document the info I'd be happy to help. I reckon a wiki page could be appropriate.
I would be willing to participate in such an upcoming wiki. Yesterday I wrote also wrote to Lorenz (on civforum.de) about this. So what do you have in mind, should the wiki be hosted at your site http://pandora.proxy-studios.com/ or at a wiki hoster like wikia.com?
There's one at http://pandora.gamepedia.com/Pandora_Wiki, but we don't have the resources to maintain one. We could however post excerpts of the code and help with questions if someone wants to document possible attributes et cetera.
Rok Breulj
Designer and Programmer
Proxy Studios
blackarchon
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 45
Joined: Sat Oct 12, 2013 2:25 pm
Location: Germany

Re: XML schema files wanted

Post by blackarchon »

Oh, I didn't know there is already one. :)
I will add some content to it!

And if you could give us a possibility to disable factions, technologies, buildings, weapons etc. from within the XML code, I could continue working on a mod for Pandora. ;)
SephiRok
Proxy Studios
Proxy Studios
Posts: 1024
Joined: Thu Jul 19, 2012 10:19 am
Contact:

Re: XML schema files wanted

Post by SephiRok »

You can already disable those, either delete the xmls or put hidden="1" into the root element.
Rok Breulj
Designer and Programmer
Proxy Studios
Belanos
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 91
Joined: Sat Jan 25, 2014 7:34 am

Re: XML schema files wanted

Post by Belanos »

greatUnknown wrote: <advancement cost="32" icon="Icons/Advancements/Default" tier="0" producable="0">
Well that would explain the error messages I was getting. I tried to enter "advancement producable="0"" in that line, the way SephiRok explained it. But I don't need the advancement part.
<technologies name="AlienAggression"/>
Yes, that part I managed to get working. But looking at your explanation, doesn't that mean that the Accomplishment will be competed for all the factions after researching the tech? I would prefer that only the TS are able to have it built instantly. I want the rest to have to build it as they normally would.

PS: Yes, it means that everyone gets it instantly. I just tested it with the fanatics. Is it possible to use the Modifier tag and set up an Effect condition for the producable="0" line? Or maybe set up a second entry, one that's "producable" and another that's not? I guess I'll have to give that a try.

PS x2: No, it seems that the "producable" part has to be in that top line, and a second entry doesn't work. Any suggestions? Or am I stuck with having everyone be able to get it instantly? I'd rather not use that line if that's the case. Vivian will just have to settle with getting a free Drone at the start of the game. That kind of puts her on a equal footing with the Togra at any rate. A free tech and an extra scout unit. Which wouldn't be too bad I suppose.
greatUnknown
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 53
Joined: Mon Nov 18, 2013 11:15 pm

Re: XML schema files wanted

Post by greatUnknown »

Wouldn't want Vivian to have to settle, would we now.

Several suggestions:

Change the tier to tier="1"
[yes, you can assign a technology to a faction regardless of tier]

Change the cost to, e.g., cost="128"
[That's actually brutal; maybe 64 would be better. Also, given the
tendency to stinginess in this program, don't try >256; it's probably
coded as a byte]
[Vivian, of course, gets it immediately, for free]

Vivian will thank you. She might actually smile.
Belanos
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 91
Joined: Sat Jan 25, 2014 7:34 am

Re: XML schema files wanted

Post by Belanos »

greatUnknown wrote:
Change the tier to tier="1"
I'm not sure what that will do, but I'll try it.
Change the cost to, e.g., cost="128"
I don't understand what that's supposed to do. If it's instantly created at 32, what difference will the extra cost make?
greatUnknown
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 53
Joined: Mon Nov 18, 2013 11:15 pm

Re: XML schema files wanted

Post by greatUnknown »

Sorry; was still asleep when I wrote that.

Change tier="1" in the /technologies/alienaggression.xml file.
That moves the research into the mechanization era or research.
Or, you can keep tier="0" but change subtier to "1" or "2" to move it
further down the colonization tree while still staying in the colonization era.

As far as cranking up the cost, that would require removing producable="0", but
giving Vivian extra credits in the faction file

<credits add="128"/>

so that she can purchase the construction immediately while the other factions
have to actually earn the money if they want to purchase it. That would delay
them for a significant number of turns at the beginning of the game.

Amazing what a difference coffee makes
Post Reply

Return to “Pandora : Modders Corner”