Andromeda Unit

SIMPA

Prince
Joined
Sep 17, 2007
Messages
367
Location
Zagreb,CROATIA
Hello!!
Just one question please:
Did anyone manage to merge andromeda unit python with revolution dcm from glider,I manage planetbreaker(the j),and all others tsentom1 wonders to merge with revdcm glider python but andromeda just wont work.
I create my new mod and I would love to have andromeda unit in it,so please people if anyone merge those 2 pythons please please send me in massage.:hammer2:
 
I would suggest messaging Tsentom1 directly for help. I'm not sure if he has a thread for that unit, but even so it's easy to miss a question among a ton of posts, so a pm is probably the best bet. He's helped me merge things in the past.

I know he's been meaning to go back and clean up the code of his units, but just hasn't gotten around to it yet. I'm sure he knows exactly what you'd need to merge.
 
I would suggest messaging Tsentom1 directly for help. I'm not sure if he has a thread for that unit, but even so it's easy to miss a question among a ton of posts, so a pm is probably the best bet. He's helped me merge things in the past.

I know he's been meaning to go back and clean up the code of his units, but just hasn't gotten around to it yet. I'm sure he knows exactly what you'd need to merge.

Hey thanks for help:)
No I do not want to disturb him,I know how and what to do to merge this unit with glider python and I did but it wont work couse I probably bug somewhere in python or dll....ahhhh to lose your mind...:crazyeye:
I just thought that someone already did that...:sad:
Once again thx man
Pozdrav!!!
 
If you post your python I wouldn't mind taking a look at it.

Thank you tsentom1,the_j, I am wreally grateful for your help,but if you do this unit for me than I never learn how to deal with python:cry:
I think that keldath manage to put andromeda in his mod and I think that he use the same python from gliders revdcm mod in his mod so first I m gonna check his mod...
If I dont achieve than I will definetly need your help....
Thx guys!!:)
 
Thank you tsentom1,the_j, I am wreally grateful for your help,but if you do this unit for me than I never learn how to deal with python:cry:
I think that keldath manage to put andromeda in his mod and I think that he use the same python from gliders revdcm mod in his mod so first I m gonna check his mod...
If I dont achieve than I will definetly need your help....
Thx guys!!:)

Well the main problem is that Andromeda was one of the first units I released here when I didn't know as much about python as I do now. As result only about half the code seems to be labeled and there's a good deal of extra code that you don't even need just sitting there in the unit.

There's really three different parts to the code - not that it's labeled as such - but it may help when trying to figure it out.

There's the code that actually handles how the ability works.

There's the AI for the code (which is actually really sloppy and defines it identically for based on religion, though it's easy to just have it once regardless of religion)

Both are these are primarily handled with the EventManager file. However PlotPicked has a section in the Gameutils file. Both of these call to the PyHelpers python file that many people forget to merge for some reason. My Copernicus' Observatory Wonder has a better labeled version of this file (they both add the same functions) so you can look at that file if you are having trouble.

The GameUtils at the very top imports the GodsOfOld python file included in the download, this file is only two lines but is important.

I included INIParser Folder but it's not needed (some of the extra left over code I was talking about). So you can just forget that whole folder.

The rest is actually getting the ability to show up on the unit. This deals with Widget entries primarily in the middle and end of MainInterface but also a section in GameUtils.

When you tried to merge it, where you able to get the ability button to show up on the unit at all and just the ability didn't work or no button or ability? This can help us figure out what the problem might be.

Also, The_J's suggestion to enable python exceptions is a good one as it will show typos or unfinished code.
 
OK now I am in big trouble
I manage to put andromeda in my mod but this happend
Civ4ScreenShot0001.JPG Civ4ScreenShot0002.JPG
as you can see now I dont have butons or anything on my main screen but andromeda is in as you can see in wb
aaaaaahhggsd
please help!!!
here is my python
View attachment a.rar
 
OK now I am in big trouble
I manage to put andromeda in my mod but this happend
View attachment 202686 View attachment 202687
as you can see now I dont have butons or anything on my main screen but andromeda is in as you can see in wb
aaaaaahhggsd
please help!!!
here is my python
View attachment 202688

Missing interface happens when you made a typo in the python code. Usually enabling python exceptions will show you exactly where when you load up the mod. I'll have a look at the python when I get home this afternoon.
 
In EventManager, your onPlotPicked looks like this:

Spoiler :
Code:
	def onPlotPicked(self, argsList):
		'Plot Picked'
		pPlot = argsList[0]

##GodsofOld / Andromeda##
		pPlotOwner = PyPlayer(pPlot.getOwner())
##GodsofOld / Andromeda##		
                
                CvUtil.pyPrint('Plot was picked at %d, %d'

##GodsofOld / Andromeda##
		if GodsOfOld.iPushButton == 5:
			pUnit = GodsOfOld.iPushedButtonUnit
						
			iMessageID = self.m_iNetMessage_ProphetUtu
			iPlotX = pPlot.getX()
			iPlotY = pPlot.getY()
			iOwner = pUnit.getOwner()
			iUnitID = pUnit.getID()

			pUnitOwner = gc.getPlayer(iOwner)
			if pUnitOwner.isTurnActive( ):
				CyMessageControl( ).sendModNetMessage( iMessageID, iPlotX, iPlotY, iOwner, iUnitID )	
##GodsofOld / Andromeda##			%(pPlot.getX(), pPlot.getY()))

Instead of:

Spoiler :
Code:
	def onPlotPicked(self, argsList):
		'Plot Picked'
		pPlot = argsList[0]

##GodsofOld / Andromeda##
		pPlotOwner = PyPlayer(pPlot.getOwner())
##GodsofOld / Andromeda##		
                
		CvUtil.pyPrint('Plot was picked at %d, %d'
			%(pPlot.getX(), pPlot.getY()))

##GodsofOld / Andromeda##
		if GodsOfOld.iPushButton == 5:
			pUnit = GodsOfOld.iPushedButtonUnit
						
			iMessageID = self.m_iNetMessage_ProphetUtu
			iPlotX = pPlot.getX()
			iPlotY = pPlot.getY()
			iOwner = pUnit.getOwner()
			iUnitID = pUnit.getID()

			pUnitOwner = gc.getPlayer(iOwner)
			if pUnitOwner.isTurnActive( ):
				CyMessageControl( ).sendModNetMessage( iMessageID, iPlotX, iPlotY, iOwner, iUnitID )	
##GodsofOld / Andromeda##

You left out or probably pasted in-between "%(pPlot.getX(), pPlot.getY()))" which caused a syntax error.

However, there is also a python exception error in your EventInterface python. Andromeda doesn't use that so it has to be related to something else you've merged. Not knowing what it is I can't really correct the syntax error without potentially messing up other stuff. (Which actually seems to be a missing callback between Bug, BugEventManager, EventManager, and EventInterface. I would suggest enabling python exceptions like The_J said and see if you can recognize the message that comes up (or at least the location of the code).
 
Let me know if you have more problems trying to merge it. I have some free time coming up in a week or so, so I might be able to clean up all the code of my units and re-release them.
 
Back
Top Bottom