Help with a simple mod I'm creating.

SULOMON

Mod Civs Best Civs.
Joined
Dec 21, 2013
Messages
448
Location
United States of Murica
I'm trying to create a mod that increases the amount of barbarians that spawn when a civilization is very unhappy. My main questions are did I mod the right value and is it the proper way to mod the global defines? Also is it simple to make naval barbarians also spawn instead of just land units when a civilization is very unhappy?
 

Attachments

  • Increased Unhappiness Revolt Size (v 1).zip
    1.3 KB · Views: 60
Your mod is missing an "OnModActivated->UpdateDatabase" entry (see third link in my sig)

"Revolts" are when cities switch player.
"Uprisings" are when barb units spawn from unhappiness.

The two values you want to change are

NumRebels = (UPRISING_NUM_BASE + RANDOM(0, 100 + ((NumCities-1) * UPRISING_NUM_CITY_COUNT))) / 100

Note that both values are "times 100", so to change the base number of rebels to 3 you would set UPRISING_NUM_BASE to 300
 
Your mod is missing an "OnModActivated->UpdateDatabase" entry (see third link in my sig)

"Revolts" are when cities switch player.
"Uprisings" are when barb units spawn from unhappiness.

The two values you want to change are

NumRebels = (UPRISING_NUM_BASE + RANDOM(0, 100 + ((NumCities-1) * UPRISING_NUM_CITY_COUNT))) / 100

Note that both values are "times 100", so to change the base number of rebels to 3 you would set UPRISING_NUM_BASE to 300
Thanks! I also realized I was looking in the wrong global defines, not the ones in the expansion2 folder.
 
Top Bottom