SoGK's New Civ

:confused: I don't really understand what your post actually means, but I'll give it a try to think of something:
Spoiler :

UA: Dawnbringer of Islamic Era
Merchant specialist grant +1 Religious Pressure. For every one :c5greatperson: Great Person, or three Wali, dead or expended, gain +1 :c5faith: Faith in capital. For every 2 trading and/or cultural buildings, gain +1 Religious Pressure.

UA seems pretty clear, but I haven't figured out yet if you can modify a sum of Pressure (all I've seen with Religious Pressure before was percentage based)

UU: Wali (replaces Missionary)
Recieve "Abangan" (gain small lump of :c5culture: Culture everytime it spread religion) or "Putihan" (+1 Religious Spread). Slightly more expensive than missionary. Can be expended to create Pesantren or convert existing Pesantren to Abangan/Putihan. Garrisoned Wali provide +1 :c5faith: Faith.

Let me assume "Abangan" and "Putihan" are promotions, but I'm not sure if you can actually build Buildings by expending them. Converting a UB to a promotion is not possible without lua, but you may create a dummy building which then provides the promotion you want to have.

UB: Pesantren (replaces Library)
+2 :c5science: Science for every 3 :c5citizen: population. +1 :c5faith: Faith for every 3 :c5citizen: populaton who follow your pantheon/religion. If founded/converted by Wali provide +1 :c5culture: Culture (Abangan) or +1 :c5faith: Faith (Putihan, stacked with regular output) for every 2 :c5citizen: citizens.

This seems quite clear, but the last function again requires a dummy building which then produces the Culture or Faith output. Again conditional with the above effect.

I'll look in the Lua files and see if the functions can be implemented.
 
Looks good, and I see a few civs on your to-do list that I'm looking forward to seeing!
 
Merchant specialist grant +1 Religious Pressure
Not possible AFAIK; I'm not aware of any way to directly edit religious pressure.
For every one Great Person <snip> dead or expended, gain +1 Faith in capital.
Fairly straight-forward lua script could do this...
or three Wali
...but once you throw the "three" in here, it gets a little complicated. But it could probably be done, just not so easily.
For every 2 trading and/or cultural building, gain +1 Religious Pressure
Not possible AFAIK, for same reason as above

gain small lump of Culture everytime it spread religion
I'm not sure if this is possible; if it is, it would probably be a very messy lua script, and perhaps an unreliable one at that.
or "Putihan" (+1 Religious Spread).
I'm pretty sure this is easily done with a promotion.
Can be expended
You're getting into dangerous territory now - whenever anyone says "can be expended", it's usually followed by some effect that would either require an override to the unit panel user interface context (which I don't recommend), or a completely new UI context. (Which I still don't recommend but for different reasons)
That is, anything following these three words usually involves something too hard to code for me to have any desire to do so.

+1 Faith for every 3 population
Faith and culture are weird yields; Firaxis coded them such that they only work in some yield-giving contexts. Buildings, for example, can yield faith, but not give faith modifiers. (This is, incidentally, why there are no buildings that give +25% faith. There are culture modifiers, I know, but they still don't work like everything else. You can blame Firaxis for this inconsistency) You could try putting faith into the table that controls yield-per-population, but I can't promise it'll work...
who follow your panthenon/religion.
...and this definitely won't, unless you want to make a "dummy" building that yields 1 faith and add it to the city as many times as necessary to equal the number of followers. I personally find it an undesirable method.
If founded/converted by Wali
First you need to figure out how exactly a missionary is able to build a building.
provide +1 Culture (Abangan) or +1 Faith (Putihan, stacked with regular output) for every 2 citizen
Again, faith and culture are weird yields that might not work in the table that controls this, but you can try



I hope I didn't crush your dreams; I'm just trying to be realistic.
 
That's a lot of civs. Do you want me to make icons for them? I could do them for all of the civs, I'd just like if you said which colors you have in mind.
 
You're getting into dangerous territory now - whenever anyone says "can be expended", it's usually followed by some effect that would either require an override to the unit panel user interface context (which I don't recommend), or a completely new UI context. (Which I still don't recommend but for different reasons)
That is, anything following these three words usually involves something too hard to code for me to have any desire to do so.

1) Hit delete button.
2) Check unit's death.
3) Run code.
4) ???
5) (Peasant) Profit!!1!
 
