Mod-Modders Guide to Fall Further

Even though I should probably be working on a lab report instead, I was in the mood for trying some DLL work again. I downloaded the FF DLL files, made a few minor errors (commenting out the lines that make the capital less likely to become a holy city, allowing the elves to cast bloom in cities, allowing spells to create improvements in cities, allowing improvements to be built on peaks), and followed Kael's instructions for compiling. It isn't compiling though. I keep getting this message:

c:\Documents and Settings\Jon-Michael Ivey\Desktop\CvGameCoreDLLFF50N\CvGameCoreDLL.h(160) : fatal error C1083: Cannot open include file: 'boost/python/list.hpp': No such file or directory
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings
 
Ahwaric: Ah, that'd be our dear friend Readpass3 wouldn't it then? Hate that bastard...

MC: It'll be easier to work with the DLL after next release (no clue when that'll be), we will include absolutely everything you need to compile successfully with the main download then. For now, many people report random weird problems with attempting to compile (though that one is new to me)

Best guess would be to make sure that you have a boost folder in with your code, mine isn't just called boost/ though, so I wonder if it is looking elsewhere.
 
Is there a way to run a python check BEFORE founding a city, or does one only exist for after?

Edit: I'd like a special settler unit to 'found' a castle, rather than a city... Would be easy to do via a spell, but I think there's a better shot for the AI to use it this way so I'm trying this first. :lol:
 
Hi all.
I just succeeded in making a new version of the Tar Demon replacing the actual effect ontop of a greatprophet by a real mesh, rougthly similar, and use it as an improvement (disturbing ? :)). I was also planning to make it semi transparent to demonstrate the gelly quality of it.

I almost succeeded, however while the transparency shows the terrain under the improvement, when a unit is also on the tile, the part which should be visible throught the improvement is not, only th eupper part (outside the tar demon) is visible..

Any hint on this strange thing ?
 
you probably have to give it an niAlphaProperty, and setup the flags for that.

http://forums.civfanatics.com/showpost.php?p=7346930&postcount=1310

Thanks, but it already has an alphaProperty. The value was different so I tried the one you proposed, but still same sympthom, the background is visible through the improvement, but not the units.

EDIT : added a picture to illustrate...

EDIT2: When thinking more I think it may be due to the order of drawing. I guess Civ draws first the background, then the feature/improvement and finally the unit. So when the transparent improvement is drawn, Civ calculates the transparency and displays the background under, but when the unit is drawn, Civ simply clips without considering transparency. what do you think ? Would work this way ?
 

Attachments

  • transparent_improvement.jpg
    transparent_improvement.jpg
    174.8 KB · Views: 82
One more strange thing happening. I have a city with population of 1 which can work 2 tiles !
Any idea how this is possible (knowing the city has a modded building, but I cannot see any option which would have such consequence) ?
 
what do you think ?

I think you should try posting the issue in the main creation/customisation forum. This thread is excellent for gettng help with code, or FF specific things, but there aren't many artists here that I'm aware.

There's nothing wrong with posting the question here, but I think you'd have better luck here. That's where I usually ask for art related help
 
I tried to find it, but I know someone made an Oil Well improvement and was having a similar issue. I had told him it wasn't fixable because I have seen to many units with a transparency also show the terrain behind them only (ignore features, cities and units which should appear). However, someone else came in and pointed out the solution and it started working. I don't remember if it was in the main C&C forums, or in a subforum though.
 
One more strange thing happening. I have a city with population of 1 which can work 2 tiles !
Any idea how this is possible (knowing the city has a modded building, but I cannot see any option which would have such consequence) ?

Ok, I tracked down the problem to its visible root.
I created a spell to found cities. 2 speels actually. Both spells are exactly similar except for one thing, one of them has a <iDelay>8</iDelay> and the other <iDelay>0</iDelay>.

Both works and created a city with population 1. However, for some reasons, the city created by the spell with the 8turns delay can work 3 tiles with its 1 population (the middle one +2) while the city created with the spell without delay can work as normal only 2 tiles with its 1 population.

I'll very to track in the dll to see why but seems very strange to me.
BTW, if I remove the delay from the delayed spell, then it works like the other one.

(Am I clear?)

