Quick Modding Questions Thread

@LibSp'it: No, I'll try. Great idea thanks.
--Update: it works with the normal files, which means it will be something in the res folder. I'll fish around in there and try to find the problem. Thanks everyone! :goodjob:
 
Does anyone know where in the C++ source the location of a new capital is determined after the old one is captured? I've been looking into CvPlayer::acquireCity() and various related methods, but couldn't find anything.
 
Great, thanks. How could I miss that.
 
Can i write NONE instead some another feature?

PHP:
	def __initFeatureTypes(self):
		self.featureJungle = self.gc.getInfoTypeForString("NONE")
		self.featureForest = self.gc.getInfoTypeForString("FEATURE_XENOFUNGUS")
		self.featureOasis = self.gc.getInfoTypeForString("FEATURE_MASOSUZ")
		self.featureFlood = self.gc.getInfoTypeForString("FEATURE_MASOSUZ")
		self.featureIce = self.gc.getInfoTypeForString("FEATURE_CARBONICE")
 
Can i write NONE instead some another feature?

PHP:
	def __initFeatureTypes(self):
		self.featureJungle = self.gc.getInfoTypeForString("NONE")
		self.featureForest = self.gc.getInfoTypeForString("FEATURE_XENOFUNGUS")
		self.featureOasis = self.gc.getInfoTypeForString("FEATURE_MASOSUZ")
		self.featureFlood = self.gc.getInfoTypeForString("FEATURE_MASOSUZ")
		self.featureIce = self.gc.getInfoTypeForString("FEATURE_CARBONICE")

That might cause issues with future code in that file which expects there to be something valid for featureJungle.
 
That might cause issues with future code in that file which expects there to be something valid for featureJungle.

OK, but this part of code is from one map script.

1. This part of code only applies to this script or?
2. Can i really write "none" instead another feature? I want that my map script have no errors. :)
 
Hello, everyone, I have recommenced working on my mod "2100".
How do I ensure that when a specific civ conquers a specific city that the city is renamed to a new name?
Also I would like to use this component, but it must be changed a little bit to work with my mod.
How do I make it happen to a specific city?
 
That depends on the way in which you want the cities to be renamed. What are the conditions, and which cities would be affected? In general, your entry point would be either onCityAcquired() or onCityAcquiredAndKept() in CvEventManager.py.

I was about to look into the component you mentioned when I saw that it was written by The_J, who will surely read this post as well and should be able to answer your questions more easily.
 
How hard would it be to make an SDK mod that changes the iCombat in unitinfos to a fCombat?
 
Probably not hard, just tedious (edit: or not even that, maybe. I just remembered that unit strengths are floats already anyway).
 
How hard would it be to make an SDK mod that changes the iCombat in unitinfos to a fCombat?

If you already know what you are doing with the SDK not too hard (although there will be a lot of changes to make sure that other things that reference combat strength play nicely).
 
I'll just give it a shot and see how it goes. Anyone know all the files that have anything dealing with combat in them? ;)
 
I would start in CvUnit::resolveCombat() and work my way backwards from there. Air combat has its own method I think, and you might need to take care of combat odds calculations separately.

(Ignore what I previously said about combat strengths as floats, that was obviously nonsense.)
 
Okay, I also have a question: I suppose it isn't possible to create a new option under the "Let's discuss something else ..." category in the diplomacy screen to trigger a new DiploEventType?
 
Okay, I also have a question: I suppose it isn't possible to create a new option under the "Let's discuss something else ..." category in the diplomacy screen to trigger a new DiploEventType?

Yes it is. RevDCM added a "do not bother" option. You just need to add an entry to the DiploEventTypes enum and then process that in CvPlayer::handleDiploEvent().
 
Oh, that's surprisingly easy. I was looking for an entry point to register it all the time. Thanks.
 
Back
Top Bottom