gain small lump of Culture everytime it spread religion
I'm not sure if this is possible; if it is, it would probably be a very messy lua script, and perhaps an unreliable one at that.
GameEvents.CityConvertsReligion, but it's definitely unreliable because it can be fired multiple times if a city constantly switches between one religion and another.
+1 Faith for every 3 population
Faith and culture are weird yields; Firaxis coded them such that they only work in some yield-giving contexts. Buildings, for example, can yield faith, but not give faith modifiers. (This is, incidentally, why there are no buildings that give +25% faith. There are culture modifiers, I know, but they still don't work like everything else. You can blame Firaxis for this inconsistency) You could try putting faith into the table that controls yield-per-population, but I can't promise it'll work...
who follow your panthenon/religion.
...and this definitely won't, unless you want to make a "dummy" building that yields 1 faith and add it to the city as many times as necessary to equal the number of followers. I personally find it an undesirable method.
City:GetNumFollowers()
provide +1 Culture (Abangan) or +1 Faith (Putihan, stacked with regular output) for every 2 citizen
Again, faith and culture are weird yields that might not work in the table that controls this, but you can try
Dummy buildings as usual. :crazyeye:


Nevertheless, this is very LUA intensive.
 
1) Hit delete button.
2) Check unit's death.
3) Run code.
4) ???
5) (Peasant) Profit!!1!
There's a difference between 1) expending the unit, 2) deleting the unit (killing the unit to get gold within friendly territory) and 3) the unit dying from either 3.1) being killed or 3.2) just sort of dying, which may or may not overlap with 2. "Checking the unit's death" will fire for all of these, which is not specifically what SOGK asked.
GameEvents.CityConvertsReligion, but it's definitely unreliable because it can be fired multiple times if a city constantly switches between one religion and another.
That too, but I was worried mostly about how CityConvertsReligion fires whenever any follower count changes - be it when any missionary, prophet or inquisitor causes religion spread, or even when the city's population increases and 1 extra citizen is converted to the religion of the most prevalent religious pressure (which I think is how it works... sort of). How you would go about detecting that the event fired specifically from a certain missionary UU spreading its religion is beyond me...

...other than looping around the plots surrounding the city and checking them for missionaries. This brings in the additional problem of "what if the missionary just used its last conversion"? Since it's dead, how do we find it, so that we can get a culture boost?

:dunno:
City:GetNumFollowers()
So, this will tell you the number of followers of a religion (that method does take a religionID parameter), but it still requires that you add City.GetNumFollowers # of +1 faith buildings to the city to actually, er, do anything.
 
There's a difference between 1) expending the unit, 2) deleting the unit (killing the unit to get gold within friendly territory) and 3) the unit dying from either 3.1) being killed or 3.2) just sort of dying, which may or may not overlap with 2. "Checking the unit's death" will fire for all of these, which is not specifically what SOGK asked.

If you want to simplify things, all you need is to be a tiny little bit creative:

"Can be expended in cities to create Pesantren or convert existing Pesanren to Abangan/Putihan."

This solves most issues, except the death by an attack... which is ridiculously fixable with a single line of code with a variable comparison from the unit death event hook.

As for firing for all those possibilities, so what? PlayerDoTurn fires once for each player when most of the time you only want the code to run for one of them, and we use it all the time. I can't see the issue here.
 
Okay, let's try to answer this...

