A couple of (hopefully) quick questions

AW Arcaeca

Deus Vult
Joined
Mar 10, 2013
Messages
2,984
Location
Operation Padlock ground zero
The kind of stuff that would be so simple for Firaxis to implement in XML but didn't...

1) Is it possible to make a building that provides extra yields to a specific improvement type in G&K? Or is the closest we have <Building_ResourceYieldChanges>?

2) I'd like to make a civ receive an extra yield from workable all tiles of a specific terrain type that have any resource on them. This should be pretty simple to implement, but I'm having a bit of a brain fart right now...

3) Sort of related - the bazaar gives double versions of all luxury resources within city limits; is it possible to provide an additional version of only one specific lux?

TIA,
AW

They sounded a lot easier to implement when I came up with the ideas :rolleyes: But then again, it might just be that I'm tried right now :sleep:
 
1) If they don't need to be shown to the player (UI), it is doable with Lua. Hidden buildings and all that.
I don't know if the CPP DLL is compatible with G&K, but if it is, then you can do it with XML too.

2) Show me what you got and we can work from there! You'll need SerialInfoCityDirty (or something like that) to intercept when something in the city changes so you can check which plots are being worked. Or, PlayerDoTurn if you want it to be simple but only working on a per turn basis.

3) Yes! With Lua, ALL* is possible!
Same thing as the above.
EDIT: Wait. There are Civs that get 'double this, double that', check them, probably the game already have XML tags for this!


* Please disregard any thoughts of immortality and invencibility that might be product of our ad. We do not take responsability if any harm come to you or if the FBI comes banging on your door. It happened once. True story.
 
1) If they don't need to be shown to the player (UI), it is doable with Lua. Hidden buildings and all that.
I don't know if the CPP DLL is compatible with G&K, but if it is, then you can do it with XML too.

2) Show me what you got and we can work from there! You'll need SerialInfoCityDirty (or something like that) to intercept when something in the city changes so you can check which plots are being worked. Or, PlayerDoTurn if you want it to be simple but only working on a per turn basis.

3) Yes! With Lua, ALL* is possible!
Same thing as the above.
EDIT: Wait. There are Civs that get 'double this, double that', check them, probably the game already have XML tags for this!


* Please disregard any thoughts of immortality and invencibility that might be product of our ad. We do not take responsability if any harm come to you or if the FBI comes banging on your door. It happened once. True story.
1) :confused: I was referring more to the fact that there isn't an XML table like <Building_ImprovementYieldChanges>, at least for G&K AFAIK. I'm not sure why were bringing DLL into this. And hidden buildings would specifically not work, for exactly the reason I can't just slap that effect on a normal building, which is what I'm trying to do (the reason being the lack of the aforementioned table). I think.

2) Oh, er, well, I don't quite have anything yet. This is all going to be for an update (if you follow my thread, this should all sound eerily familiar), and I've mostly been busying myself with artwork thus far. And SerialInfoCityDirty is the event hook I should be using? Would you happen to know its parameters off the top of your head?

3) Bazaar gets its effects from the line <ExtraLuxuries>true</ExtraLuxuries>. I'm not sure replicating the bazaar will give us the desired effect.
 
The kind of stuff that would be so simple for Firaxis to implement in XML but didn't...

1) Is it possible to make a building that provides extra yields to a specific improvement type in G&K? Or is the closest we have <Building_ResourceYieldChanges>?
Closest we have for existing XML within the Buildings Schema is the <Building_ResourceYieldChanges>. But there's no direct effect on Improvement yields within the Buildings Schema. Is the building to be a replacement for an existing class or are you wanting to add a new class-type ?
2) I'd like to make a civ receive an extra yield from workable all tiles of a specific terrain type that have any resource on them. This should be pretty simple to implement, but I'm having a bit of a brain fart right now...
If you were trying to do through a building there's nothing pre-existant within buildings that is directed to both a terrain type and a specific (or any) resource being present on that terrain type.
3) Sort of related - the bazaar gives double versions of all luxury resources within city limits; is it possible to provide an additional version of only one specific lux?
Not, as you surmised later on in the thread, by using the existing <ExtraLuxuries> column in <Buildings>.

So many good ideas so many modders have come up with....so few XML tables to accomplish the ideas.

