The Spanish Civil War v4 for ToT + ToTPP + Lua - Development Thread

Pablostuka

King
Joined
Mar 27, 2002
Messages
733
Location
Galway, IRL
Do you wanna have files from my current projects using such features (EpicWwiiEuropeTotpp & EmperorIsDead) to have exemples on hand ?

Oh I haven't tried these scenarios yet, have you implemented something like this? BTW, to use the 4 maps I need to start a new Sci-Fi game on premade worlds, correct? Thanks!
 

Dadais

King
Joined
Oct 20, 2010
Messages
659
Location
France
I need to start a new Sci-Fi game on premade worlds
I used this solution on these two projects.
Howether, I remembered from afar using the "Map/Import Map" (next to "Cheat" in the menu bar) to add a second one to the first version of TES Stromcloak Rebellion. Can't remember which kind of game it was through (and it did erase improvements and civilisations stuff from the first map anyway).

Oh I haven't tried these scenarios yet, have you implemented something like this
Those projects are not released yet.
On the other side, rules and graphic files are done, and the climate feature is already lua-built and implemented.

I'm finding these code a little rough, as I'm currently improving my code nomenclature with the upgrade of the TES scenario, and they are to be raised to that standard.
I also realise that, taking full potential of the added slot to diversify the main lands, your meteo feature structure would be (at least slightly) different than the one I built.

Hoping I'm not too much intrusive there, maybe do you prefer to learn by yourself about a way to build these ideas ?
I kind of forget sometime the pleasure I get from learning and discovering ways of building things that goes into conflict with the pleasure from helping :) . That could lead to an even better code being built for such a purpose too, in the end.
 
Last edited:
Joined
Feb 11, 2012
Messages
818
Hi Pablostuka,

Perhaps I’m misunderstanding what you are asking but adding maps to an existing scenario should not be a difficult task. Here are the steps I normally follow:

Start your scenario and from the 'Map' menu Toggle the Cheat menu and say yes to turn it on...

upload_2022-7-6_10-48-2.png


Click on the Import Map button, which should open a Windows Explorer window
Navigate to the folder where your secondary MP map is, select it and and click open ...
(IMPORTANT: all secondary maps (2, 3, 4) must be the exact same dimensions (height and width) as MAP 1)

upload_2022-7-6_10-49-35.png


A 'Building World' pop up window should appear in the middle of the screen for a few seconds and then in the top right corner you should see that your new map has been added

upload_2022-7-6_11-0-26.png


Note each new map requires it's own set of terrain bmp files:
MAP 1 = terrain1.bmp, terrain2.bmp
MAP 2 = terrain3.bmp, terrain4.bmp
MAP 3 = terrain5.bmp, terrain6.bmp
MAP 4 = terrain7.bmp, terrain8.bmp

In the rules.txt file you will need to have a separate @terrain section for each map:
@TERRAIN
@TERRAIN2
@TERRAIN3
@TERRAIN4

I recommend you review the Scenario League tip on Map Transport Relationships found here and the Secondary Maps article in The Cradle of Civilization website here.

If you are looking for examples, my Vietnam, Battle of Iwo Jima and Napoleon scenarios found here in the Scenario League website all used mulitple maps.

I hope this was useful to you.
 
Last edited:

Pablostuka

King
Joined
Mar 27, 2002
Messages
733
Location
Galway, IRL
@Dadais thanks a lot for the hints, let me give it a try myself first as what I have in mind is slightly different. BTW I loved the timelapse you did with the climate changes, it's amazing! But the weather engine I want to implement, and how it's going to be reflected in the maps, it's different so let me give it a try :) thanks for your help anyway!

@tootall_2012 after reading this thread I thought I couldn't add a new map to an existing scenario, but I'll follow the steps you detailed and will get back to you. If it's as simple as it seems, it will save me much time

Thanks both
 

Pablostuka

King
Joined
Mar 27, 2002
Messages
733
Location
Galway, IRL
Ok I gave it a try @tootall_2012 , apparently it worked, but all other tribe cities disappeared (except their names), do I need to tweak the cities.bmp file or anything else?

upload_2022-7-6_23-12-49.png


They are even gone from the minimap :D

upload_2022-7-6_23-17-23.png


I also temporarily copied terrain1.bmp and terrain2.bmp into the remaining needed files (3,4,5,6,7 & 8), but they seem odd. Do these extra terrain files need additional tweaks?
upload_2022-7-6_23-14-15.png


My files:

upload_2022-7-6_23-15-12.png


Sorry for the silly questions, this is all new to me :)

Thanks
 

Pablostuka

King
Joined
Mar 27, 2002
Messages
733
Location
Galway, IRL
I also added this to my Rules.txt file after @TERRAIN3 :

