[SCENARIO] Incoherent starting locations with the one precised in the .CivBeyondSwordWBSave file.

arkantoslegrand

Chieftain
Joined
Mar 17, 2024
Messages
1
Hello !
I'm learning how to do my own scenarios and I encounter a pretty weird issue. I'm trying to adapt 4 scenarios (linked with this post) I found for a mod called Earth Enlarged Europe 34 Civs which basically allows all the 34 civs to be played on the same game. So far I managed to add the map contained in these scenarios with random starting points and it works. But then I tried to add all civs with their respective starting points and things got pretty weird. After digging I noticed something strange : for each of these scenarios, the starting points in game is different than the StartingX/StartingY values precised in the files.

I added these 3 lines in the ./Beyond The Sword/Assets/Python/Screens/CvWorldBuilderScreen.py after the "mouseOverPlot" function (line 213) to plot the coordonates of a tile :

szText = "Plot: (%d, %d)" %(CyInterface().getMouseOverPlot().getX(), CyInterface().getMouseOverPlot().getY())
screen = CyGInterfaceScreen( "WorldBuilderScreen", CvScreenEnums.WORLDBUILDER_SCREEN )
screen.setLabel( "WBCoords", "Background", szText, CvUtil.FONT_CENTER_JUSTIFY, screen.getXResolution()/2, 6, -0.3, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )


For instance, for the scenario Earth18AncientAgeCivs, if you take the Romans, the StartingX/StartingY in the file is respectively : StartingX=15, StartingY=46. But when testing in game, their starting points is actually : 23,57.

I dug up a bit more and found something also as strange : the StartingX/StartingY values of the same civilization changes between scenarios' files, but when launched in game the starting location remains actually the same (the correct one), despite being the exact same map. With the Romans for instance :

CIVILIZATION_ROME
Earth18MiddleAgeCivs.CivBeyondSwordWBSave : ('31', '12')
Earth18ModernAgeCivs.CivBeyondSwordWBSave : ('44', '53')
Earth18AncientAgeCivs.CivBeyondSwordWBSave : ('15', '46')


So I really don't understand what's going on here. Does the "StartingX,StartingY" values precised in the "BeginPlayer/EndPlayer" in these scenarios is somehow overrided somewhere and serves no purpose ? How the game find this 23,57 starting point when it's actually 15,46 (or 44,53 / 31,12) precised in the files?

Thank you

EDIT : Embarassing, but actually found the issue. The StartingX,StartingY is indeed overrided in the plots description. See here :

BeginPlot
x=23,y=57
RiverNSDirection=2
isWOfRiver
TerrainType=TERRAIN_GRASS
PlotType=2
BeginUnit
UnitType=UNIT_SETTLER, UnitOwner=16
Damage=0
Level=0, Experience=0
FacingDirection=4
UnitAIType=UNITAI_SETTLE
EndUnit
EndPlot


Really confusing to declare variables if you intend to not use them.
 

Attachments

  • BigEarth18.zip
    348.5 KB · Views: 3
Last edited:
Top Bottom