Mod Component Requests Thread

I was wondering if anyone familiar with python could check out THIS THREAD and help me figure out why the wonder isn't working. The last two posts in that thread should have enough information for you. But in case it doesn't all of the code I used is there so it doesn't require you to DL or test anything. Thanks. :goodjob:
 
It is a real pity the Scorched Earth mod doesn't work for BtS 3.19 (Here). It would have been awesome.

Anyone able to update it for 3.19? Is it part of Revolution?

I wish to include Scorched Earth in my own mod. But I'm not interested in merging my mod with Revolution as that is out of its boundaries.
 
Ups, sorry, no, Artemis doesn't do that.
But this code should do it:

PHP:
	def onBuildingBuilt(self, argsList):
		'Building Completed'
		pCity, iBuildingType = argsList
		game = gc.getGame()
###from here
		if iBuildingType == gc.getInfoTypeForString("BUILDING_YOUKNOWWHATYOUWANTHERE"):
			pPlayer = gc.getPlayer(pCity.getOwner())
			pPlayer.initUnit(gc.getInfoTypeForString("UNIT_ARTIST"),pCity.getX(),pCity.getY(),UnitAITypes.UNITAI_ARTIST,DirectionTypes.NO_DIRECTION )

Hey The_J, if I wanted to add another building that does something like this too (except with a Great Scientist) do I just repeat the code again and change the text there?

And @ everyone else: I'd like to second Le Sage's request for the scorched earth modcomp for 3.19.
 
Would it be possible to have this:

http://forums.civfanatics.com/showthread.php?t=237367&highlight=colony

For Civilization IV Beyond the Sword 3.19? Thus, an endless amount of colonies, but what is most important to me, being able to grant any city independence (for example, you have a large land with on it 12 cities, and a small island with 3 cities, you wish to grant 1 city on the island independence, and the 2 other cities as well, creating 2 colonies, but you also wish to form a colony of 6 cities on your homeland, which thus creates another colony), and having them retain their culture.

Thanks in advance.
 
I think there aren't enough projects in civ, well I at least want to add a few more to my mod and was wondering if anybody could help me out with it. These are the projects and effects that I would like to add to my mod:

- Woman's Suffrage (Team/National Project); -20% War Weariness, +10% Production in all cities.

- Manhattan Project (Team/National Project); I just want this made into a national project that allows only the building civ to produce nukes, so that each civ has to build it before doing so.

- Adam Smith's Trading Co. (World Project); +1 Trade Route in All Cities, +1 Commerce Per Specialist, +2 Great Merchant GPPs

- Magellan's Voyage (World Project); Free Navigation I for any unit built in the city, +50% Trade Income in all cities (might be overpowered on that one though)

- Theory of Evolution (World Project); +2 Beakers for Universities, +1 Free Scientist in Each City

- Cure for Cancer (World Project); (for Next War Requires Center for Disease Control) +2 population in every city, +2 population upon city growth, +2 Happiness in every city, + 3 Relations with all other nations (might be overpowered)

I even made buttons for some of them, check it out (some of these are for pre-existing Next War projects to replace their terrible buttons):


I have been told this can't be done with Python and XML alone, however I noticed that Tsentom has a couple of python projects, and I was also wondering if any of this can be done using the event system. The reason I ask is because someone who uses Mac helped me out with my mod and I wanted to get as much content in it as I can for him before using a custom DLL. So if any of this is possible with only python and XML that would be great. So anyone want to help me out?

EDIT: Some other possible World Projects would be the Via Appia (gives +1 movement on roads within cultural borders), Hammurabi's Code (free Courthouse in all cities, and all new cities you build) and the Magna Carta, although I have no idea what the Magna Carta would do.
 
I know I just made a request, but I think this one might be useful to everyone else. I'd like to request a modcomp that adds three new animals to the game; Elephant, Horse, and Deer (I think you know where I am going with this) so that when you kill them (and have the Animal Husbandry tech) a resource for that animal appears on the tile they are killed on. These units should not be able to attack you, but should also have the ability to withdraw (maybe an even higher one than most units) and should have two movement (so they're harder to hunt, and may require more than one unit to add a level of strategy and emulate how ancient man hunted).

If you need art just ask and I can supply it, but I think it should all be in the DB.

Any takers?
 
I'm pretty sure it's fairly easy with python. And most of it can be done in xml. I'll see what I can make.