EDIT : BTW, thanks for the transparent help, I simply made the improvement less so so it is not cheking at the moment. I'll check about your reference xienwolf :)
 
Hmm... How do I get a flavor value in python? I did:
Code:
iFlavor = iLeader.getFlavorValue(gc.getInfoTypeForString('FLAVOR_RELIGION'))
But it returns a number like 100257139445...
 
The flavor MIGHT be giving you the actual number stored, and you may have found a bug. Does it do this with with all of your leaders, or specific ones?
It seems to do that for every leader. I checked just once with a pyPrint and saw only 10000358874 thingies, even for Orc, Animal and Demons.
 
Could the number be 1073741824? If so it is some sort of bug because I heard that number (2 to the 30th power) is the highest number civ can understand and displayed sometimes during an error.
 
Could the number be 1073741824? If so it is some sort of bug because I heard that number (2 to the 30th power) is the highest number civ can understand and displayed sometimes during an error.
Yes, I think it's that number. I would need to check but it's possible...
 
I thought it was twice that? Maybe that is the highest number it can handle as a float, since it has to use one bit for the +/- sign, but it can handle larger ints.

From the computer's perspective, such a number is infinity. Maybe there was some division by 0 that somehow didn't cause a crash?
 
That delay thing seems an odd bug.

OK, I'm still on the tracking down, but after many more test, it is not related to the delay but to the distance between the new city and existing cities. I thought about the delay because betwwen test I somehow choose always the bad distance for the delayed spells and the right one for the other one :)

So I tested on a 11x11 tiles grid aroud an existing city, to check when the 3 working tiles bug and occured and here is the result:

Code:
[FONT="System"]

OK OK OK OK OK OK OK OK OK OK OK
OK OK OK [COLOR="Red"]KO KO KO KO KO[/COLOR] OK OK OK
OK OK [COLOR="red"]KO KO KO[/COLOR] OK [COLOR="red"]KO KO KO[/COLOR] OK OK
OK [COLOR="red"]KO KO[/COLOR] XX XX XX XX XX [COLOR="red"]KO KO[/COLOR] OK 
OK [COLOR="red"]KO KO[/COLOR] XX XX XX XX XX [COLOR="red"]KO KO[/COLOR] OK 
OK [COLOR="red"]KO[/COLOR] OK XX XX CY XX XX OK [COLOR="Red"]KO[/COLOR] OK 
OK [COLOR="red"]KO KO[/COLOR] XX XX XX XX XX [COLOR="red"]KO KO[/COLOR] OK 
OK [COLOR="red"]KO KO[/COLOR] XX XX XX XX XX [COLOR="red"]KO KO[/COLOR] OK 
OK OK [COLOR="red"]KO KO KO[/COLOR] OK [COLOR="red"]KO KO KO[/COLOR] OK OK
OK OK OK [COLOR="Red"]KO KO KO KO KO[/COLOR] OK OK OK
OK OK OK OK OK OK OK OK OK OK OK


[/FONT]

OK : 2 working tiles for the city (as expected)
KO : 3 working tiles for the city
XX : too close to the existing city
CY : existing city position

Below is the spell used for founding the city:

Code:
def	spellRoot(caster,toKill):
	pPlot = caster.plot()
	pPlayer = gc.getPlayer(caster.getOwner())
	pPlot.setRouteType(-1)
	pPlayer.found(pPlot.getX(),pPlot.getY())
	if toKill == true:
		caster.kill(True, PlayerTypes.NO_PLAYER)

I looked up in the C++ but cannot find the reason for this.
 
PythonDbg.log said:
PY:City Built Event: Kwythellar
PY:Flavor is 101450031
PY:City Built Event: Torrolerial
PY:Flavor is 101450181
PY:City Built Event: Garduk
PY:Flavor is 101450065
PY:City Built Event: Golden Leane
PY:Flavor is 101450057
PY:City Built Event: Evermore
PY:Flavor is 101450186
PY:City Built Event: Thariss
PY:Flavor is 101450009
PY:City Built Event: Galveholm
PY:Flavor is 101450103
PY:City Built Event: Innsmouth
PY:Flavor is 101450078
PY:Flavor is 101450007
PY:Flavor is 101450200
PY:Flavor is 101450100
Not quite what Cyther said. But the first numbers are always the same... :confused:
 
Back
Top Bottom