I might have to have a peek at your code and then try to figure a way to make it more modular/portable (assuming it isn't) so two mods can each save stuff without it causing a clash (potentially). Shouldn't be that hard from what you already have. I'd then put it out as a modcomp and encourage others to use it if they want to save anything. Does this make sense to folks?You can save data to 3 objects in the game, Players, Units, and Plots. I have tested two of these, and Players and Plots work fine. The function is the same for all of them. Use Players[iPlayerID]:GetScriptData() to retrieve the string, and layers[iPlayerID]:SetScriptData() to save it. The large part of my code is for serializing tables into savable strings and back.
The SVN is public, FYI.
great ideaI'd then put it out as a modcomp and encourage others to use it if they want to save anything. Does this make sense to folks?
click not "files" but "code->svn browse", then go to "revolutions" folderThanks, that's enough to get me going. I don't know why I can't find your code at sourceforge. When I press "View All Files", I see exactly nothing. Clearly I don't know what I'm doing.
Ideas are a dime dozen. Most serious modders don't need a lot of idea suggestions, just feedback and balancing suggestions.
I think I'm going to stick with just a stability percent, for simplicity. I had to create Puppet City Visibility so that players would be able to see into puppets to know how they were doing, stability-wise. Here's a screenshot. Basically the framework is all there, but there is no insides.
Spoiler :
![]()
Yes, the dll would be most needed to do extensive mechanics modding![]()
now i'm about to start coding for revolutions mod (have to finish emigration v2 at first).
here is my plan:
stability:
* there is a state stability SS and a city stability CS.
state stability factors:
good:
* culture: +f((total accumulated culture))
* enemy unit killed: +f(N/(player's army size)) per killed unit - this should not be a big factor for not to favor warmongering
* happiness: +f(H) per turn
* peace agreement: +N stability
* rebellion suppressed:+N stablility
* being at peace: +N per turn
* proficit: +f(N) per turn
* size of treasury: +f(log(Gold)) per turn
bad:
* casualities: +f(N/(player's army size))
* unhappiness: same as happiness
* war declaration (+) no penalty with autocracy (or honor?)
* deficit: -f(N, numCities) per turn
* rebellion: -N
* being at war: -N per turn
* running rebellion: -N per turn
+number of cities has to affect most of "per turn" formulas (except war and peace states)
city stability factors:
good:
* culture
* specialists
* some buildings
* bribing
* propaganda (also decreases foreign culture in a city)
bad:
* immigration (+) no penalty with freedom
* emigration
* starvation
* enemy in city radius
* foreign culture
* distance to capital
(+) also random events may be added to affect stabilities.
city loyality is a value that determines city behavior, it depends on city and state stability.
CLL (city loyality level) = CS * SS + f(cityCulture/cityForeignCulture).
good/bad effects come into after certain CLL is hit and may increase (probability and scale) with CLL further changing.
consequences of disloyality:
permanent:
* corruption: decreased productivity/gold. corruption modifier.
probabilistic:
* unrest: crippling garrison/city defences, destroying buildings, kill population
* resistance: crippling player's units in city radius (-1 hp per turn)
* uprising: spawn rebels/capture cities (if there are no garrison)
high loyality bonuses:
* patriotism: citizens help defend cities by providing levy units (from earlier era, or from same era if armory/arsenal is built).
* partisans: enemy units in city radius are being crippled.
* optimism: increased population growth rate
* enthusiasm: increased productivity
negative effects probability lowering factors:
* garrisoned military units
* spies (+)
what rebels can do:
* rebel state - one or more cities conquered by rebels. other civs may intervence but can only liberate those cities to a former owner.
* after some time rebel state can turn into a new civilization (or several new civs).
i agree, percents will be much betterKillmeplease,
I'm thinking we should abandon the arbitrary indexes from Civ4's RevMod, and use a percentage stability and percentage loyalty instead. It's harder to explain a arbitrary number, and why 3000 "is bad" to new players. It's easier to understand, "my city is 45.57% stable", which is bad.