:confused: I don't really understand what your post actually means, but I'll give it a try to think of something:
Probably I'm too unclear on that. Yes, I intended to create a civ, like the title suggest. No, I've not yet making XML, LUA, or anything. Just civ's icon. Busy, you know
UA seems pretty clear, but I haven't figured out yet if you can modify a sum of Pressure (all I've seen with Religious Pressure before was percentage based)
Well, damn it. It just the first thing to cross my mind. Can I change the merchant to +5% RP (max 25%)? Or +1 Faith (probably like MC's Kilwa, if Faith and Food is similar in LUA modding)?
And about trading/cultural building, probably less faith needed to create missionary (is that even possible?), or flat out +n Faith for every trade routes and/or civ you are Familiar on? Any ideas? Or just straight out delete them?
Let me assume "Abangan" and "Putihan" are promotions, but I'm not sure if you can actually build Buildings by expending them. Converting a UB to a promotion is not possible without lua, but you may create a dummy building which then provides the promotion you want to have.
..okay, I forget to add that Abangan and Putihan are Promotion that can be obtained randomly. And forget about abangan - putihan pesantren, too much headache
This seems quite clear, but the last function again requires a dummy building which then produces the Culture or Faith output. Again conditional with the above effect.
Ah, screw that one
I'll look in the Lua files and see if the functions can be implemented.
Thanks! Glad to see someone helping :goodjob:


Looks good, and I see a few civs on your to-do list that I'm looking forward to seeing!
Keep in mind that to-do-list are closer to wishlist that probably never come true. But, well, I can always dream, right :D


Roman von Ungern Sternberg? Francisco Solano Lopez?

Yes, hell yes.
Kaiserreich and polandball told me about those guys. I probably should thank them. And thanks :)


Not possible AFAIK; I'm not aware of any way to directly edit religious pressure.
+1 faith perhaps? That seems to be the most safe way.
Fairly straight-forward lua script could do this...
Thank god...
...but once you throw the "three" in here, it gets a little complicated. But it could probably be done, just not so easily.
Well, damn. Removing wali's faith bonus probably isn't an option because it is quite a big thing there, but if +1 faith per wali seems a bit OP. Probably I'll ramp up the cost of Wali and give +3 faith bonus for GP?
Not possible AFAIK, for same reason as above
The alternative I can think now is 1. +n faith for every trade route and civ you are Familliar with; 2. Wali discount cost (I got bad feeling on this); or 3. Scrap that
I'm not sure if this is possible; if it is, it would probably be a very messy lua script, and perhaps an unreliable one at that.
Okay..... But how about an ability to create +3 culture yield in trading post? Leuigi's Tiwanuku kinda use thing that (appearantly) similar. Or small lump of culture when promotion is obtained (promotion obtained immideately after creation)
I'm pretty sure this is easily done with a promotion.
Less problem, yay :D
Faith and culture are weird yields; Firaxis coded them such that they only work in some yield-giving contexts. Buildings, for example, can yield faith, but not give faith modifiers. (This is, incidentally, why there are no buildings that give +25% faith. There are culture modifiers, I know, but they still don't work like everything else. You can blame Firaxis for this inconsistency) You could try putting faith into the table that controls yield-per-population, but I can't promise it'll work...
MC's Gandhi's Mandhir give +1 Faith for each 2 pop
...and this definitely won't, unless you want to make a "dummy" building that yields 1 faith and add it to the city as many times as necessary to equal the number of followers. I personally find it an undesirable method.
...can I somehow mix Mandirs in MC Gandhi with Uighur Caesar's Saudi's Sharia Court (more maintence for every infidels)?
I hope I didn't crush your dreams; I'm just trying to be realistic.
Here lies SoGK hopes and dreams


That's a lot of civs. Do you want me to make icons for them? I could do them for all of the civs, I'd just like if you said which colors you have in mind.
Thank you :D! I only finished creating Demak's icon and nothing else. If you want to be my icon departement, you are welcomed. But for now, can you create unit, building, and leader icon? I kinda needed them


You're getting into dangerous territory now - whenever anyone says "can be expended", it's usually followed by some effect that would either require an override to the unit panel user interface context (which I don't recommend), or a completely new UI context. (Which I still don't recommend but for different reasons)
That is, anything following these three words usually involves something too hard to code for me to have any desire to do so.
1) Hit delete button.
2) Check unit's death.
3) Run code.
4) ???
5) (Peasant) Profit!!1!
There's a difference between 1) expending the unit, 2) deleting the unit (killing the unit to get gold within friendly territory) and 3) the unit dying from either 3.1) being killed or 3.2) just sort of dying, which may or may not overlap with 2. "Checking the unit's death" will fire for all of these, which is not specifically what SOGK asked.
If you want to simplify things, all you need is to be a tiny little bit creative:

