Quick Modding Questions Thread

Yes, you can!

:D
There are already units in the game which need 2 resources, like jet fighters which need oil and aluminium. Just take a look at it ;).
But maximum resource requierement is [Resource 1 AND (Resource 2 OR Resource 3 OR Resource 4 OR Resource 5)].
 
Cool! thanks for that. I'll put that into my game.
 
I am assuming these values
iXPValueAttack The value, in Experience Points, that this unit is worth on the attack.
iXPValueDefense The value, in Experience Points, that this unit is worth on the defense.
is what the victor gets, when he kills the unit as the attack XP appears to be half what it is for the defense.

I am considering preparing a kind of scale, so that the higher the value of the unit, the more experience it is worth. So in the end, I would have the following;

Workboat = 0/0
Transport = 0/0
Destroyer = 0/1
Cruiser = 1/2
Battleship = 1/3
Carrier = 2/4

Similarly for planes and land units, i.e. the bigger the unit, the more experience is earned by the victor.

Am I assuming this right.
 
how do you make it so a shortcut on your desktop makes Civ start in a certian mod? I know they did it for Fall From Heaven 2.
 
Similarly for planes and land units, i.e. the bigger the unit, the more experience is earned by the victor.

Am I assuming this right.

The idea could be nice, but depending on the values later units could relativly fast get new promotions.

how do you make it so a shortcut on your desktop makes Civ start in a certian mod? I know they did it for Fall From Heaven 2.

Why do you want a shortcut?
Use this nice & handy program instead, just put it on your desktop, and you don't have to bother with shortcuts for mods.
 
Do you know of a systematic way to get the correct X and Y coordindates for a city's location on a WorldBuilder map other than simply counting the squares on the map?
 
If you have the time that would be great. My objective is to determine the correct X and Y coordinates of a number of cities in the Road To War mod in order to modify some of the events in the CvRtWEventManager.py file. Thanks!
 
Only by directly changing CvCity::unhealthyPopulation() - you might also want to make some changes to CVCityAI though to make the AI go for more health surplus, maybe with a bit less weight on the single +1 :health:.
 
A quick question:

How do I make it possible to have more than one improvement per tile?

I´d like to have a tile containing a farm and a windmill for example.

...And how do I make it so that improvements like mine DOESN´T remove forest, theres plenty of room for trees even with a mine.

Also, I´d like to make one resource be enough for ONE CITY, not the whole civilization, can I make that?

Is this something related to how many improvements you can have per tile:
<Define>
<DefineName>TERRAIN_POINTS</DefineName>
<fDefineFloatVal>5</fDefineFloatVal>
</Define>
<Define>
That´s in the globaldefines xml file

Thanks.
 
If you have the time that would be great. My objective is to determine the correct X and Y coordinates of a number of cities in the Road To War mod in order to modify some of the events in the CvRtWEventManager.py file. Thanks!

Okay, i've attached it (it's done like a stand alone mod).
When you've merged the python in (i guess you know how to do it), then you can turn it on/off by changing the one variable at the top of the code.

How do I make it possible to have more than one improvement per tile?

You don't :/.
It would need hours of programming.

...And how do I make it so that improvements like mine DOESN´T remove forest, theres plenty of room for trees even with a mine.

Assets\XML\Units\BuildInfos.xml, search for BUILD_MINE or just MINE, you should be able to see what to change.

Also, I´d like to make one resource be enough for ONE CITY, not the whole civilization, can I make that?

Would also need some programming skills :/.

Is this something related to how many improvements you can have per tile:
<Define>
<DefineName>TERRAIN_POINTS</DefineName>
<fDefineFloatVal>5</fDefineFloatVal>
</Define>
<Define>
That´s in the globaldefines xml file

Thanks.

That seems to be something graphical and not mechanics related.
 

Attachments

Okay, i've attached it (it's done like a stand alone mod).
When you've merged the python in (i guess you know how to do it), then you can turn it on/off by changing the one variable at the top of the code.

Thank you very much. Yes, I will be able to merge the python. Thanks again, this is exactly what I was looking for.
 
Could this be something useful in adding more improvements, I found this in CvWBDesc.py file in the folder Assets/Python/PyWB

class CvPlotDesc:
"serializes plot data" (could this be something about the plot data?)
def __init__(self):
self.iX = -1
self.iY = -1
self.riverNSDirection = CardinalDirectionTypes.NO_CARDINALDIRECTION
self.isNOfRiver = 0
self.riverWEDirection = CardinalDirectionTypes.NO_CARDINALDIRECTION
self.isWOfRiver = 0
self.isStartingPlot = 0
self.bonusType = None (the type of bonus in a plot?)
self.improvementType = None (HERE, what if I add another line like this one, another improvement line or something like that?)
self.featureType = None
self.featureVariety = 0
self.routeType = None
self.terrainType = None
self.plotType = PlotTypes.NO_PLOT
self.unitDescs = list()
self.cityDesc = None
self.szLandmark = ""
self.szScriptData = "NONE"
self.abTeamPlotRevealed = [0]*gc.getMAX_CIV_TEAMS()



Another question, HOW DO I MAKE SPECIALISTS PRODUCE HAPPINESS OR UNHEALTHINESS OR HEALTHINESS? Like engineers produce unhealthiness and scientists produce healthiness and priests and artists produce happiness?
Thanks for the help! :goodjob:
 
What should I put there?


2:yuck: per pop would work like this:
Code:
int CvCity::unhealthyPopulation(bool bNoAngry, int iExtra) const
{
	if (isNoUnhealthyPopulation())
	{
		return 0;
	}

	return std::max(0, ((getPopulation() + iExtra - ((bNoAngry) ? angryPopulation(iExtra) : 0)) [B][COLOR="Blue"]* 2[/COLOR][/B]));
}

CityAI changes would depend a bit on other changes your mod includes, like more different health resources on the map, access to more/cheaper/more effective health buildings and how that relates to happy caps. But that's just tweaks, for the actual change this little *2 should be enough.
 
Could this be something useful in adding more improvements, I found this in CvWBDesc.py file in the folder Assets/Python/PyWB

Good find, but this helps only the game to read the saved games.
For multiple improvements you would have to modify the SDK files (C++).
Not sure, if that's possible at all :dunno:.

Another question, HOW DO I MAKE SPECIALISTS PRODUCE HAPPINESS OR UNHEALTHINESS OR HEALTHINESS? Like engineers produce unhealthiness and scientists produce healthiness and priests and artists produce happiness?
Thanks for the help! :goodjob:

See above :/.
 
There was no mention of specialists earlier in the thread, at least I could not find any. So, how do I make specialists produce happiness, health, unhealth? Do I just add something to the XML or something?
 
Back
Top Bottom