@SECONDARY_MAPS
6, 0,0, 0,0, 0,0,0,0, 0,0,0, 0,0,0, 0,0,0,
6, 0,0, 0,0, 0,0,0,0, 0,0,0, 0,0,0, 0,0,0,
6, 0,0, 0,0, 0,0,0,0, 0,0,0, 0,0,0, 0,0,0,

And this before the sounds:

@MAP_TRANSPORT_RELATIONSHIPS
0,0 ;0/1
0,0 ;1/2
0,0 ;2/3
0,0 ;3/1
0,0 ;4/2
0,0 ;5/3
0,0 ;6/1
0,0 ;7/2
0,0 ;8/3
0,0 ;9/1
0,0 ;10/2
0,0 ;11/3
0,0 ;12/1
0,0 ;13/2
0,0 ;14/3
0,0 ;15/1

@INITIAL_SETTINGS
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3
0,0,3

But no luck :)
 
Last edited:
Joined
Feb 11, 2012
Messages
818
Are you using more then the basic 11 terrain types? If so did you update your 'NumberOfTerrainTypes' parameters in your @COSMIC2 section in your rules.txt file.

For example in Napoleon both my @TERRAIN and @TERRAIN1 maps use the maximum 16 terrain types allowed by ToTPP (check out item #45 in the ToTPP pdf reference guide as found in the Scenario Creation Excel Sheet thread for more details), therefore I set the value to 16 for both the first two digits below (equal to Map 1 and Map 2):

@COSMIC2
NumberOfTerrainTypes, 16,16,11,11
 

Pablostuka

King
Joined
Mar 27, 2002
Messages
733
Location
Galway, IRL
Are you using more then the basic 11 terrain types? If so did you update your 'NumberOfTerrainTypes' parameters in your @COSMIC2 section in your rules.txt file.

Ha! That was it with the weird terrains in the additional maps, I had this:

NumberOfTerrainTypes, 16

Thanks a lot @tootall_2012 !!

However, the cities are still gone in the main map. I have also noticed something weird, airplanes that are supposed to sit on airfields don't appear as "inside" them, but flying over them, so there's definitely something wrong with the Cities.bmp file, I'll investigate. Maybe I need to add graphics for the transporters...I'll pick the cities file from another scenario with 4 maps and overwrite my graphics on top of it and see if that resolved the issue.

upload_2022-7-7_0-18-57.png
 
Joined
Feb 11, 2012
Messages
818
It’s difficult to know what may be the exact problem without having access to the scenario but have you tried working with different city sprites. As per item #50 of the v0.18 of the ToTPP guide:

50. City sprites: Enables the @COSMIC2 keys "CitySpritesPerTribe" and "CitySpritesPerMap". When enabled with value
1, they override default city/city flag sprites from CITIES.BMP with per tribe/map files.
When only "CitySpritesPerMap" is enabled, sprites are read from CITIESM<m>.BMP (with <m> from 0 to the number of available maps - 1, max. 3);
When only "CitySpritesPerTribe" is enabled, sprites are read from CITIEST<n>.BMP (with <n> from 0 to 7);
When both "CitySpritesPerTribe" and "CitySpritesPerMap" are enabled, sprites are read from CITIESM<m>T<n>.BMP (with <m> and <n> as above).

In your case, you would want to use the CitySpritesPerMap parameter. Again I believe you can check out my Vietnam and Napoleon scenarios as guides how to implement this.
 

Pablostuka

King
Joined
Mar 27, 2002
Messages
733
Location
Galway, IRL
It’s difficult to know what may be the exact problem without having access to the scenario but have you tried working with different city sprites. As per item #50 of the v0.18 of the ToTPP guide:

50. City sprites: Enables the @COSMIC2 keys "CitySpritesPerTribe" and "CitySpritesPerMap". When enabled with value
1, they override default city/city flag sprites from CITIES.BMP with per tribe/map files.
When only "CitySpritesPerMap" is enabled, sprites are read from CITIESM<m>.BMP (with <m> from 0 to the number of available maps - 1, max. 3);
When only "CitySpritesPerTribe" is enabled, sprites are read from CITIEST<n>.BMP (with <n> from 0 to 7);
When both "CitySpritesPerTribe" and "CitySpritesPerMap" are enabled, sprites are read from CITIESM<m>T<n>.BMP (with <m> and <n> as above).

In your case, you would want to use the CitySpritesPerMap parameter. Again I believe you can check out my Vietnam and Napoleon scenarios as guides how to implement this.

Thanks for the hints, I don't want any city in the additional maps (only in the main map) but I'll check this. The weird thing is that only the cities for a particular civ are visible, the rest are "transparent". But not being even visible as dots in the minimap worries me more. I don't think it's about graphics or sprites but something else. In the cheat mode, if I go over a "disappeared" city and "edit city", nothing pop up.

I believe in the end I'll start a new fantasy/sci-game from scratch and import all my data using ProfGarfield's script, my game didn't like these "on the fly" map imports :)

Thanks again
 

Pablostuka

King
Joined
Mar 27, 2002
Messages
733
Location
Galway, IRL
I'll start all over from scratch and import my data, this is not working:

upload_2022-7-7_14-57-9.png


In COSMIC2 section in Rules.txt:

CitySpritesPerMap, 1

And my files:

upload_2022-7-7_14-58-2.png


See how it behaves in-game:

1) In Cheat Mode enabled and playing as Nationalists, I create some units besides a Republican city. Because the units are next to it, I see the city garrison:

