Pioneertank

The_J

Say No 2 Net Validations
Administrator
Supporter
Joined
Oct 22, 2008
Messages
42,185
Location
DE/NL/FR
A Pioneertank, which can create hills and also build forts :).
DOWNLOAD

attachment.php


attachment.php


attachment.php


attachment.php


3D-modell: Credits to Rabbit, White for his excellent Chimera-Tank.
Python-Code: Credtis to Tsentom1, i took the basics from his Eden Project.

DOWNLOAD

Can be used as it comes as a stand-alone-mod.
Edit: V2 is up, with the changes, tsentom suggested. The AI will maybe know, how to use it.
If you can report some observations of intelligenct ai-use of the pioneer-tank, please report it.


Feel free to use it :), but give me credit :D.


For modders:
I've added the PIONEERTANK at the end of the UnitInfos.xml and UnitClassInfos.xml., the artdefines at the end of the ArtDefines_Unit.xml.
Also added the improvement CREATE_HILL to the ImprovementInfos.xml, and BUILD_CREATE_HILL to the UnitBuildInfos.xml.
There's an entry in the CIV4ArtDefines_Improvement.xml, but it is not important, it's an dummy, you'll never see it.
Important is change of the CvEventManager.py

Code:
	def onImprovementBuilt(self, argsList):
		'Improvement Built'
		iImprovement, iX, iY = argsList
###PIONEERTANKBEGIN###
		pPlot = CyMap().plot(iX, iY)
		if iImprovement == gc.getInfoTypeForString('IMPROVEMENT_CREATE_HILL'):
		    pPlot.setPlotType(PlotTypes.PLOT_HILLS, True, True)
		    pPlot.setImprovementType(-1)
###PIONEERTANKEND###

It just says: If there's an improvement CREATE_HILL, then change the plot to a hill, and destroy the improvement after it.
Not the most elegant way, but it works.




edit: damn, didn't link the pictures right in the download-thread, how can i change that?
 

Attachments

  • pioneer1.JPG
    pioneer1.JPG
    143.3 KB · Views: 11,581
  • pioneer2.JPG
    pioneer2.JPG
    134.9 KB · Views: 10,714
  • pioneer3.JPG
    pioneer3.JPG
    157.1 KB · Views: 10,616
  • pioneer4.JPG
    pioneer4.JPG
    149.7 KB · Views: 10,612
Great Job!

Writing AI wouldn't be too hard if you can think of some guidelines of when the computer should use the ability. I don't know maybe get the food rate of the city and if it needs more production or something.

I've been writing AI for all my python stuff for the next version of Thomas' War so I'm getting better at it.
 
Great Job!

Thanks :).

Writing AI wouldn't be too hard if you can think of some guidelines of when the computer should use the ability. I don't know maybe get the food rate of the city and if it needs more production or something.

I've been writing AI for all my python stuff for the next version of Thomas' War so I'm getting better at it.

Didn't know, that writing a new AI could be done.
Thanks for the hint, that you've already done :), i'll look into the next version of thomas war, to learn something.
This will be very interessting, because i could aslo need a better AI for my changed workboats :D.
 
Last edited:
One quick way would to just be to use the XML and have the fake improvement give the benefits of a hill (since the improvement will vanish anyway). That way the AI will at least know that it... I forget what a hill does technically I think its -1 Food +1Production, but list it as +2Production. The AI weighs food pretty heavily so it should use the ability but not too much.

But actual specific python code/instructions are possible and not that difficult. The Inquisitor unit mod that's floating around has a good example of it if you just want to see ideas.
 
Back
Top Bottom