Quick Modding Questions Thread

Also how does cIV calculate how much damage a plane does to a unit? Is it strictly on the air combat? Because I want my fighters to have stronger strenght obvously, but bombers should obviously do more damage when bombing units. I mean i could obvoiusly get around that by giving bombers bonus vs ground + naval units, but im curoius if thats the only thing that factors in
 
In my futuristic upcoming mod I plan to add an "anti-matter bomb".
I would like to give it the following abilities when launched (like an ICBM):
-Destroy all things within a range of 1,that means it destroys all things(units,cities,improvements,terrain features)
But it does not destroy base terrain.
Would that be possible?
If anyone can help me find a graphic for it,that would be very helpful...
Also,where is the effect for the ICBM (mushroom cloud),the graphics and XML located.
And where are the sound defined that units make when they attack?
 
-Destroy all things within a range of 1,that means it destroys all things(units,cities,improvements,terrain features)
But it does not destroy base terrain.
Would that be possible?

What terrain should appear there?
(you say "destroy all [...] terrain, but should not destroy the base terrain, so what should now happen?)

If anyone can help me find a graphic for it,that would be very helpful...
Also,where is the effect for the ICBM (mushroom cloud),the graphics and XML located.
And where are the sound defined that units make when they attack?

The mushroom is sadly defined in the GlobalDefines.xml, so you can change that for either all or none. Making different effects for different nukes would require some Python modding :/.
Not sure about the sound, might be in the .nif itself :dunno:.
 
What terrain should appear there?
(you say "destroy all [...] terrain, but should not destroy the base terrain, so what should now happen?)
Fallout should become a terrain feature on all the tiles affected by the bomb.
 
hi guys, i was able to fix the special unit problem i had :D and now another idea rose: is it possible to make a settler found a city with 2 pop instead of 1?
 
Fallout should become a terrain feature on all the tiles affected by the bomb.

Okay, then check the attachement.
It's a cheap modification of my planet breaker modcomp.
Since I can't test it, you first have to load it and check if the planet breaker unit (looks like an ICBM) does have the desired effect (should, if there's no bug).
If it has, then check the CvEventManager.py. There's one change after onNukeExplosion, marked with "Planetbreakerbegin".

hi guys, i was able to fix the special unit problem i had :D and now another idea rose: is it possible to make a settler found a city with 2 pop instead of 1?

XML\GlobalDefines.xml

PHP:
	<Define>
		<DefineName>INITIAL_CITY_POPULATION</DefineName>
		<iDefineIntVal>1</iDefineIntVal>
	</Define>
 

Attachments

  • Planetbreaker_civciv5.zip
    36.1 KB · Views: 27
XML\GlobalDefines.xml

PHP:
	<Define>
		<DefineName>INITIAL_CITY_POPULATION</DefineName>
		<iDefineIntVal>1</iDefineIntVal>
	</Define>

i think this will change the pop for all new founded cities from settlers. i was thinking smth like, apart from settlers, to add a second unit, like advanced settlers that can found a city with 2 pop or with free building(s). i experimented a little with xml but couldn't find it. do i have to edit python?
 
Thank you it works!
The mushroom is sadly defined in the GlobalDefines.xml, so you can change that for either all or none. Making different effects for different nukes would require some Python modding :/.
So how would I make an "ant-matter bomb" use another effect then the mushroom cloud?
 
If that anti-matter-bomb is the only nuclear weapon, then just change it in the globalDefines.
If you have regular ICBMs, then you'd have to set it in the globalDefines to something nonexisting and trigger the effects via Python. AFAIK someone did this somewhere in a modmod, but not sure where :dunno:.
 
That's weird,I just added the Anti-Matter Bomb to my mod and the added effect worked!
Look!
Spoiler :



 

Attachments

  • Civ4ScreenShot0515.JPG
    Civ4ScreenShot0515.JPG
    147.7 KB · Views: 113
  • Civ4ScreenShot0516.JPG
    Civ4ScreenShot0516.JPG
    147.9 KB · Views: 93
Spoiler :

No,for an unknown reason they both have different effect...
But that makes it only better...
 

Attachments

  • Civ4ScreenShot0517.JPG
    Civ4ScreenShot0517.JPG
    145.2 KB · Views: 117
Top Bottom