More Luxuries

Ah, thanks for asking about this, macheteman. :)

I just subscribed to the More Luxuries version I have up on Steam and tested out the modified Terra map with Sparse resources. I received the same results as your screenshot, as well as some other civs throughout the map. This would probably happen with the default Terra too, since it overrides GetDisabledLuxuriesTargetNumber().

I must have neglected my tweaked Terra map when I updated the Random luxury total to a value dependent on map size (instead of a single number) a while ago. Because of that, it throws off the totals since the Terra map is using its own Disabled total, while its static random total is being overridden, which messes the system up.

I'll have that fixed in the next update.

Coincidently, I’m no longer using GetDisabledLuxuriesTargetNumber() in the new update anyway, since I’m using a weighted system for random luxury selection instead of a purely random one, and I won’t be assigning the disabled luxuries first like the default game’s system and throwing the rest into the random luxury total.

So, I’ll just have to tweak things so that the random luxury total determined for most of the other maps within the AssignStartingPlots file doesn’t override the total specified within the Terra script.
Awesome news! Looking forward to it! I will just play some none Terra maps with your mod in the mean time :)

Love the mod
 
Barathor, I've been following this mod for a while and you've done an amazing job here! You might have seen in the main forum that I'm working on a Wheel of Time mod and I've just started looking into new resources I should add that were used in the books. Olives and tobacco (referred to as tabac in WoT) are two I'd really like to include. Would you mind if I integrated those two luxuries from your mod into mine? With credit, of course (and links back to this topic)!
 
Barathor, I've been following this mod for a while and you've done an amazing job here! You might have seen in the main forum that I'm working on a Wheel of Time mod and I've just started looking into new resources I should add that were used in the books. Olives and tobacco (referred to as tabac in WoT) are two I'd really like to include. Would you mind if I integrated those two luxuries from your mod into mine? With credit, of course (and links back to this topic)!

Sure thing, I'm glad you wish to use them. :)
 
May you place your other mods/fixes to download here, please?
 
Colossal new update released!

I'll update screenshots, original post, and other documentation tomorrow. I'll also post up some spreadsheets I used to create some things, for some feedback.

Here is the raw list of changes, though I still need to edit it and make it less verbose:

1) Tweaked mod title to better represent its features.

2) Fixed a conflict with other mods which add new city-state luxuries.

3) Fixed the modified Terra map included which has been neglected the past few updates.

4) Updated perfume terrain graphics and icon.

5) Smoothed out the slight bit of pixilation on the icon for glass, around its rim.

6) Updated jade terrain graphics so that the rocks aren't too abundant.

7) Tweaked the color of sugar terrain graphics.

8) Added index numbers to all resources within the debug printout summary for much easier testing.
(This is mostly beneficial to other modders.)

9) Fixed a bug which would display the wrong world luxury total within the debug printout summary. The old total used to incorrectly include additional bonus resources placed at starts, strategic resources placed at city-states, oil placed in the sea, and strategic resources placed at starts with the Strategic Balance setting.
(This is mostly beneficial to other modders.)

10) Disabled lots of unneeded print commands (especially pertaining to region creation), while also enabling a few more print commands pertaining to resource assignments. This creates a much more condensed, easier to analyze, debug printout (especially for data relevant to this mod), since things like region creation used to flood it with data. Of course, warnings and rare error occurrence notifications are still all enabled, along with the main notifications describing each phase as the file runs ("Placing City States…" "Placing Natural Wonders…" etc.).

11) Optimized water luxury eligibility for regional luxury placement. Default code required too small of an area. Often, regional water luxuries can not reach their target number as easily as their land counterparts due to limited water tiles that are blocked by other placements -- and even the capital itself! Also, it's no longer a hard value and instead is based of the size of the map.

12) Added a ton more plot list types for better luxury distribution.

13) Very restricted luxuries would often not reach their target during regional placement. Now, a fallback method is implemented to try again and to try and get them all on.

14) Reduced both adjacent clumping of regional luxuries and also very large spreads due to large ripple radii from placement impact sites. The existing code randomized ripple radii from luxury placements, and could create many large blocked-out areas (up to a radius of 3; the size of the workable area of cities!)

15) Added a quinary (5th) and senary (6th) plot list preference for luxuries to utilize.

16) Updated all indices associated with luxury plot list preferences to make placement much more flexible and to utilize new adjustment function.

17) New adjustment function added which scans the map for resource types and adjusts the plot/feature type to the appropriate one before finalizing the map. Terrains are unaltered to maintain intended map bands and keep smoother spreads instead of speckled mixed terrains. For example, this allows cotton to be placed on a hill, if necessary, to reach its target total. Before the map is finalized, that hill will be converted to a flat tile, and if any forest or jungle is present, it'll be removed too. Though, in this example, open hills would be prioritized before covered hills when assigning cotton to the map. This way, the least amount of adjustments need to be made to the map and are only used if absolutely needed.

18) Enhanced determination of region types so assignments are more accurate relative to the other regions currently available on the map. Instead of single hard value and only one search, all checks start at a very high value and decrement down within a loop until a region type is found. This ensures the most appropriate label is applied to regions.

19) Tightened up all luxury weights per region type, and removed unnecessary luxuries which were just diluting the pool. Now they're much more focused and will try to place the most suitable luxuries for the region type.

20) Changed the way random luxuries are chosen. The old method used the Fallback luxury weights and randomly (without using weighted values) chose luxuries to disable until it reached a target number. Then, the rest were assigned to random distribution. Now, random luxuries are chosen first and are chosen randomly using a weighted system similar to the other luxury assignments. Then, the leftover luxuries are all assigned to the disabled list. By doing this, you can slightly favor more flexible luxuries for random distribution throughout the map, especially water ones which also help make the coasts more interesting.

21) New function added: GetRandomLuxuriesTargetNumber(). This way, map scripts can override values, per map size, similar to the old GetDisabledLuxuriesTargetNumber() which is no longer used since random luxuries are chosen using a different method.

22) Removed unnecessary "regional" restrictions between whales/jungle, pearls/tundra, and crab/desert to make regional assignments more flexible.

23) Elephants will now be seen in the desert and grass. Salt has been tweaked and is now more of a hill luxury, it also favors tundra and deserts more than plains, since the less fertile zones need more help. Sugar will now be seen on jungle and non-tundra forest tiles, and will no longer be converted to marsh during map creation (no more patchy marsh sugar tiles speckled through the jungle). Some other small tweaks have been made to the rest of the luxuries.

24) Increase ripple radius of random marble placements from 6 to 9 to help spread out distribution a little better; especially since the total amount placed on maps is usually pretty limited.

25) Fixes PlaceSpecificNumberOfResources() and adds a new check for marble and correctly applies the second layer of impact values to it. This is used to place them as a 2nd luxury type at start locations and is the only other method, outside of PlaceMarble(), which places marble. Originally, the impact radii on the marble table was missing and marble only applied a small ripple radius on the main luxury impact table. So, you could wind up with marble placements very close to each other -- one within the workable area of the capital and one or more just outside it. This will also help spread out marble placements and makes things much more efficient (a capital doesn't really need more than one marble, it's better to have another city obtain it -- hopefully a different civ too!).

26) Capitals will now always receive 2 copies of their regional luxury, instead of relying on an overcomplicated fertility rating process which triggered very often anyway. This way it's simpler and most importantly, consistent (Legendary Start will still add +1). Also, this enhances gameplay since it gives ALL civs trading potential from the very start, as long as you improve those tiles. Plus, there's better ways to improve the habitability of starting areas than to throw an extra luxury or two (from a yield standpoint, most only increase gold; food or hammers are more important).

27) Fixed an occasional bug involved with the lower half of the Great Barrier Reef where water resources could incorrectly placed on top of it. Now, when NW's are placed, it checks for the GBR and appropriately applies impact values to its lower half on the luxury, strategic, and bonus impact tables.
 
Thank you very much.
 
Small new update released: v 141. Documented changes in the original post.

Version 141 is also available here at Civfanatics.

Please let me know of anything that you might consider to be a bug. Also, if you were having problems with the old version, please let me know if these latest updates resolved things.
 
Here's a look at the new luxury weights:

Default Game:
Spoiler :


Mod:
Spoiler :


I like to group the luxuries into different classes. The four are basically: water luxuries, hill luxuries, forest luxuries, and open luxuries. Within some classes, are subclasses. The "forest" one is split into forest and jungle luxuries. The open one is split into plains and grassland luxuries.

I concentrated each region type towards a certain class and, if available, subclass. Desert and tundra regions are little different, as they don't have a lot of luxuries to place within their harsh terrain, so they utilize the flexible hill luxuries. Though, they each focus on different hill luxuries to diversify things, along with their one iconic luxury: incense or furs. However, they both use a heavy salt weight since this luxury can really help out these low food areas.

I removed luxuries which didn't quite fully belong in certain regions, so the pool is less diluted. In the default game, sugar, citrus, and cotton belong to the desert region in hopes that a river is present to produce flood plains (or other things they belong to that are neighboring the desert). If not, whoever is in that region is out of luck. Others like spices, used to belong to the grass and plains regions, but are only placed on jungle, forest, or marsh. If there aren't a lot of those features available, then it's out of luck. Spices was one of the very restricted luxuries that more often than others failed to meet its target total during regional luxury placement.

Also, regarding water luxuries, the chance of assigning those is actually lower than the percentages shown for the normal regions since they depend on a coastal start and for enough water to be available, which I've dramatically increased the minimum value of, depending on the amount to be placed, instead of a hard value of only 12. This ensures all water luxuries can be placed and they're not too clumped together with the new impact radii, because in the default game, water luxuries failed to meet their regional target too often as well.

Hill luxuries are the most flexible luxury types as they can go on any terrain (and remember, I have the new function which will also convert any flat terrain to a hill, if necessary). If water is present, water luxuries are also very flexible. So for the hybrid region type (when there isn't enough of a certain attribute to label the region) I chose to focus most on the hill luxuries for the versatility and also applied a little heavier weight towards the water luxuries in case the start is coastal and has enough water.

For city-states, it's pretty much the same deal. Though, hill luxuries are weighted less for city-state assignment since city-states get to choose from a pool of those assignments anyway -- it's not just a one shot deal if it's assigned. Also, water luxuries are weighed much heavier since a great majority of city-states are coastal and water luxuries are very versatile. The water luxuries aren't too heavy though, because I don't want all of them snatched up before the random assignment method gets a chance to. (note: I'm still watching these values and may reduce them a bit more, if they grab all the water luxuries too often.)

The old fallback list has been renamed to "random" because I scrapped the old way random luxuries are assigned and created a new one. However, this list is still used as a fallback for the other regions if they happen to run out of luxuries within their lists or if a modded-in region type is undefined.

The old method didn't utilize the weights for random and disabled assignments. It randomly chosen the disabled luxuries first until it reached the target number and then it simply assigned the leftover luxuries to random assignment.

My new method assigns the randoms first, and then disables the leftover ones instead. It also utilizes the weight system, since assigning the randoms is a bit like the fallback method: you probably want the most versatile luxuries. So, like the city-state list, the hill luxuries are weighed a little heavier and the water luxuries are very heavy, since they make really great random luxuries to sprinkle throughout the map, don't interfere much with what's going on inland, they make the coasts more interesting to search through instead of seeing mostly fish, and they make certain coastal city spots more enticing than settling more inland.
 
Here's a look at the new luxury indices:

Default Game:

Spoiler :


Mod:

Spoiler :


As you can tell right away, luxuries have become much more versatile! :D

Also, I've added a 5th and 6th plot list index preference to most luxuries, instead of only 4.

Also, there are a ton more plot lists available to handle all these unique requirements (the first 4 lists are from an earlier version of this mod):

Spoiler :


This is all possible because of a new function which adjusts the plot type and features of the tile to suit the luxury. Terrains aren't touched to maintain the appropriate terrain bands on the map and to not speckle and mix them up as much as you would see in Civ 4. So, for example, cotton can be placed on a jungle or forest if needed -- it can even be a hill! When map creation is near completion, it scans each tile for a resource and makes the appropriate adjustments. The cotton would have any forest or jungle removed and its tile would be flattened if a hill is present.

Also, these adjustments will only have to be made if necessary, since each class of luxury has priorities. For example, an open luxury will prioritize flat open terrain first, then flat covered terrain next since the only adjustment needed would be to remove the features. Next is hilly open terrain since the only adjustment needed would be to flatten it. Finally, hilly covered terrain is searched for if it's still needed since that will take two adjustments to suit these luxuries.

Marshes are least priority because I don't want them to be disturbed much since their quantities on the map are already limited, but I still want them available since I rather get another needed luxury on the map than have another marsh tile. Only a few luxuries keep the marsh: sugar, spices and dyes (removed truffles).

With regards to hill luxuries. During adjustment, they always are converted to hills (which looks better with mine improvements and is a bit more natural from the game's perspective since you can just mine normal flat terrain -- same goes for farms and flat land, if you don't count the presence of rivers. Also, why get 2 food from a flat grassland copper mine? haha). However, they're more flexible when it comes to coverage, and will keep any forests or jungle if they're present, which also helps balance things.

Also, these hill luxuries favor the harsher regions first, so things are more balanced alongside the other luxuries which mostly require the fertile terrains. Regarding priorities, the reason hill luxuries prioritize flat open terrain over hilly covered terrain (which wouldn't need an adjustment) is because I still want to give deserts equal love from the hill luxuries with the earlier priorities.

Also, as I noted elsewhere, salt has been made into more of a hill luxury and favors both tundra and desert more since its a potent mined luxury that can help out the food situation in areas.

There are some other tweaks. Most plains and grass luxuries are now interchangeable instead of only being placed on one of those terrain types -- instead they just favor one of the other. Also, wet and dry (having fresh water) has been removed since it wasn't really needed and only caused clumping at rivers at times.

Also, Ivory used to be a very restricted luxury. Now, it's a great deal more versatile and can be seen on grasslands and even deserts (there are desert elephants, after all, and they definitely traverse through them, at least). I may have even placed them in non-tundra forests or jungle if I could, since it's realistic and because it would take advantage of the camp luxury which can keep those features, but for some odd reason, a tree clearing process was never assigned to the graphics of ivory and I don't know how to do it.
 
Would you say compared to an umodded Standard map that there is a much greater QUANTITY of overall luxuries?

I don't really understand any of the files and stuff, but I'm under the impression that there is almost always a certain number of luxuries and copies on a map that can't be exceeded, right? This mod doesn't change that?

Like I said, I'm not familiar with the plotting mechanics. The interesting and diverse new luxuries certainly make the game much more fresh, but I can't tell from my recent games if there has been a large increase in luxuries amongst the civs.
 
Would you say compared to an umodded Standard map that there is a much greater QUANTITY of overall luxuries?

I don't really understand any of the files and stuff, but I'm under the impression that there is almost always a certain number of luxuries and copies on a map that can't be exceeded, right? This mod doesn't change that?

Like I said, I'm not familiar with the plotting mechanics. The interesting and diverse new luxuries certainly make the game much more fresh, but I can't tell from my recent games if there has been a large increase in luxuries amongst the civs.

The quantity is nearly identical on a Standard map. The only reason I say "nearly" is because of very slight tweaks, such as:

1) Regional luxuries will almost always reach their target total now when being placed on the map instead of losing any.

2) In the default game, most times a capital receives 2 copies of its regional luxury within its workable area (plus the bonus secondary luxury type). Though, sometimes a capital would only receive 1 copy of its regional luxury, and even less often it would receive 3 copies of its regional luxury. Now, it's a standard 2 copies all the time.

- - -

Oh... but you play on Terra, correct?

This may explain things best:

Spoiler :


So, on Standard, it will be pretty much identical at 20 total luxury types utilized.

Actually, in the default game, there really isn't enough luxuries for the larger Terra maps. Even with this mod, there probably still isn't enough for Huge Terra (which is huuuuuge... it's not very practical to play on).

In the comparison, it looks like Duel, Tiny, and Small receive one less type, but they're actually still one higher than the amount of types usually used on maps of those sizes if you look at the non-Terra, standard map type totals.

Large and Huge sizes receive a bit more because they really needed it, plus they'll function much better since each civ will receive their own unique copy of a regional luxury, instead of having to share copies. On the modified Terra, you can have up to 16 civs with unique regional luxuries.

Though, at the end of the day, for every one luxury type we're speaking of (which usually pertains to random luxury type totals) this is mostly what it means:

1) 1 more luxury type to add to the pool that roughly 25% of city-states may utilize. (On standard, that would be an average of 4 city-states. So, most times, it probably won't be seen anyway.)

2) 3 more luxury placements of that type on the whole map. Yes, that's it... 3 copies. (I'll be addressing determination of random luxury target totals in the next patch or two, since the default method isn't working properly.)
 
The quantity is nearly identical on a Standard map. The only reason I say "nearly" is because of very slight tweaks, such as:

1) Regional luxuries will almost always reach their target total now when being placed on the map instead of losing any.

2) In the default game, most times a capital receives 2 copies of its regional luxury within its workable area (plus the bonus secondary luxury type). Though, sometimes a capital would only receive 1 copy of its regional luxury, and even less often it would receive 3 copies of its regional luxury. Now, it's a standard 2 copies all the time.
Got it! Thanks for the write up...I'm not sure if I really still understand it all, but my fears are certainly alleviated! Thanks for the awesome mod :)
 
Hi,

