Quick Modding Questions Thread

I did some more experimenting and found that if the attacking unit's strength was greater than the defending dreadnought's full strength of 22 it targeted the dreadnought. I used another Dreadnought to attack and it was targeting the Steamer - as soon as I gave it a combat 1 promo it targeted the Dreadnought as it should. I'm using BUG/BULL/BAT and BETTER AI mods - maybe it's the AI mod? Very odd.
 
Yeah, the problem is with the latest (2010-09-26) version of Better BUG AI. When I remove the DLL my tests work fine.
 
I'm kinda confused by a weird thing happening in a Mod/Scenario I'm making. I want the game to start in the year 1700 and a starting era of industrial. I've edited the worldbuilder file to try and achieve this. However when I start the scenario it starts in Summer 1887 on turn 750, which is not what I planned :crazyeye: In the spoiler is what I currently have in the WB file. I've looked through every tutorial I can find that I think will help and tried several things, alas to no avail, I've altered it several times to turn 0 but everytime it just reverts back to turn 750 on loading.

Spoiler :
BeginGame
Era=ERA_INDUSTRIAL
Speed=GAMESPEED_MARATHON
Calendar=CALENDAR_SEASONS
Option=GAMEOPTION_NO_VASSAL_STATES
Victory=VICTORY_TIME
Victory=VICTORY_CONQUEST
Victory=VICTORY_DOMINATION
Victory=VICTORY_CULTURAL
Victory=VICTORY_SPACE_RACE
Victory=VICTORY_DIPLOMATIC
GameTurn=750
MaxTurns=1200
MaxCityElimination=0
NumAdvancedStartPoints=14400
TargetScore=0
StartYear=1700
Description=
ModPath=
EndGame


Can anyone tell me what I am doing wrong and how to fix it? Thanks for reading :)

These settings are depending upon what you have in your CIV4GameSpeedInfo.xml file for the GAMESPEED_MARATHON. Have you edited it?

Also, you are using the CALENDAR_SEASONS instead of the default one.

The StartYear should only be 1700 if you start at turn 0. Otherwise it counts as from 1700 and add 750 turns which could mean 187.5 years (750 / 4 seasons) = Summer 1887 (1700 + 187.5).

Try to think along these lines. In case you have edited it, you could also post the <GameTurnInfos> settings for your Gamespeed Marathon.
 
These settings are depending upon what you have in your CIV4GameSpeedInfo.xml file for the GAMESPEED_MARATHON. Have you edited it?

Also, you are using the CALENDAR_SEASONS instead of the default one.

The StartYear should only be 1700 if you start at turn 0. Otherwise it counts as from 1700 and add 750 turns which could mean 187.5 years (750 / 4 seasons) = Summer 1887 (1700 + 187.5).

Try to think along these lines. In case you have edited it, you could also post the <GameTurnInfos> settings for your Gamespeed Marathon.

I haven't modified the CIV4GameSpeedInfo.xml at all.

I should make clear that it is only when I edit the map in WB (which is still an onging process) and then save that WB file that the turn number is 750 when I look in the WB file next time.

I keep changing the GameTurn to 0 but still get a start year of summer 1887 when I load up the scenario. I don't understand where the extra 750 turns are coming from, I keep trying to get rid of them but they come back :confused:

But thanks anyway isenchine for reading and replying :goodjob:
 
I haven't modified the CIV4GameSpeedInfo.xml at all.

I should make clear that it is only when I edit the map in WB (which is still an onging process) and then save that WB file that the turn number is 750 when I look in the WB file next time.

I keep changing the GameTurn to 0 but still get a start year of summer 1887 when I load up the scenario. I don't understand where the extra 750 turns are coming from, I keep trying to get rid of them but they come back :confused:

But thanks anyway isenchine for reading and replying :goodjob:

How do you reset it to 0? With a text editor?

Perhaps you are not editing the file that is loaded? If you save a file in the WB, it goes by default to 'My Documents/My Games'. You have to copy it to the 'Private/PublicMaps' folder where you can load it from the menu. I can't think of something else for the time being.

EDIT: forget the above, the problem might come from the ERA_INDUSTRIAL. In the CIV4EraInfos.xml file, the BtS <iStartPercent> is set at 50, meaning 50% of 1500 turns (Marathon) = 750.
 
How do you give barbarians technologies at start in a scenario? I can give the barbs techs in worldbuilder, but when I save and then load the resulting scenario I find the barbarians once again without any techs. Please help?

Thank You.
 
EDIT: forget the above, the problem might come from the ERA_INDUSTRIAL. In the CIV4EraInfos.xml file, the BtS <iStartPercent> is set at 50, meaning 50% of 1500 turns (Marathon) = 750.

Yep its the ERA that does it, I figured that out myself last night but I wasn't quite sure how to resolve it. I thought of either changing the era to ancient or changing the start date, neither of which was exactly what I wanted...

However thanks to your information what I've actually done is just change the <iStartPercent> to 0 which solves the problem. I would probably have never figured that out by myself, IstartPercent is a pretty cryptic name :lol:

Thank you very much for your help it's also helped me by drawing my attention to the CIVEraInfos file which I needed to modify further :goodjob:
 
How do you give barbarians technologies at start in a scenario? I can give the barbs techs in worldbuilder, but when I save and then load the resulting scenario I find the barbarians once again without any techs. Please help?

Thank You.

