Caveman 2 Cosmos (ideas/discussions thread)

From what I have read it is essential. The sendNodeMessage is about multiplayer. When we did not have it in that function there were OOS when added there weren't. (from that function).
 
Question: @AIAndy, @alberts2, @Koshling

If a piece of python is set up like this:
Spoiler python :
Code:
    def aGenericFunction(self):
        ...
        CyCity = CyInterface().getHeadSelectedCity()
        ...
        CyMessageControl().sendModNetMessage(900, iPlayer, iCity, 0, 0)
....
....
    def onModNetMessage(self, argsList):
        ID, iPlayer, iCity, iData4, iData5 = argsList
        CyPlayer = GC.getPlayer(iPlayer)
        if ID == 900:
            CyCity = CyPlayer.getCity(iCity)
            CyCity.kill()
        elif ID == 901:
            etc.....:
I understand that sendModNetMessage can help avoid OOS errors... But I'm unsure of when it actually is needed for that purpose.

Would it be possible to just change:
CyMessageControl().sendModNetMessage(900, iPlayer, iCity, 0, 0)​
To:
CyCity.kill()​

Without getting OOS errors.

Asked in another way, will CyCity.kill(), a function from the SDK when triggered report on it's own to all players in a MP game that a city was just razed, or do I have to invoke the sendModNetMessage to get the game for all players to raze that city.

This is related to a demolish building/city button that will be available in the city screen.

The aGenericFunction will only be processed on the computer of the player that interacts with the demolish button.
Is it then correct that the onModNetMessage will be processed on the computer of all players in a multiplayer game?
Is it necessary for the CyCity.kill() function to be called from python on all the computers in the MP game?
I haven't had to use the ModNetMessage stuff in python BUT I have had to understand a lot about OOS errors. I can tell you that generally speaking, any time you have a player interacting with the game in a manner than can change or alter the game state, such as destroying a building or city, and doing it in a way that takes place through a UI screen (such as a popup or even the city screen itself) the activity must be indicated to all computers on the network to insert that action at EXACTLY the same place in the processing or it can and will throw off sequences such that it then creates an OOS. It's probably a very important consideration with a button like this.

This is handled a little differently in the dll. Missions and such have it all built into the system in most cases. And where you are doing something a little more unique, you have to build it into something akin to the modnetmessage system - just a bit differently than you would in python is all.
 
I haven't had to use the ModNetMessage stuff in python BUT I have had to understand a lot about OOS errors. I can tell you that generally speaking, any time you have a player interacting with the game in a manner than can change or alter the game state, such as destroying a building or city, and doing it in a way that takes place through a UI screen (such as a popup or even the city screen itself) the activity must be indicated to all computers on the network to insert that action at EXACTLY the same place in the processing or it can and will throw off sequences such that it then creates an OOS. It's probably a very important consideration with a button like this.

This is handled a little differently in the dll. Missions and such have it all built into the system in most cases. And where you are doing something a little more unique, you have to build it into something akin to the modnetmessage system - just a bit differently than you would in python is all.
So this piece of dll code will cause an OOS if only called from one of the computers in the MP game:

void CyCity::kill()
{
if (m_pCity)
m_pCity->kill(true);​
}
There is no automatic reporting by the dll, to all players in the game, happening here?
Would it be possible to modify such python → dll functions so that the dll handles the ModNetMessages stuff? It would certainly simplify python coding.
 
It's not the function so much as that it's taking place in the context of a popup.

There's probably things that could be done to improve not having to worry about that stuff in python but it would cause super slow processing and would take a hell of a long time to setup as a more generic process. Already the message system is a miracle to enable OOS debugging in python.
 
It's not the function so much as that it's taking place in the context of a popup.

There's probably things that could be done to improve not having to worry about that stuff in python but it would cause super slow processing and would take a hell of a long time to setup as a more generic process. Already the message system is a miracle to enable OOS debugging in python.
Ok, thanks for helping me understand this stuff better, I was pretty blank on the topic earlier today.
 
The thing is, ANYTHING that is called in the context of local AI that influences the gamestate must utilize a method to make sure it happens in the same moment in processing sequence on all computers. Thus it needs to be messaged to all.
 
So on discovering Irrigation the Rice Gatherer goes obsolete.

The replacment buildings (to get grain- Donkey Mill, Watermill) cannot be built if Slavery is active so all my bakeries are now out of order

What's the logic here? Can it be changed? Just doesn't ring true to me
 
So on discovering Irrigation the Rice Gatherer goes obsolete.

The replacment buildings (to get grain- Donkey Mill, Watermill) cannot be built if Slavery is active so all my bakeries are now out of order

What's the logic here? Can it be changed? Just doesn't ring true to me
Please report this in the BUG thread. It will get lost here.
 
So on discovering Irrigation the Rice Gatherer goes obsolete.

The replacment buildings (to get grain- Donkey Mill, Watermill) cannot be built if Slavery is active so all my bakeries are now out of order