"Can be expended in cities to create Pesantren or convert existing Pesanren to Abangan/Putihan."

This solves most issues, except the death by an attack... which is ridiculously fixable with a single line of code with a variable comparison from the unit death event hook.

As for firing for all those possibilities, so what? PlayerDoTurn fires once for each player when most of the time you only want the code to run for one of them, and we use it all the time. I can't see the issue here.
If bane's plan is working, I'll go with it. Otherwise, flat +2 faith for Putihan garrisoned, +3 culture for Abangan


GameEvents.CityConvertsReligion, but it's definitely unreliable because it can be fired multiple times if a city constantly switches between one religion and another.
That too, but I was worried mostly about how CityConvertsReligion fires whenever any follower count changes - be it when any missionary, prophet or inquisitor causes religion spread, or even when the city's population increases and 1 extra citizen is converted to the religion of the most prevalent religious pressure (which I think is how it works... sort of). How you would go about detecting that the event fired specifically from a certain missionary UU spreading its religion is beyond me...
...other than looping around the plots surrounding the city and checking them for missionaries. This brings in the additional problem of "what if the missionary just used its last conversion"? Since it's dead, how do we find it, so that we can get a culture boost?
Ah, screw abangan lump of culture when spreading religion. How about 1. abillity to self sacrifice in trade post and give it +3 culture, or 2. lump of culture whe created? The first one require UI editing...

Okay, I got refined plan here. Tell me what do you think again, whetever it's too boring, UP, OP, or (worse of all) a pain in the arse to code. Inside [bracket] are plan 1/2/3, to be chosen. +n means number undecided yet
Spoiler :
Demak Sultanate
Raden Fatah

UA: Dawnbringer of Islamic Era
Merchant provide [+1 :c5faith: Faith / 5% RP (up to 25%)]. [+n :c5faith: Faith / n% Wali discount] for every [trade routes :trade: / civ :c5culture: Familiar to you / both]. Expended great person add +3 Faith :c5faith: in captal, +1 for expended Wali.

UU: Wali (replace Missionary)
Gain "Abangan" or "Putihan" promotion, obtained randomly (influenced also by Wali garrisoned there). "Abangan" [provide a lump of :c5culture: culture when created / can be expended on Trading Post improvement to give +2 :c5culture: culture generation] and provide +5% culture generation when garrisoned in a city with Pesantren. "Putihan" gain +2 religion spread and +2 Faith when garrisoned. [Can be expended to create Pesantren / -]. [1.5 / 2] x more expensive than normal Missionary

UB: Pesantren (replace Library)
+2 :c5science: Science for every 3 population. +1 :c5faith: Faith for every 2 :c5citizen: populaton [who follow your panthenon/religion / - ]. [+1 :greatwork: Great Work of Writing slot / +1 :c5faith: Faith for every Wali ever born here / - ].

