C2C - Event Ideas

I can do a lot in python - but gold value in the xml code is limited to a fixed gold value or a random range (or a combination of the two), unless absolutely necessary I'd stick to xml though since the AI actually is aware of those values when choosing an option while it is utterly unaware of anything I do in python.

I did not disable the archers thing - it was discussed that it might need changing to different promotions at some point though.

You are welcome to the workboat event ;)
 
I can do a lot in python - but gold value in the xml code is limited to a fixed gold value or a random range (or a combination of the two), unless absolutely necessary I'd stick to xml though since the AI actually is aware of those values when choosing an option while it is utterly unaware of anything I do in python.

I did not disable the archers thing - it was discussed that it might need changing to different promotions at some point though.

You are welcome to the workboat event ;)
There is the option to make the gold value and maybe some other values in the event XML an expression tag, so you can do some calculations in there (and the AI would be aware of the result when it makes a choice).
 
If it's an easy but boring task... Give me an example then and I will TRY to edit them. But I have VERY low programming skills, if any :( But maybe just "copying" your example should be ok.
 
thanks, will need to look that up time permitting...
Maybe some things are possible then. Although I still don't see me rebalancing each of the events :eek:
Just to make sure it is not misunderstood: Currently it is not an expression tag and it would require some small code changes by me to make it one but I am happy doing that if it will be used.
 
So what kind of calculations could be feasibly done with that?
Just to get an idea whether it would be worth doing.
This explains the boolean expressions, but the integer expressions are somewhat similar:
http://forums.civfanatics.com/showpost.php?p=11598257&postcount=27

You can add, subtract, multiply and divide depending on values of attributes or properties and also count stuff like the number of cities with a certain building or religion.
I can also expose more information to it if some is needed.

An example that counts all forests in your cultural territory and then multiplies it by 2 (if it is evaluated on the player):
Code:
			<Mult>
			    <IntegrateCount>
			      <RelationType>RELATION_ASSOCIATED</RelationType>
			      <GameObjectType>GAMEOBJECT_PLOT</GameObjectType>
			      <Has>
			        <GOMType>GOM_FEATURE</GOMType>
			        <ID>FEATURE_FOREST</ID>
			      </Has>
			    </IntegrateCount>
			    <Constant>2</Constant>
			</Mult>
 
A few rev idnex dependent ideas:
Military coup attempt: High national rev index could cause it. A group of military hardliners try to grap the power.
Possible outcomes: Give in. automatic war with a civ that is cautious towards you.
Supress: vairous levels, costing differently.
a) all means neccesary. big cost, loose 5 random military buildings somewhere in your nation.
b) stop them: medium cost, loose 5 random military buildings, 10 units go rogue ( babarians)
c) at least minimize the damage: low cost. 10 buildings lost 15 units go babarian.

Another high rev index event ( for democaracies or similar):
Votes not in your favour.
outcomes:
a) form a coalition: lowers national rev index ( one time), maintenance costs increased by..hmm 10%?
b)It´s their turn : lowers national rev index more, one random civic chance without anarchy in religious,education, garbage category ( or the last one.. forgot name right now... like the opposition was a feminist party and suddenly you get matriarchy)
c) Count the votes again: costs gold, 3 :mad: for 15 turns in all cities.
 

:lol: I'll bet there are similar numbers for every other main discussion topic, old threads get buried and such. I'm fine with new threads if the old one is dead and isn't a core thread (like the Modders Docs or something).
 
Ok since Koshling brought it up, I am a bit thinking about including an event to GEM that makes a landbridge on a certain tile vanish at a certain turn.

The mechanism I thought of to copy paste with (as I am a total code noob) was the Volcano one.

I knew That when after a volcano becomes extinct in civ, it finally erodes. My plan was to to alter the volcano event cycle so the landbridge on specified tile X;Y would become a volcano in specified turn X, become extinct in specified turn Y and finally erode in specified turn Z

and leave the eroded tile instead of BARREN the terrain type SEA.

Also the description of the volcano event would eventually change to something like this

Code:
<EventInfo>
			<Type>EVENT_SEALEVELRISE_1</Type>
			<Description>TXT_KEY_EVENT_SEALEVELRISE_1</Description>
...
<EventInfo>

Not sure about how to combine <iWeight> and (if they exist - or anything similar) <iTurn> and <iLocation>?
in the deviated event though.

Also

<EventArt>Art/Afforess/Event_Images/VolcanoEvent.dds</EventArt> would have to be exchanged with the "hurricane/Tornado event dds"?

And

when in the volcano event the "volcano" graphic (improvement or terrain?) would be triggered, in the modified file it would be exchanged with "storm" (rain) graphic (which would also be displayed during the "eruption" turn and the following, "extinct" turn, before then "eroding" into sea).


So my plan was to open the phyton, change something here, change something there and happily present a mechanism.

Turns out it's not that easy if you are someone who is getting kinda seasick looking at a lot of code. :yuck:


So I found out that there is maybe an easier way to "compose" this Sealevelrise Event as I discovered this piece of code

Code:
<ElementType name="TerrainType" content="textOnly"/>
	<ElementType name="iTerrainChange" content="textOnly" dt:type="int"/>
	<ElementType name="ImprovementsRequired" content="eltOnly">
		<element type="ImprovementType" minOccurs="0" maxOccurs="*"/>
	</ElementType>

in the C2C_Civ4EventSchema.XML

So my question is how could I tie such a terrain change to a certain turn at a certain location with 100% iWeight?

Thx for your help and sorry I am so bad at coding.


EDIT: ok I thought about something else: what also could be done would be to manipulate the "global warming" event to happen at a specific place at a specific time (turn) with the specific outcome to change terrain to sea?

Btw. The new event would have to trigger only at GEM map, is a tag like

<iMaptypeToTrigger>PRECOLUMBIAN_GEM<iMaptypeToTrigger>

possible?

As I said code is like a black box for me but I very much want the cat inside to be alive^^
 
You can't without Python or DLL coding. And if you do it that way then likely it won't be in effect only when you use the GEM but also when you use some random map in which it won't fit at all.

The good way, which is quite a lot of effort though, would be to add the capability to trigger a terrain/feature/improvement change at a certain turn to the worldbuilder map format itself. Then you could add such changes specifically to certain maps where they fit.
 
You can't without Python or DLL coding. And if you do it that way then likely it won't be in effect only when you use the GEM but also when you use some random map in which it won't fit at all.

The good way, which is quite a lot of effort though, would be to add the capability to trigger a terrain/feature/improvement change at a certain turn to the worldbuilder map format itself. Then you could add such changes specifically to certain maps where they fit.

Also there is a known bug that can often lead to crashes if any terrain change joins or splits landmasses (this is why fusion nuke detonations sometimes cause a crash). Since it's not an easy bug to resolve it has not yet been fixed, but it really prevents such an event for now.
 
Also there is a known bug that can often lead to crashes if any terrain change joins or splits landmasses (this is why fusion nuke detonations sometimes cause a crash). Since it's not an easy bug to resolve it has not yet been fixed, but it really prevents such an event for now.

Would it be easier to create a sea terrain or feature like a tunnel that is passable by land units and then disappears at some point?
 
Would it be easier to create a sea terrain or feature like a tunnel that is passable by land units and then disappears at some point?

You would have to teach the AI how to use it, so while it would circumvent one set of problems, it adds other work. Better to figure out how to fix the bugs in the terrain changes in the first place I would say.
 
Top Bottom