you may need to create your own mod for the scenario, and then modifiy CIV4CivilizationInfos.xml and change this bit
Spoiler :
Code:
<FreeTechs>
				<FreeTech>
					<TechType>TECH_IMPROVISED_WEAPONS</TechType>
					<bFreeTech>1</bFreeTech>
				</FreeTech>
				<FreeTech>
					<TechType>TECH_FORAGING</TechType>
					<bFreeTech>1</bFreeTech>
				</FreeTech>
			</FreeTechs>

For the Barbarian Civ. This is where starting techs are handled.
 
has anyone ever made a mod that allowed playing as you plus your vassal? ie you end your turn and then you get to play the vassal's turn etc?
 
I elected not to post the python or SDK forums because the problem could be either.

Quick noob question... what are some common causes for CTD? I'm debugging a mod with extensive python and DLL work (which is not my own). I get a CTD without an error message. I've got the auto save file and it crashes as soon as it loads.

Are there any debugging tools that I might consider using?
 
I elected not to post the python or SDK forums because the problem could be either.

Quick noob question... what are some common causes for CTD? I'm debugging a mod with extensive python and DLL work (which is not my own). I get a CTD without an error message. I've got the auto save file and it crashes as soon as it loads.

Are there any debugging tools that I might consider using?

in my experience CTDs with no message have virtually always been because of bad art defines.
 
Are there any debugging tools that I might consider using?

First, make sure you have it set to show you Python errors. In the main CivilizationIV.ini set HidePythonExceptions to 0. This will give a pop-up if you get a Python error.

The Python errors are also stored in the PythonErr.log file (there is also a PythonErr2.log file which is almost never of any use). There are other log files in the Logs folder which might have some info in them that is useful to you.

But as srpt said, the single most common "instant crash" causing thing is art. Missing art. Bad path names in the art def XML making it look in the wrong place. Incorrect button definitions. That sort of thing.
 
Have you made a debug version of the .dll?

I'm not entirely sure. I'm just alpha testing, I'll ask though. Is there a specific DLL that handles errors, or do debug versions simply have built in methods for dealing with exceptions?

I've dealt with the art defines before where I'll get a CTD during loading or during map creation. Can art defines cause a CTD during game play too? I'm thinking yes... perhaps if a promotion had a bad art define, it wouldn't crash until the player unit was eligible; or if a unit type had a bad art define, it wouldn't crash until something (python or the ai) built or spawned the unit?
 
Can art defines cause a CTD during game play too?
As far as units go, I'm pretty sure their art is loaded when you start up the game even before you play. I have had many instant CTD's because of wrong art for units.
 
you may need to create your own mod for the scenario, and then modifiy CIV4CivilizationInfos.xml and change this bit
Spoiler :
Code:
<FreeTechs>
				<FreeTech>
					<TechType>TECH_IMPROVISED_WEAPONS</TechType>
					<bFreeTech>1</bFreeTech>
				</FreeTech>
				<FreeTech>
					<TechType>TECH_FORAGING</TechType>
					<bFreeTech>1</bFreeTech>
				</FreeTech>
			</FreeTechs>

For the Barbarian Civ. This is where starting techs are handled.

I tried this, and the civilopedia claims I succeeded, but when I open my scenario via WB, I find that the barbs once more have no techs. I can post screenshots if that would be useful. Is there any place in a WB File where the techs that Barbarian (team 50, methinks) has are listed?
 
Yeah barbs can be tricky, as they have there own set of rules and have all these bits of code in the sdk that do things, so the code may force the barbs back to a default level..

have you tried playing your scenario for a turn or 2 then WB changing the techs and reloading? It may do nothing, but it might just 'avoid' some defaulting bit of code that starts the barbs off with X or no tech?
 
spaceman98 I'm also interested in solving this one and having a sudden brainwave I think I've found a simple way round it and that's to add a minor civilisation to the game. You open the WB file and add a new team and player.

In this example it's team 16. First add the team and the techs you want
Spoiler :
BeginTeam
TeamID=16
Tech=TECH_MYSTICISM
Tech=TECH_MEDITATION
Tech=TECH_POLYTHEISM
Tech=TECH_PRIESTHOOD
Tech=TECH_MONOTHEISM
Tech=TECH_MONARCHY
Tech=TECH_LITERATURE
ContactWithTeam=16
RevealMap=0
EndTeam


Then you add the player

Spoiler :
BeginPlayer
Team=16
LeaderType=LEADER_BARBARIAN
LeaderName=Barbarian
CivDesc=Barbarian
CivShortDesc=Barbarian
CivAdjective=Barbarian
FlagDecal=Art/Interface/TeamColor/FlagDECAL_ZuluShield.dds
WhiteFlag=0
CivType=CIVILIZATION_BARBARIAN
Color=PLAYERCOLOR_BLACK
ArtStyle=ARTSTYLE_BARBARIAN
PlayableCiv=0
MinorNationStatus=1
StartingGold=200
StartingX=108, StartingY=68
StateReligion=
StartingEra=ERA_RENAISSANCE
RandomStartLocation=false
CivicOption=CIVICOPTION_GOVERNMENT, Civic=CIVIC_HEREDITARY_RULE
CivicOption=CIVICOPTION_LEGAL, Civic=CIVIC_VASSALAGE
CivicOption=CIVICOPTION_LABOR, Civic=CIVIC_SLAVERY
CivicOption=CIVICOPTION_ECONOMY, Civic=CIVIC_DECENTRALIZATION
CivicOption=CIVICOPTION_RELIGION, Civic=CIVIC_PAGANISM
Handicap=HANDICAP_NOBLE
EndPlayer


This seems to work, as long as you make sure that you specify PlayableCiv=0 and MinorNationStatus=1 then as far as I can tell you can't negotiate with that civ and neither can the AI (I think anyway)
 
Back
Top Bottom