[TOT] Things that CANNOT be changed after start

Discussion in 'Civ2 - Scenario Creation' started by Konig15, Aug 1, 2021.

  1. Konig15

    Konig15 Warlord

    Joined:
    Nov 4, 2007
    Messages:
    205
    I'm getting closer to actually working on a scenario, almost got a map down thanks to Nighttime (and THANK YOU!) So now I have to move onto the very basics, which start with, once a game is set in motion, what CANNOT be changed once ithe game is generated.

    Things I know cannot be changed:
    1. Flat Earth
    2. Size of Map

    Things I know can be changed via various means:
    1. Rivers
    2. Terrian under cities
    3. Number of maps

    Things I don't know can be changed
    1. Turn order
    2. Turns counted for merchant bonus/malus (the 200 turn change for non-freight)
    3. Whether or not Global Warming can be turned off (to make pollution far more flexible)
    4. Pollution modifier (outside of techs)
    5. Barbarian generation and Barbarian government (there was an old edit program for this but not for TOT AFAIK)
    6. If the Space Ship mechanic can be used for ANYTHING else.
    7. How to turn on the Throne Room improvements thingie
    8. Native transport abilities and allowed on map capacities for units.
    9. Destroyed Wonders
    10. Locations of Wonders (I think Lua can do this)

    If there are other things that cannot be changed by utilities
     
  2. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,523
    Location:
    Ontario
    That can now be changed using the Lua console, with one of these two commands.

    Code:
    game.rules.flatWorld = false
    game.rules.flatWorld = true
    
    I suppose you could put that in a regular event as well, though I can't see much purpose in it. Perhaps an Age of Discovery scenario where the shape of the world is in some doubt...

    I can't think of a reason why you couldn't write a script to swap two tribes' units/cities/etc., but no one has bothered to do that yet.


    civ.game.globalWarming
    civ.game.globalWarmingCycle

    These might (they aren't properly documented, they were discovered by analysing totpp binary) provide reference to the following part of data:

    GlobalWarmingMemory.png

    Even if they don't, it wouldn't be too hard to get someone to hex edit this for you if you have an otherwise complete scenario.

    You can set this using the lua console, with the tribeObject:
    Code:
    civ.getTribe(0).government = 
    
    With the right hand side being an integer 0-6

    @Knighttime's Medieval Millennium uses it for a "Journey to the New World", I believe.

    nativeTransport (get/set)
    unittype.nativeTransport -> integer

    Returns the 'native transport' settings of the unit type (bitmask).


    notAllowedOnMap (get/set - ephemeral) (since 0.16)
    unittype.notAllowedOnMap -> integer

    Returns the 'not allowed on map' settings of the unit type (bitmask).


    Lua can reverse this by assigning the wonder to a city (or, even assigning it to the nil city).

    Yes, Lua can do that. Cheat mode can delete all wonders from a city, and make them available to be built again.
     
    Konig15 likes this.
  3. Konig15

    Konig15 Warlord

    Joined:
    Nov 4, 2007
    Messages:
    205
    That was very instructive! Thank you!
    Now is number 8 something that can be done via rules.txt or by Lua?

    And also...it's becoming clear I need to switch over to Lua but I have deep problems with scripts of any kind, Paradox games, Fallout mods, and here. They are too dense for me to make heads or tails of AND they are visually disorientating. The second part, in particular, I've compared to Lovecraftian madness, where I look at scripting functions and just want to start shrieking in horror. I hae to say this but I can, considering I'm diagnosed, I'm autistic, and looking at script code as of right now causes instant (albeit low level) autistic meltdown. Fortunately, it don't last long if I look away. See, I get grammar and rhythm intuitively and but I'm almost blind to them cognitively.

    I'm wondering if there's a much MUCH simpler tutorial on Lua. The reason I tend to use events.txt is not familiarity it's that it uses a stupidly simple grammar (outside of flags, which should give you an idea how difficult this stuff is for me), and I'm neither overwhelmed nor confused at looking at Napoleon 3. I can do rudimentary editing of Lua events, like Nappy's admin bonus I can modify, but that's by using the find button and the amount of the bonus. I couldn't understand the workings of the event or recognize it scrolling through.

    I think I might need something more basic than the Lua tutorial. I don't know if you can help, but I thought I'd ask.
     
  4. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,523
    Location:
    Ontario
    I think nativeTransport settings are stored in the saved game, which means that changing the rules.txt file after you start a new game won't do anything. However, since it isn't marked as ephemeral, you can make the change in the console and save the game, and the changes should be preserved. (I think this is the case, anyway.)

    Since notAllowedOnMap is ephemeral, you should be able to change it in the rules.txt and have it stick. If you want notAllowedOnMap to change during the course of the game, you will have to figure out what it should be whenever the game is loaded, and set it to that particular value.

    I did try to find an introduction to programming that used Lua (so I would only have to do the civ parts), but I couldn't find a good one. Having searched again, I found these videos, which might be useful



    You might consider learning some basic programming using Python instead. Python is quite similar to Lua, but it is much more popular.

    You could also try using Scratch. Scratch doesn't have syntax, rather you drag and drop pieces of programming and assemble them kind of like Lego. It can give you some experience programming without worrying about syntax.
     
  5. Konig15

    Konig15 Warlord

    Joined:
    Nov 4, 2007
    Messages:
    205
    That's decent advice but I must ask, use Python and Scratch for what? I know I'm practicing but don't I need a game or something to work ON? And thus make sure the thing actually fires?

    Also on your recommendation, I thought I might ask about the airfield issue. If as you imply it is possible for Lua to register a tile with an airfield, then can it make additive registers? Like two airfields in the same city? And also can there be a "fine" per airfield?

    See I'm interested in decline mechanics and I want to use pollution in this Byzantine scenario as "Pronioia" that is feudal estates that arose under the Komenni that promised more troops but ultimately sapped the treasury leaving the Byzantine state corrupt broke and unanswerable to the Emperor. If airfields can register a production bonus, then maybe polluted squares can too. Keeping administrative control of your cities should be a continuous challenge because it PLAGUED the empire are the end of the theme system.

    I'm assuming if either produced extra shields, those shields would not count for the railroad production bonus? They would be added flat to the city's shield production? Same thing with Supermarkets and food? And trade for Superhighways?
     
  6. Prof. Garfield

    Prof. Garfield Deity Supporter

    Joined:
    Mar 6, 2004
    Messages:
    3,523
    Location:
    Ontario
    Scratch is used to move sprites around a 'canvas' in a sort of rudimentary animation, so that's your game or whatever. And Python will let you print the results of your calculations to the console, even if you don't do anything else with it. My suggestion is based on the idea that programming in general and programming in a specific language are somewhat distinct skills, but when you first learn to program, you need to learn both at the same time. I don't know of a good resource for learning Lua as your first language, which is why I'm suggesting this strategy.

    Since Lua can "see" airfields on the map and can see whether a city is working a given tile, and Lua can change the resources that a city harvests, you can give any sort of bonus or penalty you like based on airfields.

    Yes, they can.

    If the tile has railroad, or the city has Supermarket/Highways, you would just calculate a different bonus, so you could take those things into account if you wanted.

    In general, if you want to change X based on Y, and Lua can change X and "see" Y, you can have any kind of relationship you want between X and Y. The only other limitation is that Lua can only check for things at certain times.
     

Share This Page