Aspiring modmaker seeks advice/help

Added this code to CvGameUtils and changed cannot move callback, but the game crashes at launch. Maybe there's something else?


This is how the entire function should look:

unitCannotMoveInto(self,argsList):
ePlayer = argsList[0]
iUnitId = argsList[1]
iPlotX = argsList[2]
iPlotY = argsList[3]

# <---------- begin unit stack changes ----------------->
myPlot = gc.getMap().plot(iPlotX, iPlotY)
myUnit = gc.getPlayer(ePlayer).getUnit(iUnitId)


if(myPlot.getNumUnits() >= 16 and myPlot.getNumVisibleEnemyDefenders(myUnit) < 1):
return True
# <---------- end unit stack changes ----------------->

return False


What is the error you are getting?
 
Last edited:
State of the mod.
After combining some mods to serve as the base and customising vanilla things into what I want, I added all map-generated bonuses, half of the units, some techs and buildings and several leaders. Also, I modified Totestra map script to generate maps that are much closer to what I want (I now just need to integrate starting location preferences that were discussed above).
After that, in october, my attention shifted away from Civ, so the development of this mod is currently on halt. I clearly see what is to be done next - first of all, a lot of content things that I planned. Anyway, I got valuable experience and modmaking now looks much more comprehensible and possible - this mod is, first of all, my learning polygon. Likely, I will resume and will try to finish first publishable version in some months.
For now, I will focus on two other things on this forum. First, sharing some maps that I made. Map making in Civ4 kinda became my hobby and I got a lot of experience (along with geographical knowledge) over 8 years of it. This experience resulted in some great maps that I made in recent months that I'll publish soon (I just need to polish some and finish others).
Second, I'll write some posts with various "crazy?" ideas I have for modding Civ4. I hope someone would be interested in reading them and perhaps even will get some ideas about implementing them - all of them, more or less, require deeper coding than XML, so I have no idea how to impement them or if they are feasible at all.
P.S. community here is really nice, hehe.
 
Well, actually I don't want to request anything new. My mod has inherited a lot of maps from AND2 but since than, I have added several new terrain features (like islets) and a lot of new resources. So I'm looking for someone who would update these earth maps. Maybe you are totally uninterested by the task, which I understand.
 
Well, actually I don't want to request anything new. My mod has inherited a lot of maps from AND2 but since than, I have added several new terrain features (like islets) and a lot of new resources. So I'm looking for someone who would update these earth maps. Maybe you are totally uninterested by the task, which I understand.
Well, I never really played Chronicles of Mankind, maybe I just gave a look onto this mod some years ago. If I was playing intensely I definitely would had started to improve maps to my taste, like I did playing RI and various RFC mods. I have quite some knowledge what resources where should be realistically, and features too, Maybe I'll give a look onto CoM maps later. Feel kinda honoured by your confidence in my unrevealed mapmaking skills, hehe.
 
Back
Top Bottom