davidlallen
Deity
I was able to get this working, partly, but there are still some problems. The beacon approach seems fine. I haven't coded all of it but units will pick up nearby items, and if they can't use them they will drop them in the nearest city.
I have traced out bCommunalProperty, and all it seems to do is hide the flag when the unit is displayed. That is working. I have traced out bNeverHostile, which goes a number of places.
1. In CvUnit::canJoinGroup, there is a test to return false if bNeverHostile. When I include this check, and a NeverHostile unit is created, a python exception is thrown, unidentifiable C++ exception at CvMainInterface.py line 1487 in updateSelectionButtons. I have not modded this file or anything related to selection buttons. When I remove the NeverHostile test in canJoinGroup, everything "appears" to be fine, but I am sure that test must be there for a reason. Any thoughts on what may cause this problem?
2. It seems that when a bNeverHostile unit is dropped in territory which is owned by any player, the unit is deleted at the end of the turn. It does not matter if there are any other units there or not. The dropped unit will persist fine on un-owned territory. I am not sure what could be doing this; any thoughts?
3. At a higher level, I am concerned about archipelago maps and my beacons. It may be that a unit is nearby, but on another island, and cannot reach. I am checking if the two plot().getArea()s match, and this is probably OK, but is there another way to tell in python if one unit can reach a certain plot? I have tried calling CyUnit.generatePath, but I cannot figure out what python to write for an "int *" argument.
4. Either to answer a beacon or to drop off an unusable item, a land unit may be required to travel by ocean. (This mod is not Dune Wars, no all-terrain units here.) Is there a way that a unit can request pickup by a transport? I guess that land units may get "stranded" for any reason, and they would need pickup. Once the transport arrives, I can probably figure out how to push its mission to go to the nearest useful drop-off point on the right island; but any help on how to *call* for transport would be appreciated.
I have traced out bCommunalProperty, and all it seems to do is hide the flag when the unit is displayed. That is working. I have traced out bNeverHostile, which goes a number of places.
1. In CvUnit::canJoinGroup, there is a test to return false if bNeverHostile. When I include this check, and a NeverHostile unit is created, a python exception is thrown, unidentifiable C++ exception at CvMainInterface.py line 1487 in updateSelectionButtons. I have not modded this file or anything related to selection buttons. When I remove the NeverHostile test in canJoinGroup, everything "appears" to be fine, but I am sure that test must be there for a reason. Any thoughts on what may cause this problem?
2. It seems that when a bNeverHostile unit is dropped in territory which is owned by any player, the unit is deleted at the end of the turn. It does not matter if there are any other units there or not. The dropped unit will persist fine on un-owned territory. I am not sure what could be doing this; any thoughts?
3. At a higher level, I am concerned about archipelago maps and my beacons. It may be that a unit is nearby, but on another island, and cannot reach. I am checking if the two plot().getArea()s match, and this is probably OK, but is there another way to tell in python if one unit can reach a certain plot? I have tried calling CyUnit.generatePath, but I cannot figure out what python to write for an "int *" argument.
4. Either to answer a beacon or to drop off an unusable item, a land unit may be required to travel by ocean. (This mod is not Dune Wars, no all-terrain units here.) Is there a way that a unit can request pickup by a transport? I guess that land units may get "stranded" for any reason, and they would need pickup. Once the transport arrives, I can probably figure out how to push its mission to go to the nearest useful drop-off point on the right island; but any help on how to *call* for transport would be appreciated.