3UC/4UC for VP: Project Coordination Thread

Status
Not open for further replies.
That is why you need this PlotDistance function, because not every plot within loops’ range will actually be 3 tiles away.
VP doesn’t use any Lua except for UI. Everything is coded in the DLL, so AI can use all features.
We made a few changes here, in 3/4uc, converting PlotIterators into loops. In GitHub you’ll be able to see the files before the change and after the change.
 
I've done another playtest session. It may be the finale one before the release of the modmod. :groucho:

As always, thank you for your hard work ! :)

Here we go :
Spoiler List :

Ethiopia :
- Monolithic Chruch : the Game info of the UI still indicates that the MC can be built on Marble, which isn't the case anymore, so this must be corrected

Portugal :
- Cacadores : it's unique promotion still doesn't work (argh !)
- University of Coimbra : the bonus yield from CS Feitora is added or substracted correctly when a Feitora is added/deleted from a tile in CS territory (and, as intended, there is no effect when a Feitora is added/deleted anywhere else)

Morocco :
- Riad : There is no info ingame about the yields (gold/culture/GMerchant points) added thanks to the effect of the building on TR. There should be at least a popup like what happens with the Portugese UA (I think)

Celts :
- The civilopedia article should be modified so that all adjacency bonus can be read
Here is the current situation with this article
Spoiler Celtic Oppidum :

20180415113806_1.jpg


