.

woodelf said:
Whoa! Belizan is here? :)
Whoa! Gerikes is here too? :)

Do you have any idea how to work with features Gerikes? This is my previous post about what I needed to do with them:

Civmansam said:
I have a request as well, I need a code so that whenever a unit dies there is a 50% chance that FEATURE_CORPSE is created in that plot. I tried it myself but for some reason it doesn't work? Maybe I did some tiny thing wrong, anyway if someone could quickly do it, I think it's simple to do.
 
Civmansam said:
Whoa! Gerikes is here too? :)

Do you have any idea how to work with features Gerikes? This is my previous post about what I needed to do with them:

Something like this during onUnitKilled:

Code:
def onUnitKilled(self, argsList):
	'Unit Killed'
	unit, iAttacker = argsList
	player = PyPlayer(unit.getOwner())
	attacker = PyPlayer(iAttacker)
		
	[b]# Spawn corpse start
	iPercentChance = gc.getDefineINT("CORPSE_SPAWN_CHANCE")
	if (iPercentChance > gc.getGame().getSorenRandNum(100, "Corpse spawn") ):
		# Success. Spawn corpse
		unit.plot().setFeatureType(gc.getInfoTypeForString("FEATURE_CORPSE"), -1)
			
	# Spawn corpse finish[/b]


	if (not self.__LOG_UNITKILLED):
		return
	CvUtil.pyPrint('Player %d Civilization %s Unit %s was killed by Player %d' 
		%(player.getID(), player.getCivilizationName(), PyInfo.UnitInfo(unit.getUnitType()).getDescription(), attacker.getID()))

I haven't tried it, but that should work. Just define "CORPSE_SPAWN_CHANCE" or some like variable in the defines, and of course make the XML for the corpse feature.

The only problem with this is that you'll lose a feature on the terrain (Ice, Jungle, Oasis, Floodplains, Forest, Fallout) to be replaced by the corpse. Although there are a few ways to remedy this (making plots allow for multiple features, creating a variable in the CvPlot file to keep track of if a plot has a corpse or not, using script data, etc..), I don't know of any way to fix it without running into the problem of when and how to redraw the corpse on the screen. With multiple features, the graphics engine will only draw one of them. With a seperate variable to keep track of if a plot has a corpse, you would have to find a way to update how the corpse is drawn on the screen every time the plot rebuilds the graphics.

The only way I can see it working like this is if there is either using script data or a new variable a way to keep track if a plot has a corpse. Then, create a new terrain texture in the "art\terrain\plottextures\plottextures.dds" file, and change the CyGame::updatePlots in the HOPE that that function is called any time a plot has to be redrawn. I really don't know if that is the case or not. Even if it is, though, you run into the problem that the plottextures.dds file can only store 5 textures, so you'd be hard-pressed to make the dead not all look the same.

But if you're ok with losing the feature, then that code above should be all you need.
 
Duke van Frost said:
Sounds like the corpses need to be a resource instead of a feature, because the appearance of corpses shouldn´t destroy the present features.

Hmm. I didn't think about that. That's probably a good choice. You don't get to have your 3D corpses, but I don't think that it's too important.
 
Now I understand, I had done it onCombatResult, but unit killed is a better choice.

If I make it a recource, will it be like this?
Code:
def onUnitKilled(self, argsList):
	'Unit Killed'
	unit, iAttacker = argsList
	player = PyPlayer(unit.getOwner())
	attacker = PyPlayer(iAttacker)
		
	# Spawn corpse start
	iPercentChance = gc.getDefineINT("CORPSE_SPAWN_CHANCE")
	if (iPercentChance > gc.getGame().getSorenRandNum(100, "Corpse spawn") ):
		# Success. Spawn corpse
		unit.plot().[B]setRecourceType(gc.getInfoTypeForString("RECOURCE_CORPSE"), -1)[/B]
			
	# Spawn corpse finish
 
