Danmacsch
Geheimekabinetsminister
Hi,
Thought I'd start a thread where I can ask a bunch of questions - hopefully it won't drown as easily as posts in Lua Request Thread sometimes tend to do.
1) Research Agreements; how mod-able are they? If wanted to increase the Science bonus from Research Agreements with a percentage, is there a lua method that can be used, or am I overlooking some tag in either a buildings or policies subtable?
2) visibility of tiles; I have a unique unit that should be able to detect worker units within some radius. That is, if the unique unit moves to a plot, all plots within a (say) 3 tile radius are checked. If one of these plots has a unit of a specific type on it, the plot is revealed to the player (if it isn't already) and becomes visible. When either the unique unit or the unit of the specific type moves away, the tile isn't automatically visible anymore, but it keeps being revealed.
I've tried multiple things so far, but haven't gotten it to work correctly. I can get the plot to be permanently visible with SetVisibilityCount(team) but then the plot doesn't stop being visible again, at all.
I'll post my most recent coding attempt here later.
3) adding a dynamic to the combat bonus from having a great general nearby. The relevant traits table tag can't really be modified during the game, so can't use that. What I'm trying to do specifically is to increase the bonus by 5% for every original capital conquered. I've made some attempts here as well with a bunch of promotions, but it turned out the only great general bonus tag in the promotions table is one applied to stacking a unit with a great general. A similar problem was recently/is currently discussed in the lua request thread, but without the dynamic aspect. Any ideas?
4) this I also asked in another thread, but didn't receive an answer - hopefully will here. In have an UA, which allows military units to repair pillaged tiles. This is to my knowledge achievable by creating unique versions of all military units in the game supplying them with a non nil workrate and the repair build, then converting all the player's units to their repairing-able counterpart. This method however, is somewhat tedious SQL-wise and doesn't seem very efficient not to mention won't be very compatible with mods adding need military units. Can someone think of another method?
Thought I'd start a thread where I can ask a bunch of questions - hopefully it won't drown as easily as posts in Lua Request Thread sometimes tend to do.
1) Research Agreements; how mod-able are they? If wanted to increase the Science bonus from Research Agreements with a percentage, is there a lua method that can be used, or am I overlooking some tag in either a buildings or policies subtable?
2) visibility of tiles; I have a unique unit that should be able to detect worker units within some radius. That is, if the unique unit moves to a plot, all plots within a (say) 3 tile radius are checked. If one of these plots has a unit of a specific type on it, the plot is revealed to the player (if it isn't already) and becomes visible. When either the unique unit or the unit of the specific type moves away, the tile isn't automatically visible anymore, but it keeps being revealed.
I've tried multiple things so far, but haven't gotten it to work correctly. I can get the plot to be permanently visible with SetVisibilityCount(team) but then the plot doesn't stop being visible again, at all.
I'll post my most recent coding attempt here later.
3) adding a dynamic to the combat bonus from having a great general nearby. The relevant traits table tag can't really be modified during the game, so can't use that. What I'm trying to do specifically is to increase the bonus by 5% for every original capital conquered. I've made some attempts here as well with a bunch of promotions, but it turned out the only great general bonus tag in the promotions table is one applied to stacking a unit with a great general. A similar problem was recently/is currently discussed in the lua request thread, but without the dynamic aspect. Any ideas?
4) this I also asked in another thread, but didn't receive an answer - hopefully will here. In have an UA, which allows military units to repair pillaged tiles. This is to my knowledge achievable by creating unique versions of all military units in the game supplying them with a non nil workrate and the repair build, then converting all the player's units to their repairing-able counterpart. This method however, is somewhat tedious SQL-wise and doesn't seem very efficient not to mention won't be very compatible with mods adding need military units. Can someone think of another method?