I've made a simple mod for myself

m202

Chieftain
Joined
Jul 21, 2011
Messages
35
Now how do I make it so it will show up in the mods menu in my game?
 
It's mine, you're not having it!!!

Hahahaha!!!

My suggestion would be to try the Creation and Customisation Forum.

What did you make if you don't mind me asking.
 
It's nothing exciting, just overpowering japanese samurais. It's more of an experiment than anything. It's not working yet so now I'm trying to figure out what is wrong.
Code:
<GameData>
	<Units>
		<Update>
			<Set Cost=".1" Moves="6" Combat="5000" prereqtech="TECH_AGRICULTURE" obsoletetech="NULL"/>
			<Where Type="UNIT_JAPANESE_SAMURAI"
		</Update>
	</Units> 
</GameData>
is my coding maybe you can help.
 
Its still not working.
Code:
<GameData>
	<Units>
		<Update>
			<Set Cost="1" Moves="6" Combat="5000" prereqtech="TECH_AGRICULTURE" obsoletetech="NULL"/>
			<Where [B][COLOR="Red"]Type[/COLOR][/B]="UNIT_JAPANESE_SAMURAI"/>
		</Update>
	</Units> 
</GameData>
Should Type be Class?
 
I changed it to class and tried it again, it still doesn't work. What am I doing wrong?
 
No, Type is correct. The class would be UNITCLASS_something, whatever unit the Samurai replaces.

But first of all, it's all case-sensitive, so prereqtech needs to be PrereqTech. Same for ObsoleteTech.

Second: OnModActivated/UpdateDatabase. If you don't know what I mean by that, then that's your problem.

Third, if it still doesn't work, try trimming the Set down to something smaller, see if that works, and then add things back in. For instance, the ObsoleteTech="NULL" might not work right; NULL elements generally don't replace well.
 
This may sound dumb, but try breaking your mass update into individual updates for each change you want to make. IIRC I tried to do the same thing when I first began modding civ5 and that wasn't working.

I always resort to changing stuff that seems stupid when I have no idea why something isn't working.
 
No, Type is correct. The class would be UNITCLASS_something, whatever unit the Samurai replaces.

But first of all, it's all case-sensitive, so prereqtech needs to be PrereqTech. Same for ObsoleteTech.

Second: OnModActivated/UpdateDatabase. If you don't know what I mean by that, then that's your problem.

Third, if it still doesn't work, try trimming the Set down to something smaller, see if that works, and then add things back in. For instance, the ObsoleteTech="NULL" might not work right; NULL elements generally don't replace well.

What should I use instead of NULL then? Cus I don't want my SuperSamurais going obsolete on me. Also how do I make it so iron isn't required to build them?
 
You can do a mass update, it's just that if any one part of it doesn't work (like the case-sensitive thing I mentioned before) then the whole thing will break. This makes it hard to debug, until you're experienced enough that you spot these things beforehand.

m202 said:
Also how do I make it so iron isn't required to build them?

There's a separate table, Unit_ResourceQuantityRequirements. That's the one you want to modify. So you'll just do something like
Code:
<GameData>
  <Unit_ResourceQuantityRequirements>
    <Delete UnitType="UNIT_JAPANESE_SAMURAI"/>
  </Unit_ResourceQuantityRequirements>
</GameData>
which'll delete any blocks in that table that have UnitType set to that value. If, hypothetically, the Samurai required two different resources and you only wanted to remove the one for Iron, you'd write
<Delete UnitType="UNIT_JAPANESE_SAMURAI" ResourceType="RESOURCE_IRON"/>
instead.
 
You can do a mass update, it's just that if any one part of it doesn't work (like the case-sensitive thing I mentioned before) then the whole thing will break. This makes it hard to debug, until you're experienced enough that you spot these things beforehand.



There's a separate table, Unit_ResourceQuantityRequirements. That's the one you want to modify. So you'll just do something like
Code:
<GameData>
  <Unit_ResourceQuantityRequirements>
    <Delete UnitType="UNIT_JAPANESE_SAMURAI"/>
  </Unit_ResourceQuantityRequirements>
</GameData>
which'll delete any blocks in that table that have UnitType set to that value. If, hypothetically, the Samurai required two different resources and you only wanted to remove the one for Iron, you'd write
<Delete UnitType="UNIT_JAPANESE_SAMURAI" ResourceType="RESOURCE_IRON"/>
instead.

This is my first attempt so I'm really not experienced. I learned this by downloading mods and then looking at how they worked in the ModBuddy. I successfully edited the mods, but it seems I can't make my own :D.

Code:
<GameData>
	<Units>
		<Update>
			<Set Cost="1" Moves="6" Combat="5000" PrereqTech="TECH_AGRICULTURE" ObsoleteTech="NULL"/>
			<Where Type="UNIT_JAPANESE_SAMURAI"/>
		</Update>
	</Units>
		<Unit_ResourceQuantityRequirements>
			<Delete UnitType="UNIT_JAPANESE_SAMURAI"/>
		</Unit_ResourceQuantityRequirements>
</GameData>

Do you see anything wrong there?
 
Code:
<GameData>
	<Units>
		<Update>
                        <Where Type="UNIT_JAPANESE_SAMURAI"/>
                        <Set>
                             <Cost>1</Cost>
                             <Moves>6</Moves>
                             <Combat>1000</Combat>
                             <PrereqTech>TECH_AGRICULTURE</PrereqTech>
                             <ObsoleteTech></ObsoleteTech>
                        </Set>
		</Update>
	</Units> 
</GameData>

Try that, let me know if it works.
 
I think I'm going to rage quit modding. The damn thing wont let me upload the mod to the internet even though I changed all the numbers the file name and re-did the mod with a new name. It says I'm uploading a duplicate mod.
 
And when I do get it into my game manually, the mod still isnt working even after i did the action thing to apply to the right files, and using putmalks coding. Either I'm a complete idiot when it comes to modding or mod buddy isnt my 'buddy'.
 
First of all, you should NOT be uploading a mod that doesn't work. You don't need to upload something just to be able to use it yourself; uploading is only so that other people can play your mod. People uploading nonfunctional mods is a big part of why the Mod Browser is so worthless.

Second, ATTACH THE FILES. Zip up your mod, attach it to your post, and we can take a look at it.
 
Back
Top Bottom