Ok, I thought about this again and if the corpses are a resource and there´s already a resource on the field, wouldn´t it also get deleted?

Or could an option be implemented that corpses can´t be "spawned" on a field where a resource is?
 
Duke van Frost said:
Ok, I thought about this again and if the corpses are a resource and there´s already a resource on the field, wouldn´t it also get deleted?

Or could an option be implemented that corpses can´t be "spawned" on a field where a resource is?

Wait, are we talking about the same "resources"? I thought of resources as you have Food, Production and Commerce. Now, you can add "Corpses". Only now I realize that those are "Yields", not resources. My bad :P

If you mean resources as in Bonuses, then yes, you have the same problem as with the features. You'll also have the same problem with improvements too.

I was thinking along the lines of making each corpse add to a Yield value, so you can look at the field and see your Food, Hammers, Commerce and Gravestones or something. It would be easier to implement graphically (I'm assuming, since I've never really done it but I know that you can have more than one yield value per square so I see no reason why not). The problem I see with this is that a user can't see corpses unless they turn on their yields for the whole map, which might get kind of annoying.

@ Civmansam:

Well, that won't work, since in Civ4 there are no such things as "Resources". I think Duke was talking about Bonuses, and I was talking about Yields.

Try to do it just with the setFeature like I had and see if you can get it to work that way, just to make sure that we can fill in the "setFeature" with whatever we want to later.
 
The corpses are meant to be raiseable (?!?) by Necromants, Liches, etc and can even come to live on their own (chances are higher if your workers try to bury them before the enemy can raise them - never disturb the dead!). So I don´t think that a yield would work, and yes, I was talking about resources as in bonuses.
 
Gerikes said:
Wait, are we talking about the same "resources"? I thought of resources as you have Food, Production and Commerce. Now, you can add "Corpses". Only now I realize that those are "Yields", not resources. My bad :P

If you mean resources as in Bonuses, then yes, you have the same problem as with the features. You'll also have the same problem with improvements too.

I was thinking along the lines of making each corpse add to a Yield value, so you can look at the field and see your Food, Hammers, Commerce and Gravestones or something. It would be easier to implement graphically (I'm assuming, since I've never really done it but I know that you can have more than one yield value per square so I see no reason why not). The problem I see with this is that a user can't see corpses unless they turn on their yields for the whole map, which might get kind of annoying.

@ Civmansam:

Well, that won't work, since in Civ4 there are no such things as "Resources". I think Duke was talking about Bonuses, and I was talking about Yields.

Try to do it just with the setFeature like I had and see if you can get it to work that way, just to make sure that we can fill in the "setFeature" with whatever we want to later.


Ahh so it would be setBonusType. I forgot that the XML calls them bonuses while the game calls them recources. I'll try both and see what I can do. Thanks for the help!
 
Duke van Frost said:
The corpses are meant to be raiseable (?!?) by Necromants, Liches, etc and can even come to live on their own (chances are higher if your workers try to bury them before the enemy can raise them - never disturb the dead!). So I don´t think that a yield would work, and yes, I was talking about resources as in bonuses.

That's what I assumed. Even still, it shouldn't be too hard to be able to say "changeCorpseCount" and be able to add and subtract all you want. The fact that it's graphically being shown as a yield doesn't mean that it will act like one.

Of course, finding a way to do it outside of using yields would probably be more preferred. When I'm working on whatever I end up doing today I'll see what I can make of determining when plots are redrawn. Who knows, we might even be able to make it a resource/unit/whatever and not have to attach it to a plot, but we can just place it on the map whenever the plot is drawn.
 
Ploeperpengel said:
Actually Corpes should work like Fallout (and more) see this post:

http://forums.civfanatics.com/showpost.php?p=4255868&postcount=19

I try get get some links for yor other questions too. Great to have you here Gerikes:)

That's what I like to see. Exact numbers and data! :P

But, and I just have to ask, you do realize that if you make it like fallout you run the risk of generating "corpses" that will take down forests, jungles, oases, etc.?
 
