Overlord Scenario Playtest Thread

Status
Not open for further replies.
I'm assuming this is an actual bug with the extra cities and units patch of ToTPP...I guess if someone wishes to, they could try and replicate the crash in a different scenario on the same map, like Imperialism III?

Boosting the playert land unit count over 700 units with the Shift F1 cheat, and see what happens...? If it gives the "Goto key" crash, then it is a bug for sure.
 
I loaded a save from Imperialism III, which had a fully-developed German empire, and around 713 units. I added more units and pressed "G" at every 25 or so.

No crash. Even when the civ had 850 units, still no crashes. So it leads me to think it is something esoteric in the rules of the Overlords scenario...

I am wondering if it is due to a lot of expensive buildable units like the Atom Bomb and Super BB, both with 800 shields...
Perhaps these big numbers have an unforeseen effect on the game. Or it might be something to do with the amount of cities...

At this stage, I am really wondering if the Overlord base save file and scn file are corrupted with info from previous ToTPP versions...

Not sure how to fix it, if that is the case...
 
If any of you guys would like to install this latest build of the scenario and test, I'd be grateful.
I have a zip of Overlords currently, including the crashy save (the files are safe to use)...

Can you install, load the save, select a land unit, and hit "g", then tell me what happens?

I've been poking around some more.

Loading that save, if I select a unit on St. Helena (landmass 63), and press G, I get a proper Goto menu. If I place a unit in Japan (landmass 28), I get a proper goto menu also. A few other tests on smaller landmasses also yield proper menus.
 
From the TOTPP thread:
@CurtSibling

I think your error is the result of the game trying to create a selection menu that has too many entries.

I get the same error (except with "data: XX XX" different) in a brand new game without the cities and units patch enabled, if I create a stack of 500 units and then try to select one.

I also got the same error on a first or second turn save in Overlords after using Lua to transfer all landmass 1 cities to the Americans, and then pressing G for goto.
 
Try starting a new game, pressing G for a unit on Landmass 1, and press the 'all players' button. That gives me a crash also, and is consistent with the hypothesis that this is a result of trying to make a menu with too many entries.
 
Here is the saved game you provided, except that I've used Lua to randomize the "landmass" of all the tiles under the cities. Goto doesn't appear to crash on the units I tried before (but, of course, it is a bit useless now).
 

Attachments

  • randomLandmass.sav
    852.1 KB · Views: 30
It looks like you can have 240 'eligible' cities to go to, but 241 causes a crash. I tested several times, and got the same result. It is a bit of an odd number. I was expecting something right around 255, since the game programmers never expected you to have more than that anyway.

I haven't tested the unit limit, but it is higher. I suppose in the unpatched game, you don't get a cycling menu anyway.

Interestingly, giving all 773 cities airbases and German ownership didn't cause a crash during airlift selection.
 
Thanks for investigating this, @Prof. Garfield - You have shed definite light onto this mystery. :)

I tried the actions you recommended, and yes, "goto" works on places like UK/Ireland, but the crash happens on Africa/Eurasia.

I am wondering the best way forward...
Your Lua landmass solution to trick the CIV2 game into having randoms...It's inspired. Do you think that is the most feasible method to get around the CTD?

I plan to use Lua for this scenario, I'm thinking having the "turn 1" test-save (It's the basic save I use to make the scenario file) Lua-edited in such a manner will overcome this bug.

I am of course, open to any suggestions.
 
FYI, you can use the Lua Console to make changes to your game without using Lua Events, so you don't have to use Lua events just because you follow these instructions.

What I recommend is dividing your map up into "continents", and giving each continent its own landmass. You'll have 63 of them to play with. This will mean that caravan payouts are doubled between continents, but you already have various separate islands anyway, event if America and AfroEurasia share the same continent number.

Extract the contents LandmassChange.zip into the lua folder in your test of time directory. If you already have any of these files there, replacing them with the newer versions will be fine.

We'll now use a couple scripts to define and change polygons.

Open cheat mode, and press CTRL+SHIFT+F3 to open the lua console.
1CtrlShiftF3.png

Press Load Script, and select PolygonScript
3PolygonScript.png

