Changing Workable Tile Radius

Acoustic

Warlord
Joined
Sep 24, 2010
Messages
270
Looking to change it from 3 to 2, anyone know where in the DLL that is located?
 
I'm pretty sure there are two mods on the workshop that change it to 4 and 5. Perhaps look at what they did, and change it to 2?
 
Short answer
  • NUM_CITY_RINGS
  • CITY_PLOTS_RADIUS
  • NUM_CITY_PLOTS

Longer answer, those three and the 60 to 80 other places they are used in the code that you will have to check to ensure changing them doesn't break any other assumptions the devs made that there are three rings a city can work
 
There actually isn't that many files to change at all, but I am not sure what to change. Here are the ones I am having problems with:

#define CITY_PLOTS_RADIUS (3)
#define CITY_PLOTS_DIAMETER ((CITY_PLOTS_RADIUS*2) + 1)
int m_iRingModifier[NUM_CITY_RINGS+1];
GC.getMap().updateWorkingCity(pPlot,NUM_CITY_RINGS*2)
GC.getMap().updateWorkingCity(pCityPlot,NUM_CITY_RINGS*2);
NUM_CITY_PLOTS (37)

Most of them just reference these 3 codes but dont actually modify them. Some of them use equations (like above). Do i really need to change all of the equation ones?
 
#define CITY_PLOTS_RADIUS (3)
#define CITY_PLOTS_DIAMETER ((CITY_PLOTS_RADIUS*2) + 1)
int m_iRingModifier[NUM_CITY_RINGS+1];
GC.getMap().updateWorkingCity(pPlot,NUM_CITY_RINGS*2)
GC.getMap().updateWorkingCity(pCityPlot,NUM_CITY_RINGS*2);
NUM_CITY_PLOTS (37)

Most of them just reference these 3 codes but dont actually modify them. Some of them use equations (like above). Do i really need to change all of the equation ones?

I've been working on this, too, and it's a little quirky. NUM_CITY_PLOTS seems to be a read attribute only.

You may also need to worry about MAXIMUM_BUY_PLOT_DISTANCE and MAXIMUM_ACQUIRE_PLOT_DISTANCE. I haven't tested these yet, but I want to make sure that players can't go outside the distance I've set.

I also added a complete Lua hack since my goal was to START A CITY WITH ONLY TWO TILES. When a city gets founded (Events.SerialEventCityCreated) I detect whatever I need to detect and change it. As an example, I remove ownership, visibility, fog, etc., from the plots that the city originally owned. I know it's a hack but it seems to work and I haven't found another way of doing it. Culture expansion works fine using this method.

I've also added the ability to "work" tiles beyond the city limits using a similar method.

What are you trying to do EXACTLY?
 
Change the workable tile range from 3 tiles to 2. Culture can expand the default way, I dont care. Just need the workable tiles changed. If you can help, I'd greatly appreciate it.
 
Top Bottom