Well maybe not exactly like Fallout more the way waste/pollution in civ3 works;)
Simply an overlay on the tile that disables all the production of it until it's cleared of. And those other special effects.

The normal Fallout we could still use for something like Warpenergy so no simple replacement.
 
Adding xmltags on buildings for Unitcombattypeproduction increasement just is on hold cause Olleus concentrated on other stuff. We definitly need that.


Can you give examples of events that happen that spawn Characters/Hereos? Is it a random event, something where the user knows it will happen when they attain a goal, etc?
You can check the Heros thread for ideas but the design is just started maybe later.

Psychology is Olleus' baby leave it to him;)


To be clear, Chaos gets +20% to all units that are alive for the duration of the GA? Or does the bonus only get put on newly built units? Also, what is implied by "more aggressive"? Will they be more wiling to start a war, or just be more aggressive in wars they're already in?
The first. All units during the duration of GA was intended. But I'm still not sure of it. Maybe just another unitproductionboost by 50% and no buildingproduction instead-but maybe we should discuss this further.


I could probably work on this. If someone could provide just a bit of info on exactly what the effects of "peaceweariness" are. Is it exactly the same as the effects of Warweariness (only backwards) such that you just get more unhappy citizens? Also, how does it get accumulated? I'm not sure on this, but doesn't Warweariness accumulate due to losing units? Should Peaceweariness occur when the Civ is not at war, or do they also need to be losing units at the same time?
Last thing I remember it should be about half the effect of Peaceweariness and only accumulated by turns the orcplayer is not at war at all. I think as soon we have Animosity(psycholgy-chance that orcs fight themselves insteed of the enemy) it would be possible to lose units during peacetime though and I think not being at war with another civ should increase that chance drastically and then would it also be possible to have peaceweariness increased by casualties. I think we need animosity first and put this into a combined package.

Any links to how "support fire" would work?
Defensive Bombardment like in civ3 the archers had.

Is it possible to just make all the improvements, and replace the worker unit's list of available builds for each Race to build that improvement rather than the normal? That should just be XML, right?
Wrong. Highelfvillages should have a chance of spawning units i.e. like ancientforests can spawn tryants in FFH. That would just be a matter of incorporating the gamemechanic from FFH.
But other stuff may come too. Check this thread:
http://forums.civfanatics.com/showthread.php?t=178611

What consists of a "group of civs". Is this something that is Civ-related ("only these three civs can build this wonder") or in-game defined (This Civ made wonder X, now only it and it's allies can build wonder Y)?
Not settled for all civs yet. The idea is to have a bunch of wonders with similar effects like a Great Forge which can only be build like a worldwonder but should show different art and names for different civs. If the wonders is built by Elves it would be Vaults' Smithy if by Orcs: "Da big noisy ting dat makez uz da arma" in example.
 
Ploeperpengel said:
Well maybe not exactly like Fallout more the way waste/pollution in civ3 works;)
Simply an overlay on the tile that disables all the production of it until it's cleared of. And those other special effects.

The normal Fallout we could still use for something like Warpenergy so no simple replacement.

Well, if it goes that far, you might be able to implement a stack where a corpse is pushed on top, and when it's finally popped off due to one of the ways that they are removed, then the old features takes over once again. It might be a bit weird having a forest disappear, a "corpse" placed on top, then when the corpse is gone the forest reappear again...
 
Another request I have is adding the combatzoom function of Roger-Bacons flying mod. Seems we have the flying only version integrated(not bad we don't need his other features) but the combatzoom while defending is a must have otherwise you don't recognize the combat with our scale.
 
One more small thing:
unitclass_scout and unitclass_explorer needs to be enabled to build camps. Currently they need some billion turns to do it that's kind of slow imo. It should be the normal rate of workers. another way could be to sacrifice them to build a camp(even outside of your borders) whatever is easier. If's only xml please tell me where to look. Thx
 
Back
Top Bottom