Caesar's Gallic Wars

Congratulations on the release, I already had the chance to see it, and I can assure everyone it is great. :)

Now a bug report, as there seems to be a regression regarding the buildRestrictionsUnits list, conditionMet refers to defaultBuildFunction which is not in scope. Replace lines 2177-2179 with this and it should work again:
Code:
   ["romanCavalry"] = {unit=civ.getUnitType(72), conditionMet=function (city, state) return civ.hasImprovement(city, civ.getImprovement(18)) end}
   ,["scorpioArtillery"] = {unit=civ.getUnitType(70), conditionMet=function (city, state) return civ.hasImprovement(city, civ.getImprovement(17)) end}
   ,["onagerArtillery"] = {unit=civ.getUnitType(71), conditionMet=function (city, state) return civ.hasImprovement(city, civ.getImprovement(17)) end}
Thanks a lot from me as well!
Just to be sure, that means if I want to set the condition such that it works like "default AND additional Condition", then I have to actually write the conditionMet such that it contains the default? Like "tribe.hasTechnology(unit.requirement) and civ.hasImprovement", we cannot access the default function directly?
 
If you want to use defaultBuildFunction in conditionMet, then just pass it as a parameter. :)
 
Ah! Right, of course - that's what I planned to do anyway! :D
Thanks for the tip!

I think for GW here it works as in in the bugfixed version, but I'll check the issue for Philipp of Macedon and perhaps include it there :)
 
Downloaded scenario and it looks great, this may be a stupid question, but when I press 'k' nothing is happening. Does anyone know what I am doing wrong? Do I need to run some sort of file for lua to work?
 
Do you have the test of time patch project installed?

If so, what unit are you pressing k with and where? Not all of them can shoot from every type of terrain
 
I do have the patch project installed. Trying to get the ranged units to fire projectiles.
 
Can you possibly attach a save? I'm not sure why it isn't working for you. You may want to go into cheat mode and bring up the lua console (I think it is either ctrl + f3 or shift + f3) to see if there is any error.

Did other events work for you? For example the opening text and song?
 
Can it be that the Lua patch in ToTPP is not activated?

This is my current problem, too and that´s why you haven´t received a feedback from me about playing your great scenario that opens a new dimension in playing Civ 2 ToT. If a working Civ 2 ToT exe was updated by ToTPP, it seems this exe cannot be updated again by ToTPP for activating the lua patch, that was not activated before in my current ToTPP installation. Now the problem starts when using Win 10, as it is on my pc:

The official Civ 2 ToT patch does not recognize my normal Civ 2 ToT exe for the update of that exe, that is needed for the installation of ToTPP. So a new direct patching of that exe by ToTPP isn´t possible. I have to wait until I can do a new version of the the needed Civ 2ToT exe with the official Firaxis patch on my very old Win-XP laptop and than to transfer that patched exe to my Win 10 pc, so I can receive a patched Civ 2 ToT exe on that pc that can be recognized by ToTPP. This is somewhat crazy :hammer2:but I hope I will have such an exe during this week.
 
This also may be a stupid question, but am I supposed to download lua from somewhere? I thought it was in the scenario folder and active, but maybe I am forgetting a step. When I hit f3 plus shift or f3 plus ctrl in cheatmode nothing happens.
 
You don't need to download Lua separately -- the necessary components of that are included in the recent versions of TOTPP. If you have TOTPP installed and working, within the TOTLauncher, there are two checkboxes for enabling Lua events scripts -- make sure those are checked. Then in cheat mode, it's actually all three keys together (Ctrl+Shift+F3) if you want to bring up the Lua console.
 
Just to confirm - you don't launch the game via the civ2tot.exe any more. You run the ToTPP launcher which launches the game. There are several check boxes and you need to ensure that enable lua scripting is active.
 
An incredible scenario JPetroski :goodjob:
Units_druid.png
 
This also may be a stupid question, but am I supposed to download lua from somewhere? I thought it was in the scenario folder and active, but maybe I am forgetting a step. When I hit f3 plus shift or f3 plus ctrl in cheatmode nothing happens.

