Results 1 to 10 of 10

Thread: How to add Asturias' abandon mechanics to other factions in AoC?

  1. #1

    Default How to add Asturias' abandon mechanics to other factions in AoC?

    I would like to experiment with the scorched earth approach from Attila in my AoC campaigns with factions other than Asturias.

    I have managed to clone Asturias' trait from effects_bundles_to_effects_junctions in PFM. This shows the trait in the faction selection screen (in addition to a faction's regular traits) but once on the campaign map the option to abandon a settlement ('click to abandon this settlement on the next turn') is not there.

    [note: I tested this with other factions' traits to check I wasn't making mistakes and managed to get them to work, i.e., the danes' no attrition and increased movement were added to Charlemagne and to Mercia, etc)

    I have been exploring the db tables and can't find anything that remotely resembles this ability and after searching up and down the forums I haven't found anything other than mods that do anything other than remove the ability to raze after conquest (when you get the option to loot, occupy, sack and so on) so I'm well and truly stuck.

    What table is it that contains the value that allows abandoning a settlement in regular Attila? Can I clone from there? What value in what table makes Asturias unique? Is it a buildings table that I have missed?

    I really wanted to figure this one out on my own but it's my first go at modding and I'm worse than lost. Could a kind-hearted mod guru please help?

  2. #2

    Default Re: How to add Asturias' abandon mechanics to other factions in AoC?

    No, it have nothing to do with effect bundles. culture_settlement_occupation_options table is what you need.

  3. #3

    Default Re: How to add Asturias' abandon mechanics to other factions in AoC?

    Yep, the effect bundle in this case is only the text that appears in the faction select screen, while the actual mechanics are defined in that other table. Most of the other faction traits of course are actually affected by changing entries in effect_bundles_to_effects_junction.

  4. #4

    Default Re: How to add Asturias' abandon mechanics to other factions in AoC?

    Ok, in culture_settlement_occupation_options I can see cha_occupation_everyone_else gets every option but one(colonise, liberate, loot, occupy, resettle, sack and vassal). Cha_occupation_asturias additionally gets occupation_decision_raze_without_occupy. This is the only one different to the other factions, that I can see.

    Now, I have tried adding raze_without_occupy both to cha_occupation_everyone_else and adding it to a newly created cha_occupation_charlemagne (no idea if this is correct but it doesn't crash the game).

    Is there another option I should use? The only other one I can see pertains to the roman expedition (gift_to_another_faction).

    Thanks for the replies!

  5. #5

    Default Re: How to add Asturias' abandon mechanics to other factions in AoC?

    Just to clarify: neither of the changes I mentioned allows me to abandon my settlements.

    This micro-mod (with only the culture table in it) is the only one active in the mod manager (I even unsuscribed from all my other mods and have already verified my installation).

  6. #6

    Default Re: How to add Asturias' abandon mechanics to other factions in AoC?

    Oh boy, this thing is driving me nuts... it should be a super easy mod but I just can't understand why it won't work.

    Could someone please check my work? Line 61 is the only change I made. I gave the decision to raze_without_occupy to everyone_else. Giving it to specific factions doesn't work either.

    Thanks a bunch for the help!

    abandonAoC.zip

  7. #7
    Foederatus
    Join Date
    Apr 2013
    Location
    Detroit, Michigan
    Posts
    38

    Default Re: How to add Asturias' abandon mechanics to other factions in AoC?

    I know I'm a month late, but this is a scripting thing, not a DB thing. Razing/abandoning is enabled for everyone by default in Charlemagne, but there is a script called button_disabling.lua in charlemagne.pack that disables razing, migrating, and abandoning settlements for all factions except Asturias.

    The relevant code is here:

    function Disable_Migration() output("#### Disabling Migration ####");
    local isAsturiasLocal = cm:model():faction_is_local("cha_fact_asturias");
    output("isAsturiasLocal = "..tostring(isAsturiasLocal));

    if isAsturiasLocal == false then
    ui_state.migration:set_allowed(false);
    ui_state.raze_button:set_allowed(false);
    ui_state.abandon_settlements:set_allowed(false);
    end
    end
    Just import this .lua file into a custom .pack and delete that part, then you should be good to go.

  8. #8

    Default Re: How to add Asturias' abandon mechanics to other factions in AoC?

    Just import this .lua file into a custom .pack and delete that part, then you should be good to go.
    oh my roasted sweet potatoes..! Thank you so very, very much for taking the time to post, DETrooper! Funny thing is...I think I'd already taken a cursory look at that script but the function name threw me for a loop. That's what I get for not reading through the whole thing, heh.

  9. #9

    Default Re: How to add Asturias' abandon mechanics to other factions in AoC?

    Quote Originally Posted by hdiarm View Post
    oh my roasted sweet potatoes..! Thank you so very, very much for taking the time to post, DETrooper! Funny thing is...I think I'd already taken a cursory look at that script but the function name threw me for a loop. That's what I get for not reading through the whole thing, heh.
    Is there an updated pack I can download? I'm a noob when it comes to editing like this. And does this work for AoC Byzantine Expedition mod?

  10. #10

    Default Re: How to add Asturias' abandon mechanics to other factions in AoC?

    Sorry for reviving this thread but I need a similar type of help.

    I wanted to enable raze/abandon on other AoC factions by re-using an old Steam workshop mod that's been removed (but available by Googling: all factions raze mod (Radious and AoC) http://catalogue.smods.ru/archives/23277 ) , so I downloaded and changed by hex editor the bin to pack, and added everything in the pack to another workshop-enabled mod. The raze/abandon seems to work fine, but I noticed some AoC units and buildings enabled for building not according to the normal requirements.

    Looking at the pack db tables included in the mod I took, is there anything superfluous or not needed to be included if all I need is to re-enable raze/abandon for other AoC factions, like building_levels_tables?

Posting Permissions

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