Quick Modding Questions Thread

Haven't really looked much into it, but in the XML files, at the top, you have to name the related schema file, which has to be in the same folder (this whole schema thing only applies for modular loading).
And e.g. in your EquestrianMissionary_CIV4UnitInfos.xml you have:
PHP:
<Civ4UnitInfos xmlns="x-schema:AltReligions_CIV4UnitSchema.xml">

but the schema file in the folder is named Elements_of_Harmony_CIV4UnitSchema.xml.
 
Haven't really looked much into it, but in the XML files, at the top, you have to name the related schema file, which has to be in the same folder (this whole schema thing only applies for modular loading).
And e.g. in your EquestrianMissionary_CIV4UnitInfos.xml you have:
PHP:
<Civ4UnitInfos xmlns="x-schema:AltReligions_CIV4UnitSchema.xml">

but the schema file in the folder is named Elements_of_Harmony_CIV4UnitSchema.xml.

Okay. I was unaware of this. I'll have to go through all of them and fix that. Thank you very much. I knew it was something simple.
 
Thank me when you see it working ;).
Because, like said, I haven't really looked into it, and there might still be other errors in your files (but these will hopefully result into some error messages).

Aye. There were a number of new errors that I went around and fixed. For the most part I worked out the errors, but there are still a few...

http://i.imgur.com/5s9hU.jpg

This is how my temple displays in-game. The numbers change every time I load the mod, but while I've made a couple of different attempts to fix it, nothing helps. (Also I realize the graphics for the buildings are broken--I'll figure out what I did wrong in making those graphics later--it was probably just some kind of alpha channel messup or something.)

Attempting to load things in game gave mixed results. Clicking on the monastery in the build list caused the game to lock up and crash.

I've reuploaded the mod with all of the edits and changes:

http://www.mediafire.com/?rn8t83yqumepo8n
 
oh i was thinking of a rohan civ or making a langshnekt replace both a maceman and a pikeman
 
This is how my temple displays in-game. The numbers change every time I load the mod, but while I've made a couple of different attempts to fix it, nothing helps.

:lol: no idea.
The only unusual thing I see that all your BuildingClassInfos.xml have the whole list of buildings in the, and not only the new building. I guess that might somehow be a problem.

(Also I realize the graphics for the buildings are broken--I'll figure out what I did wrong in making those graphics later--it was probably just some kind of alpha channel messup or something.) [...]
Clicking on the monastery in the build list caused the game to lock up and crash.

-> that's related. You really screwed up the alpha channel somehow, it's displayed besides the actual button, which makes it a) invalid and b) brings the game to crash because it's bigger than 64*64 (the max. resolution for a button).


Other thing:
- You forgot to add your new religion icon to the assets\res\fonts\Gamefont.tga and _75.tga (therefore currently the cereal mills icon is used).
- You forgot to make your shrine a world wonder
 
oh i was thinking of a rohan civ or making a langshnekt replace both a maceman and a pikeman

Since I never try this before, you can see if this work.

So currently you have a L that is replacing both M and P for the same civ.
As a result, when the civ meets the requirements to build both M and P, you see L twice in the build list, thats the problem I guess?

Maybe you can, just let L replace M and not both.
Then replace P with NONE just like barbarians, or use python to disable it.
Of course, just make sure the upgrade path is still correct, such that whatever can upgrade to P, can now upgrade to L instead, and whatever P can upgrade to, L can upgrade to as well.

The only thing is that you will not see the P is replaced by L statement.
 
:lol: no idea.
The only unusual thing I see that all your BuildingClassInfos.xml have the whole list of buildings in the, and not only the new building. I guess that might somehow be a problem.
Quite possibly. When I next get a chance I'll strip out the extra buildings and see if that fixes it.

-> that's related. You really screwed up the alpha channel somehow, it's displayed besides the actual button, which makes it a) invalid and b) brings the game to crash because it's bigger than 64*64 (the max. resolution for a button).


Other thing:
- You forgot to add your new religion icon to the assets\res\fonts\Gamefont.tga and _75.tga (therefore currently the cereal mills icon is used).
- You forgot to make your shrine a world wonder
Ah. I have pretty much zero skills with image editing, so that's probably why I messed up the alpha channel. All I did was take a button template then copy/paste images on top of the template, but apparently GIMP didn't like that very much if it messed up the alpha channel that badly. I'll figure out how to work that properly(maybe by doing the smart thing and actually reading up some image editing tutorials.)

As for the religion icon--thank you on that. I knew I'd forgotten it. Also I'll make sure to set the shrine as a world wonder too--dunno why I didn't have it set that way already.

Thank you so much for all of your help. You've been fantastic help already, and hopefully with your extra advice I'll get this working perfectly. Only other thing I need to figure out is how to get the audio to work right...(I know it technically can't be used with the modular XML, but does that mean that it can't be used at all if I'm using something in a module, or does it just mean I have to do it in a different way?)
 
:)

