• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

XML changes without effect

Black Whole

Dancing Condor
Joined
Dec 21, 2005
Messages
534
Location
Theatre of Dreams
So, I feel dumb because I can't make he simplest mod in modbuddy work. For a start, I wanted the Project Beacon to require the Tech Field Theory and 5 Geothermal resources. Now here's the code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 12/11/2014 4:36:43 PM -->
<GameData>
	<Projects>
		<Update>
			<Where ProjectType="PROJECT_BEACON"/>
			<Set TechPrereq="TECH_FIELD_THEORY"/>
		</Update>
	</Projects>
	<Project_ResourceQuantityRequirements>
		<Row>
			<ProjectType>PROJECT_BEACON</ProjectType>
			<ResourceType>RESOURCE_GEOTHERMAL_ENERGY</ResourceType>
			<Quantity>5</Quantity>
		</Row>
	</Project_ResourceQuantityRequirements>
  
</GameData>

The database.log shows no errors from my mod and I have set updateDatabase in OnModActivated. Yet it doesn't work at all. Do I have to add entries for the graphic interpretation (so the icon for the Beacon appears at Field Theory)? It is infuriating, because such a mod only took 2 minutes when I was modding Civ4 :mad:
 
The tech web updates automatically, so you don't have to add mod any graphics. The only thing I can think of is that the default prerequisite for the beacon project isn't a technology, it's the decode signal project. So you're not trying to change an existing prereq tech to another, you're adding one. So maybe if you used <row> instead of <update>? That's the only thing I can think of.
 
The tech web updates automatically, so you don't have to add mod any graphics. The only thing I can think of is that the default prerequisite for the beacon project isn't a technology, it's the decode signal project. So you're not trying to change an existing prereq tech to another, you're adding one. So maybe if you used <row> instead of <update>? That's the only thing I can think of.

First thanks for the fast response! I thought so about the TechWeb, but you never know ;). I will try it out as soon as I am back at my PC. Theoretically, there is a TechPrereq for Projects and it is set to "NULL" as a default setting. Hence why I used <Update>.
 
Should be Type="PROJECT_BEACON" in the <Projects> table, not ProjectType ;)

Duh. Thanks, that was it. Well 3 hours wasted for this :lol: Yet the resource requirements still do not apply, at least I can't see it. Could it be that this part of the code isn't used anymore, since no project actually requires resources?
 
Back
Top Bottom