upload_2022-7-7_15-1-27.png


2) I attack: until killing the defending troops:

upload_2022-7-7_15-2-2.png


3) I capture the city (what? goodie huts?):

upload_2022-7-7_15-2-33.png


4) The city appears now, but still as Republican (see red color and flag), but with my unit there (what?):

upload_2022-7-7_15-3-46.png


5) if I exit and come back to the city, then the city is captured as normal.

I've tried this with other random cities, the behaviour is slightly different (no goodie hut this time)

1) Same thing, create units beside a city, I see the defending garrison:

upload_2022-7-7_15-8-39.png


2) Attack and kill defenders, and because I still have MP left, my unit moves straight to the city, but it doesn't capture it. Please note it's still under Republican colors and flag (same behavious as before):

upload_2022-7-7_15-9-17.png


3) Leave the city and come back to it, this time it's captured as normal:

upload_2022-7-7_15-11-5.png


I guess this file is corrupted, the goodie huts left me totally confused. Any final ideas before I scrap the .scn file?

Thanks,

Pablo
 

Attachments

  • upload_2022-7-7_15-3-12.png
    upload_2022-7-7_15-3-12.png
    80.3 KB · Views: 7

Dadais

King
Joined
Oct 20, 2010
Messages
659
Location
France
Of course, my previous .scn file (...)

I'm totally confused :)
I've never worked on a .scn file appart from testing last features, gameplay and balance.

Is it the result from using Prof Garfield's script ?

Or from adding a map ?
-the time I did it, I guess all cities and terrain improvements simply got erased. I don't remember about units.
 

Pablostuka

King
Joined
Mar 27, 2002
Messages
733
Location
Galway, IRL
Is it the result from using Prof Garfield's script ?

Or from adding a map ?.

This is the result of importing a map on top of a single map game/scenario. I followed the steps outlined here, but that seems to have broken the cities and some airbases :)

ProfGarfield's script is fine, I already used it in the past to start from scratch on a bigger map without losing all my stuff.
 
Joined
Feb 11, 2012
Messages
818
It's difficult to determine why you are encountering difficulties with your cities.

If I understand correctly, you don't plan on having cities in any of your secondary maps, and it's only after you import your 2nd map that you begin to experience issues with your cities on your primary map (map 1)? I may also have been confused, as I thought you were trying to import the exact same map file as your primary map (terrain, cities and all). Unfortunately, I can't say I've experienced this problem in the past.

If you aren't using different cities graphics fro each map, I don't believe you are required to use the CitySpritesPerMap feature as any city on secondary maps should default to the base cities.bmp file.

You did mention a problem with goody huts. Typically when you import a new map, it's best to go back to each map and from the Cheat - Scenario Parameters menu to 'Wipe All goody boxes' before saving a new version of your base scn file (otherwise as you are experiencing you may find goody huts still present).

Just on a side note, whenever I need to make changes to the base scn file, I always make certain that I don't have the Events file available (either by removing it from the directory or having an extremely basic one that does nothing). This prevents you embedding events as part of your base scn file.
 
Last edited:

Pablostuka

King
Joined
Mar 27, 2002
Messages
733
Location
Galway, IRL
Yeah, I want no cities on additional maps, just different terrain and will use labels to show things. Thanks for the tip on wiping out the goody huts, i've just done that :)

Anyway I'll re-start again on my map using a sci-fi game from scratch, I already did the backup of my game data and it's ready to be imported via the lua console. I'm just tweaking some stuff and adding additional techs I've thought about recently. Thanks for the help!
 

Pablostuka

King
Joined
Mar 27, 2002
Messages
733
Location
Galway, IRL
This is not dead! Given I need to start a fresh scenario file to include the 3 extra maps without getting issues with my cities and airbases, I decided to increase the available techs from 100 to 253 so the players have multiple decisions to take on each turn by playing around with the tech paradigm so each turn (month) players can obtain a couple of relevant techs.

And given that's very boring (thinking of 153 extra historical decisions/facts/reinforcements, etc), I've also been drawing some flags for the tech icons (and borrowing other icons from others, mostly @CurtSibling 's) as I decided to replace all improvement/wonders graphics from v3 of the scenario.

1658159735763.png


At least now some work on the Icons.bmp and Improvements.bmp is done
 
Top Bottom