Results 1 to 15 of 15

Thread: Movement Points & Terrain

  1. #1

    Default Movement Points & Terrain

    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.

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,149
    Blog Entries
    36

    Default Re: Movement Points & Terrain

    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.










  3. #3

    Default Re: Movement Points & Terrain

    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

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,149
    Blog Entries
    36

    Default Re: Movement Points & Terrain

    Nothing like this exists for the strat map, movement is all the same, only the battle map has movement modifiers..










  5. #5

    Default Re: Movement Points & Terrain

    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

  6. #6

    Default Re: Movement Points & Terrain

    Quote Originally Posted by Gigantus View Post
    Nothing like this exists for the strat map, movement is all the same, only the battle map has movement modifiers..
    Are you sure about that? Just did a quick test and in bare_geomod moving one tile (not diagonaly) costs 9.9 on grass and 12.6 points on hills

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,149
    Blog Entries
    36

    Default Re: Movement Points & Terrain

    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.
    Last edited by Gigantus; August 14, 2021 at 09:03 AM.










  8. #8

    Default Re: Movement Points & Terrain

    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.

  9. #9
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,149
    Blog Entries
    36

    Default Re: Movement Points & Terrain

    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.










  10. #10

    Default Re: Movement Points & Terrain

    Quote Originally Posted by Gigantus View Post
    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.
    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.

  11. #11
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,149
    Blog Entries
    36

    Default Re: Movement Points & Terrain

    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.
    Last edited by Gigantus; August 14, 2021 at 10:29 AM.










  12. #12

    Default Re: Movement Points & Terrain

    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?

  13. #13

    Default Re: Movement Points & Terrain

    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

  14. #14

    Default Re: Movement Points & Terrain

    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:

    Code:
    require('myconfigs')
    require('Character_MP_Ground')
    
    function onCharacterSelected(character) --exports namedCharacter
        CharMPTester(character)
     
    end
    in luaPluginScript.lua and
    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
    in Character_MP_Ground.lua, which is imported to the luaPluginScript.lua file by using the require command.
    Last edited by Mountainhouzhe; August 14, 2021 at 01:45 PM. Reason: Added Tests

  15. #15

    Default Re: Movement Points & Terrain

    Quote Originally Posted by Mountainhouzhe View Post
    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:

    Code:
    require('myconfigs')
    require('Character_MP_Ground')
    
    function onCharacterSelected(character) --exports namedCharacter
        CharMPTester(character)
     
    end
    in luaPluginScript.lua and
    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
    in Character_MP_Ground.lua, which is imported to the luaPluginScript.lua file by using the require command.
    Nice job, if you wanna get real fancy make an actual little menu and not just print it to the console
    Edit: Possible Roads multiplikators:
    1.0 0.75 0.60000002 0.5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •