Search results

  1. PawelS

    Need help with a mod limiting the number of cities

    Hello, I'm new to Civ6 modding, I did some Civ5 modding though. I need help with making a mod that limits the number of cities you can have. The limit, let's call it L, should be equal to E + 5, where E is the current era number (1 to 9). The following rules should apply to all players (human...
  2. PawelS

    Problems when playing with "No Characters"

    I don't like the Crusader Kings style character micromanagement, so I'm playing with the "No Characters" option. There are some problems with it though: 1. The diplomacy is very lacking. When I'm at truce with another nation, it's OK: I can declare war or make peace. But when I'm at peace, I...
  3. PawelS

    Need help with DLL modding

    So I managed to create a DLL mod using Dale's guide, but I have no idea how to make it actually do something. For example, I want to change the way the number of VPs to win is calculated, so I need to replace the original Game.getVPToWin function with my own version. How do I do it?
  4. PawelS

    Visual diversity of units

    I'm going to create units that are the same unit type but look different for different civs, using a similar method that is done with Settlers in the normal game - by setting UnitArtInfoCulturalVariation to true, and using the ArtStyleSuffix of a civ. Questions: 1. If I change the...
  5. PawelS

    Multiple improvements with NearbyEnemyDamage

    I found something interesting in the source code: when a unit is next to two or more enemy improvements with NearbyEnemyDamage, it will get damage only from one of these improvements, and it's not guaranteed that it will be the one with the highest damage. The following function: bool...
  6. PawelS

    Water-based improvements

    I'm going to add an improvement type that can be built on water tiles without resources (coast only, no two adjacent.) I can allow workboats or embarked workers to build it and it should work fine for the human player, but (when I look at the DLL code) it seems the AI won't build them. Is there...
  7. PawelS

    Allowing the AI to produce a unit, only faith purchase for humans

    As the title says - if I want to make a unit buildable by the AI, but only purchasable for faith by human players, how do I do it in Lua? Events like PlayerCanTrain or CityCanTrain don't seem to offer any way to distinguish between producing the unit and purchasing it for faith.
  8. PawelS

    City Planning Mode

    A simple UI modification that should be useful in planning where to found cities. Download and instructions here. Any feedback is appreciated.
  9. PawelS

    How to detect key pressed

    Sorry if I'm asking something obvious, but it's not obvious for me: how do I detect in Lua when a specific key (or key combination like ctrl + something) is pressed? Bonus question: is the 'X' key used for anything in Civ5? If not, I'm going to use it for showing the city limits in my mod.
  10. PawelS

    Questions about using a custom DLL

    I'm thinking about using a custom DLL in my mod, to be able to use the various fixes and modding capabilities included in them, and in the future use it as a base to make my own changes. I have some questions: 1. What are the differences between Whoward's VMC DLL and the Community Patch DLL...
  11. PawelS

    Strange XML behavior

    I create a table using SQL: CREATE TABLE CoA_CityNames ( 'Code' TEXT NOT NULL, 'Number' TEXT NOT NULL, 'Name' TEXT PRIMARY KEY, 'Key' TEXT); And then fill it using XML (only one row for now): <GameData> <CoA_CityNames> <Row Code="DRE" Number="001" Name="Paradera"/> </CoA_CityNames>...
  12. PawelS

    How to quickly spread a religion for testing purposes?

    I need to test some religious aspects of my mod, and therefore I need a religion to be present in several cities. Is there a way to do it quickly? Spawning a prophet or missionary using FireTuner doesn't work, as the spawned unit won't have a religion.
  13. PawelS

    Problems with browsing the site (including forums)

    Lately I have serious troubles when browsing the CivFanatics site and forums. Sometimes the pages load very slowly, sometimes it just stops with a partially loaded page, and all I can do is to hit Refresh to try again (usually with similar results, but sometimes I'm lucky enough to see the...
  14. PawelS

    How to mark undiscovered resources on the map

    I want to display '?' icons on the map in places where there are undiscovered resources (when resource icons are turned on). Is there a way to do it without DLL changes? I checked ResourceIconManager.lua, but, if I interpret it correctly, it relies on events that are fired only when the resource...
  15. PawelS

    Idea: City State unique benefits

    It's not a mod request, as I'm going to do it myself (and use in my mod, but not in the first version, which I'm going to release as soon as possible). But perhaps someone did it before, so if there exists a mod (or a mod component) that does something similar, let me know. The idea is that...
  16. PawelS

    BE style policy trees

    Has anyone accomplished making a policy system that works like in Beyond Earth, with "synergy bonuses" for certain numbers of policies in rows and columns? I like the idea a lot, and it would be great to bring it to Civ5.
  17. PawelS

    BuildFinished event fires twice

    I created a function that generates a new resource, when a Great Person constructs a special improvement. That improvement is removed and the resource appears somewhere on the map. I used the BuildFinished event for this, but it behaves in a weird way: it fires twice, and both instances seem to...
  18. PawelS

    Changing unit AI type from Lua

    Is there a way to change a unit's AI type using Lua, without killing the unit and creating a new one? I can't find a function that does it, but perhaps I'm missing something...
  19. PawelS

    Questions about Great People and AI

    There are no Great Works in my mod (so far), and no Writers, Musicians or Tourism. So I'm going to give my version of the Great Artist two abilities: start a Golden Age (like Great Artist) or create a culture boost (like Great Writer). I have 3 questions: 1. Will such unit cause problems with...
  20. PawelS

    How to iterate through all columns in a table?

    Iterating through all rows in a table is easy, and used in many places in the game's Lua code: for row in GameInfo.TableName () do [some code here] end But would it be possible to iterate through all columns in a table, and get the names of these columns as text strings? It would be very...
Top Bottom