I'm thinking most if not all your ideas could be accomplished with lua, but I think it would require iterating through plots and looking for improvements being present, as well as if the plot is being worked, if the city has the requisite building(s). Then I think you can directly add a yield to the plot through lua. But I haven't done any lua modding yet to look through plots and try to add yields or do anything else, so I could be full of Christmas Cheer here.
 
I'm not sure why were bringing DLL into this.
Because Unified Yields. :)

And hidden buildings would specifically not work, for exactly the reason I can't just slap that effect on a normal building, which is what I'm trying to do (the reason being the lack of the aforementioned table). I think.
You're ignoring what I'm saying, I don't know the reason, as I'm just repeating with other words what I've just said, but let's go!
I have specifically said about ignoring the UI, so you just iterate through the plots, count the improvements and add a Hidden Building with the appropriate Yield which is what you're trying to do (being the lack of the aforementioned table irrelevant).

2) Oh, er, well, I don't quite have anything yet. This is all going to be for an update (if you follow my thread, this should all sound eerily familiar), and I've mostly been busying myself with artwork thus far. And SerialInfoCityDirty is the event hook I should be using? Would you happen to know its parameters off the top of your head?
I have no idea. :(
The game itself must have functions for this, or you could establish a listener.


3) Bazaar gets its effects from the line <ExtraLuxuries>true</ExtraLuxuries>. I'm not sure replicating the bazaar will give us the desired effect.
Yeah. I'm sure it won't. :p
Trait_ResourceQuantityModifiers works on the Trait level. Considering Unified Yields again, I would say it is possible. Otherwise, Lua (again) can do it, at least on a per turn basis.
 
Closest we have for existing XML within the Buildings Schema is the <Building_ResourceYieldChanges>. But there's no direct effect on Improvement yields within the Buildings Schema. Is the building to be a replacement for an existing class or are you wanting to add a new class-type ?
Unique Building, though I'm not sure why it matters... you obviously know something that I don't :shifty:
If you were trying to do through a building there's nothing pre-existant within buildings that is directed to both a terrain type and a specific (or any) resource being present on that terrain type.
This will probably involve directly editing plot yields with lua then?
So many good ideas so many modders have come up with....so few XML tables to accomplish the ideas.
In Firaxis' defense - something we seldom see around here - I imagine it's awfully hard to predict what a large group of players will all come up with and want to add to the game, and then make the game easy to mod for each and every one of those ideas.

On the other hand, there are a lot of things that could've been controlled by XML tables but instead they decided to make a single useless XML column for it. That's mostly what's frustrating. :mad:
Looks incredible... but I try to not use DLL mods whenever possible.
Trait_ResourceQuantityModifiers works on the Trait level. Considering Unified Yields again, I would say it is possible. Otherwise, Lua (again) can do it, at least on a per turn basis.
Derp, forgot about that table. :crazyeye: The effect is intended as a part of a UA, so it should work... unless the table only works with strategic resources, which is the only thing it's used for in the base game. Maybe whoward with all his DLL wisdom has any insight on this? ;)
 
Unique Building, though I'm not sure why it matters... you obviously know something that I don't :shifty:
I was thinking there might be some round-about ways of getting the effect if the Building were a new class. New Class-type is only relevent in my half-completed thought patterns because what I was trying to think through seemed like any of the possibilities might pretty much break the existing building-class structures.

Follow-on question would be what improvement(s) were you thinking of? There's something banging around in the back of my head but I haven't completely thought it through as yet.
 
I was thinking there might be some round-about ways of getting the effect if the Building were a new class. New Class-type is only relevent in my half-completed thought patterns because what I was trying to think through seemed like any of the possibilities might pretty much break the existing building-class structures.

Follow-on question would be what improvement(s) were you thinking of? There's something banging around in the back of my head but I haven't completely thought it through as yet.
Just pastures. Again, not sure how it matters which improvement, unless you've got some undisclosed classified information...
 
Only matters because of the standard number of resource "ands" / "ors" you can specify. But you can do a Trait_ImprovementYieldChanges which I think was mentioned up-thread.

The other idea I was thinking of might not end up being workable, which is why I was being a little mystery-man about it.
 
Top Bottom