The Age of Reformation (Version 2.0)

Hi civ2units,

I believe I tested your scenario a little over a year ago and I remember enjoying it very much. It was very well crafted and balanced with amazing graphics and full of historical references.

As I recollect I played as the main protagonist, the Habsburg Empire (as your were still working on the events for the other powers), and it was very challenging with many many interesting lua events and effects. I can only imagine that you've managed to polish it even more since then. :)

I encourage anyone who's fascinated by the period to have a go at this one.

Congratulations on your latest release! :thumbsup:
 
just so you're aware, norton antivirus gave a false-positive for Tiles.dll being a threat and deleted it. Restored but not sure what that was about...
 
This looks very interesting. I'm curious about the victory conditions though. It appears that most civs can satisfy their victory conditions simultaneously. So if you meet your civ's objectives and 2 or 3 AI civs also meet theirs, you win the game?
Many thanks tecumseh :thumbsup:

Unfortunately I don't know how to use the victory point settings from the game itself if more than one civilization is playable. So I decided to use an own victory system were the player has to conquer certain areas of the map.
If you meet your victory conditions until the end of the game you will win, regardless if the AI theoretically has also meet their own victory conditions.
 
just so you're aware, norton antivirus gave a false-positive for Tiles.dll being a threat and deleted it. Restored but not sure what that was about...

That's strange. Before I've uploaded the files I checked them and my antivirus (G Data) didn't find anything.
I've now downloaded the files and made a check with my antivirus and Avast Free Antivirus too. Again here are no founds.

Like you write I think too it must be a false positiv.
 
I think .dll files spook those programs sometimes no matter what you do.
 
Hi, I've found a small bug in /EventsFiles/onUnitDefeated.lua
Code:
-- MESOAMERICAN ALLIANCE (CIV NO. 5 CONTROLLED BY THE PLAYER) --
--
-- Mesoamericans are able to plunder enemy trade units
-- Supply Wagon
if loser.type == object.uSupplyWagon and object.pMesoamericanAlliance.isHuman == true and winner.owner == object.pMesoamericanAlliance then
    local dialog = civ.ui.createDialog()
        dialog.title = "Sacrifie for Xipe Totec"
        dialog.width = 700
    local multiLineText = "Our warriors have captured an enemy supply wagon and seized goods worth of 200 ducats. The foreign traders were sacrified to Xipe Totec, god of rebirth, agriculture, the seasons and craftsmen."
        text.addMultiLineTextToDialog(multiLineText,dialog)
        dialog:show()   
    object.pFrench.money = object.pFrench.money + 200
end
object.pFrench.money = object.pFrench.money + 200
should be:
object.pMesoamericanAlliance.money = object.pMesoamericanAlliance.money + 200
 
Last edited:
Also, Rebel Xebecs are being spawned next to Greenland (see pic) for some reason
Screenshot_2024-04-09_03-43-31.png
 

Attachments

  • Screenshot_2024-04-09_03-43-49.png
    Screenshot_2024-04-09_03-43-49.png
    75.3 KB · Views: 31
Also, Rebel Xebecs are being spawned next to Greenland (see pic) for some reason
View attachment 688638
This is some 60 turns into the game (me playing as French), but Xebecs start spawning from the beginning. I couldn't find them being created in this location in event files (that's how I've found the above bug), so I think that @civ2units left Barbarian activity above the "Villages only" level.
 
Last edited:
This is some 60 turns into the game (me playing as French), but Xebecs start spawning from the beginning. I couldn't find them being created in this location in event files (that's how I've found the above bug), so I think that @civ2units left Barbarian activity above the "Villages only" level.

I'm sure I've set Barbarian activity to "Village Only". Unfortunately I can't explain your screenshot with the Barbarian xebecs and don't know how this could be solved.
 
I'm sure I've set Barbarian activity to "Village Only". Unfortunately I can't explain your screenshot with the Barbarian xebecs and don't know how this could be solved.
With lua,

first define apropriate zones on map for these to be.
Then when any unit is active, if it is barbarian, if it is Xebec, if it is not in defined zone then destroy it ?

;)
 
I'm sure I've set Barbarian activity to "Village Only". Unfortunately I can't explain your screenshot with the Barbarian xebecs and don't know how this could be solved.
I double checked your SCN file through hex editing and can confirm that your Barbarian activity is set to "Village Only", i.e. Offset 685 is set to 00.

1713018929682.png


With lua,

first define apropriate zones on map for these to be.
Then when any unit is active, if it is barbarian, if it is Xebec, if it is not in defined zone then destroy it ?

;)

As Dadais indicated you can use lua to delete unwanted Xebec from any zone on the map you deliminate.

In this case, you can first deliminate your zone by creating a polygon (which can easily be done using the Prof's lua template "Start Polygon Script " feature which can be accessed within the game with the CTRL + Shift + F4 combo)

1713019191975.png


In this example, I created a polygon that cover the area west of Greenland and east of Labrador which comes out to the following map coordinates

Code:
local Xebec_Free_Zone_polygon = {{34,0},{62,0},{71,9},{71,33},{80,42},{64,58},{49,43},{47,43},{34,30},doesNotCrossThisX=2}

1713019867087.png


Of course, if you need the zone to be larger or have multiple such zones you would need to modify the coordinates or create one or more polygons.

Then you just write this code that ensures that any Rebel (aka Barbarian) Xebec unit that starts its turn in this zone will be automatically deleted at the beginning of each turn:
Code:
    if turn >= 1 then
        for activeUnit in civ.iterateUnits() do
            if activeUnit.owner == object.pRebels and activeUnit.type == object.uXebec and gen.inPolygon(activeUnit.location,Xebec_Free_Zone_polygon) then
                civ.deleteUnit(activeUnit)
                civ.ui.text("Xebec Deleted")
            end
        end
    end

The "civ.ui.text("Xebec Deleted")" part of the code is optional. It depends if you want to have a message or not when the unit(s) get deleted.

I've successfully tested this in the onTribeTurnBegin.lua file because the code will run at the beginning of each turn. I've attached the file to this post (I changed the extension to txt which you will have to change back to lua). You just need to add it to your EventsFiles folder.

I hope this is helpful.
 

Attachments

  • onTribeTurnBegin.txt
    871 bytes · Views: 3
Last edited:
Hmmm, maybe you also want to have Castles (City walls) preserved on city conquest. On my first playthrough as Mesoamericans, Bakhchisary changed hands several times and was ultimately destroyed. Same thing happened to Oran on my second playthrough (as French). I'm currently playing as French again. Both times (as French) I noticed a lone neutral settler (from Rome, but how?), blocking my path to Florence. Ultimately it didn't change much as I was willing to wait until Independents declare war on me for demanding tribute every turn.
1st pic is what happens when a city is deleted during game (other scripts still run fine).
2nd pic is centered on Neutral settler (the only one in the game so far). Not homed to any city, it's probably the same one previously mentioned.
 

Attachments

  • Screenshot_2024-04-08_07-11-45.png
    Screenshot_2024-04-08_07-11-45.png
    218.7 KB · Views: 30
  • Screenshot_2024-04-14_17-13-24.png
    Screenshot_2024-04-14_17-13-24.png
    270.1 KB · Views: 30
Last edited:
That's interesting. I'm using 'CityPopulationLossAttack, 2' and 'CityPopulationLossCapture, 1' to avoid city destruction.
Having castles in every city, even if they where conquered, seems to be a good solution. Although it would make the wonder "Holy Roman Empire" obsolete, but this wouldn't be a big issue.
 
Top Bottom