And some logos:
http://imgur.com/joj1QWV
(still try to figure out why the hell i can't post insert image on imgur link)
 
Well, damn it. It just the first thing to cross my mind. Can I change the merchant to +5% RP (max 25%)? Or +1 Faith (probably like MC's Kilwa, if Faith and Food is similar in LUA modding)?

I looked into the Lua Events, and it seems not possible to do RP, mostly due to RP being coded with beliefs, where no dummy beliefs exist. +1 :c5faith: for each Merchant is easy in theory, though:

Code:
<Trait_SpecialistYieldChanges>
	<Row>
		<TraitType>TRAIT_YOURCIVTRAIT</TraitType>
		<SpecialistType>SPECIALIST_MERCHANT</SpecialistType>
		<YieldType>YIELD_FAITH</YieldType>
		<Yield>1</Yield>
	</Row>
</Trait_SpecialistYieldChanges>

And about trading/cultural building, probably less faith needed to create missionary (is that even possible?), or flat out +n Faith for every trade routes and/or civ you are Familiar on? Any ideas? Or just straight out delete them?

Only general less :c5faith: Faith Cost with ONE Trading/Cultural Building possible. If it fires multiple times, it might get in negative modifiers (not tested yet, but I'd rather not check it as it seems risky).

Faith for every trade route is easy:

Code:
<Trait_YieldChangesPerTradePartner>
	<Row>
		<TraitType>TRAIT_YOURCIVTRAIT</TraitType>
		<YieldType>YIELD_FAITH</YieldType>
		<Yield>X</Yield>
	</Row>
</Trait_YieldChangesPerTradePartner>

X is the Value you want to enter. In Morocco's trait, the trait values for :c5gold: Gold and :c5culture: Culture are 3 and 1 respectively.

Code:
<Trait_YieldChangesIncomingTradeRoute>
	<Row>
		<TraitType>TRAIT_YOURCIVTRAIT</TraitType>
		<YieldType>YIELD_FAITH</YieldType>
		<Yield>X</Yield>
	</Row>
</Trait_YieldChangesIncomingTradeRoute>

This code is for incoming trade routes.

well, I can always dream, right :D
Yeah, hope dies last, but it's better than nothing :D.

Okay..... But how about an ability to create +3 culture yield in trading post? Leuigi's Tiwanuku kinda use thing that (appearantly) similar.
Too powerful, because...
1. Trading Posts can be built anywhere (except snow, unless you use Poor Tiles Tweak, which, in this case, the trading post can be built anywhere). If you build it in Jungles, it results in...
2. 2 :c5food:, 3 :c5science:, 3 :c5gold: and 3 :c5culture:? That's better than the Great Barrier Reef! (Can be achieved in Renaissance/Enlightenment Era, with University, Free Thought and Commerce Finisher)

Then again if it's for Dummy Trading Post...

Or small lump of culture when promotion is obtained (promotion obtained immideately after creation)
I haven't checked yet, but should be possible.

Less problem, yay :D
MC's Gandhi's Mandhir give +1 Faith for each 2 pop
...can I somehow mix Mandirs in MC Gandhi with Uighur Caesar's Saudi's Sharia Court (more maintence for every infidels)?
Infidels? What is that? Then again, if you plan to make your civ compatible with JFD's Rise to Power, there's already a Mandir Building and there's a Crime Function (Heresy).

Otherwise, flat +2 faith for Putihan garrisoned, +3 culture for Abangan.
Sounds simple enough, but for some case, it doesn't seem to work (not sure if it's because of my mods or something else)

Ah, screw abangan lump of culture when spreading religion. How about 1. abillity to self sacrifice in trade post and give it +3 culture, or 2. lump of culture whe created? The first one require UI editing...
1. Dummy Trading Post required.
2.Trofflesby's Lu Bu Forces civ has a similar Lua Script for combat units, just make sure to set a fixed Culture Value for your Wali :scan:.

Spoiler :
"Putihan" gain +2 religion spread

:eek:! With JFD's Piety, that's six religion spreads (2 + 2 + 1 from Mosque of Djenne + 1 from Devout Status (JFD's Piety)! Make it +1 religion spread, and it's powerful enough.

still try to figure out why the hell i can't post insert image on imgur link
Strange... normally it should work.

Whew... that's a lot. But, the more the merrier, right :lol:?
 
Thank you :D! I only finished creating Demak's icon and nothing else. If you want to be my icon departement, you are welcomed. But for now, can you create unit, building, and leader icon? I kinda needed them

I think you might want to have a design in hand before. You did for Demak. But maybe asking other to draft your planned civ so the artwork could be made without interruption. The name is UU, UB, UI is kind of needed. You know.

And some logos:
http://imgur.com/joj1QWV
(still try to figure out why the hell i can't post insert image on imgur link)


Good one. To paste picture here from Imgur, you should use BBCode (forum) instead of direct link. :crazyeye:

Also, welcome to the world of Mod.
 
Here's a civ design I had made for Francisco Solano Lopez some time ago:

Paraguay - Solano Lopez
UA: Patria o Muerte: Can sell buildings to rush production of units in city. Civilian units cause attrition damage to enemy units that end their turn near them.
UU: Aca Yboty: Replaces Cavalry. Unlocked earlier at Rifling. Deals significantly less damage, but its trained in pairs and starts with the Charge Promotion.
UU: Christian Cannon: Replaces Cannon. Starts with extra experience equal to the amount of faith produced in city. Generates a small amount of faith from victories.
 
As funny as it may be, it's a true thing. (As you may or may not be aware of).

For those who don't read either portuguese or spanish, the story behind the cannon is basically that Paraguay was using pretty much whatever material was available to keep the war going, and as such they melted various church bells donated from across the country to make this gun. It's now in possession of Brazil and there's a sort of fight over it.
 
Okay, let's try to answer this...
Thank you :D! I only finished creating Demak's icon and nothing else. If you want to be my icon departement, you are welcomed. But for now, can you create unit, building, and leader icon? I kinda needed them

I might try to make icons for the uniques, but as I said, I'll just try. My main thing is civilization icons. As for leader icons, it's usually advisable that you make them only after you have the leaderscreen.
Also, I'd like if you said what you have in mind for the colors and actual symbol for each civ before doing it, in case you have thought about it.
By the way, did you do Demak's icon using Sukitract's template? If not, I can do remake it using it, if you want. Icons made that way generally look better. Just post the alpha.
 
Faith for every trade route is easy:

Code:
<Trait_YieldChangesPerTradePartner>
	<Row>
		<TraitType>TRAIT_YOURCIVTRAIT</TraitType>
		<YieldType>YIELD_FAITH</YieldType>
		<Yield>X</Yield>
	</Row>
</Trait_YieldChangesPerTradePartner>
Nope

Remember what I told SOGK about Faith yields?
Faith and culture are weird yields; Firaxis coded them such that they only work in some yield-giving contexts.
Faith doesn't work in this table.

Thanks, Firaxis! :goodjob: :rolleyes:

MC's Gandhi's Mandhir give +1 Faith for each 2 pop
Because the faith isn't given via XML, by way of the <Building_YieldChangesPerPop> table, which is what the library/university/public school/everything else Firaxian uses for "yield per population"... and the mod doesn't use the table BECAUSE faith doesn't work in it. That mod has a lua script that actually counts up the population in cities with mandirs, adds it all together, multiplies the total by 50%, rounds up, and "injects" the resultant number into the player's faith-bloodstream. The player's faithstream, I guess.

EDIT: Okay, juts looked over the code to confirm my memory. I was half-right. They actually do use the <Building_YieldChangesPerPop> table, but the mod also has to include a lua script which extends the table's capabilities to allowing faith-per-pop yields, by doing the algorithm I spelled out above.
 
Nope

Remember what I told SOGK about Faith yields?

Faith doesn't work in this table.

Thanks, Firaxis! :goodjob: :rolleyes:

Oops, totally forgot the post you made earlier :hammer2:. That explains why someone's civ providing faith per route didn't work :p.

So the only possibility to generate :c5faith: faith via trade routes is via the :religion: pilgrimage function (10% of the :c5faith: faith generation from the originating city is added to the :c5faith: Faith Production of the destined city).
 
Top Bottom