Select Tell about polygon script for some instructions (I've pasted some of them here.)
4TellAboutPolygonScript.png

5KKey.png

6Backspace.png

Press k to mark the corners of your polygon, then press backspace for a menu
7PrintConstructor.png

Some other options can help you determine if you've chosen the correct vertices for your polygon. Then print the constructor to the console.
8CopyConstructor.png

Highlight the polygon constructor and copy it. (everything after polygon =)
9PasteConstructor.png

Paste the constructor into the changeLandmass.lua file, beside the entry for the landmass you want to set that polygon to. Note: sea tiles won't have their landmass changed, so your polygons don't have to fit the edge of land exactly. Remember to save the file after changing it.
Re-load your saved game (to get rid of the units that were used to mark your polygon corners). Open the lua console again, and load the script changeLandmass.lua
10ChangeLandmass.png

Check the landmasses to make sure the changes took place.

Let me know if you run into difficulties.

EDIT: If anyone else wants to use this, and needs it for a scenario with more than one map, let me know. I realised that it might not work as intended for multiple maps, but I won't bother fixing it unless there is a need for it.
 

Attachments

  • LandmassChange.zip
    25.2 KB · Views: 31
Excellent stuff.
I am into trying out this re-assigning landmass experiment...I will let you know how it progresses.

If I cannot get this to work, my solution would be to remove some cities, or assign them to the barbs. I will still use Lua for restricting city production, etc.
 
I followed the instructions up to loading the script, and am unsure what is needed to make the "K" command have an effect?

Do I select areas on the map with the CIV2 cursor and press "K" to demark out new continent areas, and assign them with "Backspace"?

I am not getting any response when pressing "K"...Sorry for my rookie Lua ignorance here!
 
Also the console gives this message:

N:\CIV2 TOT\lua\PolygonScript.lua:73: attempt to index a nil value (field 'scen')
stack traceback:
N:\CIV2 TOT\lua\PolygonScript.lua:73: in main chunk

Make sure you have the Lua events patch enabled. The script technically creates a key press 'event' that will remain until you load a game again. I get the same error when I disable the patch. What I meant about not needing lua events is that you don't need a file called events.lua in your scenario's directory.

I followed the instructions up to loading the script, and am unsure what is needed to make the "K" command have an effect?

Do I select areas on the map with the CIV2 cursor and press "K" to demark out new continent areas, and assign them with "Backspace"?

I am not getting any response when pressing "K"...Sorry for my rookie Lua ignorance here!

If the script is working properly, pressing 'k' will create a barb unit to mark out a corner of the polygon. You may need to reveal the entire map to see it. But, it probably won't work unless you fix the above error.
 
Is there any recommended method to laying down the barb poly markers? Should they be side by side?

You only need the 'corners', but they have to be laid out in order, as if you were drawing the polygon without raising your pen. Now that I think about it, your polygon can't cross the 'date line,' which I suppose creates a bit of a problem for you. I'll look into fixing it.

One of the backspace options is to fill in the polygon, so you can see exactly what tiles are covered and not covered.
 
This changeLandmass.lua file will now provide you with a function
Code:
setLandmassNumber(xMin,xMax,yMin,yMax,landmass)
that you can use to change the landmass of non-ocean tiles. This should let you fill in any 'gaps' near the dateline.

To set 22 as the landmass of all tiles with x values at least 10 and not more than 25, and y values at least 30 and not more than 50, you would write this code into the console:

Code:
setLandmassNumber(10,25,30,50,22)

You can't cross the dateline with this either, but you would just split it into 2 commands, with one having xMax 287, and the other having xMin as 0.

If you're using the Lua Template already, open events.lua and replace the line (probably line 29)
Code:
gen.noGlobal()
with
Code:
--gen.noGlobal()
If you're not using the lua template yet, then don't worry about this part.
 

Attachments

  • changeLandmass.lua.zip
    989 bytes · Views: 28
I'll try and process this and make it work - I'm a programming newb, so I expect to make a mess before getting anywhere. :)

If I get you right, our hope is to break up the map's land masses into "areas" that will have their own lists of cities, so the "goto" menu won't overload.

That is my aim, before moving forward on any other area of the scen.
 
Getting my head around the poly system, and have an odd one to report. I started laying down the marker units with "k", I decided to mark out the German area of Europe as my first landmass.

I put down the markers, filled with interior units, and the filler units sort of worked, but also spread across the entire map to the USA and across to China!

weird1.png

Not sure if that matters? The sea tiles are not counted, but should lay my "k" marker closer together?
 
Status
Not open for further replies.
Top Bottom