I may have experienced a similar problem when first play testing John's scenario, which I was able to resolve with the following action:

In the 0.015.1 zip file there is a folder called lua which contains the following civlua.lua, functions.lua and init.lua files.

If you haven't done so already, you need to place this lua folder in the root directory of your ToT installation. Once I did this the lua events, including the K key function started working.

I hope this fixes your problem.
 
I've played through the first 12 turns and I'm about to cross the Rhine to eliminate Ariovistus once and for all. The game mechanics are working very well - with one notable exception. This might be a lua bug. During the winter months, the movement values of my units are halved (as they should be). However, if I save the game during a winter month and then reload, the movement values revert to their summer default. For some reason, reloading the game erases the winter-specific terrain movement costs. This is odd because the winter terrain graphics still load perfectly. Does anyone else have the same problem when reloading the game during winter?
 
I've played through the first 12 turns and I'm about to cross the Rhine to eliminate Ariovistus once and for all. The game mechanics are working very well - with one notable exception. This might be a lua bug. During the winter months, the movement values of my units are halved (as they should be). However, if I save the game during a winter month and then reload, the movement values revert to their summer default. For some reason, reloading the game erases the winter-specific terrain movement costs. This is odd because the winter terrain graphics still load perfectly. Does anyone else have the same problem when reloading the game during winter?
Thanks for the report! Ill take a look.

Does this persist on the turn after the load too? One (though unlikely im afraid) possibility might be that it is more of a display issue on the first turn. Or calling the procedure in onLoad is inadequate for the rules part ...
Ill try to get a fix then we can take a look :)
 
I'll have to playtest it once I get to a Civ2-enabled computer, but just in case someone wants to playtest right away - I moved the setting of winter rules and graphics from onLoad to onScenarioLoaded - does that help? :)
 

Attachments

  • Events_20180515.zip
    26.1 KB · Views: 207
Yes, that completely fixed the problem! Thanks Grishnach :thumbsup:

Does this persist on the turn after the load too? One (though unlikely im afraid) possibility might be that it is more of a display issue on the first turn. Or calling the procedure in onLoad is inadequate for the rules part ...
Ill try to get a fix then we can take a look :)

To answer your question, the problem did not persist on the turns following the load. I'm glad you isolated "onLoad" as the source of the issue.
 
I have a further playtest report. My armies reached the gates of Aduatuca in the winter of 56/55. However, the city starved itself into oblivion! Before I had a chance to capture it, Aduatuca simply disappeared. The reason for this is that it was producing Ambush units, which are food-eating settlers. The Belgic cities love creating Ambush units even though these units are immobile!

John, what is the purpose of the Ambush unit? Why are they immobile food-eating settlers? I understand the desire to create a unit that can intercept "forced marches" (airlifts), but that's not what they do. I believe they need to have movement points and possess the "can attack air units" flag in order to intercept forced marches.
 
They aren't supposed to have the settler flag, that's a good old fashioned "I goofed" that didn't come up in the playtest. Thanks for.catching it. I'll upload a fix plus Grishnach's latest events in the next day or so.
 
According to my tests, air units need to have the "air superiority" (3) role in order to intercept forced marches. (The fighter flag is apparently not necessary.) Air units also need to have an adequate movement rate. Specifically, the movement rate should be ≥ the # of squares between the airlift destination and the nearest Gallic city hosting the Ambush unit. Otherwise, ambushes will never occur.

I doubt you want Ambush units carelessly attacking Roman units. My recommendation is to give them an attack value of 0. That way they can't attack the Romans, but they'll still be able to intercept forced marches. Let's hope the AI doesn't disband these units or send them aimlessly into Germania!

EDIT: I see that no ambush units are situated in the Gallic cities at the beginning of the scenario. Since the AI probably won't build any if their attack value is 0, one option is to manually place 1-2 Ambush units in each city. I decided to give the ambush units a movement rate of 10 and an attack value of 0 , and fortunately they appear to stay within their home city instead of wandering off.
 
Last edited:
Top Bottom