New Mod "Hex Conquer (Borders Only)"

Discussion in 'Mods Repository' started by usadefcon1, Apr 30, 2020.

  1. Rekk

    Rekk Emperor

    Joined:
    Dec 9, 2017
    Messages:
    1,495
    Part of why water tile capture should be a thing is for claiming access to a channel that you would otherwise be unable to get through in peacetime. Restricting ocean tiles from being capturable hurts this goal.
    On the other hand, can embarked units enter the ocean if you own the territory?
     
  2. Tekamthi

    Tekamthi Prince

    Joined:
    Aug 12, 2016
    Messages:
    575
    This is completely untested as I have not yet installed civ 5 nor VP, but I made some notepad edits to my previous v4 in attempt to achieve the distinction between land/water conquering, as discussed in recent posts.

    @Rekk or others, please let me know if you get a chance to test and your results, ideally with firetuner open and noting any errors. I will try to test on my end asap, though I'm not sure when this will be.

    Assuming this works, one thought for possible future refinement: should amphibious promotion allow land unit to conquer water tiles?
     

    Attached Files:

    Zanteogo likes this.
  3. Martiquin

    Martiquin Chieftain

    Joined:
    Apr 21, 2020
    Messages:
    16
    Gender:
    Male
    This mod works very well, i love the additions you made, big problem however is whenever there is a city adjacent to a city that was razed, the other city would become invisible: upload_2022-6-5_9-15-48.png
     
  4. Tekamthi

    Tekamthi Prince

    Joined:
    Aug 12, 2016
    Messages:
    575
    strange, i've never seen this myself. I've got a game going right now with v4, have had a few cities razed around me but everything's working as expected. Only dif between v4 and v5 should be naval units capturing water tiles. Is it possible there is some other mod affecting razed cities?
     
  5. Martiquin

    Martiquin Chieftain

    Joined:
    Apr 21, 2020
    Messages:
    16
    Gender:
    Male
    yeah sorry, I have tested all of my mods individually now, its not your mod thats making that happen!
     
  6. Tekamthi

    Tekamthi Prince

    Joined:
    Aug 12, 2016
    Messages:
    575
    Okay thanks for update. fyi to anyone following this thread, I did eventually do a brief test of v5 and it seemed fine -- reminder that v5 is not an update to v4 so much as a change in functionality per community request. I prefer v4 personally.
     
  7. Martiquin

    Martiquin Chieftain

    Joined:
    Apr 21, 2020
    Messages:
    16
    Gender:
    Male
    Ok, found out it was a combination of extending the city working distance to 5 tiles and this mod which causes cities near razed cities to disappear. Do you know any way to fix this?
     
  8. Tekamthi

    Tekamthi Prince

    Joined:
    Aug 12, 2016
    Messages:
    575
    My version of this mod (iirc, its been a while since I've looked at this code) checks the razing city's owned tiles and reassigns them to another city that can work them -- in default VP the city can work a distance of 3 tiles, and cities must have 3 tiles between them minimum, ie no cities within another city's workable tiles. I imagine if you have 5 working distance and cities with less than 5 tiles between them, somehow the city tile itself is being affected. That said, I would expect a city tile is not assigned as a workable tile to an entirely separate city so this issue does not intuitively make sense to me.

    Somewhat speculatively, you might eliminate this problem by adjusting minimum distance between cities to match the working distance. Much more speculatively, maybe tweak the lua in this mod to check to ensure the plot being reassigned is not itself a city ie. by adding a "if not [plotVariable]:IsCity() then .... end" to the razing function's tile reassigner. Just a guess.
     
    Last edited: Jun 22, 2022
  9. Martiquin

    Martiquin Chieftain

    Joined:
    Apr 21, 2020
    Messages:
    16
    Gender:
    Male
    I tried injecting it here in the main lua file of the mod:
    if Map.PlotDistance( AssignCity:GetX(), AssignCity:GetY(), lPlot:GetX(), lPlot:GetY() ) < 4 then
    print("reassigning plot belonging to nearly razed city")
    if not [plotVariable]:IsCity() then
    if ourCityAvailable then
    lPlot:SetOwner(-1, -1, false, false)
    end
    lPlot:SetOwner( iAssignPlayer, AssignCity, true, true )
    end
    end

    when i run the game is just crashes on turn 2. :(
     
  10. Tekamthi

    Tekamthi Prince

    Joined:
    Aug 12, 2016
    Messages:
    575
    okay by [plotVariable] i meant that the code update should use whatever name the lua file uses for the plot variable it is dealing with in this loop. Afaik you appear to be in the right place of the file, assuming the rest of your quote is just copy/paste. If this is the case, then the variable name appears to be "lPlot"... so your if statement should read "if not lPlot:IsCity() then..."

    Once the if statement is updated with correct variable name, if its still not working right, run with firetuner and it should pinpoint the line of any lua errors in firetuner output. Assuming you've only added this one new condition as an if statement (or to an existing if statement), then there should be at worst just some minor syntax error.

    However it is unusual for lua mod file, even with bad variable names, to crash the whole game -- its possible there are other issues at play here.
     
    Last edited: Jun 23, 2022
  11. Martiquin

    Martiquin Chieftain

    Joined:
    Apr 21, 2020
    Messages:
    16
    Gender:
    Male
    I fixed the code to what u said and it still crashes :( no idea how to use firetuner after trying it for a few hours.
     
  12. Tekamthi

    Tekamthi Prince

    Joined:
    Aug 12, 2016
    Messages:
    575
    just to make sure, you changed [plotVariable] to lPlot? ie lower case 'L' -- not upper case 'i'?

    theres a tutorial on firetuner somewhere on these forums, you just need the console window really, to see output from mods. You'd have to enable it in a civ 5 config file, but otherwise it shouldn't be that complicated for these purposes.
     

Share This Page