Count me among those who registered mainly to compliment you on a fantastic mod. :)

I do have a bug (I think) to report, though.

It seems to only happen when your mod is loaded. I get a CTD late in the game (after I've been playing a couple of hours) at the end of a turn, when the game says it's processing the barbarians' turn. If I reload the game (or an earlier save), I always get a CTD on the same turn. (In that game. It varies which turn from game to game.) Hence, I can't play past a certain point. I don't think I've ever had it happen before 1000 AD, after starting in the ancient era. I've tried different maps, including basic ones like Continents, so I don't think that has anything to do with it. I am new to Civ V, though, and it's my first Civ game. Had it a month or so now, I guess.

The only thing I can see in the logs that looks like an error is the following, from the database log:

[43021.274] columns StrategicViewType, TileType are not unique
[43021.274] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'

Considering what I know about programming (a little bit), I find it strange the symptoms I'm getting could be related to your mod, but I'm grasping at straws at this point. Maybe it's just a bug in Civ V or a graphics driver problem, and I have to hope for an update.

I'm playing the Mac App Store version and I have G&K, BNW, and all the DLC's.

Any thoughts?
 
Thanks, oakdragon, and welcome to CFC!

Those error messages you've listed are actually from the default game and are usually seen in the log.

By any chance, are you playing on larger map sizes, such as Huge? I believe Huge maps can really bog things down late in the game and demand a lot of memory -- which is already limited since it's only a 32-bit app. Having any units automated makes it a bit worse, I believe. Also, long play sessions without restarting the game can make things even slower due to memory leaks. These are just some things I think I remember reading at one time, I'm not sure how accurate they are since I usually only play on Standard maps. But Huge maps definitely have some difficulties when a game starts to reach the later eras.
 
Thanks, oakdragon, and welcome to CFC!

Those error messages you've listed are actually from the default game and are usually seen in the log.

By any chance, are you playing on larger map sizes, such as Huge? I believe Huge maps can really bog things down late in the game and demand a lot of memory -- which is already limited since it's only a 32-bit app. Having any units automated makes it a bit worse, I believe. Also, long play sessions without restarting the game can make things even slower due to memory leaks. These are just some things I think I remember reading at one time, I'm not sure how accurate they are since I usually only play on Standard maps. But Huge maps definitely have some difficulties when a game starts to reach the later eras.

Thanks! :)

Nope, I've only ever played a huge map once... almost always standard. It does sound like it might be a memory leak. One would think having 8 GB of RAM would be enough. *sigh* Hopefully a future Civ or OS update will fix it. Thanks for your time. :)
 
I don't know if it's related to the "bug" I already posted, but I found another bug which may be related to your mod (I haven't noticed it in modless games).

Whether the Great Barrier Reef wonder is supposed to be two tiles or not, I don't know (I think it looks good that way, actually), the game is counting it as two separate wonders. As you'll see from my screenshot, there are two alert icons on the right. Once says there's two natural wonders left to find; the other says there's one.

This is on a Fractal map with only your mod loaded.


edit: This was all under version 1.3.3 of the Mac Campaign (App Store) Edition. 1.3.4 just came out, finally integrating the "Fall Patch", so I'll have to see how that changes things through further testing.
 

Attachments

  • Screen Shot 2013-12-17 at 3.42.50 PM.jpg
    Screen Shot 2013-12-17 at 3.42.50 PM.jpg
    369.4 KB · Views: 171
I don't know if it's related to the "bug" I already posted, but I found another bug which may be related to your mod (I haven't noticed it in modless games).

Whether the Great Barrier Reef wonder is supposed to be two tiles or not, I don't know (I think it looks good that way, actually), the game is counting it as two separate wonders. As you'll see from my screenshot, there are two alert icons on the right. Once says there's two natural wonders left to find; the other says there's one.

This is on a Fractal map with only your mod loaded.


edit: This was all under version 1.3.3 of the Mac Campaign (App Store) Edition. 1.3.4 just came out, finally integrating the "Fall Patch", so I'll have to see how that changes things through further testing.

That's actually working as it was intended to in the default game. The GBR has always been two tiles and produces two discovery alerts, each with +1 happiness. This mod hasn't altered that. :D
 
That's actually working as it was intended to in the default game. The GBR has always been two tiles and produces two discovery alerts, each with +1 happiness. This mod hasn't altered that. :D

Huh. Weird that it counts as two separate wonders. But ok. :D
 
They'll have to restrict to make it only one tile soon :(
 
Top Bottom