What's the logic here? Can it be changed? Just doesn't ring true to me
I just put this on my item list. High priority. Should be fixed fairly soon.
 
So on discovering Irrigation the Rice Gatherer goes obsolete.

The replacment buildings (to get grain- Donkey Mill, Watermill) cannot be built if Slavery is active so all my bakeries are now out of order
Shouldn't the Rice Gatherer be replaced by the Rice Paddy (requires Agriculture)?
 
Yes seems you're right but Rice Paddy requires river access which my city with rice doesn't have
Should require fresh water instead I'd think...
 
I'd just use the world edit to place a river, but I just overuse the world edit :D Hope someone could be able to give the world edit some love seeing it's tendency to just explode in my face, wish I could do it myself but I'm not at any way capable in that regard
 
View attachment 476562

Requires certain civics to be active.
Also: note that the unit starts with 3 xp although the breakdown says 7 xp
I just reviewed this in the code. 3xp would be correct if it says 7 because drafted units indeed start with half XP by game rule. I've tweaked the display to show an accurate XP readout on the draft tooltip but it can't adjust the amount it shows each source gives. So I've added a note to the total XP displayed that explains it to the player.
 
Unlike BTS, the amount of hammers you get from sacrificing population is pathetic (at least on deity/nightmare.Not sure about other difficulty levels).
The only reason you'd want to do that if you really want to lower your pop to keep crime etc. in check (a useful necessity on nightmare, with -6 crime and -6 edu/pop).

The fact that there is a blatantly obvious bug in whipping (if you press the whip button, the number of population units in the city screen doesn't change) and I'm the only one who ever reported it (AFAIK), shows that probably nobody ever uses the whip button.
Does anyone have a save from a game where a population rush (better known as 'whipping') can be made? I need to confirm the bug that it doesn't cost population as stated. The code looks like it would so I'm going to have to evaluate the code in progress to see 'outside the box' of my thinking on how this can be broken.
 
So on discovering Irrigation the Rice Gatherer goes obsolete.

The replacment buildings (to get grain- Donkey Mill, Watermill) cannot be built if Slavery is active so all my bakeries are now out of order

What's the logic here? Can it be changed? Just doesn't ring true to me
This is by design and is based on history. It is part of balancing slavery but I only got as far as the early industrial era in its implementation.

The down side of slavery is that many buildings that would save labour can't be built - for fear that the slaves would have too much time on their hands and make trouble especially when they out number the slave owners. There is historical documentation on those exact buildings not being built, eg Roman Empire. This comes mostly from a document describing the need to build the water mills etc in one city when disease wiped out most of the slaves.

I now have glasses that let me read the computer screen! Yay! Only took 2 weeks!
 
Hello everyone.
Thank you for the greatest Civ4 Mod.

37 version was created a year ago exactly.
Is there ETA for the next version?
 
The goal is around xmas, yet it probably will be a bit later. The focus now is on one main version quite rarely but "bugfree" and well balanced instead of pumping them out once a month. You can (and should!) get the SVN version, it is way better than V37 and updates very regulary. Plus it is actually quite easy to get and after you have it, new versions only need like 10 sec to load instead of ages for the whole mod.
 
Does that mean you want to have swardsmanship I, II and III as techs? What about Obsidian Swordsmen, will they require this tech? Will those techs be semi-skippable, meaning you can leave out a bunch of military techs if you want to have a peaceful game?
Yes to the second part.

Assuming you have
  • obsidian sword
  • short sword
  • kopesh
  • broadsword
  • long sword
  • sabre/cutlass/scimitar
  • rapier
Except for the rapier, and perhaps kopesh, you would only need one tech with access to the unit controlled by materials (resources and manufactured goods).
  • obsidian sword requires wood and obsidian
  • short sword requires ingots of (copper and tin for bronze) or iron or steel or wootz steel
  • kopesh ditto
  • broadsword requires ingots of (copper and tin for bronze) or iron or steel or wootz steel
  • long sword requires ingots of iron or steel or wootz steel
  • sabre/cutlass/scimitar ingots of iron or steel or wootz steel
  • rapier ingots of steel or wootz steel
BtW the Wootz Steel event needs to be removed now that we have the Crucible tech/building and make it a normal manufactured good/equipment.

With mounted units there would be tech Animal Riding which requires any one of the domestication techs for the animals. This then leads to two others Mounted Combat for all horse sized mounts, and another for elephants and mammoths. Mounted Combat would allow access to all the mounted units for horses, camels, deer, llamas, bison etc.. You may want to split Mounted Combat into skirmish or light and heavy as they are different tactics sets or techniques.

This is one of the main ideas in the mod I am converting from Civ III. I have finished the techs and buildings. I am about half way through the units and promotions. Next I need to add in Civics, it has only one. Then add religions. The main problem with the units is Civ III units have a defense strength and an attack strength which may not be related to each other. Civ IV assumes that one is a percentage of the other.
 
Top Bottom