Natural wonders development thread

post the code in CvEventManager under on GameStart. make sure you have python exceptions enabled!

is it the new ones or the old ones that are not working?
 
what about with exceptions... I tested everything and it all worked perfectly
 
Can you post a list of the natural wonders included in the mod.
 
@ Voyhkah, the only three right now in are devil's head, Sugarloaf Mountain and Uluru

@J_mie 6 sorry I reinstalled civ and I had python exceptions before obhvoiusly and never realized they wouldnt be enabled after reinstalations, just didnt put 2 and 2 together

I get an error when I load (the unedited version of what you gave me ) a game
 

Attachments

  • Civ4ScreenShot0005.JPG
    Civ4ScreenShot0005.JPG
    80 KB · Views: 120
Line 381
Code:
                                if (not pPlot.isWater() and not pPlot.isAdjacentToLand()) or (gc.getFeatureInfo(pPlot.getFeatureType[COLOR="Red"]()[/COLOR]).isNaturalWonder()):
 
Because if there isn't a Feature on the plot, then pPlot.getFeatureType() == None lol

Change to this:
Code:
		if iFeatureType != -1:
		        if gc.getFeatureInfo(iFeatureType).isNaturalWonder()): continue
		if not pPlot.isWater() and not pPlot.isAdjacentToLand(): continue

P.S.
I hate this style of indentation. Why can't they just use tabs...
Adjust the indentation yourself lol
 
That worked very nice, I still got an error when i took my first turn but it didn't seem to do anything. All of the wonders spawned, I got messages when Enemy found one, when I found one I got a message and it showed movie, and when i put city next to it I got huge culture, it looks realy good

here the error (enemy found one when i took a turn, not sure if that matters since I didnt get errors when I found one. and I didnt get error next turn I took)
 

Attachments

  • Civ4ScreenShot0009.JPG
    Civ4ScreenShot0009.JPG
    83.5 KB · Views: 65
Because you are stuffing a float value into where it can only take an integer value

Change that line to
Code:
 iCultureBoost = pCity.getCulture(iPlayer))* iCulturePercentageBoost /100
 
Do you mean to replace this line?

Code:
 #Create Effects for discoverers
                                                        for pPlayer in lPlayers:
                                                                iPlayer = pPlayer.getID()
                                                                for iCity in xrange(pPlayer.getNumCities()):
                                                                        pCity = pPlayer.getCity(iCity)
                                                                        [COLOR="Red"]iCultureBoost = (float(pCity.getCulture(iPlayer))/100) * iCulturePercentageBoost[/COLOR]
                                                                        pCity.changeCulture(iPlayer, iCultureBoost, True)

                                                        return

Because if I replace just that line with what you get me i get a lot of errors when loading mod, dont even wanna try to start a game
 
iCultureBoost = pCity.getCulture(iPlayer)* iCulturePercentageBoost /100

1 extra bracket lol
 
You better try all those CityBuilt, CityAcquiredAndKept and CityLost codes as well

Then I can bill jamie the post sales maintainence fees :D
 
This you will have to wait for jamie lol
I only use CityRazed and CityAcquired codes, I dont use CityLost codes.

Anyway, looking at the codes, it appears that culture added is a fixed 4000 value.
You may want to adjust it according to game speed, so that it is not too high for quick or too low for marathon
 
what?! I wasn't getting those errros :confused:

well actually I didn't test the code where I forgot brackets or the feature type -1 :p (urg I feel so stupid... I would have fixed those in two seconds)

btw I don't like not using floats when doing percentages because the decimal point gets dropped. use the original line but encase everything after = with round(...)... I think I will do some improvements tonight...

and I did not think that culture thing would happen :p surely if a city is razed all cutlure is destroyed.... ahh well I will fix it all tonight (and I love that indenation style, keeps code smaller) though I believe it could be because I set bPlots to True...

edit: and yes I will add a modifier for that culture value for game speed.

I will reupload CvEventmanager with my changes tonight... Thanks plat for error finding in my absense.
 
Hi dacubz145
I have naturals wonders idea for some time.
I´m working on some natural locations what I can send you after finishing.
Can You for me to do a separate part that allows the discovery of the natural wonders on the map? For starters I'll suffice to my seven natural wonders appeared on the map. I use a system that will allow cities to work with them .
(special improvements)
nice day
Hroch
 
there is discovery :confused:

when the first player sees a natural wonder they get a culture boost
 
Back
Top Bottom