Hi,
Is het possible to modify the effect that certain strat map terrain has on characters' movement points? In the same way that battle_map_movement_modifiers does, for example.
I'd like to drastically affect movement points in marshes.
Hi,
Is het possible to modify the effect that certain strat map terrain has on characters' movement points? In the same way that battle_map_movement_modifiers does, for example.
I'd like to drastically affect movement points in marshes.
That is only achieved by the 'flood' disaster event - unfortunately it's permanent and region wide plus it prevents building of towers and forts hence it's usually disabled in descr_disasters. Otherwise it's either go or no-go where ground types are concerned.
Only if you have a complete region covered in swamp would it make sense to trigger the flood event via script to get the desired effect.
Is there a list which specifies the calculation for traversing over tiles?
Like traversing a tile which has hills cost 5 Movement points, fertile ground 4 points, roads effect Movement points needed by -1, paved roads by -2.
Something like this.
Does height have any influence?
Best regards
Hmm, I thought, I read for example that the road generation depends on the ground type and when playing in game I always thought it made a difference. But this of cause might be confirmation bias.
I will try some tests in the coming days.
Edit: Found the article about road generation
https://www.twcenter.net/forums/show...AVY&highlight=
Last edited by Mountainhouzhe; August 14, 2021 at 08:12 AM. Reason: Found the article about road generation
Interesting jojo - how did you establish the movement cost?
@mountain - roads give movement bonus in itself along it's placement, it doesn't depend on the ground type the road is on. As GED found out all those years ago the placement of it is dependent on whether the terrain ground type is passable or not.
Thank you for testing Jojo.
About the roads. In the thread he says:
"
Replacing high_mountain with hills lets the road go back to the right. But notice that it follows the edge of the hills instead of going through the middle of it, even right up next to the coast. So we may be able to use either low or high_mountain to set the boundary and then use hills to tweak it later. It looks like its following the shortest route possible and then adjusting for ground type.
"
You can also clearly see this when comparing the first picture and the picture where he adds the hills/swamps.
My guess is that the roads are calculated by a kind of minimal MovementPoint path algorithm, maybe like the pathway finding.
That is possible and would confirm jojo's finding. Just need to know how he got to the numbers to conduct some more specific tests myself. The differences however seem to be too minimal to be of use for your purpose. And there definitely is no file where to set a modifier for it, unlike for the battle map.
I set them to 100.00 and moved one tile and looked what they were afterwards. I think i vaguely remember that there is some calculation going when i was looking at the road bonuses.
You see and set the moventpoints with the Engine Overhaul, its not too difficult to build a little menu in lua where it always shows them/lets you set them for the selected (or a chosen) character.
Never worked with the 'engine overhaul' set up other then from an administrative perspective (when it was first introduced: to confirm that it doesn't alter the executable), so I really have no idea about it's practical application, might take a while to wrap my head around it.
Replicating GED's approach might be an easier way to confirm if different passable ground types have different movement points. The obvious approach would be to set movement points in descr_characters to 100 like you did, place that character on flat ground, change ground types and see where his movement range display ends in each case. Then repeat with gradual ground elevation. Using trade resources every two tiles as distance markers will probably work best to establish range.
Jojo, did you in your works for the Engine Overhaul, come across the structure how these Traversing Movement Points for each Ground Type values are stored in the game?
I think i came across a list of numbers but couldnt exactly match them.
10.0
11.0
11.0
12.0
999.0
15.0
14.0
999.0
13.0
20.0
12.0
8.0
Nice, The twelve numbers would match the 12 land ground types! Yet there are 3 Impassible types, which might be the 999, but there are only 2 of them.
Also your 12.6 and 9.9 number doesnt exactly match, could this be affected by heights? Are the movement points saved as floats or integers?
I have also started making tests with the EOP tool.
For now I didnt test for heights.
So far I found:
Forest:11.7
MiddleFert: 9.9
Wilderness: 10.8, onRoadsLvl1: 8.1
VeryFertile(With farms): 8.8
Swamp: 16
I will later test the remaining ones and check for differences in height.
Also the Movementpoints seems to be calculated for the tile the character moves to and doesnt count the starting one.
I used the following LUA code:
in luaPluginScript.lua andCode:require('myconfigs') require('Character_MP_Ground') function onCharacterSelected(character) --exports namedCharacter CharMPTester(character) end
in Character_MP_Ground.lua, which is imported to the luaPluginScript.lua file by using the require command.Code:function CharMPTester(namedcharacter) --tostring CharStrat = namedcharacter.character CharMP = CharStrat.movepoints CharX = CharStrat.xCoord CharY = CharStrat.yCoord CharMPMult = CharStrat.movepointsModifier nameChar = namedcharacter.fullName print(nameChar , tostring(CharX) , tostring(CharY) ,tostring(CharMP), tostring(CharMPMult) ) end
Last edited by Mountainhouzhe; August 14, 2021 at 01:45 PM. Reason: Added Tests