Persia :
- Paradise Garden : the yields of this UB are too important (+9 basic yields compared to a classic Garden plus the +1 gold/+1 culture on all guilds => with 3 writer guilds and 3 artist guilds, each Paradise garden gives 9 gold, 9 culture and 3 tourism... this is just insane for a Classical era building)
+ the building gives +3 gold while also still having the 3 GPT maintenance cost
Suggestion :
- Eliminate the maintenace cost of the building and its gold base yield (since they balanced each other), or go back to the gold revenue of the Garden by eliminating the gold base yield (a 'Paradise garden' shouldn't cost less to maintain than a 'Garden', except throught indirect bonus, like the one to guilds).
- Diminish the culture/tourism base yields to +2/+2, or even +1/+2 (the building will still give a lot of culture through the 'culture on GAge' bonus and the bonus to guilds).

Aztecs :
- Huey Teocalli : the 'Food' denomination lacks in the Game info for the UW in the 'GAge bonus' part (see below)
Spoiler Huey Teocalli food :

20180415114507_1.jpg


Austria :
- Landwehr : why choosing the K.K. Landwehr denomination ? I know what it means, but there is little risk of being misunderstood when using simply 'Landwehr'.
+ the Game info no longer indicates the effect of the 'Yorkscher Marsche' (cupromotion
+ I think we should talk about the unit a bit. What do you think of it ?

Egypt :
- Kopesh : the Game Info of the unit must be corrected because of the recent changes to the 'Fatigue' promotion : the GI should be changed from 'temporarily reduces the combat power of a unit that it attacks' to 'reduces the combat power of a melee foot unit that it attacks until this unit fortifies', or something else (I'm not sure of what this promotion does exactly anymore).

America :
- Monitor : the unit should have the same promotion (Coastal patrol) as the Korean Turtle ship, since both units have exactly the same bonus in that regard.

China :
- Xiafan Guanjun : the Game Info should be reworked (as it is now, there is nothing besides the fact that it is a Chinese unique unit), and the Strategy should be updated to take into account the changes from the last months (the unit no longer has the 'Supply' promotion, for example).

 
Last edited:
  • text fixes to Xiafan Guanjun, Khopesh, Landwehr, Pairidaeza, Mono Church, Oppidum, and Huey Teocalli
  • Khopesh increased fatigue penalty to 30%
    • The penalty is restricted to unmounted melee units now, so I think it deserves to be boosted. It also is more symmetrical with their "Mercy" promotion
  • Pairidaeza - removed all Gold
    • Glad to hear I'm not the only one who thought this looked OP. I've taken all the gold yields out on the base building and on guilds. Now there is no overlap in yields with amphitheatre/opera house/museum, and building is focused on culture.
  • No change on Monitor. The Steam-powered promotion already exists in vanilla. It does the same thing as the coastal patrol, but giving the Kobukseon a "steam-powered" promotion would be silly. It's fine as is.
  • No change on Cacador or Riad. The issues listed are lua issues. I didn't touch lua.
Landwehr:
The name has not been changed (still K.K. Landwehr). I made this change so there is no conflict with the Landwehr from @HungryForFood's Prussia for VP mod. They are two different institutions which happened to have the same name, so I thought it best to avoid duplications.
The unit is whatever. I have no strong feelings one way or the other. The Landwehr overlaps on the Canada mod that I would like to adapt for VP at some point, so I'm not super jazzed about it in that respect. On the other hand, Austria has a rather lackluster military history, so I don't know what else to do with the unit.
 
Last edited:
Landwehr:
The name has not been changed (still K.K. Landwehr). I made this change so there is no conflict with the Landwehr from @HungryForFood's Prussia for VP mod. They are two different institutions which happened to have the same name, so I thought it best to avoid duplications.
The unit is whatever. I have no strong feelings one way or the other. The Landwehr overlaps on the Canada mod that I would like to adapt for VP at some point, so I'm not super jazzed about it in that respect. On the other hand, Austria has a rather lackluster military history, so I don't know what else to do with the unit.

I understand, but, in that case, I think the Historical Info part of the civilopedia article should be updated to explain the K.K. and its unique attributes.
As for the unit in itself, one of the main attributes of the Austrian 'armed forces', during the days of the Austro-Hungarian empire, was its extreme heterogeneity : the diversity in people within the empire was reflected in the multitude of languages and habits of the 'Austrian' soldier, even if the leading posts were monopolized by 'native' Austrian nobility. This was more a weakness than a strength, but it was still something quite caracteristic (the Russian empire or the Ottoman empire could compete in that regard though).

Suggestion : A small production boost to the UM for each CS under the effect of the Austrian UA (I think there is a dummy building spawning whenever a marriage is arranged, so an effect could be added there), instead of the culture bonus ?
With the Schützenstand production bonus added, the Austria would have access to a quite strong UM which would be quite spammable as well (most of the time, a spammable UM has less strength than most other UM to compensate, but the KKLandwehr would be a good mix of combat power and affordability).
I know it's not the most interesting idea, and it could require a lot of coding, but I just wanted to find something else... The Yorkscher Marsche is both quite unbalanced and bland, to my mind.
 
Last edited:
Landwehr:
The name has not been changed (still K.K. Landwehr). I made this change so there is no conflict with the Landwehr from @HungryForFood's Prussia for VP mod. They are two different institutions which happened to have the same name, so I thought it best to avoid duplications.
The unit is whatever. I have no strong feelings one way or the other. The Landwehr overlaps on the Canada mod that I would like to adapt for VP at some point, so I'm not super jazzed about it in that respect. On the other hand, Austria has a rather lackluster military history, so I don't know what else to do with the unit.

IMO just leave it as Landwehr. KK Landwehr doesn't sound great. Both Landwehrs have different icons anyway, so it should be fine. If people are really confusing them, I'll do a name change under the Prussia mod, so that people without both mods won't see KK Landwehr.
 
A small production boost to the UM for each CS under the effect of the Austrian UA (I think there is a dummy building spawning whenever a marriage is arranged, so an effect could be added there), instead of the culture bonus
That hews a bit close to the schutzenstand's current bonus, which already scales based on CS status. I agree that something else would be nice though. Maybe the yorkscher marsche promotion could give a bonus to the unit based on the number of great works of music on empire? Like, maybe they heal +1HP on fortify for every GWM?
IMO just leave it as Landwehr. KK Landwehr doesn't sound great. Both Landwehrs have different icons anyway, so it should be fine. If people are really confusing them, I'll do a name change under the Prussia mod, so that people without both mods won't see KK Landwehr
The main issue is that militaristic CS gifts give you no other details other than the name of the unique unit they offer. Players can't know what kind of Landwehr the CS offers if they don't have different names.

I think that, between the two civs, it would be more appropriate for Austria to retain the Landwehr name, since that was the name of their main infantry corps. The Prussian Landwehr were reservists. Perhaps the name could be changed to Gardekorps? That would retain their defensive flavor, but they would be named after a main army corps.
 
That is why you need this PlotDistance function, because not every plot within loops’ range will actually be 3 tiles away.
VP doesn’t use any Lua except for UI. Everything is coded in the DLL, so AI can use all features.
We made a few changes here, in 3/4uc, converting PlotIterators into loops. In GitHub you’ll be able to see the files before the change and after the change.

Yeah. Problem is that as far as I can see all the changes you made in this mod regarding the PlotIterator, all changes were only for 1 range, and we need 3 range which complicates the matter a lot, since it can not be solved with a simple loop.
If you agree with this, I might take the time to write a helper class in a separate LUA file to provide all plots in a range from a starting plot.
 
I went ahead and tried to create the function, and here it is:

Code:
function GetAllPlotsInRangeofPlot(startingPlot, range)
    local currentExaminedPlots = {}
    local currentFoundPlots = {}
    local finalPlots = {}
    
    if range > 0 then
        currentFoundPlots[1] = startingPlot
        finalPlots[1] = startingPlot
        
        for local currentRange = 0, range, 1 do
            currentExaminedPlots = currentFoundPlots
            
            currentFoundPlots = {}
            
            for i, currentExaminedPlot in ipairs(currentExaminedPlots) do
            
                local currentExaminedPlotX = currentExaminedPlot:getX()
                local currentExaminedPlotY = currentExaminedPlot:getY()
                
                for direction = 0, DirectionTypes.NUM_DIRECTION_TYPES - 1, 1 do
                    local adjacentPlot = Map.PlotDirection(currentExaminedPlotX, currentExaminedPlotY, direction)

                    if not has_value(currentFoundPlots, adjacentPlot) and not has_value(finalPlots, adjacentPlot) then
                        currentFoundPlots[#currentFoundPlots + 1] = adjacentPlot
                        finalPlots[#finalPlots + 1] = adjacentPlot)
                    end
                end
            
            end
        end
    end
    
    return finalPlots;
end

local function has_value (tab, val)
    for index, value in ipairs(tab) do
        if value == val then
            return true
        end
    end

    return false
end

Infixo could you have a look at it and see if there is something which looks wrong or weird ?
I know the run time of this is horrendous due to the lack of a quick way of checking if a value is present in an array, but I don't think that it is too bad when dealing with ranges as low as we are using it.
 
@De_Genius
I see you are eager to help, so I suggest you test the mod. There’s lots of Lua scripts that need to be tested for various weird conditions. I suggest also that you do not rewrite entire Lua scripts until you’ll get enough skills to actually do that.
But, if you insist on writing them, then the first thing you should do after creating one, is to RUN it in the game and check results and logs.
 
That hews a bit close to the schutzenstand's current bonus, which already scales based on CS status. I agree that something else would be nice though. Maybe the yorkscher marsche promotion could give a bonus to the unit based on the number of great works of music on empire? Like, maybe they heal +1HP on fortify for every GWM?

It seems a good idea (it opens interesting synergies, and brings a new mechanic to a civilization which.is powerful but a bit bland).
Note : I just discovered that the Yorkscher Marsch was a traditionnal march for one Bundeswehr, but not the Austrian one... The German one... So it must quickly be changed to something else quickly (before someone notices :shifty:). Why not simply Regimentsmarsch ?
 
Is it? The Yorkscher marsche was written in 1808 for the Bohemian militia. Bohemia was part of the Austro-Hungarian Empire at the time.

... Was the regiment called the Bohemian militia not actually stationed in Bohemia? They probably were... Depending on what source you look at it will either talk about Prussians or Austrians;19th century borders are so fluid, it's a mess

Regimentsmarsche is more general, so that's probably a good idea anyways. Picking the Yorkscher Marsche was maybe a bit too specific.
 
Last edited by a moderator:
Is it? The Yorkscher marsche was written in 1808 for the Bohemian militia. Bohemia was part of the Austro-Hungarian Empire at the time.

Yes indeed, but the name now associated with the music (Yorkscher marsche) is actually a reference to a Prussian general from the Napoleonic wars... so...
Anyway, happy to be of use. I'll go check other things (more complex things to verify, like the effect of the Waag, or of the Hippodrome).

Edit : We should also begin a separate, private discussion to prepare the 'release thread' by doing a list of all the links, documents and elements needed in the first messages.
 
So... Speaking of the Waag and the Hippodrome :
- Waag : The bonus CP to city (+ GP points bonus percentage) doesn't work for civs other than the Netherlands (which means that a Roman player, after capturing a Dutch city, cannot benefit from these bonus)... I suppose it comes from the fact the Waag counts the number of times the Dutch UA is triggered to calculate the bonus, or something similar
- Hippodrome : Some things aren't right with this UW. First and foremost, the fact that, if a city other than Constantinople build it, this city actually become the Byzantine capital city (but Constantinople keeps the Palace...). Then, the fact that the Game info of the UW doesn't talk about the 'Nike riots' event which happens at the beginning of every new age of the construction of the Hippodrome : 1 turn of rebellion in all cities, then 10 turns of WLTKD in all the empire.
Suggestion : Since this WLTKD bonus is only available 6 times during the game, why not increase the duration of the bonus a bit ?

Spoiler Constantinople isn't the heart of the Byzantine empire, the Hippodrome is... :

20180417004914_1.jpg

 
Can a city other than Constantinople build the hippodrome in a normal game though? Or is this some wackiness with the SDK?
The hippodrome was using the "Capital" table instead of the "CapitalOnly" table. Captial is used only on the palace, and assigns capital status to a city. fixed.

The WLTKD is only in the capital, but the resistance is on empire. We couldn't get WLTKD to trigger on empire. Though now that I think of it, couldn't we have done a for loop? Paging @adan_eslavo

for city in Player:cities() do
or something...

Changed K.K. Landwehr back to Landwehr, changed Yorkscher Marsche to Regimentsmarsche, and fixed hippodrome text/sql. @HungryForFood, what do you think of my proposal to change the name of the Prussian Landwehr to Gardekorps?
 
Last edited:
How about this?

I checked and I wasn't able to any command to find the number of great works on empire via lua. At least nothing is listed in the modding wiki. So my proposal for increased healing on the Landwehr for GWMusic is no good.

I propose that the Regimenstmarsche be reduced to 1:c5culture: culture per turn (down from 3) for Landwehr in cities/forts/citadels. Make it a flavor-booster ability, not a core attribute.
Furthermore, I propose a change to the Standschutzen:
Spoiler :
Current Standschützen
4 maintenance
Available at Rifling
3 :c5culture:Culture and 3 :c5production:Production
750 Production cost
(down from 1000)
+25:c5strength: city defense (up from 20)
+200 HP (up from 150)
+20%:c5production: Production to Land military units
+2 :c5gold:Gold and +1 :c5culture:Culture for each allied CS

City must have a castle
+5% unit supply cap from pop

New Standschützen
4 maintenance
Available at Rifling
3 :c5culture:Culture and 3 :c5production:Production
750 Production cost
(down from 1000)
+25:c5strength: city defense (up from 20)
+200 HP (up from 150)
+15%:c5production: Production to Land military units
An additional +15%:c5production: Production (30%:c5production: total) and 15XP to Gunpowder Units
+1:c5production: Gold and +1 :c5culture:Culture for each allied CS

City must have a castle
+5% unit supply cap from pop
A few reasons for the change:
Gold is extremely valuable to Austria for diplo marriages, and it doesn't make sense for a building based on militia to feed into the marriage mechanic
The per CS ally change from 2:c5gold: to 1:c5production: is a slight nerf, which I think is fair because these per-CS/per-City bonuses are devastating, especially on Diplo civs. It also tightens the building onto just 2 yields instead of 3.
The previous building gave bonuses to all land military, but the IRL institution was a rifle club. Bonuses to gunpowder units should stand out more.
This change essentially makes the building a Gunsmith from EE. When we get around to an EE conversion it will make more sense for this building to be a unique Gunsmith replacement. This change will make the switch back and forth from EE less jarring.

Overall these 2 changes would be a nerf to Landwehr, which is currently OP, and a buff to Standschutzen. The Landwehr and Standschutzen would have more obvious synergy, which is good because they unlock at the same tech.

I think the Regimentsmarsche can stay as is currently is, as long as the power of the effect is downgraded to being a "bell and whistle" upgrade, instead of being a massive boost to cultural economy. At 3:c5culture: per turn, the Landwehr is a major player in the cultural output of this civ, and I don't think that's intentional or fair
 
I checked and I wasn't able to any command to find the number of great works on empire via lua. At least nothing is listed in the modding wiki. So my proposal for increased healing on the Landwehr for GWMusic is no good.

How does the Assyrian Royal Library work ? Since it counts all GWWriting in the empire to calculate the bonus xp, maybe its code could contain something useful ?
 
The Assyrian library is a very specific SQL table. it gives 5XP for every GWLit on empire, and is just a boolean 1/0 to turn on and off. The code is very specific in its use, and it would require rooting around in the DLL to expose GWs of different types in order to give them different effects.

BNW gave almost 0 tools for manipulating GWs. There's no lua hooks for Great work creation, nothing for counting, changing yields or making Great works. The only way to even give free great works is to spawn a free GP of the relevant type, then force mission it to construct a great work, or build an invisible building that comes with a free great work, then immediately delete it. The GW system is an unholy mess, and any fixes to it require extensive changes to the DLL
 
Last edited:
The WLTKD is only in the capital, but the resistance is on empire. We couldn't get WLTKD to trigger on empire. Though now that I think of it, couldn't we have done a for loop? Paging @adan_eslavo

for city in Player:cities() do
or something...
I assume that WLTKD can be done on empire. It will use similar code like Yassa Court. The problem was making resistance only in capital which is impossible.
 
Last edited:
Is there a reason that the Landwehr's Yorkscher marsche lua uses a gamespeed modifier? It's a per-turn bonus like a building, not an instant boost, so wouldn't a flat amount be more appropriate?
I assume that WLTKD can be done on empire. It will use similar code like Yassa Court. The problem was making resistance only in capital which is impossible.
Ah so I have it backwards. We always wanted the WLTKD boost to only be in the capital then. I'll close that issue on github then
 
I changed it to be easy to understand. Maybe tweak turn count to balance it somehow.
 
Status
Not open for further replies.
Back
Top Bottom