I assume you are talking about the Horse, Deer and Elephant thing. Right? Because if you are talking about the Projects that would be awesome... :goodjob:

Just kidding. Thanks a lot man, I think this would be a cool feature for almost any mod really. Do you need me to get some art together for you or do you not need that?

EDIT: Also if you think about it, this could be used for all sorts of mods too. For instance, that World of Odysseus mod out there, you could get some type of bonus from killing a Cyclops or a Gorgon or something. Or if you killed a Kraken you get some type of crazy-awesome seafood resource.
 
I assume you are talking about the Horse, Deer and Elephant thing. Right? Because if you are talking about the Projects that would be awesome... :goodjob:

Just kidding. Thanks a lot man, I think this would be a cool feature for almost any mod really. Do you need me to get some art together for you or do you not need that?

EDIT: Also if you think about it, this could be used for all sorts of mods too. For instance, that World of Odysseus mod out there, you could get some type of bonus from killing a Cyclops or a Gorgon or something. Or if you killed a Kraken you get some type of crazy-awesome seafood resource.

If you could get some art from somewhere, that would be awesome. But i can't get the modcomp complete today. I'll try to get the main idea work before I got to bed. It's midnight here. :sleep:
 
If you could get some art from somewhere, that would be awesome. But i can't get the modcomp complete today. I'll try to get the main idea work before I got to bed. It's midnight here. :sleep:

Alrighit, I'll put a pack of art for you together that you can use. Get some sleep! :goodjob:
 
Here's the main code that does all the work
Code:
	def onCombatResult(self, argsList):
		'Combat Result'
		pWinner,pLoser = argsList
		playerX = PyPlayer(pWinner.getOwner())
		unitX = PyInfo.UnitInfo(pWinner.getUnitType())
		playerY = PyPlayer(pLoser.getOwner())
		unitY = PyInfo.UnitInfo(pLoser.getUnitType())

# Animal unit bonus start
		pUnitType = pLoser.getUnitType()
		if (pUnitType == gc.getInfoTypeForString('UNIT_WHATEVER')):
			teamX = playerX.getTeam()
			if (teamX.isHasTech(gc.getInfoTypeForString('TECH_WHATEVER)) == 1):
				pPlot = pLoser.plot()
				pPlot.setBonusType(gc.getInfoTypeForString('BONUS_WHATEVER'))
# Animal unit bonus end
...
I'll continue work tomorrow. :sleep:
 
And when you wake up, you'll have some art to use! Think of it like Christmas, except you are working and not getting anything out of it. :mischief: :goodjob:
 
@Project list: All not doable :(.
Why? I've looked at the API, and you can't check later in the game, who has built a project, and nearly all affects would occur later after building the project, or would affect conquered/new founded cities.
 
@Project list: All not doable :(.
Why? I've looked at the API, and you can't check later in the game, who has built a project, and nearly all affects would occur later after building the project, or would affect conquered/new founded cities.

So, I can only use python for one-time effects?

EDIT: And what about Manhattan?
 
I'd like to request a modcomp that adds three new animals to the game; Elephant, Horse, and Deer
done
so that when you kill them (and have the Animal Husbandry tech) a resource for that animal appears on the tile they are killed on.
done
These units should not be able to attack you,
done
but should also have the ability to withdraw (maybe an even higher one than most units)
Do you mean when they're attacked, they should be able to espace?
and should have two movement (so they're harder to hunt, and may require more than one unit to add a level of strategy and emulate how ancient man hunted).
and done

Now I'm wating for your art. :mischief:
 
Sorry about that, I wound up testing out a map-mod-thing for The_J and then going out drinking last night. :blush:

Here you go man. I hope it all goes well! :goodjob:

I included the artdefines so you know the animations, although they are from the original and I made new buttons, so use the Btn_Deer.dds, Btn_Horse.dds, and Btn_Elephant.dds for the button.

EDIT: Yes, when they are attacked there should be a chance (maybe something high, like 40-60%) they can escape the attack, if that is possible.
 

Attachments

  • Animals.rar
    508 KB · Views: 39
So, I can only use python for one-time effects?

For projects yes :(.

EDIT: And what about Manhattan?

Mmhh...easiest way would be, to create a fake building, which is prerequisite for the nukes, then create a fake wonder, which gives this building to every city, and create a team project, which will then set this wonder in your city.
Can't think myself of a really good way to do it :/.
 
Top Bottom