Only other thing I need to figure out is how to get the audio to work right...(I know it technically can't be used with the modular XML, but does that mean that it can't be used at all if I'm using something in a module, or does it just mean I have to do it in a different way?)

When modular civilizations (or other stuff) are made here, the modders normally include the audio files as normal (non modular) files, which you have to merge in, if you want to use them in a mod.
Sort of a hack, and a bit messy, but the only option I know.
 
That's how a comment should look, but sadly the Civ4 XML parser does not deal very well with the comments. In some files the comments might even break the file.
So I guess this here....er...Firaxis' fault, somehow an improper implementation, I'd guess.

<!-- X -->

This is what I use for commenting out in xml files and it seems to work for me ok. obviously the X is your text (I may have misunderstood the question though..)
 
I have 2 questions guys.

This mat have been answered before but I don't know.

1. How do I remove the space race Victory/stuff from the game.

2. Is there a way to remove temples, because they seem to be handled differently to other buildings, they seem to be some how hard wired to priesthood, as they do not have prereq techs? any clues as to where I might need to go?

Or can I simply remove priesthood from the game with some hinky code doohicky exploding?

EDIT: ok specialbuildingsinfo was needed

any other relevant info on temples is appreciated :)
 
1) Remove it from VictoryInfo and delete all the space projects from ProjectInfos. The wonder as well since it is useless.
2) SpecialBuildingInfos.xml I believe or was it called specialbuildingclassinfos... Either way there aren't many files in the building folder
 
:)



When modular civilizations (or other stuff) are made here, the modders normally include the audio files as normal (non modular) files, which you have to merge in, if you want to use them in a mod.
Sort of a hack, and a bit messy, but the only option I know.

Okies. That's not a problem at all, actually.

In the meantime, I've managed to get everything working properly(except the audio for some weird reason.) The only other thing that doesn't work is the temple which still displays as that horridly weird messed up stats. I'm going to try taking a clean XML file and rewriting it from scratch to see what happens.

EDIT: In doing so, the building shows up as normal in the Civopedia, but it's not actually constructable or selectable in world builder. It appears as normal and doesn't have funky stats--it's just not buildable in game.

I've attached the file in question.
 

Attachments

  • Elements_of_HarmonyTemple.zip
    2 KB · Views: 62
The fault in this file is:
PHP:
<Type>BUILDING_ISLAMIC_TEMPLE</Type>

;)

I am clearly one of the most unobservant modders ever. D'oh.

Thank you so much again! Everything now works perfectly. The only thing I haven't been able to get to work is the audio...and that I don't know why. I have everything set up perfectly in the various audio files--I know I do because all I did was copy the same settings from where I had originally tried to build this mod for my own personal use within Rise of Mankind: A New Dawn, and the sound works perfectly there. It might very well just be more, or I'm trying to merge it into the wrong place. (I merge the settings WITHIN the main Beyond the Sword game files, yes?)
 
I am clearly one of the most unobservant modders ever. D'oh.

Happens to everyone at some point ;).

(I merge the settings WITHIN the main Beyond the Sword game files, yes?)

NOOOOOOOOOOOO!
NEVER touch the original files. You don't want to screw your BtS installation, do you?

You would merge that in the mod itself, but not as modular files, as normal mod files.
Means you'd create in your mod an Assets\XML\Sounds folder, you'd copy the normal sound XML over and put your new entries additionally to the original entries into them.
 
Happens to everyone at some point ;).



NOOOOOOOOOOOO!
NEVER touch the original files. You don't want to screw your BtS installation, do you?

You would merge that in the mod itself, but not as modular files, as normal mod files.
Means you'd create in your mod an Assets\XML\Sounds folder, you'd copy the normal sound XML over and put your new entries additionally to the original entries into them.

Ah, right, okay. I was a little confused.

Anyway, having done so...the game just crashes after loading the mod. It doesn't give any kind of error notifications. I checked the log files, and this is all it said:

[32093.399] DBG: CIV Init
[32093.399] VERSION: App: C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization IV Beyond the Sword\beyond the sword\Civ4BeyondSword.exe
[32093.399] VERSION: Build: Thu May 14 08:17:10 2009
[32093.399] VERSION: 3.1.9.0 (128100)
[32093.524] VERSION: Mod Loaded: C:\Users\Kyronea\Documents\My Games\beyond the sword\Mods\Elements of Harmony\
[32093.586] DBG: FILE Cat Init

EDIT:

I also decided to try loading the mod with copies of the XML files that lacked any modifications to them. It loaded into the game, but all sound refused to work. Music, sound effects--all of it just wasn't working at all.
 
So the only thing you've done were modifications in the sound?
I don't think that should result in a crash :dunno: (normally missing graphic entries are the fault).
If just the sound is lacking, then an improper merge is the reason. Due to an unknown reason the XML parser is very picky with the sound files and will even break when you put valid comments into the sound XMLs. Sadly no idea how to debug that, besides by redoing and hoping.
 
I´ve added some civilization modular in my mod. In the screen where you can configure your game, the leaders and civs of the original games are listed first in alphabetical order. After that, the added leaders and civs are shown. Is there any way to force a alphabetical order over all the leaders and civs even if they are only added modular?
 
Top Bottom